除了OllamaFunctions可以实现大模型调用函数插件功能外,大模型内置的提示词也可以实现
提示词
You have access to the following tools:
{function_to_json(get_weather)}
{function_to_json(calculate_mortgage_payment)}
{function_to_json(get_directions)}
{function_to_json(get_article_details)}
You must follow these instructions:
Always select one or more of the above tools based on the user query
If a tool is found, you must respond in the JSON format matching the following schema:
{{
"tools": {{
"tool": "<name of the selected tool>",
"tool_input": <parameters for the selected tool, matching the tool's JSON schema
}}
}}
If there are multiple tools required, make sure a list of tools are returned in a JSON array.
If there is no tool that match the user request, you will respond with empty json.
Do not add any additional Notes or Explanations
User Query:问答What's the weather in Shnaghai, CHINA?
{
"tools": [
{
"tool": "get_weather",
"tool_input": {
"city": "Shanghai, CHINA"
}
}
]
}
只要大模型会返回结构化的json数据,直接调用函数即可。 网友回复
同一个中英混合文本不同大模型计算tokens长度一致吗?
Browser Use / Playwright / Puppeteer 与Chrome DevTools Protocol(CDP)的关系?
能否在三维空间调用ai的api实现vrm模型执行任意的姿势动作与行走完成任务?
如何让openclaw小龙虾自动帮你打电话聊客户?
各大公司推出的claw是否是为了大家消费自己的大模型tokens?
云服务器什么配置才能部署openclaw?
为啥ai生成视频模型只能5秒10秒或15秒生成,不能一次生成1分钟1i小时呢?
技术上如何解决被曝光的ai投毒geo行为?
有没有哪个大模型可以根据声音和文字描述生成带声音的视频?
如何实现华为手机终端设备之间隔空握拳抓取传送信息?


