aj
09/11/2025, 8:45 PMfunction ExtractResume(resume: string) -> Resume {
// Specify a client as provider/model-name
// you can use custom LLM params with a custom client name from clients.baml like "client CustomHaiku"
client CustomOllama
Your response must be valid JSON, and should not include any Markdown formatting or extra text. Only provide the JSON object.
{{ _.role("user") }}
Extract from this content:
{{ resume }}
{{ ctx.output_format }}
"#
}
and it all worked perfectly. But the debugging to get there required me to get the raw curl and get into my terminal even though I was using the extension. Maybe not optimizing for Ollama but at least making the entry point of the example code better for someone testing it out with Ollama, might not be a bad idea. "http://localhost:11434/v1" too with the v1.go tool baml-cli for instance. But it doesn't seem like the VSCode configuration allows for that other than also keeping an install of the baml-cli in the GOBIN.aaronv (BAML)
09/11/2025, 8:51 PMaaronv (BAML)
09/11/2025, 8:51 PMaj
09/11/2025, 8:54 PMcurl -X POST 'http://localhost:11434/v1/chat/completions' ... -d "{
\"model\": \"llama3.2\",
\"messages\": [
{
\"role\": \"system\",
\"content\": \"Extract from this content:\nVaibhav Gupta\nvbv@boundaryml.com\n\nExperience:\n- Founder at BoundaryML\n- CV Engineer at Google\n- CV Engineer at Microsoft\n\nSkills:\n- Rust\n- C++\n\nAnswer in JSON using this schema:\n{\n name: string,\n email: string,\n experience: string[],\n skills: string[],\n}\n\n\"
}
]
}"
{...,"choices":[{"index":0,"message":{"role":"assistant","content":""}, ...}aj
09/11/2025, 8:54 PMVaibhav (BAML 🐑)
09/12/2025, 10:57 AM