增强标记,对话上下文预处理(预处理后这些标签不会遗留在上下文中)
flag: debug
例子:
<debug />
>>>>>
{
"messages": [
{
"content": "<debug />\n研读书籍,准备明天的测验",
"role": "user"
}
],
"model": "coze",
"stream": false
}
flag: echo
例子:
<echo />
>>>>>
{
"messages": [
{
"content": "<echo />\n研读书籍,准备明天的测验",
"role": "user"
}
],
"model": "coze",
"stream": false
}
<![CDATA[ xxx ]]>
flag: notebook
attribute:
disabled: (bool) 是否禁用,默认false
<notebook />
<notebook disabled />
flag: histories
例子:
<histories>[{"role": "user", "content": "hi!"}]</histories>
>>>>>
{
"messages": [
{
"content": "<histories>[{\"role\": \"assistant\", \"content\": \"了解,请问有什么可以帮到你?\"}]</histories> 你是一个拥有128k上下文token的gpt机器人",
"role": "system"
},
{
"content": "你好",
"role": "user"
}
],
"model": "coze",
"stream": false
}
最终效果
>>>>>
{
"messages": [
{
"content": "你是一个拥有128k上下文token的gpt机器人",
"role": "system"
},
{
"role": "assistant",
"content": "了解,请问有什么可以帮到你?"
},
{
"content": "你好",
"role": "user"
}
],
"model": "coze",
"stream": false
}
flag: tool
attribute:
enabled: (bool) 是否开启toolCall,默认 false
id: (string) 指定tool_function里的name值,默认-1
tasks: (bool) 是否任务拆解,默认 false
使用示例
<tool enabled id="xxx" />
<tool enabled id="xxx" tasks />