brokenshaders.xyz
10/15/2025, 9:35 AMFunctionLog {}, I tried both OpenAI and Groq clients :((
Also can't get withOptions to work, I have to parse the options into the function call directly to get the environment variables to set.brokenshaders.xyz
10/15/2025, 9:42 AMts
import type { RequestEvent, RequestHandler } from './$types';
import { b } from "$lib/baml_client"
import { Collector } from "@boundaryml/baml"
import type { Resume } from '$lib/baml_client/types'
export const GET: RequestHandler = async (event: RequestEvent) => {
const collector = new Collector("my-collector")
const env = {
BAML_LOG: "WARN",
OPENAI_API_KEY: "sk-...",
GROQ_API_KEY: "gsk_...",
}
const res = await b.ExtractResume(
"Aaron Sverdlen\n University of California, Berkeley\n B.S. Electrical Engineering and Computer Science",
{ collector, env }
);
console.log(collector.last?.id)
console.log(collector.last?.usage)
console.log(collector.logs)
return new Response(JSON.stringify(res));
};
-->
js
bfcall_01k7kkwt3pew486qw0a6rfjvpx
Usage {}
[ FunctionLog {} ]Vaibhav (BAML 🐑)
10/15/2025, 2:58 PMVaibhav (BAML 🐑)
10/15/2025, 2:58 PMbrokenshaders.xyz
10/16/2025, 6:44 PMjensbodal
10/19/2025, 8:42 AMVaibhav (BAML 🐑)
10/20/2025, 12:36 PM