This repository was archived by the owner on Jul 22, 2025. It is now read-only.
Replies: 2 comments 1 reply
-
|
Structured outputs are still in closed beta for us. If you want in, please email [email protected] with a long-form description of your use case and anticipated usage volume. |
Beta Was this translation helpful? Give feedback.
1 reply
-
|
We have used ChatPerplexity from LangChain and using with_structured_output fuctionality but somehow its not working but provided in the documentation https://python.langchain.com/api_reference/community/chat_models/langchain_community.chat_models.perplexity.ChatPerplexity.html#langchain_community.chat_models.perplexity.ChatPerplexity.with_structured_output |
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.
-
It would be great if the API support passing a JSON schema that specifies the format the response should conform to, similar to OpenAI. This would make it much easier to programmatically handle messages in API responses as we could have a stronger guarantee that the message is in a well-structured and specific format.
Right now the only way to achieve this is by crafting a very specific prompt, and even so the results are inconsistent. The responses are often wrapped in markdown code blocks and can include invalid JSON.
For example, sending this prompt to the API:
Results in a response with line breaks in the JSON, which are invalid:
{ "text": "Perplexity AI is an AI-powered conversational search engine founded in 2022 by former employees of Google and OpenAI. It aims to democratize access to knowledge by providing concise, relevant, and up-to-date answers to user-generated queries. The platform utilizes large language models (LLMs) such as GPT-4, Claude, and Mistral, along with its own custom models, to search the web in real-time and offer citations and images alongside text responses. This approach distinguishes it from traditional search engines and chatbots, making it a valuable tool for research, fact-checking, and various professional tasks. Perplexity AI has gained significant traction, with over 10 million active users and a valuation of over $1 billion. The company is backed by prominent investors including Amazon, Nvidia, and Databricks. It offers a range of features, including the ability to summarize PDFs, translate files, generate code snippets, and solve math problems. The platform is designed to be user-friendly, providing personalized and interactive search experiences, and it continues to evolve with new capabilities and integrations." }Beta Was this translation helpful? Give feedback.
All reactions