Add internet search capability to all models. There are two ways to enable this feature, and you can choose either one:
1.
Append -web-search to the model suffix, e.g., gpt-3.5-turbo-web-search (convenient for third-party software)
2.
Include the parameter "web-search": true in the model request, as shown in the example (convenient for API usage)
Note: If the model suffix includes -web-search but "web-search" is set to false, the internet search functionality will also be disabled.(Can be used together with -ocr, e.g., deepseek-r1-ocr-web-search)
Supported Parameters: search-service: Search service provider
search-include-sites: Whitelist for search (not supported by Bocha)
["arxiv.org", "paperswithcode.com"]
search-exclude-sites: Blacklist for search (not supported by Bocha)
["arxiv.org", "paperswithcode.com"]
*The principle behind this feature is: Before each request, keywords are extracted from the user's conversation, followed by a search. The results from the search engine are then incorporated into the model's context as reference information. The detailed process can be viewed in the logs during API calls.Price: Original model cost + search API fees
{"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}}