[PR #151] Fix: Image Format not accepted by OpenAI #185

Open
opened 2026-02-16 08:16:10 -05:00 by yindo · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/langchain-ai/agent-chat-ui/pull/151
Author: @ASchwad
Created: 7/4/2025
Status: 🔄 Open

Base: mainHead: alex/fix-openai-file-format


📝 Commits (3)

📊 Changes

3 files changed (+78 additions, -32 deletions)

View changed files

📝 src/components/thread/MultimodalPreview.tsx (+12 -8)
📝 src/hooks/use-file-upload.tsx (+29 -15)
📝 src/lib/multimodal-utils.ts (+37 -9)

📄 Description

https://stackoverflow.com/questions/78395237/query-azure-openai-with-images

OpenAI APIs require the image_url format for vision capabilities, e.g.:

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

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/langchain-ai/agent-chat-ui/pull/151 **Author:** [@ASchwad](https://github.com/ASchwad) **Created:** 7/4/2025 **Status:** 🔄 Open **Base:** `main` ← **Head:** `alex/fix-openai-file-format` --- ### 📝 Commits (3) - [`dcca810`](https://github.com/langchain-ai/agent-chat-ui/commit/dcca810a9dd5691eed48d15d588776d3b0758d5d) Adjust type - [`3120b29`](https://github.com/langchain-ai/agent-chat-ui/commit/3120b290b908a397c1d8c46df5ec7ebede8a1a6c) Adjust Image Preview - [`807576a`](https://github.com/langchain-ai/agent-chat-ui/commit/807576acf7f53c1d22b45fae50eb85b9723d7ae1) Remove duplicated UI code ### 📊 Changes **3 files changed** (+78 additions, -32 deletions) <details> <summary>View changed files</summary> 📝 `src/components/thread/MultimodalPreview.tsx` (+12 -8) 📝 `src/hooks/use-file-upload.tsx` (+29 -15) 📝 `src/lib/multimodal-utils.ts` (+37 -9) </details> ### 📄 Description https://stackoverflow.com/questions/78395237/query-azure-openai-with-images OpenAI APIs require the image_url format for vision capabilities, e.g.: ``` { "type": "image_url", "image_url": { "url": f"data:image/jpeg;base64,{base64_image}" } } ``` --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
yindo added the pull-request label 2026-02-16 08:16:10 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: langchain-ai/agent-chat-ui#185