From 1361de21cab512bdfec692ce2175807571d4b42b Mon Sep 17 00:00:00 2001 From: Thomas Vitale Date: Wed, 24 Jul 2024 00:01:41 +0200 Subject: [PATCH] Update APIs to latest Spring AI 1.0.0-SNAPSHOT --- .../java/com/thomasvitale/ai/spring/TextClassifierTests.java | 2 ++ .../src/main/java/com/thomasvitale/ai/spring/ChatService.java | 2 +- .../com/thomasvitale/ai/spring/TranscriptionController.java | 2 +- 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/00-use-cases/text-classification/src/test/java/com/thomasvitale/ai/spring/TextClassifierTests.java b/00-use-cases/text-classification/src/test/java/com/thomasvitale/ai/spring/TextClassifierTests.java index cb74c56..272dba1 100644 --- a/00-use-cases/text-classification/src/test/java/com/thomasvitale/ai/spring/TextClassifierTests.java +++ b/00-use-cases/text-classification/src/test/java/com/thomasvitale/ai/spring/TextClassifierTests.java @@ -1,5 +1,6 @@ package com.thomasvitale.ai.spring; +import org.junit.jupiter.api.Disabled; import org.junit.jupiter.api.RepeatedTest; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.boot.test.context.SpringBootTest; @@ -10,6 +11,7 @@ import static org.assertj.core.api.Assertions.assertThat; +@Disabled @SpringBootTest @Import(TestcontainersConfiguration.class) public class TextClassifierTests { diff --git a/02-prompts/prompts-multimodality-openai/src/main/java/com/thomasvitale/ai/spring/ChatService.java b/02-prompts/prompts-multimodality-openai/src/main/java/com/thomasvitale/ai/spring/ChatService.java index ed6c17d..b97fea0 100644 --- a/02-prompts/prompts-multimodality-openai/src/main/java/com/thomasvitale/ai/spring/ChatService.java +++ b/02-prompts/prompts-multimodality-openai/src/main/java/com/thomasvitale/ai/spring/ChatService.java @@ -1,7 +1,7 @@ package com.thomasvitale.ai.spring; import org.springframework.ai.chat.client.ChatClient; -import org.springframework.ai.chat.messages.Media; +import org.springframework.ai.model.Media; import org.springframework.beans.factory.annotation.Value; import org.springframework.core.io.Resource; import org.springframework.stereotype.Service; diff --git a/09-audio-models/audio-models-transcription-openai/src/main/java/com/thomasvitale/ai/spring/TranscriptionController.java b/09-audio-models/audio-models-transcription-openai/src/main/java/com/thomasvitale/ai/spring/TranscriptionController.java index 4bde062..6d6c631 100644 --- a/09-audio-models/audio-models-transcription-openai/src/main/java/com/thomasvitale/ai/spring/TranscriptionController.java +++ b/09-audio-models/audio-models-transcription-openai/src/main/java/com/thomasvitale/ai/spring/TranscriptionController.java @@ -1,9 +1,9 @@ package com.thomasvitale.ai.spring; +import org.springframework.ai.audio.transcription.AudioTranscriptionPrompt; import org.springframework.ai.openai.OpenAiAudioTranscriptionModel; import org.springframework.ai.openai.OpenAiAudioTranscriptionOptions; import org.springframework.ai.openai.api.OpenAiAudioApi; -import org.springframework.ai.openai.audio.transcription.AudioTranscriptionPrompt; import org.springframework.beans.factory.annotation.Value; import org.springframework.core.io.Resource; import org.springframework.web.bind.annotation.GetMapping;