Skip to content

UserMessage upload PDF cannot read #4954

@pyy-Yanis

Description

@pyy-Yanis

Please do a quick search on GitHub issues first, there might be already a duplicate issue for the one you are about to create.
If the bug is trivial, just go ahead and create the issue. Otherwise, please take a few moments and fill in the following sections:

Bug description
When I use an LLM model, such as ChatGPT, and upload a PDF document, the media cannot access the resources
Image

Environment
jdk21, spring-ai-1.1.0

Steps to reproduce
Media media = new Media(mediaType != null ? mediaType : MediaType.ALL, new URI(filePath));
Upload a PDF file and then send a question, such as asking what the content of the document uploaded by the large model is. It will respond that no document or image has been uploaded

Expected behavior
For the example above, I hope to retrieve the content from the document

Minimal Complete Reproducible example

Image and chatClient.prompt(prompt).stream().content()

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions