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

Support for the promptFeedback.blockReason in the Gemini streaming output #4235

Closed
xukecheng opened this issue Dec 31, 2024 · 1 comment
Closed
Labels
bug Something isn't working

Comments

@xukecheng
Copy link

Description

During the use of Gemini API, it is possible to encounter a return blockReason.

{
  "promptFeedback": {
    "blockReason": "PROHIBITED_CONTENT"
  },
  "usageMetadata": {
    "promptTokenCount": 12559,
    "totalTokenCount": 12559
  },
  "modelVersion": "gemini-1.5-flash-002"
}

However, it currently seems that there is no way to obtain the blockReason in the streaming output.

Code example

No response

AI provider

https://esm.sh/[email protected]

Additional context

No response

@xukecheng xukecheng added the bug Something isn't working label Dec 31, 2024
@lgrammel
Copy link
Collaborator

lgrammel commented Jan 2, 2025

Duplicates #4236

@lgrammel lgrammel closed this as completed Jan 2, 2025
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

2 participants