-
|
Hi everyone, I noticed an inconsistency when retrieving images between the Chat Platform UI and the Chat API. When images are uploaded or sent in the Chat Platform, they appear correctly when retrieved through the PageIndex interface. However, when accessing the same messages via the Chat API, the response only includes the image description, but the image URL or Base64 representation is missing. What I observed PageIndex retrieval (UI): Image is visible and accessible. Chat API response: Only the image description is returned. Missing: Image URL or Base64 data. Expected behavior an image URL, or the Base64 encoded image data, similar to what is accessible via the platform interface. Is this the expected behavior of the API, or could this be a bug or a missing field in the response? If anyone has experienced this or knows the correct way to retrieve image data from the Chat API, I’d really appreciate the guidance. Thanks! |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
|
Hi @bipin-adh What’s happening
So the API is returning retrieval results, while the UI additionally handles rendering. Where the image data usually is In most RAG-style APIs, images are not embedded directly in the message content. Check the response JSON for fields like:
These often contain references to the original content. Typical retrieval flow
Why images are not returned directly This is usually intentional:
What to check
When it would be a bug Only if:
Suggestion If your use case needs images in the response:
Summary
|
Beta Was this translation helpful? Give feedback.
Hi @Manoj-Gujare , thanks for the detailed analysis.
I managed to get the image base64 url i need along with image description from the pdf having tables, text, formulas and figures.
It was not present in api but when i used mcp of pageindex got the image url as well.Its internally calling get document image tool by passing image path as argument.