baml icon indicating copy to clipboard operation
baml copied to clipboard

first-class support for PDFs

Open sxlijin opened this issue 9 months ago • 5 comments

Add support for PDFs:

  • anthropic now supports passing in PDFs directly (tweet)
  • pretty sure at least one other model provider supports this

sxlijin avatar Feb 28 '25 19:02 sxlijin

For reference, I also created #1499 for this, last week.

alioguzhan avatar Mar 01 '25 19:03 alioguzhan

OpenAI also supports this, but I believe they do it via the Assistants API. I'm not sure how you abstract this functionality, but it would be great to have provider-agnostic direct PDF support.

alioguzhan avatar Mar 01 '25 19:03 alioguzhan

@alioguzhan the way we'd make this provider agnostic is likely by reading in PDFs in BAML itself and by creating a pdf type :)

But in the manehilw, ed like to support the providers that support this directly.

hellovai avatar Mar 02 '25 02:03 hellovai

Hi @hellovai, curious when this will land? We'd like to leverage native PDF support as well.

danielvdao avatar Mar 12 '25 20:03 danielvdao

@hellovai any updates on native pdf support?

randomUser00 avatar May 09 '25 21:05 randomUser00

Does https://github.com/BoundaryML/baml/pull/2121 closes this?

alioguzhan avatar Jul 21 '25 19:07 alioguzhan

yep it is supported now! https://docs.boundaryml.com/ref/baml/types#pdf Version 0.202+

aaronvg avatar Jul 21 '25 19:07 aaronvg