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
Edit: It looks like the image needs to be sent to the model as a uInt8Array but this cannot be sent as part of the REST call. A solution may be to base64 encode the image than convert it in the lambda if it is present. I do think that the Converse API should accept the image as base64 if its encoded in that format already.
Given a proxy lambda behind an api gateway, which is essentially exposed as a REST API - how should the client send an image data? base64?
Since the code just passes through the json body, then it needs to be in the converse format. However I get this error message from the model (in this case its Claude 3.5 sonnet v2):
{
"message": "The model returned the following errors: messages.0.content.1.image.source.bytes: Invalid image input"
}
This is an example payload, I have tried base64 encoding the image and passing it in the bytes field:
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Edit: It looks like the image needs to be sent to the model as a uInt8Array but this cannot be sent as part of the REST call. A solution may be to base64 encode the image than convert it in the lambda if it is present. I do think that the Converse API should accept the image as base64 if its encoded in that format already.
Given a proxy lambda behind an api gateway, which is essentially exposed as a REST API - how should the client send an image data? base64?
Since the code just passes through the json body, then it needs to be in the converse format. However I get this error message from the model (in this case its Claude 3.5 sonnet v2):
This is an example payload, I have tried base64 encoding the image and passing it in the bytes field:
Any idea how an image can be sent via the payload?
Beta Was this translation helpful? Give feedback.
All reactions