UNPKG

doomiaichat

Version:

Doomisoft OpenAI

34 lines (33 loc) 914 B
import GptBase from "./gptbase"; export default class AIMiddlePlatform extends GptBase { protected apikey: string; protected agent: { endpoint: string; agentid: string; }; /** * * @param apikey 调用AI中台 的key * @param agent 智能体信息 */ constructor(apikey: string, agent: { endpoint: string; agentid: string; }); /** * 非流式传输聊天请求 * @param chatText * @param callChatOption * @param axiosOption */ chatRequest(chatText: string | any, callChatOption: any, axiosOption?: any): Promise<any>; /** * 流式传输聊天请求 * @param chatText * @param callChatOption * @param attach * @param axiosOption * @returns */ chatRequestInStream(chatText: string | any, callChatOption: any, attach?: any, axiosOption?: any): Promise<any>; }