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 image_url parameter to match recent OpenAI Docs #1721

Merged
merged 1 commit into from
May 15, 2024

Conversation

kovrichard
Copy link
Contributor

According to the recent OpenAI docs, image_url must be passed the following way to vision models:

{
  "type": "image_url",
  "image_url": {
    "url": f"data:image/jpeg;base64,{base64_image}"
  }
}

See here: https://platform.openai.com/docs/guides/vision/uploading-base-64-encoded-images

I also changed the Claude API route to avoid breaking existing vision models.

I have no access to Gemini Pro Vision, so that is the only vision model I could not test.

kovrichard referenced this pull request May 14, 2024
@mckaywrigley mckaywrigley merged commit d60e1f3 into mckaywrigley:main May 15, 2024
leovvay pushed a commit to kissMyApps-tlm/_KMA_kissmychat that referenced this pull request May 19, 2024
Chr96er pushed a commit to Chr96er/chatbot-ui that referenced this pull request May 26, 2024
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