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
from langchain_aws import ChatBedrockConverse
messages = [
(
"system",
"You are a helpful assistant that shapes sentences into poetic form. Translate the user sentence.",
),
("human", "I love programming."),
]
llm = ChatBedrockConverse(
model='us.anthropic.claude-3-sonnet-20240229-v1:0',
temperature=0,
max_tokens=None,
client=bedrock_runtime,
)
print(llm.invoke(messages).content)
I am getting the error:
---------------------------------------------------------------------------
ImportError Traceback (most recent call last)
Cell In[5], line 1
----> 1 from langchain_aws import ChatBedrockConverse
3 messages = [
4 (
5 "system",
(...)
8 ("human", "I love programming."),
9 ]
11 llm = ChatBedrockConverse(
12 model='us.anthropic.claude-3-sonnet-20240229-v1:0',
13 temperature=0,
14 max_tokens=None,
15 client=bedrock_runtime,
16 )
ImportError: cannot import name 'ChatBedrockConverse' from 'langchain_aws' ([/opt/conda/lib/python3.10/site-packages/langchain_aws/__init__.py](https://x4kaivqtuvti2g3.studio.us-east-1.sagemaker.aws/opt/conda/lib/python3.10/site-packages/langchain_aws/__init__.py))
The text was updated successfully, but these errors were encountered:
After installing:
Then, running:
I am getting the error:
The text was updated successfully, but these errors were encountered: