import request from "@/api/request.js";
const INTELLECTUAL_API = "/intelligent-api";

export class IntelligentResultWrapper<T> {
	result: T;
	status: string;
}
export class TextEntity {
	text_span: string;
	type: string;
}
// 智能化：提取文本实体
export function extractTextEntity(text: string): Promise<IntelligentResultWrapper<TextEntity[]>> {
	return request({
		url: `${INTELLECTUAL_API}/extract-entity`,
		method: "POST",
		data: {
			text
		}
	});
}
