Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -41,9 +41,10 @@ For most of the multimodal LLMs, the Spring AI code would look something like th
----
var imageResource = new ClassPathResource("/multimodal.test.png");

var userMessage = new UserMessage(
"Explain what do you see in this picture?", // content
new Media(MimeTypeUtils.IMAGE_PNG, this.imageResource)); // media
var userMessage = UserMessage.builder()
.text("Explain what do you see in this picture?") // content
.media(new Media(MimeTypeUtils.IMAGE_PNG, this.imageResource)) // media
.build();

ChatResponse response = chatModel.call(new Prompt(this.userMessage));
----
Expand Down