https://www.boundaryml.com logo
🟡 Using BAML functions without streaming enabled
# questions
e
Hi! Is it possible to use BAML functions without streaming enabled? I'm attempting to use BAML with a custom API for LLMs via work, but running into some issues. In BAML Playground it shows only the
model
and
messages
fields in the
curl
data. However, when I intercept the request & log it, it appears BAML is also adding a
stream: True
field, and then fails due to
Stream ended without response
🙁
v
Yep! You can use: supports_streaming false https://docs.boundaryml.com/ref/llm-client-providers/open-ai
e
Awesome, thank you!! This worked great. Also just another quick question: does BAML's parser expect LLM API responses for
openai-generic
to follow the Response schema that OpenAI has in their docs here? I'm getting a parsing error & I think I may have to modify the response schema for the LLM being passed to BAML https://platform.openai.com/docs/api-reference/responses/create Schema:
Copy code
{
  "id": "resp_67ccd2bed1ec8190b14f964abc0542670bb6a6b452d3795b",
  "object": "response",
  "created_at": 1741476542,
  "status": "completed",
  "error": null,
  "incomplete_details": null,
  "instructions": null,
  "max_output_tokens": null,
  "model": "gpt-4.1-2025-04-14",
  "output": [
    {
      "type": "message",
      "id": "msg_67ccd2bf17f0819081ff3bb2cf6508e60bb6a6b452d3795b",
      "status": "completed",
      "role": "assistant",
      "content": [
        {
          "type": "output_text",
          "text": "In a peaceful grove beneath a silver moon, a unicorn named Lumina discovered a hidden pool that reflected the stars. As she dipped her horn into the water, the pool began to shimmer, revealing a pathway to a magical realm of endless night skies. Filled with wonder, Lumina whispered a wish for all who dream to find their own hidden magic, and as she glanced back, her hoofprints sparkled like stardust.",
          "annotations": []
        }
      ]
    }
  ],
  "parallel_tool_calls": true,
  "previous_response_id": null,
  "reasoning": {
    "effort": null,
    "summary": null
  },
  "store": true,
  "temperature": 1,
  "text": {
    "format": {
      "type": "text"
    }
  },
  "tool_choice": "auto",
  "tools": [],
  "top_p": 1,
  "truncation": "disabled",
  "usage": {
    "input_tokens": 36,
    "input_tokens_details": {
      "cached_tokens": 0
    },
    "output_tokens": 87,
    "output_tokens_details": {
      "reasoning_tokens": 0
    },
    "total_tokens": 123
  },
  "user": null,
  "metadata": {}
}
v
OpenAI generic follows the chat completion
You can swap to OpenAI-responses
e
Ah ok, I see -- I'll give that a shot! Thank you again for quick help 🙂
3 Views