zooski1099
09/30/2025, 7:23 PMgenerated_prompt = b.prompt.FunctionToRun(some_param, other_param=other_param, baml_options={'tb': tb, 'collector': coll})
generated_prompt would be something like an array of parsed prompt components, e.g.
[
{
"role": "system",
"content_type": "text",
"content": "system prompt text"
},
{
"role": "user",
"content_type": "text",
"content": "parsed user prompt text here"
},
{
"role": "user",
"content_type": "pdf_base64",
"content": "<base64_string>"
}
]
I feel like some intermediate format like this has to already exist (what is the content of the Preview tab in the VSCode extension created from?) but just isn't exposed at this point, but I might be way off. Regardless, if something like this isn't planned or in the works, I'm gonna write some gross code that generates something similar from b.request.FunctionToRun(*params).http_request.body.json() . I say gross since it'll be a bunch of hard-coded logic for each provider's specific request format. 🙂Vaibhav (BAML 🐑)
09/30/2025, 7:25 PMzooski1099
09/30/2025, 7:36 PMVaibhav (BAML 🐑)
09/30/2025, 8:51 PMVaibhav (BAML 🐑)
09/30/2025, 8:51 PM