search_domain_filter issues #117
-
saw a q about this arg not working below, but want to flush it out. seeing:
is search domain filter only supported for post request? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 4 replies
-
The OpenAI API doesn't know anything about Perplexity's parameters. If you are ever using the OpenAI API for another API, and the other API has unique parameters, you have to pass them in response = client.chat.completions.create(
model="sonar-pro",
messages=[
{
"role": "user",
"content": "What is the most recent version of Python?"
}
],
extra_body={"search_domain_filter": ["-python.org"]},
) We know this works as well because you can use their search recency filter this way and the citations are correctly filtered ( But I wouldn't bother with search domain filters, as you said the feature doesn't work and it hasn't worked for over a year now. Maybe they plan to support it, but I can't speak for them. |
Beta Was this translation helpful? Give feedback.
The OpenAI API doesn't know anything about Perplexity's parameters. If you are ever using the OpenAI API for another API, and the other API has unique parameters, you have to pass them in
extra_body
.We know this works as well because you can use their search recency filter this way and the citations are correctly filtered (
extra_body={"search_recency_filter": "hour"}
will work).But I wouldn't bother with search domain filters, …