Skip to content

Messages to allow content as an object for base64 images to use Vision #2

@danielsailes

Description

@danielsailes

Hi, just found this repo & included in my project - noticed that you have restricted content top be a string. Is there a reason behind that?
I've had issues using a basic cURL iteration of a PHP SDK package for Anthropic as it won't format the JSON as a list correctly..

I may try modify it locally to allow an object like below:

['role' => 'user', 'content' => [ [ 'type' => 'image', 'source' => [ 'type' => 'base64', 'media_type' => $image1_media_type, 'data' => $image1_data ], ], [ 'type' => 'text', 'text' => $text ]

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions