How do I enable structured output from LLM? #8460
-
I'm looking for a solution that allows me to enforce a structured output in a pipeline. Is there a built-in function available, similar to what LangChain offers? https://python.langchain.com/v0.1/docs/modules/model_io/chat/structured_output/ Actually the openai provides an offical feature as well. |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 1 reply
-
Hi @eric-easyhealth. Currently, we don't have an interface for structured outputs but their is an open issue for this topic. Meanwhile, here are some helpful resources that implement structured outputs in Haystack: |
Beta Was this translation helpful? Give feedback.
-
Thank you, @Amnah199. Both solutions work for me before an official method is available. |
Beta Was this translation helpful? Give feedback.
Hi @eric-easyhealth. Currently, we don't have an interface for structured outputs but their is an open issue for this topic. Meanwhile, here are some helpful resources that implement structured outputs in Haystack: