8.1 函数调用机制
8.1.1 什么是函数调用
8.1.2 函数调用的价值
8.1.3 工作原理
工具定义
{
"name": "get_weather",
"description": "获取指定城市的天气信息",
"parameters": {
"type": "object",
"properties": {
"city": {
"type": "string",
"description": "城市名称"
},
"unit": {
"type": "string",
"enum": ["celsius", "fahrenheit"],
"description": "温度单位"
}
},
"required": ["city"]
}
}模型决策
结果处理
生成响应
8.1.4 主流模型的支持
模型
函数调用支持
特点
8.1.5 调用模式
自动模式
强制模式
禁用模式
8.1.6 并行调用
8.1.7 函数调用与上下文工程
Last updated
