-
Notifications
You must be signed in to change notification settings - Fork 568
Closed
Labels
Description
Describe the bug
I get an iterable of GenerateResponseChunkData from generateStream but GenerateResponseChunk would be better.
To Reproduce
const llmResponseStream: GenerateStreamResponse = await generateStream({
prompt: `Suggest a complete menu for a ${subject} themed restaurant`,
model: gemini15Flash,
});
for await (const responseChunk of llmResponseStream.stream()) {
console.log(responseChunk.text()); // compiler error
}
But if I add @ts-ignore before the line it compiles and works
Expected behavior
I want to use all of GenerateResponseChunk's useful methods. In fact I think it's required for partial structured output
Screenshots
If applicable, add screenshots to help explain your problem.
Runtime (please complete the following information):
- OS: [e.g. Linux, MacOS]
- Version [e.g. 22]
** Node version
- run
node --versionat paste here
Additional context
Add any other context about the problem here.
Metadata
Metadata
Assignees
Labels
Type
Projects
Status
Done