https://www.boundaryml.com logo
🟡 Programmatically obtaining a list of BAML funct...
# questions
z
Is there any way to programmatically get a list of all my BAML functions, optionally including their parameters? Use case is extracting a large set of data points with numerous prompts for a large set of PDF documents. The web interface for the app allows viewing PDFs one by one, and in that UI (context is a single PDF) i want to have a document chat interface where the user can select any of the available BAML functions (aka prompts). Upon selection, the user would be able to run the prompt as defined in BAML, or optionally tweak it and run it. The latter would simply load the interpolated content of the BAML function (essentially prettying up the output of
b.request.<baml_function>(**params)
) into the chat editor, where the user could edit it and send it off as a custom, one-off prompt. Anything baked into BAML (i'm using the python lib) that could help make any of this easier?
a
Hmm have you looked into just having one function and using TypeBuilder?
So you can swap types depending on what user wants to extract