Remove unsupported response_format from Perplexity API call
This commit is contained in:
1 parent
2b355ed9ba
commit
0f2d3583ac
1 file changed
+2
-4
@@ -81,8 +81,7 @@ class PerplexityClient:
|
||||
"""
|
||||
Send a chat request with JSON output.
|
||||
|
||||
Uses response_format={"type": "json_object"} because Perplexity's
|
||||
Sonar models do not support the json_schema response_format.
|
||||
Uses Sonar models do not support the json_schema response_format.
|
||||
Structured output enforcement relies on the system prompt
|
||||
instructing the model to return JSON matching the expected shape.
|
||||
|
||||
@@ -111,8 +110,7 @@ class PerplexityClient:
|
||||
messages=messages,
|
||||
temperature=temperature,
|
||||
max_tokens=max_tokens,
|
||||
response_format={"type": "json_object"},
|
||||
)
|
||||
)
|
||||
|
||||
choice = response.choices[0]
|
||||
content = choice.message.content or ""
|
||||
|
||||
Reference in new issue
Block a user