This repository was archived by the owner on Jul 22, 2025. It is now read-only.
Ensuring JSON-Only Responses from Perplexity's Sonar-Pro Model #159
Unanswered
ManthanCitrusbug
asked this question in
Q&A
Replies: 1 comment
-
See the docs: https://docs.perplexity.ai/api-reference/chat-completions#body-response-format You need a higher API tier to access this parameter. For now I am chaining API calls to have a second, smaller, model format the first model's response in to JSON. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I have an answer sheet that I read and pass as input to Perplexity’s Sonar-Pro model via OpenAI’s SDK. The model should:
I am using Perplexity’s base URL in OpenAI’s SDK and need to ensure the response strictly follows this JSON format.
How can I configure my request (parameters, settings, or prompt instructions) to achieve this?
Beta Was this translation helpful? Give feedback.
All reactions