参考这个通用提示词
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"
}
}
]} 网友回复
chrome插件能否实现网页远程控制鼠标选择网页文字滚动网页?
nativescript开发的安卓与ios app应用是原生的吗?
go如何写一个类似redis的nosql数据库让python客户端调用?
php7中为啥无法使用$_SERVER['HTTP_RAW_POST_DATA'] ?
chrome插件能否实现2台电脑的远程协助桌面控制?
python如何通过webrtc网页远程协助控制python运行的电脑?
systemd-nspawn与unshare区别?
Firejail、Bubblewrap沙箱与docker、podman容器区别?
如何访问unshare -n -- python3 -m http.server 8000创建的网站url?
linux中如何限制进程执行非法的系统调用命令,例如reboot 删除等等?


