spring-projects / spring-projects/spring-ai
My image list is not sent in the request
Open
Nobody has claimed this yet.
status: waiting-for-triage
- Dominant language
- Java
- Stars
- 9.5k
- Forks
- 2.9k
- Avg merge
- 1d 10h
- Merged PRs (30d)
- 5
Description
Bug description
I'm trying to send a list of images to ChatGPT to analyze, but it's insisting that no images are sent.
I enabled request logging and found that the image list is ignored.
Environment
Spring AI 1.0.2
Java 17
Minimal Complete Reproducible example
try(InputStream inputStream = Files.newInputStream(Path.of("1.jpg"));
InputStream inputStream2 = Files.newInputStream(Path.of("2.jpg"));
InputStream inputStream3 = Files.newInputStream(Path.of("3.jpg")))
{
System.out.println(this.chatClient.prompt()
.system("Check <something relevant to all the images>")
.user(userSpec -> userSpec
.media(MimeTypeUtils.IMAGE_JPEG, new InputStreamResource(inputStream))
.media(MimeTypeUtils.IMAGE_JPEG, new InputStreamResource(inputStream2))
.media(MimeTypeUtils.IMAGE_JPEG, new InputStreamResource(inputStream3)))
.call()
.content());
}
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 minimal Java reproduction and request logging described in the issue, checking how the three calls to media are represented in the outgoing ChatGPT request. Done means all three JPEG images appear in the request and the model can analyze them together.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java, spring
- Domain
- ai, api
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100