Gemini 1.5 pro v1beta chat-api Response was blocked due to OTHER #106
Labels
component:other
Questions unrelated to SDK
status: awaiting user response
Awaiting a response from the author
type:bug
Something isn't working
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
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, }, ];
const apiVersion = 'v1beta';
const generationConfig = { temperature: 0.9,};
Specifications
The text was updated successfully, but these errors were encountered: