================================== Ai Message ==================================
The result of 1 + 1 is 2.
复制代码
二、LLM服务
从LLM服务的后台日志,查看Agent调用tool的流程;
1、第一次调用LLM
当客户端输入 “1+1”时,LLM服务端接受的输入,如下:
prompt: '<|im_start|>system\n# Tools\n\nYou may call one or more functions to assist with the user query.\n\nYou are provided with function signatures within <tools></tools> XML tags:\n
<tools>\n{
"type": "function",
"function": {
"name": "add",
"description": "add two int number",
"parameters": {
"properties": {
"a": {
"type": "integer"
},
"b": {
"type": "integer"
}
},
"required": ["a", "b"],
"type": "object"
}
}
}\n</tools>
\n\nFor each function call, return a json object with function name and arguments within <tool_call></tool_call> XML tags:\n
prompt: '<|im_start|>system\n# Tools\n\nYou may call one or more functions to assist with the user query.\n\nYou are provided with function signatures within <tools></tools> XML tags:\n<tools>\n
{
"type": "function",
"function": {
"name": "add",
"description": "add two int number",
"parameters": {
"properties": {
"a": {
"type": "integer"
},
"b": {
"type": "integer"
}
},
"required": ["a", "b"],
"type": "object"
}
}
}\n
</tools>\n\nFor each function call, return a json object with function name and arguments within <tool_call></tool_call> XML tags:\n