Skip to content

Commit 9de13d1

Browse files
barsha-ghosh721sobychacko
authored andcommitted
GH-2342: Remove unused json-path dependency in spring-ai-openai
Signed-off-by: Barsha Ghosh <[email protected]> Use the proper StringUtils in OpenAiAudioSpeechModel Signed-off-by: Soby Chacko <[email protected]>
1 parent 62cc6f1 commit 9de13d1

File tree

2 files changed

+2
-7
lines changed

2 files changed

+2
-7
lines changed

models/spring-ai-openai/pom.xml

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -55,11 +55,6 @@
5555
<version>${project.parent.version}</version>
5656
</dependency>
5757

58-
<dependency>
59-
<groupId>io.rest-assured</groupId>
60-
<artifactId>json-path</artifactId>
61-
</dependency>
62-
6358
<dependency>
6459
<groupId>com.github.victools</groupId>
6560
<artifactId>jsonschema-generator</artifactId>

models/spring-ai-openai/src/main/java/org/springframework/ai/openai/OpenAiAudioSpeechModel.java

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

1717
package org.springframework.ai.openai;
1818

19-
import org.apache.commons.lang3.StringUtils;
2019
import org.slf4j.Logger;
2120
import org.slf4j.LoggerFactory;
2221
import reactor.core.publisher.Flux;
@@ -35,6 +34,7 @@
3534
import org.springframework.http.ResponseEntity;
3635
import org.springframework.retry.support.RetryTemplate;
3736
import org.springframework.util.Assert;
37+
import org.springframework.util.StringUtils;
3838

3939
/**
4040
* OpenAI audio speech client implementation for backed by {@link OpenAiAudioApi}.
@@ -174,7 +174,7 @@ private OpenAiAudioApi.SpeechRequest createRequest(SpeechPrompt request) {
174174
}
175175
}
176176

177-
String input = StringUtils.isNotBlank(options.getInput()) ? options.getInput()
177+
String input = StringUtils.hasText(options.getInput()) ? options.getInput()
178178
: request.getInstructions().getText();
179179

180180
OpenAiAudioApi.SpeechRequest.Builder requestBuilder = OpenAiAudioApi.SpeechRequest.builder()

0 commit comments

Comments
 (0)