anerli
08/04/2025, 9:49 PMfunction 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 iteratorVaibhav (BAML 🐑)
08/04/2025, 9:56 PMVaibhav (BAML 🐑)
08/04/2025, 9:56 PMVaibhav (BAML 🐑)
08/04/2025, 9:56 PManerli
08/04/2025, 10:02 PMVaibhav (BAML 🐑)
08/04/2025, 10:03 PMVaibhav (BAML 🐑)
08/04/2025, 10:03 PMVaibhav (BAML 🐑)
08/04/2025, 10:03 PMba11b0y
08/04/2025, 10:07 PManerli
08/04/2025, 10:08 PMba11b0y
08/04/2025, 10:09 PManerli
08/04/2025, 10:10 PMimport { b } from "../src/baml_client";
const stream = b.stream.StreamTest();
for await (const partial of stream) {
console.log(partial);
}anerli
08/04/2025, 10:11 PMba11b0y
08/04/2025, 10:11 PMVaibhav (BAML 🐑)
08/04/2025, 10:11 PMVaibhav (BAML 🐑)
08/04/2025, 10:11 PManerli
08/04/2025, 10:11 PMba11b0y
08/04/2025, 10:12 PManerli
08/05/2025, 2:32 AManerli
08/05/2025, 3:09 AManerli
08/06/2025, 6:13 AMFailed to parse into a response accepted by baml_runtime::internal::llm_client::primitive::google::types::GoogleResponse: {"candidates":[{"content":{"role":"model"},"finishReason":"STOP","index":0}],"usageMetadata":{"promptTokenCount":3244,"totalTokenCount":3266,"promptTokensDetails":[{"modality":"TEXT","tokenCount":3244}],"thoughtsTokenCount":22},"modelVersion":"gemini-2.5-pro","responseId":"rvGSaOX7KcTiqtsPmeuJIQ"}
Caused by:
missing field `parts`anerli
08/06/2025, 8:26 PMts
/**
* Get all open issues for a specific user.
* @param linearUsername The name of the user in Linear.
* @returns A list of open issues assigned to the user, including details like title, creator, creation date, and status.
*/
function listIssuesForUser(linearUsername: string): {
issues: {
id: string;
title: string;
createdAt: string;
creator?: {
id: string;
name: string;
email: string;
};
status: {
id: string;
name: string;
type: string;
};
}[];
} {
if (!linearUsername || linearUsername.trim() === "") {
throw new Error("Linear username must be provided.");
}
// Find the user by their name to get their ID.
const allUsersResponse = listLinearUsers({});
const user = allUsersResponse.users.find(
(u: { name: string; email: string }) =>
u.name.toLowerCase() === linearUsername.toLowerCase() ||
u.email.toLowerCase() === linearUsername.toLowerCase()
);
if (!user) {
throw new Error(`User with name or email '${linearUsername}' not found.`);
}
const userId = (user as { id: string }).id;
// Fetch all issues assigned to this user.
const assignedIssuesResponse = listLinearIssues({ assignee_id: userId });
// Filter for issues that are not in a "completed", "done", or "canceled" state.
// These states typically indicate that an issue is closed.
const openIssues = assignedIssuesResponse.issues.filter((issue: any) => {
if (issue.state && issue.state.type) {
const stateType = issue.state.type.toLowerCase();
returnVaibhav (BAML 🐑)
08/06/2025, 8:27 PMVaibhav (BAML 🐑)
08/06/2025, 8:27 PM-> string type as the return type?anerli
08/06/2025, 8:27 PManerli
08/06/2025, 8:27 PMVaibhav (BAML 🐑)
08/06/2025, 8:27 PMVaibhav (BAML 🐑)
08/06/2025, 8:28 PMVaibhav (BAML 🐑)
08/06/2025, 8:28 PManerli
08/06/2025, 8:28 PMVaibhav (BAML 🐑)
08/06/2025, 8:28 PMSTOP token for a bitVaibhav (BAML 🐑)
08/06/2025, 8:29 PMVaibhav (BAML 🐑)
08/06/2025, 8:29 PManerli
08/06/2025, 8:29 PMVaibhav (BAML 🐑)
08/06/2025, 8:30 PManerli
08/06/2025, 8:42 PM