Gemini API error with empty stopSequences value

Created on 25 January 2025, about 2 months ago

Problem/Motivation

While testing the Gemini provider with the chat explorer, there seems to be a discrepancy between and error and the help text related to the Stop Sequences value.

Error invoking model response: Unable to submit request because it has a stopSequences value of 0 but the supported range is from 1 (inclusive) to 17 (exclusive). Update the value and try again.

Steps to reproduce

Install the module and go to Chat explorer at /admin/config/ai/explorers/chat_generator
The error will appear when the "Stop Sequences" value is empty.
Using for example value "1" works.

Proposed resolution

To me it looks like the help text is correct according to the API documentation https://ai.google.dev/api/generate-content#generationconfig
Need to figure out why the error response message says something different.

Remaining tasks

User interface changes

API changes

Data model changes

🐛 Bug report
Status

Active

Version

1.0

Component

Code

Created by

🇫🇮Finland merilainen

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Merge Requests

Comments & Activities

Production build 0.71.5 2024