Closed zing75blog closed 1 week ago
I have seen the documentation about the api, but I just want to know if my code is correct?
because from the response it doesn't seem like the claude model and is it possible to use web search parameters in the API?
this is my code:
import requests url = "http://localhost:1337/v1/chat/completions" body = { "model": "claude-sonnet-3.5", "stream": False, "messages": [ {"role": "user", "content": "hello"} ], "provider": "Blackbox", "web_search": True } json_response = requests.post(url, json=body).json().get('choices', []) for choice in json_response: print(choice.get('message', {}).get('content', ''))
Could you please clarify why you believe it is not a Claude model? Additionally, the web_search option is not currently supported in the API.
sorry this was my mistake now the sonnet model is working fine
I have seen the documentation about the api, but I just want to know if my code is correct?
because from the response it doesn't seem like the claude model and is it possible to use web search parameters in the API?
this is my code: