https://www.boundaryml.com logo
[feat] Image output · Issue #2746 · Boun...
# contributing
s
Proposal(s) for Image-output DX: https://github.com/BoundaryML/baml/issues/2746 @aaronv (BAML)
a
Also CC @Vaibhav (BAML 🐑)
v
now that image gen models are becoming much more common, I can see us wanting to support this!
a
A basic output image type seems doable to me. Inlining them in classes also but that is much trickier and probably lots of corner cases.
v
yea i wonder if we can support top level
image
and
image[]
types
a
Yep that is 100% doable, it is actually similar work to supporting tool call apis
v
or even
image | string
or
(image | string)[]
a
Cause we need to extract more types of blobs from llm api responses and map abck to types
Instead of just parsing
v
yep
s
Yeah, we have very immediate need for it. I'm working around it for now, which is not too hard (see: https://github.com/kemiller/brainpipe-rb/blob/c20ada567fe58f29d4995481296d09ff0af116f1/lib/brainpipe/operations/baml_raw.rb#L73) but first-class support would be awesome