[]
        
立即下载
(Showing Draft Content)

Forguncy.Forguncy.Plugin.CommandExecutor

接口: CommandExecutor

Forguncy.Plugin.CommandExecutor

命令执行器

方法

executeCommand

executeCommand(commands, options): any

执行命令

参数

属性名 类型 说明
commands object[] 命令列表。
options CommandExecuteOptions 执行选项。

返回值

any


openAICallAsync

openAICallAsync(params, abortSignal?): Promise<AIResponse>

调用OpenAI

参数

属性名 类型 说明
params OpenAICallRequestParams 参数。
abortSignal? AbortSignal 取消信号。

返回值

Promise<AIResponse>


openAICallStreamingAsync

openAICallStreamingAsync(params, onMessage, onClose?, onError?, abortSignal?): any

调用OpenAI

参数

属性名 类型 说明
params OpenAICallRequestParams 参数。
onMessage (response: AIResponse) => void 接收消息时回调方法。
onClose? () => void 结束时回调方法。
onError? (e: any) => void 出错时回调方法。
abortSignal? AbortSignal 取消信号。

返回值

any