2023-11-10 09:50:58 +08:00
|
|
|
|
FUNCTIONS = [
|
|
|
|
|
{
|
|
|
|
|
"name": "send_message",
|
2023-11-19 21:16:51 +08:00
|
|
|
|
"description": "给用户发送一条消息",
|
2023-11-10 09:50:58 +08:00
|
|
|
|
"parameters": {
|
|
|
|
|
"type": "object",
|
|
|
|
|
"properties": {
|
|
|
|
|
"message": {
|
|
|
|
|
"type": "string",
|
2023-11-19 21:16:51 +08:00
|
|
|
|
"description": "消息内容",
|
2023-11-10 09:50:58 +08:00
|
|
|
|
},
|
|
|
|
|
},
|
|
|
|
|
"required": ["message"],
|
|
|
|
|
},
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
"name": "core_memory_append",
|
2023-11-19 21:16:51 +08:00
|
|
|
|
"description": "向你的核心记忆中添加内容",
|
2023-11-10 09:50:58 +08:00
|
|
|
|
"parameters": {
|
|
|
|
|
"type": "object",
|
|
|
|
|
"properties": {
|
|
|
|
|
"name": {
|
|
|
|
|
"type": "string",
|
2023-11-19 21:16:51 +08:00
|
|
|
|
"description": "需要编辑的记忆部分(persona或human)",
|
2023-11-10 09:50:58 +08:00
|
|
|
|
},
|
|
|
|
|
"content": {
|
|
|
|
|
"type": "string",
|
2023-11-19 21:16:51 +08:00
|
|
|
|
"description": "要写入记忆的内容",
|
2023-11-10 09:50:58 +08:00
|
|
|
|
},
|
|
|
|
|
},
|
|
|
|
|
"required": ["name", "content"],
|
|
|
|
|
},
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
"name": "core_memory_replace",
|
2023-11-19 21:16:51 +08:00
|
|
|
|
"description": "替换核心记忆中的内容。要删除记忆,请将new_content赋值为空",
|
2023-11-10 09:50:58 +08:00
|
|
|
|
"parameters": {
|
|
|
|
|
"type": "object",
|
|
|
|
|
"properties": {
|
|
|
|
|
"name": {
|
|
|
|
|
"type": "string",
|
2023-11-19 21:16:51 +08:00
|
|
|
|
"description": "需要编辑的记忆部分(persona或human)",
|
2023-11-10 09:50:58 +08:00
|
|
|
|
},
|
|
|
|
|
"old_content": {
|
|
|
|
|
"type": "string",
|
2023-11-19 21:16:51 +08:00
|
|
|
|
"description": "替换的字符串,一定要是精确的匹配",
|
2023-11-10 09:50:58 +08:00
|
|
|
|
},
|
|
|
|
|
"new_content": {
|
|
|
|
|
"type": "string",
|
2023-11-19 21:16:51 +08:00
|
|
|
|
"description": "要写入记忆的内容",
|
2023-11-10 09:50:58 +08:00
|
|
|
|
},
|
|
|
|
|
},
|
|
|
|
|
"required": ["name", "old_content", "new_content"],
|
|
|
|
|
},
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
"name": "conversation_search",
|
2023-11-19 21:16:51 +08:00
|
|
|
|
"description": "搜索回忆存储中的内容",
|
2023-11-10 09:50:58 +08:00
|
|
|
|
"parameters": {
|
|
|
|
|
"type": "object",
|
|
|
|
|
"properties": {
|
|
|
|
|
"query": {
|
|
|
|
|
"type": "string",
|
2023-11-19 21:16:51 +08:00
|
|
|
|
"description": "需要搜索的字符串",
|
2023-11-10 09:50:58 +08:00
|
|
|
|
},
|
|
|
|
|
"page": {
|
|
|
|
|
"type": "integer",
|
2023-11-19 21:16:51 +08:00
|
|
|
|
"description": "允许你对结果分页。默认是0(第1页)",
|
2023-11-10 09:50:58 +08:00
|
|
|
|
},
|
|
|
|
|
},
|
|
|
|
|
"required": ["query", "page"],
|
|
|
|
|
},
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
"name": "archival_memory_insert",
|
2023-11-19 21:16:51 +08:00
|
|
|
|
"description": "写入存档记忆。要将写入的内容格式化,以便后续方便查询",
|
2023-11-10 09:50:58 +08:00
|
|
|
|
"parameters": {
|
|
|
|
|
"type": "object",
|
|
|
|
|
"properties": {
|
|
|
|
|
"content": {
|
|
|
|
|
"type": "string",
|
2023-11-19 21:16:51 +08:00
|
|
|
|
"description": "要写入记忆的内容",
|
2023-11-10 09:50:58 +08:00
|
|
|
|
},
|
|
|
|
|
},
|
|
|
|
|
"required": ["content"],
|
|
|
|
|
},
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
"name": "archival_memory_search",
|
2023-11-19 21:16:51 +08:00
|
|
|
|
"description": "搜索存档记忆",
|
2023-11-10 09:50:58 +08:00
|
|
|
|
"parameters": {
|
|
|
|
|
"type": "object",
|
|
|
|
|
"properties": {
|
|
|
|
|
"query": {
|
|
|
|
|
"type": "string",
|
2023-11-19 21:16:51 +08:00
|
|
|
|
"description": "要搜索的字符串",
|
2023-11-10 09:50:58 +08:00
|
|
|
|
},
|
|
|
|
|
"page": {
|
|
|
|
|
"type": "integer",
|
2023-11-19 21:16:51 +08:00
|
|
|
|
"description": "允许你对结果分页。默认是0(第1页)",
|
2023-11-10 09:50:58 +08:00
|
|
|
|
},
|
|
|
|
|
},
|
|
|
|
|
"required": ["query", "page"],
|
|
|
|
|
},
|
|
|
|
|
},
|
|
|
|
|
]
|