https://www.boundaryml.com logo
🟡 Programmatically modifying ctx.output_format fo...
# questions
a
is there a way to programatically get and/or modify the ctx.output_format ? use case is I want to present a BAML schema as required but actually parse it as if every field was optional, but for dynamic / arbitrary output shapes
v
same requirement
p
Curious why this can't be done with the existing output format? Why not something like
"MyType" | "Other"
and use a catch-all term for the optional types
v
@prraoMy idea is to maintain class/types in BAML as much as possible and avoid using dynamic type builder in external code (Python or TypeScript). If using
other
to reduce the prompt entering the function, dynamic needs to be introduced.