注意:如果模型后缀加了-web-search但是"web-search"为false,联网搜索功能也将会关闭
(可以和-ocr一起用,例如deepseek-r1-ocr-web-search)
支持列表:
search1api(默认)
tavily
exa
bochaai
默认为10,可选范围1-20
["arxiv.org", "paperswithcode.com"]
["arxiv.org", "paperswithcode.com"]
top_p
但不是两者。temperature
但不是两者。{
"model": "gpt-3.5-turbo-web-search",
"search-service":"search1api",
"web-search":true,
"messages": [{"role": "user", "content": "2025年美国总统是谁"}]
}
curl --location --request POST 'https://api.302.ai/v1/chat/completions' \
--header 'Accept: application/json' \
--header 'Authorization: Bearer ' \
--header 'Content-Type: application/json' \
--data-raw '{
"model": "gpt-3.5-turbo-web-search",
"search-service":"search1api",
"web-search":true,
"messages": [{"role": "user", "content": "2025年美国总统是谁"}]
}'
{
"id": "chatcmpl-123",
"object": "chat.completion",
"created": 1677652288,
"choices": [
{
"index": 0,
"message": {
"role": "assistant",
"content": "\n\nHello there, how may I assist you today?"
},
"finish_reason": "stop"
}
],
"usage": {
"prompt_tokens": 9,
"completion_tokens": 12,
"total_tokens": 21
}
}