Skip to content

Commit 779160a

Browse files
committed
feat: format code and add TextToSpeechResponseMetadata
Signed-off-by: Alexandros Pappas <[email protected]>
1 parent 01507f3 commit 779160a

File tree

9 files changed

+31
-19
lines changed

9 files changed

+31
-19
lines changed

models/spring-ai-openai/src/main/java/org/springframework/ai/openai/audio/speech/Speech.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,8 @@
2929
*
3030
* @author Ahmed Yousri
3131
* @since 1.0.0-M1
32-
* @deprecated Use {@link org.springframework.ai.audio.tts.Speech} from the core package instead.
33-
* This class will be removed in a future release.
32+
* @deprecated Use {@link org.springframework.ai.audio.tts.Speech} from the core package
33+
* instead. This class will be removed in a future release.
3434
*/
3535
@Deprecated
3636
public class Speech implements ModelResult<byte[]> {

models/spring-ai-openai/src/main/java/org/springframework/ai/openai/audio/speech/SpeechMessage.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,8 @@
2424
*
2525
* @author Ahmed Yousri
2626
* @since 1.0.0-M1
27-
* @deprecated Use {@link org.springframework.ai.audio.tts.TextToSpeechMessage} from the core package instead.
28-
* This class will be removed in a future release.
27+
* @deprecated Use {@link org.springframework.ai.audio.tts.TextToSpeechMessage} from the
28+
* core package instead. This class will be removed in a future release.
2929
*/
3030
@Deprecated
3131
public class SpeechMessage {

models/spring-ai-openai/src/main/java/org/springframework/ai/openai/audio/speech/SpeechModel.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,8 @@
2525
*
2626
* @author Ahmed Yousri
2727
* @since 1.0.0-M1
28-
* @deprecated Use {@link org.springframework.ai.audio.tts.TextToSpeechModel} from the core package instead.
29-
* This interface will be removed in a future release.
28+
* @deprecated Use {@link org.springframework.ai.audio.tts.TextToSpeechModel} from the
29+
* core package instead. This interface will be removed in a future release.
3030
*/
3131
@Deprecated
3232
@FunctionalInterface

models/spring-ai-openai/src/main/java/org/springframework/ai/openai/audio/speech/SpeechPrompt.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,8 @@
2929
*
3030
* @author Ahmed Yousri
3131
* @since 1.0.0-M1
32-
* @deprecated Use {@link org.springframework.ai.audio.tts.TextToSpeechPrompt} from the core package instead.
33-
* This class will be removed in a future release.
32+
* @deprecated Use {@link org.springframework.ai.audio.tts.TextToSpeechPrompt} from the
33+
* core package instead. This class will be removed in a future release.
3434
*/
3535
@Deprecated
3636
public class SpeechPrompt implements ModelRequest<SpeechMessage> {

models/spring-ai-openai/src/main/java/org/springframework/ai/openai/audio/speech/SpeechResponse.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,8 @@
2828
*
2929
* @author Ahmed Yousri
3030
* @since 1.0.0-M1
31-
* @deprecated Use {@link org.springframework.ai.audio.tts.TextToSpeechResponse} from the core package instead.
32-
* This class will be removed in a future release.
31+
* @deprecated Use {@link org.springframework.ai.audio.tts.TextToSpeechResponse} from the
32+
* core package instead. This class will be removed in a future release.
3333
*/
3434
@Deprecated
3535
public class SpeechResponse implements ModelResponse<Speech> {

models/spring-ai-openai/src/main/java/org/springframework/ai/openai/audio/speech/StreamingSpeechModel.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,8 @@
2727
*
2828
* @author Ahmed Yousri
2929
* @since 1.0.0-M1
30-
* @deprecated Use {@link org.springframework.ai.audio.tts.StreamingTextToSpeechModel} from the core package instead.
31-
* This interface will be removed in a future release.
30+
* @deprecated Use {@link org.springframework.ai.audio.tts.StreamingTextToSpeechModel}
31+
* from the core package instead. This interface will be removed in a future release.
3232
*/
3333
@Deprecated
3434
@FunctionalInterface

models/spring-ai-openai/src/main/java/org/springframework/ai/openai/metadata/audio/OpenAiAudioSpeechResponseMetadata.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,9 @@
1616

1717
package org.springframework.ai.openai.metadata.audio;
1818

19+
import org.springframework.ai.audio.tts.TextToSpeechResponseMetadata;
1920
import org.springframework.ai.chat.metadata.EmptyRateLimit;
2021
import org.springframework.ai.chat.metadata.RateLimit;
21-
import org.springframework.ai.model.MutableResponseMetadata;
2222
import org.springframework.ai.openai.api.OpenAiAudioApi;
2323
import org.springframework.lang.Nullable;
2424
import org.springframework.util.Assert;
@@ -29,7 +29,7 @@
2929
* @author Ahmed Yousri
3030
* @see RateLimit
3131
*/
32-
public class OpenAiAudioSpeechResponseMetadata extends MutableResponseMetadata {
32+
public class OpenAiAudioSpeechResponseMetadata extends TextToSpeechResponseMetadata {
3333

3434
public static final OpenAiAudioSpeechResponseMetadata NULL = new OpenAiAudioSpeechResponseMetadata() {
3535

spring-ai-model/src/main/java/org/springframework/ai/audio/tts/TextToSpeechResponse.java

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -31,15 +31,15 @@ public class TextToSpeechResponse implements ModelResponse<Speech> {
3131

3232
private final List<Speech> results;
3333

34-
private final ResponseMetadata metadata;
34+
private final TextToSpeechResponseMetadata textToSpeechResponseMetadata;
3535

3636
public TextToSpeechResponse(List<Speech> results) {
3737
this(results, null);
3838
}
3939

40-
public TextToSpeechResponse(List<Speech> results, ResponseMetadata metadata) {
40+
public TextToSpeechResponse(List<Speech> results, TextToSpeechResponseMetadata textToSpeechResponseMetadata) {
4141
this.results = results;
42-
this.metadata = metadata;
42+
this.textToSpeechResponseMetadata = textToSpeechResponseMetadata;
4343
}
4444

4545
@Override
@@ -52,8 +52,8 @@ public Speech getResult() {
5252
}
5353

5454
@Override
55-
public ResponseMetadata getMetadata() {
56-
return this.metadata;
55+
public TextToSpeechResponseMetadata getMetadata() {
56+
return this.textToSpeechResponseMetadata;
5757
}
5858

5959
@Override
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
package org.springframework.ai.audio.tts;
2+
3+
import org.springframework.ai.model.MutableResponseMetadata;
4+
5+
/**
6+
* Metadata associated with an audio transcription response.
7+
*
8+
* @author Alexandros Pappas
9+
*/
10+
public class TextToSpeechResponseMetadata extends MutableResponseMetadata {
11+
12+
}

0 commit comments

Comments
 (0)