ppagent / IXunfeiBotOptions
Interface: IXunfeiBotOptions
Defined in: src/bot/xunfei.bot.ts:4
机器人的实例属性,在创建机器人实例的时候配置
Extends
Properties
apiBase?
optional
apiBase:string
Defined in: src/bot/basic.bot.ts:14
service url
Inherited from
apiKey
apiKey:
string
Defined in: src/bot/basic.bot.ts:18
service key
Inherited from
attachSendMode?
optional
attachSendMode:"now"
|"later"
Defined in: src/bot/basic.bot.ts:28
附件何时上传,now是立即上传,later是用户下次提问的时候上传。立即上传bot会进行响应(私聊或者群聊agent配置非文本消息reply时),later不会马上响应,等提问后再响应。 later模式下,如果用户提问之前服务重启,那么缓存会丢失。 默认later
Inherited from
IOpenAIBotOptions
.attachSendMode
chatOptions
chatOptions:
Omit
<ChatCompletionCreateParamsStreaming
,"stream"
|"messages"
|"audio"
>
Defined in: src/bot/openai.bot.ts:9
Inherited from
clientOptions?
optional
clientOptions:Omit
<ClientOptions
,"apiKey"
|"baseURL"
>
Defined in: src/bot/openai.bot.ts:8
Inherited from
IOpenAIBotOptions
.clientOptions
historyExipresInSeconds?
optional
historyExipresInSeconds:number
Defined in: src/bot/basic.bot.ts:22
如果大于0,表示上一次的消息距离现在如果超过了多长时间就清空历史对话重新开始新的对话。默认30分钟。注意dify本身也有会话周期逻辑。这里的逻辑是在dify内增加主动清空逻辑。
Inherited from
IOpenAIBotOptions
.historyExipresInSeconds
instanceName?
optional
instanceName:string
Defined in: src/instance.base.manager.ts:10
用来区分不同实例的全局唯一key
Inherited from
IOpenAIBotOptions
.instanceName
maxAttachCount?
optional
maxAttachCount:number
Defined in: src/bot/basic.bot.ts:32
默认3张,同dify设置
Inherited from
IOpenAIBotOptions
.maxAttachCount
modelName?
optional
modelName:string
Defined in: src/bot/xunfei.bot.ts:8
优先级高于chatOptions中的模型名称
onlyText?
optional
onlyText:boolean
Defined in: src/bot/basic.bot.ts:44
是否是纯文本模型,默认false,表示支持多模态。
Inherited from
subscribeWelcome?
optional
subscribeWelcome:string
Defined in: src/bot/basic.bot.ts:40
当收到订阅消息时,要对用户说的欢迎词,如果欢迎词以双下划线__开头,表示使用固定词语,如 __欢迎关注!,否则将使用配置的词作为提示词让后端给出欢迎词
可以使用该功能提供对模型能力的介绍。
默认为 “请对用户的使用表示欢迎,并且简单的介绍你自己,重点是你的能力。”
Inherited from
IOpenAIBotOptions
.subscribeWelcome
systemPrompt?
optional
systemPrompt:string
Defined in: src/bot/bot.ts:28
并不是所有bot都支持自定义prompt,比如agent类的,一般都在agent平台上预置好,或者通过自定义变量传入