-
Notifications
You must be signed in to change notification settings - Fork 169
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
RECITATION Error causes history contains empty parts[], and kills chat session #124
Comments
displays if response.candidates[0].finishReason is not 'STOP' chat session ends if RECITATION or OTHER error received look at: google-gemini/generative-ai-js#124
Any updates on this? As it stands at the current moment, using Gemini Pro 1.5 for RAG-base Q/A with chat history is incredibly unreliable. Simply ask 2-3 questions about a document with some overlap, and you will encounter a I.e, using LangChain:
If you simply ask the model to recite a specific section of a file/PDF twice in a row, you will get a Recitation error GURANTEED (whether you pass the input File in once at the beginning of the conversation, only in the latest message, or as part of every message input is irrelevant). |
I am also getting this error |
We are getting this error all the time trying to create a glossary from documents that we are sanctioned and authorized to use for this purpose. How is GEMINI even useful if this is the results we are getting? Is this google copyright protection gone wrong? |
getting this too |
Is this issue fixed? I tried to trigger RECITATION issue manually, then ask it what's the weather today. It works well?
|
Ok It turned out stream case the issue is harder to occur because stream will always output something. But for non-stream it will 100% occur. I have created a PR #290 |
* Fix the issue #124 * Add changeset change.
Hi @junyanxu thanks for creating a PR. That being said, I too am using stream=False because otherwise the GCP cloud run engine sometimes hangs and doesn't collect the whole response. Also, a side question, is there anyway to configure the model to not refer to external sources.
|
Expected Behavior
after receiving that error,
to be able to continue to chatting, model's last element of history must contain an empty text, such as
Actual Behavior
this error kills chat session
because now last element of history contains empty parts[] as follows
if I continue to chat , always get that error::
GoogleGenerativeAIError: [400 Bad Request] * GenerateContentRequest.contents[3].parts: contents.parts must not be empty
in that line of source code
const result = await chat.sendMessage(prompt);
Steps to Reproduce the Problem
Specifications
The text was updated successfully, but these errors were encountered: