79142705

Date: 2024-10-30 20:36:30
Score: 1.5
Natty:
Report link

you are sending the image in base64.

The Conversation api directly accepts the file content in the format you specify.

"messages": [
    {
        "content": [
            {"text": "What is this document?"},
            {"image": {"format": "jpeg", "source": {"bytes": image_content}}}
        ],
        "role": "user"
    }
]

where for example if you take your image from aws S3

file_obj = s3.get_object(Bucket=bucket, Key=key)
image_content = file_obj['Body'].read()
Reasons:
  • Blacklisted phrase (1): this document
  • Has code block (-0.5):
  • Low reputation (1):
Posted by: colomuller91