Replies: 2 comments
-
Closing this discussion as #4410 was addressed. |
Beta Was this translation helpful? Give feedback.
0 replies
-
Hello! Reopening this discussion to make it searchable. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hello I am trying to send two attachments to Calude 3.5 sonnet (modelId: nthropic.claude-3-5-sonnet-20240620-v1:0), I cant seem to make this work. I am sending them as follows.
payload = {
"modelId": "anthropic.claude-3-5-sonnet-20240620-v1:0",
"contentType": "application/json",
"accept": "application/json",
"body": json.dumps({
"anthropic_version": "bedrock-2023-05-31",
"max_tokens": 10000,
"messages": [
{
"role": "user",
"content": [
{
"type": "text",
"text": "Explain the diagram from the PDF and sumamrize content from the DOCX attachments"
},
*attachments
]
}
]
})
}
my attachments are created as specified below.
attachments = []
the error is raise error_class(parsed_response, operation_name)
botocore.errorfactory.ValidationException: An error occurred (ValidationException) when calling the InvokeModel operation: messages.0.content.1.image.source: Field required
my invocation is
response = self.bedrock_client.invoke_model(modelId=payload["modelId"], body=payload["body"])
Beta Was this translation helpful? Give feedback.
All reactions