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

Gemini 1.5 pro v1beta chat-api Response was blocked due to OTHER #106

Closed
zakcali opened this issue Apr 18, 2024 · 5 comments
Closed

Gemini 1.5 pro v1beta chat-api Response was blocked due to OTHER #106

zakcali opened this issue Apr 18, 2024 · 5 comments
Labels
component:other Questions unrelated to SDK status: awaiting user response Awaiting a response from the author type:bug Something isn't working

Comments

@zakcali
Copy link

zakcali commented Apr 18, 2024

Expected Behavior

I setup all 4 safety settings to HarmBlockThreshold.BLOCK_NONE, I'm expecting a valid response

Actual Behavior

I got error:

sendMessage() was unsuccessful. Response was blocked due to OTHER. Inspect response object for details.
response: { promptFeedback: { blockReason: 'OTHER' }, text: [Function (anonymous)], functionCall: [Function (anonymous)], functionCalls: [Function (anonymous)] }

I'm getting same error both in Google AI Studio, and in my nodejs program using api

note, api call thinks that parameter is illegal, even though I see that category is defined in source code:
{ category: HarmCategory.HARM_CATEGORY_UNSPECIFIED, threshold: HarmBlockThreshold.BLOCK_NONE, },

Steps to Reproduce the Problem

  1. const safetySettings = [ { category: HarmCategory.HARM_CATEGORY_HARASSMENT, threshold: HarmBlockThreshold.BLOCK_NONE, }, { category: HarmCategory.HARM_CATEGORY_HATE_SPEECH, threshold: HarmBlockThreshold.BLOCK_NONE, }, { category: HarmCategory.HARM_CATEGORY_SEXUALLY_EXPLICIT, threshold: HarmBlockThreshold.BLOCK_NONE, }, { category: HarmCategory.HARM_CATEGORY_DANGEROUS_CONTENT, threshold: HarmBlockThreshold.BLOCK_NONE, }, ];
  2. const apiVersion = 'v1beta';
  3. const generationConfig = { temperature: 0.9,};
  4. `const model = genAI.getGenerativeModel({ model: "gemini-1.5-pro-latest" , generationConfig, safetySettings }, {apiVersion});`
    
  5. `const result = await chat.sendMessage("translate following to English: Opere meme Ca tanısıyla izlenen hastada sağ meme mastektomizedir. Mastektomi lojunda belirgin kitle lezyonu saptanmadı.");`
    

Specifications

  • Version: "@google/generative-ai": "^0.7.1",
  • Platform: Windows 10, nodejs v20.12.2 (LTS)
@zakcali zakcali changed the title Gemini 1.5 pro V1beta chat-api Response was blocked due to OTHER Gemini 1.5 pro v1beta chat-api Response was blocked due to OTHER Apr 18, 2024
@caliburn420
Copy link

Yes, also have this Blocked Reason other. Wonder if that's just Google controlling stuff :/

@singhniraj08
Copy link

@zakcali

Thank you reporting this issue. This issues look like more on the API side rather than SDK. For issues related to Gemini API, we would suggest you to use "Send Feedback" option in Gemini docs. Ref: Screenshot below.

image

@singhniraj08 singhniraj08 added type:bug Something isn't working status: awaiting user response Awaiting a response from the author component:other Questions unrelated to SDK labels Apr 24, 2024
@zakcali
Copy link
Author

zakcali commented Apr 28, 2024

I send a feedback in Gemini docs

@singhniraj08
Copy link

@zakcali,
There are some filters that can't be turn off, these all go into the "OTHER" finish reason. For example: one of the non-configurable filters is child safety, which is a legal requirement.

Closing this issue as you have already sent feedback in Gemini Docs. Please reopen this issue with comments or open a new issue if the problem persists. Thank you

@sayhicoelho
Copy link

sayhicoelho commented Oct 2, 2024

@singhniraj08 The Gemini API is completly useless since we can't use it to detect and block such contents in our applications. I'm trying to detect sexual content and hate speech in my chat application using Gemini API and it is useless even if I configure the safety filters.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component:other Questions unrelated to SDK status: awaiting user response Awaiting a response from the author type:bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants