Describe the Bug
Example code doesn’t take search_mode, OpenAI rejects it
Error: Completions.create() got an unexpected keyword argument ‘search_mode’
Expected Behavior
docs.perplexity.ai/guides/chat-completions-guide
Docs should have working code!
Actual Behavior
Error: Completions.create() got an unexpected keyword argument ‘search_mode’
Working code
I cannot give you working code as you stop me posting >2 links, which includes ANY urls in the code!!! I’m only here because you shut down the api_discussion github
The answer is to use extra_body
extra_body={
"search_mode": "web",
"search_domain_filter": ["government.gov", "nature.com", "science.org"],
"search_recency_filter": "month",
"return_citations": True
}