Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

generateStream has empty (await response).text #210

Open
6 tasks
handihow opened this issue Jan 13, 2025 · 1 comment
Open
6 tasks

generateStream has empty (await response).text #210

handihow opened this issue Jan 13, 2025 · 1 comment
Assignees
Labels
bug Something isn't working

Comments

@handihow
Copy link

Affected plugin(s)

  • Anthropic
  • Azure OpenAI
  • Cohere
  • Convex
  • Groq
  • Mistral
  • [ x ] OpenAI

Describe the bug
generateStream has empty (await response).text when using OpenAI models

To Reproduce
Steps to reproduce the behavior:

const { stream, response } = await aiInstance.generateStream(
generateConfig
);

for await (const chunk of stream) {
console.log(chunk.text) // works fine
}
const result = await response;
console.log(result.text); // string is empty

Expected behavior
When using Anthropic models or Groq models, the text property on the response is the concatenated string of the chunks as expected

Screenshots

Plugin(s) version:
"genkitx-anthropic": "^0.12.0",
"genkitx-groq": "^0.12.0",
"genkitx-openai": "^0.12.0",
Genkit version:
"genkit": "^0.9.12",

Additional context
Add any other context about the problem here.

@handihow handihow added the bug Something isn't working label Jan 13, 2025
@xavidop xavidop assigned xavidop and Dabolus and unassigned xavidop Jan 16, 2025
@xavidop
Copy link
Collaborator

xavidop commented Jan 16, 2025

@Dabolus can you take a look at this one?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants