UNPKG

tmaiplugin

Version:

TrainingMaster AIGC Component

29 lines (28 loc) 880 B
/// <reference types="node" /> import { FaqItem } from "./declare"; import { EventEmitter } from "events"; import { GptBase } from "doomiaichat"; /** * Faq问题的提取器插件 */ export declare class FaqPicker extends EventEmitter { protected gptInstance: GptBase.default | null; /** *构造函数 * @param gpt : 根据配置创建出GPT Instance */ constructor(provider: string, param: any); /** * 从指定的文本内容中生成相关的问答 * @param {*} content * @param {*} count * @param {*} axiosOption * @returns */ execute(content: string, count: number | undefined, everyContentLength: number, axiosOption?: any): Promise<any>; /** * 解析Faq返回的问题 * @param {*} messages * @returns */ protected pickUpFaqContent(messages: Array<any>): Promise<Array<FaqItem>>; }