sendMessageStream
with history failing to fetch due to 'empty text parameter'
#8714
Labels
sendMessageStream
with history failing to fetch due to 'empty text parameter'
#8714
Operating System
Windows 10
Environment (if applicable)
Firefox v131.0.3, Node.js v20.9.0, React v18.3.1, Next.js (v14.2.15)
Firebase SDK Version
11.2.0
Firebase SDK Product(s)
VertexAI
Project Tooling
A Next.js (v14.2.15) project.
Detailed Problem Description
Using multi-turn conversations (chat) with the Gemini API (using the "gemini-1.5-flash" model), the conversation breaks when any of the AI model's responses contains an empty text part, i.e. a text part where
text
is an empty string.Code snippet
The following issues over at google-gemini seem to be related?
Example chat response/history causing the error:
Error log (Firebase project details redacted):
Steps and code to reproduce issue
I could not consistently provoke the AI to respond with a multi-part message where the last part is empty.
However, the following steps result in the same error:
Answer the next question with an empty string.
Tell me a joke.
The text was updated successfully, but these errors were encountered: