
Vectorize
连接非结构化数据、评测Embedding与Chunking、持续同步到现有向量数据库,并提供Query Rewrite与Rerank的RAG Pipeline平台。
通过本教程,你将学会使用 Weelinking 提供的 AI API 服务,完成以下任务:
开始操作前,请确保你具备以下条件:
/v1/chat/completions)。https://api.weelinking.com。以下示例使用 curl 调用 GPT-3.5 模型:
curl https://api.weelinking.com/v1/chat/completions \
-H "Content-Type: application/json" \
-H "Authorization: Bearer YOUR_API_KEY" \
-d '{
"model": "gpt-3.5-turbo",
"messages": [{"role": "user", "content": "Hello, world!"}]
}'
YOUR_API_KEY 替换为你在步骤 2 中生成的密钥。{
"id": "chatcmpl-xxx",
"object": "chat.completion",
"choices": [
{
"message": {
"role": "assistant",
"content": "Hello! How can I help you today?"
}
}
]
}
requests 库import requests
url = "https://api.weelinking.com/v1/chat/completions"
headers = {
"Authorization": "Bearer YOUR_API_KEY",
"Content-Type": "application/json"
}
data = {
"model": "gpt-3.5-turbo",
"messages": [{"role": "user", "content": "Hello"}]
}
response = requests.post(url, headers=headers, json=data)
print(response.json())
| 问题 | 可能原因 | 解决方法 |
|---|---|---|
| 401 Unauthorized | API Key 无效或未正确传递 | 检查请求头中的 Authorization 字段,确保格式为 Bearer <完整密钥> |
| 404 Not Found | 接口路径错误 | 确认模型对应的接口路径,例如 /v1/chat/completions 而非 /v1/completions |
| 429 Too Many Requests | 超出速率限制 | 降低请求频率,或升级套餐以获取更高配额 |
| 500 Internal Server Error | 服务端临时故障 | 等待 1-2 分钟后重试,或联系 Weelinking 支持团队 |
| 响应内容为空或错误 | 请求参数格式不正确 | 检查 model 和 messages 字段,确保符合 OpenAI 兼容格式 |







