Skip to content

Commit 920a937

Browse files
committed
0 Update spring-ai version to 1.1.0
1 parent 08bb7e6 commit 920a937

File tree

6 files changed

+50
-21
lines changed

6 files changed

+50
-21
lines changed

gradle/libs.versions.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ org-mapstruct-extensions-spring = "1.1.3"
1010
org-springdoc = "2.8.14"
1111
pmd = "7.17.0"
1212
spotbugs = "4.9.8"
13-
spring-ai = "1.1.0-M4"
13+
spring-ai = "1.1.0"
1414
spring-boot = "3.5.7"
1515
spring-cloud-aws = "3.4.0"
1616
spring-cloud-dependencies = "2025.0.0"

server/libs/modules/components/ai/llm/mistral/src/main/java/com/bytechef/component/ai/llm/mistral/action/MistralChatAction.java

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -94,11 +94,12 @@ public class MistralChatAction {
9494

9595
return MistralAiChatModel.builder()
9696
.mistralAiApi(
97-
new MistralAiApi(
98-
"https://api.mistral.ai",
99-
connectionParameters.getString(TOKEN),
100-
ModelUtils.getRestClientBuilder(),
101-
RetryUtils.DEFAULT_RESPONSE_ERROR_HANDLER))
97+
MistralAiApi.builder()
98+
.baseUrl("https://api.mistral.ai")
99+
.apiKey(connectionParameters.getString(TOKEN))
100+
.restClientBuilder(ModelUtils.getRestClientBuilder())
101+
.responseErrorHandler(RetryUtils.DEFAULT_RESPONSE_ERROR_HANDLER)
102+
.build())
102103
.defaultOptions(
103104
MistralAiChatOptions.builder()
104105
.model(inputParameters.getRequiredString(MODEL))

server/libs/modules/components/ai/llm/mistral/src/main/java/com/bytechef/component/ai/llm/mistral/cluster/MistralAiEmbedding.java

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -50,11 +50,15 @@ public class MistralAiEmbedding {
5050
.options(EMBEDDING_MODELS));
5151

5252
protected static EmbeddingModel apply(Parameters inputParameters, Parameters connectionParameters) {
53-
return new MistralAiEmbeddingModel(
54-
new MistralAiApi(
55-
connectionParameters.getRequiredString(TOKEN)),
56-
MistralAiEmbeddingOptions.builder()
57-
.withModel(inputParameters.getRequiredString(MODEL))
58-
.build());
53+
return MistralAiEmbeddingModel.builder()
54+
.mistralAiApi(
55+
MistralAiApi.builder()
56+
.apiKey(connectionParameters.getRequiredString(TOKEN))
57+
.build())
58+
.options(
59+
MistralAiEmbeddingOptions.builder()
60+
.withModel(inputParameters.getRequiredString(MODEL))
61+
.build())
62+
.build();
5963
}
6064
}

server/libs/modules/components/ai/llm/ollama/src/main/java/com/bytechef/component/ai/llm/ollama/action/OllamaChatAction.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@
9999
import com.bytechef.component.definition.TypeReference;
100100
import org.springframework.ai.ollama.OllamaChatModel;
101101
import org.springframework.ai.ollama.api.OllamaApi;
102-
import org.springframework.ai.ollama.api.OllamaOptions;
102+
import org.springframework.ai.ollama.api.OllamaChatOptions;
103103

