Blank responses via API with BLOCK_NONE set on all categories #331
Labels
component:examples
Issues/PR referencing examples folder
status:awaiting response
Awaiting a response from the author
status:stale
Issue/PR is marked for closure due to inactivity
status:triaged
Issue/PR triaged to the corresponding sub-team
type:help
Support-related issues
Description of the bug:
with the Category filtering turned off entirely via API, certain requests are still "blocked" albeit with the
"finish_reason": "STOP"
still being set and a blank response returned in"text": "```\n"
Returned normally:
blank response returned:
The purpose of our model is actually to assess content given to it and return a JSON response with a disposition of the content given to it for use in chat moderation.
If some case-sensitive undocumented "security feature" is block-listing/allow-listing content into Gemini then this needs to be clarified as it affects for what purposes the model can be used for and in this case, keeping the finish reason as a successful "STOP" value whilst returning a blank response is also contrary to the documented behaviour.
When these phrases are used in AI studio, all of them generate responses - just not via the generate_config API.
Gemini model used:
gemini-1.5-flash-8b
Output example below:
Actual vs expected behavior:
If there is a blocklist/allowlist of terms in addition to the documented security in-place via API then document this and return the correct value for
finish_reason
asSAFETY
instead ofSTOP
to allow developers to handle this correctly instead of having to inspect/validate a string field to deal with this issue.Any other information you'd like to share?
No response
The text was updated successfully, but these errors were encountered: