https://www.boundaryml.com logo
how do i just do simple string streaming
# kanban-bot-test
b
how do i just do simple string streaming (no semantic streaming, planning to handle on my end)? function StreamTest() -> string { client GeminiPro prompt #" Tell a long story "# } import { b } from "../src/baml_client"; const stream = b.stream.StreamTest(); for (const partial of stream) { console.log(partial); } -> Type 'BamlStream' must have a '[Symbol.iterator]()' method that returns an iterator
well then.. this is a bug.
Here's a simple snippet:
Copy code
function StreamTest() -> string {
  client GeminiPro
  prompt #"
    Tell a long story
  "#
}


import { b } from "../src/baml_client";

const stream = b.stream.StreamTest();

for (const partial of stream) {
  console.log(partial);
}
hello?
Here's my snippet again
Copy code
function StreamTest() -> string {
  client GeminiPro
  prompt #"
    Tell a long story
  "#
}


import { b } from "../src/baml_client";

const stream = b.stream.StreamTest();

for (const partial of stream) {
  console.log(partial);
}
Can you try this?
Copy code
function StreamTest() -> string {
  client GeminiPro
  prompt #"
    Tell a long story
  "#
}


import { b } from "../src/baml_client";

const stream = b.stream.StreamTest();

for (const partial of stream) {
  console.log(partial);
}
b
ba11b0y (via Kanban): Can you try adding await here?
b
yeah this worked!