104104
/**
105105
* @author Marko Kriskovic
@@ -163,7 +163,7 @@ public class OllamaChatAction {
163163
return OllamaChatModel.builder()
164164
.ollamaApi(ollamaApi)
165165
.defaultOptions(
166-
OllamaOptions.builder()
166+
OllamaChatOptions.builder()
167167
.model(inputParameters.getRequiredString(MODEL))
168168
.temperature(inputParameters.getDouble(TEMPERATURE))
169169
.topP(inputParameters.getDouble(TOP_P))

server/libs/modules/components/ai/llm/ollama/src/test/resources/definition/ollama_v1.json

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -133,10 +133,22 @@
133133
"description": null,
134134
"label": "qwen2.5vl",
135135
"value": "qwen2.5vl"
136+
}, {
137+
"description": null,
138+
"label": "qwen3:0.6b",
139+
"value": "qwen3:0.6b"
140+
}, {
141+
"description": null,
142+
"label": "qwen3:1.7b",
143+
"value": "qwen3:1.7b"
136144
}, {
137145
"description": null,
138146
"label": "qwen3:4b",
139147
"value": "qwen3:4b"
148+
}, {
149+
"description": null,
150+
"label": "qwen3:4b-thinking",
151+
"value": "qwen3:4b-thinking"
140152
}, {
141153
"description": null,
142154
"label": "qwen3:7b",
@@ -1467,10 +1479,22 @@
14671479
"description": null,
14681480
"label": "qwen2.5vl",
14691481
"value": "qwen2.5vl"
1482+
}, {
1483+
"description": null,
1484+
"label": "qwen3:0.6b",
1485+
"value": "qwen3:0.6b"
1486+
}, {
1487+
"description": null,
1488+
"label": "qwen3:1.7b",
1489+
"value": "qwen3:1.7b"
14701490
}, {
14711491
"description": null,
14721492
"label": "qwen3:4b",
14731493
"value": "qwen3:4b"
1494+
}, {
1495+
"description": null,
1496+
"label": "qwen3:4b-thinking",
1497+
"value": "qwen3:4b-thinking"
14741498
}, {
14751499
"description": null,
14761500
"label": "qwen3:7b",

server/libs/modules/components/ai/llm/open-ai/src/main/java/com/bytechef/component/ai/llm/openai/action/OpenAiCreateSpeechAction.java

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -37,16 +37,16 @@
3737
import java.io.ByteArrayInputStream;
3838
import java.util.Arrays;
3939
import java.util.stream.Collectors;
40+
import org.springframework.ai.audio.tts.Speech;
41+
import org.springframework.ai.audio.tts.TextToSpeechModel;
42+
import org.springframework.ai.audio.tts.TextToSpeechPrompt;
43+
import org.springframework.ai.audio.tts.TextToSpeechResponse;
4044
import org.springframework.ai.openai.OpenAiAudioSpeechModel;
4145
import org.springframework.ai.openai.OpenAiAudioSpeechOptions;
4246
import org.springframework.ai.openai.api.OpenAiAudioApi;
4347
import org.springframework.ai.openai.api.OpenAiAudioApi.SpeechRequest;
4448
import org.springframework.ai.openai.api.OpenAiAudioApi.SpeechRequest.AudioResponseFormat;
4549
import org.springframework.ai.openai.api.OpenAiAudioApi.TtsModel;
46-
import org.springframework.ai.openai.audio.speech.Speech;
47-
import org.springframework.ai.openai.audio.speech.SpeechModel;
48-
import org.springframework.ai.openai.audio.speech.SpeechPrompt;
49-
import org.springframework.ai.openai.audio.speech.SpeechResponse;
5050

5151
/**
5252
* @author Monika Domiter
@@ -114,16 +114,16 @@ public static FileEntry perform(
114114
.input(input)
115115
.voice(SpeechRequest.Voice.valueOf(inputParameters.getString(VOICE)))
116116
.responseFormat(audioResponseFormat)
117-
.speed(inputParameters.getFloat(SPEED))
117+
.speed(inputParameters.getDouble(SPEED))
118118
.build();
119119

120-
SpeechModel speechModel = new OpenAiAudioSpeechModel(
120+
TextToSpeechModel speechModel = new OpenAiAudioSpeechModel(
121121
OpenAiAudioApi.builder()
122122
.apiKey(connectionParameters.getRequiredString(TOKEN))
123123
.build(),
124124
speechOptions);
125125

126-
SpeechResponse response = speechModel.call(new SpeechPrompt(input));
126+
TextToSpeechResponse response = speechModel.call(new TextToSpeechPrompt(input));
127127

128128
Speech result = response.getResult();
129129

0 commit comments

Comments
 (0)