spring-projects / spring-projects/spring-ai
UserMessage upload PDF cannot read
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 9.5k
- Forks
- 2.9k
- Avg merge
- 1d 10h
- Merged PRs (30d)
- 5
Description
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
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
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the Media construction using new URI(filePath) and the chatClient.prompt(...).stream().content() reproduction; inspect how PDF media is passed to the configured LLM. Done means a PDF upload's content is available when asking a question, with a regression test for the reported jdk21/spring-ai-1.1.0 case.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java, spring
- Domain
- ai
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 38/100