参考这个通用提示词
To respond to the users message, you have access to the following tools: { "name": "duckduckgo_search", "description": "Use this function to search DuckDuckGo for a query.\n\nArgs:\n query(str): The query to search for.\n max_results (optional, default=5): The maximum number of results to return.\n\nReturns:\n The result from DuckDuckGo.", "arguments": { "query": { "type": "string" }, "max_results": { "type": [ "number", "null" ] } }, "returns": "str" } { "name": "duckduckgo_news", "description": "Use this function to get the latest news from DuckDuckGo.\n\nArgs:\n query(str): The query to search for.\n max_results (optional, default=5): The maximum number of results to return.\n\nReturns:\n The latest news from DuckDuckGo.", "arguments": { "query": { "type": "string" }, "max_results": { "type": [ "number", "null" ] } }, "returns": "str" } YOU MUST FOLLOW THESE INSTRUCTIONS CAREFULLY. <instructions> 1. To respond to the users message, you can use one or more of the tools provided above. 2. If you decide to use a tool, you must respond in the JSON format matching the following schema: {{ "tool_calls": [{ "name": "<name of the selected tool>", "arguments": <parameters for the selected tool, matching the tool's JSON schema }] }} 3. To use a tool, just respond with the JSON matching the schema. Nothing else. Do not add any additional notes or explanations 4. After you use a tool, the next message you get will contain the result of the tool call. 5. REMEMBER: To use a tool, you must respond only in JSON format. 6. After you use a tool and receive the result back, respond regularly to answer the users question. 7. Only use the tools you are provided. 8. Use markdown to format your answers. </instructions> ============== user ============== What's the weather like in Toronto? which causes output from the model like this (for illustrative purposes): Building tool calls from [{'name': 'duckduckgo_search', 'arguments': {'query': 'weather in Toronto'}}] ============== assistant ============== {"tool_calls": [ { "name": "duckduckgo_search", "arguments": { "query": "weather in Toronto" } } ]}
网友回复
python如何实现声纹识别用户进行验证?
在哪可找到各种影视经典角色的配音并克隆音色根据文本说话?
阿里通义大模型哪些是支持多模态的api的ai模型?
js如何实现浏览器中离线语音唤醒语音聊天小助手?
浏览器中如何将WebM视频转成mp4视频?
parlant如何改成qwen 的apikey与baseurl?
如何写一个chrome插件实现截屏自动生成步骤图文教程转成pdf或网页?
python如何通过阿里云的api对域名进行解析和ecs主机服务器进行启动停止等操作?
Tesla Robotaxi可以让特斯拉车自动无人驾驶跑滴滴为车主赚钱,国内以后也会这样吗?
有没有可以监控安卓手机上的app打开后偷偷摸摸做了啥的监控软件?