Closed aaronlim0919 closed 3 months ago
Thanks for reaching out, here is the documentation for invoke_model, and for using Anthropic specifically: https://docs.aws.amazon.com/bedrock/latest/userguide/model-parameters-anthropic-claude-messages.html
As noted there, the anthropic_version
value should be bedrock-2023-05-31
:
anthropic_version – (Required) The anthropic version. The value must be
bedrock-2023-05-31
.
When changing that it worked for me. If you run into any issues let me know. For any documentation feedback on this please use the Provide feedback links at the bottom of the API documentation page, and any updates would get propagated to the SDK docs.
This issue is now closed. Comments on closed issues are hard for our team to see. If you need more assistance, please open a new issue that references this one.
Describe the bug
I am using boto3 to connect
bedrock-runtime
and invoke modelanthropic.claude-3-sonnet-20240229-v1:0
. I've check the available models by usinglist_foundation_models()
, the model id I've used is in the list. However, the error message occur when I execute the code:And this is my implementation:
Expected Behavior
successfully receive the output of anthropic model
Current Behavior
Reproduction Steps
As the implementation above
Possible Solution
No response
Additional Information/Context
No response
SDK version used
1.34.149 (both boto3 and botocore)
Environment details (OS name and version, etc.)
python 3.11.4, macOS