Exploring Multimodality in Spring AI

Exploring Multimodality in Spring AI

Introduction This article primarily explores the multimodality of Spring AI. Examples chatModel Example 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 ChatResponse response = chatModel.call(new Prompt(this.userMessage)); chatClient Example String response = ChatClient.create(chatModel).prompt() .user(u -> u.text("Explain what do you … Read more