aws-samples / amazon-bedrock-workshop

This is a workshop designed for Amazon Bedrock a foundational model service.
https://catalog.us-east-1.prod.workshops.aws/workshops/a4bdb007-5600-4368-81c5-ff5b4154f518/en-US/20-intro
MIT No Attribution
1.38k stars 591 forks source link

Amazon Bedrock Workshop - ModuleNotFoundError: No module named 'langchain_aws' #289

Open gideonsergei opened 3 weeks ago

gideonsergei commented 3 weeks ago

To Reproduce Steps to reproduce the behavior (or some version of this):

  1. Go to 04_entity_extraction.ipynb
  2. Cell from langchain_aws import ChatBedrock

llm = ChatBedrock( model_id="anthropic.claude-3-sonnet-20240229-v1:0", model_kwargs={ "max_tokens": 200, "temperature": 0, # Using 0 to get reproducible results "stop_sequences": ["\n\nHuman:"] } )

  1. See error

I'm running in SageMaker Studio Classic; I restarted the Kernel (data sci 3.0) but it didn't clear the error.