Add Advisor to Automatically Apply Structured Output Formatting #4852
damienmiheev
started this conversation in
Ideas
Replies: 0 comments
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.
-
Currently, to apply a StructuredOutputConverter format to a prompt, I need to manually include a {format} placeholder inside the template and pass it as a variable:
This puts the responsibility on the developer to modify the prompt template just to enable structured output. It would be more ergonomic if the formatting could be applied automatically, e.g., via an Advisor or another abstraction that augments the prompt consistently.
Ideally, the Advisor mechanism could be generalized to support vendor-specific structured response formats (e.g., OpenAI JSON Schema / response format specs) without requiring template placeholders.
Beta Was this translation helpful? Give feedback.
All reactions