Skip to content

Commit f5b00a0

Browse files
committed
Various checkstyle fixes
1 parent c038526 commit f5b00a0

File tree

38 files changed

+86
-85
lines changed

38 files changed

+86
-85
lines changed

models/spring-ai-anthropic/src/main/java/org/springframework/ai/anthropic/api/AnthropicApi.java

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -298,12 +298,14 @@ public enum Role {
298298
/**
299299
* The user role.
300300
*/
301-
@JsonProperty("user") USER,
301+
@JsonProperty("user")
302+
USER,
302303

303304
/**
304305
* The assistant role.
305306
*/
306-
@JsonProperty("assistant") ASSISTANT
307+
@JsonProperty("assistant")
308+
ASSISTANT
307309
// @formatter:on
308310

309311
}
@@ -824,7 +826,7 @@ public record Tool(
824826

825827
/**
826828
* Chat completion response object.
827-
*
829+
*
828830
* @param id Unique object identifier. The format and length of IDs may change over
829831
* time.
830832
* @param type Object type. For Messages, this is always "message".

models/spring-ai-anthropic/src/test/java/org/springframework/ai/anthropic/api/AnthropicApiIT.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,9 @@
2828
import org.springframework.ai.anthropic.api.AnthropicApi.ContentBlock;
2929
import org.springframework.ai.anthropic.api.AnthropicApi.Role;
3030
import org.springframework.http.ResponseEntity;
31-
import static org.assertj.core.api.Assertions.assertThatThrownBy;
31+
3232
import static org.assertj.core.api.Assertions.assertThat;
33+
import static org.assertj.core.api.Assertions.assertThatThrownBy;
3334

3435
/**
3536
* @author Christian Tzolov

models/spring-ai-anthropic/src/test/java/org/springframework/ai/anthropic/client/AnthropicChatClientMethodInvokingFunctionCallbackIT.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,7 @@ void methodGetWeatherNonStatic() {
124124
.user("What's the weather like in San Francisco, Tokyo, and Paris? Use Celsius.")
125125
.functions(FunctionCallback.builder()
126126
.description("Get the weather in location")
127-
.method("getWeatherNonStatic",String.class, Unit.class)
127+
.method("getWeatherNonStatic", String.class, Unit.class)
128128
.targetObject(targetObject)
129129
.build())
130130
.call()
@@ -148,7 +148,7 @@ void methodGetWeatherToolContext() {
148148
.description("Get the weather in location")
149149
.method("getWeatherWithContext", String.class, Unit.class, ToolContext.class)
150150
.targetObject(targetObject)
151-
.build())
151+
.build())
152152
.toolContext(Map.of("tool", "value"))
153153
.call()
154154
.content();

models/spring-ai-bedrock-converse/src/test/java/org/springframework/ai/bedrock/converse/BedrockConverseChatClientIT.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -257,7 +257,7 @@ void defaultFunctionCallTest() {
257257
.description("Get the weather in location")
258258
.function("getCurrentWeather", new MockWeatherService())
259259
.inputType(MockWeatherService.Request.class)
260-
.build())
260+
.build())
261261
.defaultUser(u -> u.text("What's the weather like in San Francisco, Tokyo, and Paris? Return the temperature in Celsius."))
262262
.build()
263263
.prompt()
@@ -280,7 +280,7 @@ void streamFunctionCallTest() {
280280
.description("Get the weather in location")
281281
.function("getCurrentWeather", new MockWeatherService())
282282
.inputType(MockWeatherService.Request.class)
283-
.build())
283+
.build())
284284
.stream()
285285
.content();
286286
// @formatter:on

models/spring-ai-bedrock/src/main/java/org/springframework/ai/bedrock/anthropic/api/AnthropicChatBedrockApi.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@
3535

3636
/**
3737
* Anthropic Chat API.
38-
*
38+
*
3939
* @author Christian Tzolov
4040
* @author Thomas Vitale
4141
* @author Wei Jiang

models/spring-ai-bedrock/src/main/java/org/springframework/ai/bedrock/anthropic3/Anthropic3ChatOptions.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -244,7 +244,7 @@ public Anthropic3ChatOptions copy() {
244244
/**
245245
* Builder for {@link Anthropic3ChatOptions}.
246246
*/
247-
public static class Builder {
247+
public static final class Builder {
248248

249249
private final Anthropic3ChatOptions options = new Anthropic3ChatOptions();
250250

models/spring-ai-bedrock/src/main/java/org/springframework/ai/bedrock/anthropic3/api/Anthropic3ChatBedrockApi.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -248,7 +248,7 @@ public static final class Builder {
248248
private Double topP;
249249
private List<String> stopSequences;
250250
private String anthropicVersion;
251-
251+
252252
private Builder(List<ChatCompletionMessage> messages) {
253253
this.messages = messages;
254254
}

models/spring-ai-bedrock/src/main/java/org/springframework/ai/bedrock/jurassic2/api/Ai21Jurassic2ChatBedrockApi.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -249,7 +249,7 @@ public record FloatScalePenalty(@JsonProperty("scale") Float scale,
249249
/**
250250
* Builder for {@link Ai21Jurassic2ChatRequest}.
251251
*/
252-
public static class Builder {
252+
public static final class Builder {
253253
private String prompt;
254254
private Double temperature;
255255
private Double topP;

models/spring-ai-huggingface/src/main/java/org/springframework/ai/huggingface/HuggingfaceChatModel.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,6 @@
2424
import com.fasterxml.jackson.databind.ObjectMapper;
2525

2626
import org.springframework.ai.chat.messages.AssistantMessage;
27-
import org.springframework.ai.chat.metadata.ChatGenerationMetadata;
2827
import org.springframework.ai.chat.model.ChatModel;
2928
import org.springframework.ai.chat.model.ChatResponse;
3029
import org.springframework.ai.chat.model.Generation;

models/spring-ai-mistral-ai/src/test/java/org/springframework/ai/mistralai/MistralAiChatClientIT.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -229,7 +229,7 @@ void functionCallTest() {
229229
.description("Get the weather in location")
230230
.function("getCurrentWeather", new MockWeatherService())
231231
.inputType(MockWeatherService.Request.class)
232-
.build())
232+
.build())
233233
.call()
234234
.content();
235235
// @formatter:on
@@ -275,7 +275,7 @@ void streamFunctionCallTest() {
275275
.description("Get the weather in location")
276276
.function("getCurrentWeather", new MockWeatherService())
277277
.inputType(MockWeatherService.Request.class)
278-
.build())
278+
.build())
279279
.stream()
280280
.content();
281281
// @formatter:on

0 commit comments

Comments
 (0)