-
Notifications
You must be signed in to change notification settings - Fork 2.3k
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
Reported message length does not match received message length
with langchain/chat_models/bedrock/web
#3236
Comments
🤖 Hello again, @Manouchehri! It's good to see you're continuing to utilize langchainjs. I'm going to dive into this issue reported with |
🤖 The error "Reported message length does not match received message length" typically occurs when there is a mismatch between the expected length of a message and the actual length of the message received. In the context of the The To debug this issue, you could add logging statements in the The expected message length when using the The exact implementation of the If the provider is either "anthropic" or "cohere", it reads the response body in chunks. For each chunk, it decodes the event and checks if it is a valid event chunk. If it is, it decodes the body and checks if there is a message. If there is a message, it throws an error. If there are bytes, it decodes them and prepares the output. It then yields a new If the provider is not "anthropic" or "cohere", it simply prepares the output from the response json and yields a new I hope this helps! If you need further assistance, please provide more specific information about the exact circumstances under which the error occurs. SourcesThis response is meant to be useful and save you time. It is not meant to be a precise solution, but rather a starting point for your own research. Help me be more useful! Please leave a 👍 if this is helpful and 👎 if it is irrelevant. If you want to continue the conversation, start your reply with @dosu-bot. |
When using
BedrockChat
with streaming, I always getReported message length does not match received message length
.Might be releated to #3187.
The text was updated successfully, but these errors were encountered: