Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix MIME type of webp images #671

Merged

Conversation

evanmiller-anthropic
Copy link
Contributor

This PR contains:

  • New features
  • Changes to dev-tools e.g. CI config / github tooling
  • Docs
  • Bug fixes
  • Code refactor

What is the current behavior? (You can also link to an open issue here)

Webp images are encoded with data:image/png;base64... due to incorrect MIME type resolution. This causes 400 Bad Request errors on Anthropic API endpoints. Related bug: UKGovernmentBEIS/inspect_evals#11

What is the new behavior?

Encode Webp images as image/webp

Does this PR introduce a breaking change? (What changes might users need to make in their application due to this PR?)

No

Other information:

Tested with Mathvista, which includes 4 webp images

@jjallaire-aisi jjallaire-aisi merged commit aa534a7 into UKGovernmentBEIS:main Oct 9, 2024
9 checks passed
@evanmiller-anthropic evanmiller-anthropic deleted the mathvista-webp branch October 9, 2024 11:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants