From 3b752bbb548ce34937f7482dad40d41f8c85a76f Mon Sep 17 00:00:00 2001 From: jito Date: Tue, 29 Apr 2025 02:57:16 +0900 Subject: [PATCH] Update deprecated Media constructor usage in documentation example (#2762) Signed-off-by: jitokim --- .../main/antora/modules/ROOT/pages/api/chat/anthropic-chat.adoc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/spring-ai-docs/src/main/antora/modules/ROOT/pages/api/chat/anthropic-chat.adoc b/spring-ai-docs/src/main/antora/modules/ROOT/pages/api/chat/anthropic-chat.adoc index 0989c0d5c..c095ea221 100644 --- a/spring-ai-docs/src/main/antora/modules/ROOT/pages/api/chat/anthropic-chat.adoc +++ b/spring-ai-docs/src/main/antora/modules/ROOT/pages/api/chat/anthropic-chat.adoc @@ -182,7 +182,7 @@ Below is a simple code example extracted from https://github.com/spring-projects [source,java] ---- -byte[] imageData = new ClassPathResource("/multimodal.test.png").getContentAsByteArray(); +var imageData = new ClassPathResource("/multimodal.test.png"); var userMessage = new UserMessage("Explain what do you see on this picture?", List.of(new Media(MimeTypeUtils.IMAGE_PNG, this.imageData)));