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