Skip to content

[Feature] Support PDFs in input for anthropic #827

@narengogi

Description

@narengogi

What Would You Like to See with the Gateway?

https://docs.anthropic.com/en/docs/build-with-claude/pdf-support
This can be supported with image_url param the same way it is done for bedrock

{
    "model": "claude-3-5-sonnet-20240620",
    "max_tokens": 200,
    "stream": false,
    "messages": [
        {
            "role": "system",
            "content": "Say Hi"
        },
        {
            "role": "user",
            "content": [
                {
                    "type": "text",
                    "text": "what does the following pdf say?"
                },
                {
                    "type": "image_url",
                    "image_url": {
                        "url": "data:application/pdf;base64,UklGRkacAABXRUJQVlA4IDqcAACQggKdASqpAn8BPm0uk0ckIqGqKPWc6UANiWMIcl33AqAiFYn3hHuobjH43nn9X+sxNwI+Ef/H/OG6q1IxXqHLz59fzvDX8p+uf2H+B/d/......"
                    }
                }
            ]
        }
    ]
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions