

让模型能够访问新的功能和数据,以便它们能够遵循指令并响应提示。函数调用(也称为工具调用)为模型提供了一种强大而灵活的方式来与外部系统交互,并访问训练数据之外的数据。本指南将展示如何将模型连接到应用程序提供的数据和操作。
工具调用是指您的应用程序与模型之间通过 API 进行的一系列多步骤交互。工具调用流程主要包含五个步骤:
curl 'https://wanqing.streamlakeapi.com/api/gateway/v1/endpoints/chat/completions' \
-H "Authorization: Bearer $WQ_API_KEY" \
-H 'Content-Type: application/json' \
-d '{
"model": "模型 id/推理点id",
"messages": [
{
"role": "system",
"content": "你是一个 AI 人工智能助手。"
},
{
"role": "user",
"content": "请介绍一下太阳系的八大行星"
}
],
"tools": [
{
"type": "function",
"function": {
"name": "函数名称",
"description": "函数相关描述",
"parameters": {
"properties": {
"arg1": {
"description": "函数参数相关描述",
"type": "string"
},
"argsN": {
"description": "函数参数相关描述",
"type": "string"
}
},
"type": "object"
}
}
},
{
'_comments': '其他函数'
}
],
"stream": false,
"tool_choice" : "auto"
}'
模型系列 | 模型名称 |
KAT Coder 系列 | KAT-Coder-Pro-V1 |
KAT-Coder-Air-V1 | |
KAT-Coder-Exp-72B-1010(仅非思考模式) | |
DeepSeek 系列 | DeepSeek-V3.2-Speciale |
DeepSeek-V3.2 | |
DeepSeek-V3.2-Exp | |
DeepSeek-V3.1-Terminus | |
DeepSeek-V3.1 | |
DeepSeek-R1-0528 | |
Qwen 系列 | Qwen2.5-7B-Instruct |
Qwen3-8B | |
Qwen3-32B | |
Qwen3-30B-A3B | |
Qwen3-235B-A22B-Thinking-2507 | |
Qwen3-VL-235B-A22B-Instruct | |
Qwen3-VL-235B-A22B-Thinking | |
Qwen3-235B-A22B-Instruct-2507 | |
Qwen3-30B-A3B-Instruct-2507 | |
Qwen3-30B-A3B-Thinking-2507 | |
GLM 系列 | GLM-4.6 |
MiniMax 系列 | MiniMax-M2 |
前缀续写中,用户提供希望输出的前缀信息,来让模型基于用户提供的前缀信息来补全其余的内容。 基于上述能力,模型能有更好的指令遵循能力,满足用户一些特定场景的指定格式的问题。
curl 'https://wanqing.streamlakeapi.com/api/gateway/v1/endpoints/chat/completions' \
-H "Authorization: Bearer $WQ_API_KEY" \
-H 'Content-Type: application/json' \
-d '{
"model": "模型 id/推理点id",
"messages": [
{
"role": "system",
"content": "你是一个 AI 人工智能助手。"
},
{
"role": "user",
"content": "请介绍一下太阳系的八大行星"
}
],
"response_format": {
"type": "json_object"
},
"stream": false,
}'
模型系列 | 模型名称 |
KAT Coder 系列 | KAT-Coder-Pro-V1 |
KAT-Coder-Air-V1 | |
KAT-Coder-Exp-72B-1010 | |
DeepSeek 系列 | DeepSeek-V3.2-Speciale |
DeepSeek-V3.2 | |
DeepSeek-V3.2-Exp | |
DeepSeek-V3.1-Terminus | |
DeepSeek-V3.1 | |
Qwen 系列 | Qwen2.5-7B-Instruct |
Qwen3-8B | |
Qwen3-32B | |
Qwen3-30B-A3B | |
Qwen3-235B-A22B-Thinking-2507 | |
Qwen3-VL-235B-A22B-Instruct | |
Qwen3-VL-235B-A22B-Thinking | |
Qwen3-235B-A22B-Instruct-2507 | |
Qwen3-30B-A3B-Instruct-2507 | |
Qwen3-30B-A3B-Thinking-2507 | |
GLM 系列 | GLM-4.6 |
MiniMax 系列 | MiniMax-M2 |