Create demo code examples to request Claude 3 models on the Bedrock
Install Boto3 before running the scripts.
pip3 install boto3
This is the script to chat with Claude 3 on Amazon Bedrock. Change the value of "content" at line 9 to what you would like to ask the LLM. Run the script by:
python claude3-text.py
This is the script to get the captions for an image with Claude 3 on Amazon Bedrock. Change the path of the image you'd like to feed at line 44. Change the LLM prompt to instruct how you would like to process the image at line 23, the value of the key "text". Run the script by:
python claude3-image.py
This is the script to get all the available Anthropic models on the Amazon Bedrock. Run the script by:
python modellist.py
This is the script to utilize Claude 3 Opus on Amazon Bedrock to develop a Side-Scrolling browser game, the sample code is based on the Claude 3 Opus examples provided by Amazon Bedrock. The script defines the prompt and generates the source code of the game, users can open the game directly in the web browser. you can refer to this Article to know more about the case.
python modellist.py