67 lines
3.1 KiB
JSON
67 lines
3.1 KiB
JSON
{
|
||
"id": "conv_tool_system_fixture",
|
||
"title": "工具结果以 system 回传示例",
|
||
"created_at": "2025-11-14T21:08:00",
|
||
"updated_at": "2025-11-14T21:08:00",
|
||
"messages": [
|
||
{
|
||
"role": "user",
|
||
"content": "我正在测试添加文件工具,请在这个文件中随便添加一些内容,不需要阅读\n/users/jojo/desktop/agents/正在修复中/agent_kimi_源码备份_标记有bug版本/project/test_add_file.txt\n"
|
||
},
|
||
{
|
||
"role": "assistant",
|
||
"content": "我来帮你在文件中添加一些内容。"
|
||
},
|
||
{
|
||
"role": "assistant",
|
||
"content": "",
|
||
"tool_calls": [
|
||
{
|
||
"id": "append_to_file:0",
|
||
"index": 0,
|
||
"type": "function",
|
||
"function": {
|
||
"name": "append_to_file",
|
||
"arguments": "{\"path\": \"/users/jojo/desktop/agents/正在修复中/agent_kimi_源码备份_标记有bug版本/project/test_add_file.txt\", \"reason\": \"测试添加文件工具,添加一些随机内容\"}"
|
||
}
|
||
}
|
||
]
|
||
},
|
||
{
|
||
"role": "tool",
|
||
"content": "{\"success\": false, \"error\": \"路径必须在项目文件夹内\"}",
|
||
"tool_call_id": "append_to_file:0",
|
||
"name": "append_to_file"
|
||
},
|
||
{
|
||
"role": "assistant",
|
||
"content": "",
|
||
"tool_calls": [
|
||
{
|
||
"id": "append_to_file:1",
|
||
"index": 0,
|
||
"type": "function",
|
||
"function": {
|
||
"name": "append_to_file",
|
||
"arguments": "{\"path\": \"test_add_file.txt\", \"reason\": \"测试添加文件工具,添加一些随机内容\"}"
|
||
}
|
||
}
|
||
]
|
||
},
|
||
{
|
||
"role": "tool",
|
||
"content": "{\"success\": true, \"awaiting_content\": true, \"path\": \"test_add_file.txt\", \"message\": \"\\n请按照以下格式输出需要追加到文件的完整内容,禁止输出任何解释性文字:\\n<<<APPEND:test_add_file.txt>>>\\n(在此行之后紧接着写入要追加的全部内容,可包含多行代码)\\n<<<END_APPEND>>>\\n若追加完成后仍需继续写入,请再次调用 append_to_file。\"}",
|
||
"tool_call_id": "append_to_file:1",
|
||
"name": "append_to_file"
|
||
},
|
||
{
|
||
"role": "assistant",
|
||
"content": "<<<APPEND:test_add_file.txt>>>\n这是一个测试文件,用于测试添加文件工具的功能。\n这里添加了一些随机的内容,包括:\n- 普通文本内容\n- 列表项\n- 时间戳:2025-10-09 16:13:00\n\n测试完成,文件添加功能正常工作。\n\n<<<END_APPEND>>>"
|
||
},
|
||
{
|
||
"role": "system",
|
||
"content": "[工具结果] append_to_file (tool_call_id=append_to_file:1)\n{\"success\": true, \"path\": \"test_add_file.txt\", \"lines\": 7, \"bytes\": 236, \"forced\": false, \"message\": \"已向 test_add_file.txt 追加 7 行(236 字节)\", \"finish_reason\": null, \"appended_content\": \"这是一个测试文件,用于测试添加文件工具的功能。\\n这里添加了一些随机的内容,包括:\\n- 普通文本内容\\n- 列表项\\n- 时间戳:2025-10-09 16:13:00\\n\\n测试完成,文件添加功能正常工作。\\n\"}"
|
||
}
|
||
]
|
||
}
|