You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
import cohere_aws
import boto3
co = cohere_aws.Client(mode=cohere_aws.Mode.BEDROCK)
message = "Write a LinkedIn post about starting a career in tech:"
response = co.chat(message=message, model_id="cohere.command-r-plus-v1:0", stream=False)
print(response)
Try summarize from cohere_aws. Also doesn't work.
Try BedrockLLM from Langchain, Cohere also doesn't work.
All I need is a code snippet that allows me to use Cohere "cohere.command-r-plus-v1:0" on Bedrock us-east-1 to summarise text. And that seems impossible so far!! I just want to call Bedrock directly without creating an end point.
Appreciate your help.
The text was updated successfully, but these errors were encountered:
Hello, that code snippet works for me. Can you share the error you're getting? Please make sure you're using the latest version of cohere_aws and that you're providing your AWS credentials.
Also, this package is being deprecated. I suggest using the cohere package instead - there's an example for querying Bedrock here. I've just double checked that it works. Again, if it doesn't work for you, please share the error you're getting.
I tried the snippet you shared and is working, thank you. My project is built on Langchain and would be great if you could share a working example in Langchain because there where my problem started. Cohere Bedrock doesn't work on Langchain.
Try this and it doesn't work:
Try summarize from cohere_aws. Also doesn't work.
Try BedrockLLM from Langchain, Cohere also doesn't work.
All I need is a code snippet that allows me to use Cohere "cohere.command-r-plus-v1:0" on Bedrock us-east-1 to summarise text. And that seems impossible so far!! I just want to call Bedrock directly without creating an end point.
Appreciate your help.
The text was updated successfully, but these errors were encountered: