Open Adam-Thometz opened 4 months ago
The Command R models also no longer accept stream
as a parameter.
Opened up a pull request to fix this (https://github.com/langchain-ai/langchain-aws/pull/101).
@Adam-Thometz For ChatBedrock use with the command models, use the converse API, here is some sample code.
params = {
"region_name": "us-west-2",
"model_id": "cohere.command-r-v1:0",
"beta_use_converse_api": True
}
model = ChatBedrock(**params)
response = model.invoke("Hello!")
Running the
ChatBedrock
model with Cohere's new Command R and Command R+ models will throw aValidationException
.When you invoke the following model:
You will get the following error:
This is likely because the new Command R models do not accept "prompt" as an input. It accepts "message". (Source).
This should be refactored to pass in a
message
key instead ofprompt
if Command R or R+ is used.