-
Notifications
You must be signed in to change notification settings - Fork 344
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
TypeError: Additional kwargs key total_tokens already exists in left dict and value has unsupported type <class 'decimal.Decimal'>. #620
Comments
Below is the stack trace:
|
I have also raised the issue on langchain repo langchain-ai/langchain#29042 |
The usage data in the metadata for the last successful message is as below:
|
Hi @azaylamba , Are you able to reproduce it consistently and/or with other models? Note, there is a known issue with long RAG conversations were saving large history causes issues. aws-genai-llm-chatbot/lib/model-interfaces/langchain/functions/request-handler/adapters/base/base.py Line 233 in b9ba6e3
|
Hi @charles-marion , this is reproducible most of the times but not always. But once occurred, it gets reproduced consistently in that particular session. I have not tried with other models yet. I will try the above mentioned change to see if that solves the problem. |
Not encountering the issue after removing |
Getting the above error in case of long conversations while using RAG flow. The issue could be on langchain side as well but not sure.
I am using
anthropic.claude-3-5-sonnet-20240620-v1:0 model
Following are the versions of langchain libraries:
The text was updated successfully, but these errors were encountered: