ppagent / IOllamaBotOptions
Interface: IOllamaBotOptions
Defined in: src/bot/ollama.bot.ts:6
机器人的实例属性,在创建机器人实例的时候配置
Extends
Properties
apiBase?
optionalapiBase: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?
optionalattachSendMode:"now"|"later"
Defined in: src/bot/basic.bot.ts:28
附件何时上传,now是立即上传,later是用户下次提问的时候上传。立即上传bot会进行响应(私聊或者群聊agent配置非文本消息reply时),later不会马上响应,等提问后再响应。 later模式下,如果用户提问之前服务重启,那么缓存会丢失。 默认later
Inherited from
IBasicBotOptions.attachSendMode
authType
authType:
"token"|"none"|"basic"
Defined in: src/bot/ollama.bot.ts:19
basicOptions?
optionalbasicOptions:object
Defined in: src/bot/ollama.bot.ts:20
name
name:
string
password
password:
string
historyExipresInSeconds?
optionalhistoryExipresInSeconds:number
Defined in: src/bot/basic.bot.ts:22
如果大于0,表示上一次的消息距离现在如果超过了多长时间就清空历史对话重新开始新的对话。默认30分钟。注意dify本身也有会话周期逻辑。这里的逻辑是在dify内增加主动清空逻辑。
Inherited from
IBasicBotOptions.historyExipresInSeconds
instanceName?
optionalinstanceName:string
Defined in: src/instance.base.manager.ts:10
用来区分不同实例的全局唯一key
Inherited from
keep_alive?
optionalkeep_alive:number
Defined in: src/bot/ollama.bot.ts:18
模型在GPU中驻留多久,默认为空
maxAttachCount?
optionalmaxAttachCount:number
Defined in: src/bot/basic.bot.ts:32
默认3张,同dify设置
Inherited from
IBasicBotOptions.maxAttachCount
model
model:
string
Defined in: src/bot/ollama.bot.ts:10
模型名称
onlyText?
optionalonlyText:boolean
Defined in: src/bot/basic.bot.ts:44
是否是纯文本模型,默认false,表示支持多模态。
Inherited from
options?
optionaloptions:object
Defined in: src/bot/ollama.bot.ts:14
Ollama的可选配置
Index Signature
[key: string]: any
subscribeWelcome?
optionalsubscribeWelcome:string
Defined in: src/bot/basic.bot.ts:40
当收到订阅消息时,要对用户说的欢迎词,如果欢迎词以双下划线__开头,表示使用固定词语,如 __欢迎关注!,否则将使用配置的词作为提示词让后端给出欢迎词
可以使用该功能提供对模型能力的介绍。
默认为 “请对用户的使用表示欢迎,并且简单的介绍你自己,重点是你的能力。”
Inherited from
IBasicBotOptions.subscribeWelcome
systemPrompt?
optionalsystemPrompt:string
Defined in: src/bot/bot.ts:31
并不是所有bot都支持自定义prompt,比如agent类的,一般都在agent平台上预置好,或者通过自定义变量传入
Inherited from
tokenOptions?
optionaltokenOptions:object
Defined in: src/bot/ollama.bot.ts:24
in
in:
"query"|"header"
key
key:
string
token
token:
string
tools?
optionaltools:string[]
Defined in: src/bot/bot.ts:35
可调用的工具集的instanceId集合。不是所有bot都支持工具调用。