spring-projects / spring-projects/spring-ai
Documentation: The example code for Vision in the OpenAI reference documentation is incorrect.
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 9.5k
- Forks
- 2.9k
- Avg merge
- 1d 7h
- Merged PRs (30d)
- 6
Description
Bug description
https://docs.spring.io/spring-ai/reference/api/chat/openai-chat.html#_vision
In the 1.0.0 version of the documentation, the Vision example shown is actually from version 1.1.0-SNAPSHOT. Shouldn't the example below be included instead if it's truly the 1.0.0 documentation?
var imageData = new ClassPathResource("/test.png");
var userMessage = UserMessage.builder()
.text("Explain what do you see on this picture?")
.media(List.of(new Media(MimeTypeUtils.IMAGE_PNG, imageData)))
.build();
var response = this.chatModel
.call(new Prompt(List.of(userMessage), OpenAiChatOptions.builder().model(modelName).build()));
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
Open the Vision section at docs.spring.io/spring-ai/reference/api/chat/openai-chat.html#_vision and compare the example shown for version 1.0.0 with the version-specific source. Update the 1.0.0 documentation so its example matches that release, then verify the rendered example and version link.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- documentation
- Issue type
- Documentation
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100