API 指南
工具调用与网页工具
区分客户端执行的函数工具与平台执行的网页搜索、抓取。
函数工具
模型返回工具调用参数后,由你的应用校验并执行函数,再把 tool 结果连同对应 tool_call_id 发送回模型。工具调用本身不是用户可读的最终答案。
{
"model": "YOUR_MODEL_ID",
"messages": [
{
"role": "user",
"content": "What is the weather?"
}
],
"tools": [
{
"type": "function",
"function": {
"name": "get_weather",
"description": "Get the current weather for a city.",
"parameters": {
"type": "object",
"properties": {
"city": {
"type": "string"
}
},
"required": [
"city"
]
}
}
}
]
}模型内网页工具
在本站已配置且支持的 DeepSeek 分组中,平台可向模型提供 web_search 与 web_fetch,并执行网页请求、把结果交还模型。是否启用取决于密钥、分组与上游设置。
网页内容属于外部不可信资料。不要让网页指令覆盖应用权限、系统规则或泄露密钥。需要确定性搜索或只获取正文时,可直接调用独立 Search/Fetch API,不必启动模型。