From 88072e2e30db90a5bd97f3136cc479c80c2eb6b7 Mon Sep 17 00:00:00 2001 From: Thomas Vitale Date: Thu, 23 May 2024 16:53:30 +0200 Subject: [PATCH] Add missing exception handler --- .../main/java/com/thomasvitale/ai/spring/ChatController.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/02-prompts/prompts-multimodality-openai/src/main/java/com/thomasvitale/ai/spring/ChatController.java b/02-prompts/prompts-multimodality-openai/src/main/java/com/thomasvitale/ai/spring/ChatController.java index b71932f..8f048db 100644 --- a/02-prompts/prompts-multimodality-openai/src/main/java/com/thomasvitale/ai/spring/ChatController.java +++ b/02-prompts/prompts-multimodality-openai/src/main/java/com/thomasvitale/ai/spring/ChatController.java @@ -5,6 +5,7 @@ import org.springframework.web.bind.annotation.RestController; import java.io.IOException; +import java.net.MalformedURLException; @RestController class ChatController { @@ -21,7 +22,7 @@ String chatFromImageFile(@RequestParam(defaultValue = "What do you see in this p } @GetMapping("/chat/image/url") - String chatFromImageUrl(@RequestParam(defaultValue = "What do you see in this picture? Give a short answer") String message) { + String chatFromImageUrl(@RequestParam(defaultValue = "What do you see in this picture? Give a short answer") String message) throws MalformedURLException { return chatService.chatFromImageUrl(message); }