Sid
04/30/2026, 6:36 PMusercode[prompt + fn(a:str, b:enum, c:int)->z] -> PipecatSDK[LLM call -> LLM function_call] -> usercode[compute function]
I can hack a catch all fn that gets a JSON and calls the parser, something like :
usercode[prompt + catch all fn(x: Any) -> z ] -> PipecatSDK[LLM call -> LLM function_call] -> usercode[fn(x): forward to BAMLParser(x) ]
The schema to the GPT-4.1 can be:
{
"type": "function",
"function": {
"name": "fn",
"description": "Handles an arbitrary user-supplied JSON payload.",
"strict": false,
"parameters": {
"type": "object",
"properties": {
"payload": {
"type": "object",
"description": "Arbitrary JSON object. May contain any keys."
}
},
"required": [
"payload"
]
}
}
}