Skip to content

Commit 00e110b

Browse files
committed
fix pmd violations
1 parent 8d358c1 commit 00e110b

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

sample-code/spring-app/src/main/java/com/sap/ai/sdk/app/services/OrchestrationService.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,7 @@ public OrchestrationChatResponse inputFiltering(@Nonnull final AzureFilterThresh
127127
@Nonnull
128128
public OrchestrationChatResponse outputFiltering(@Nonnull final AzureFilterThreshold policy) {
129129

130-
var systemMessage = Message.system("Give three paraphrases for the following sentence");
130+
final var systemMessage = Message.system("Give three paraphrases for the following sentence");
131131
// Reliably triggering the content filter of models fine-tuned for ethical compliance
132132
// is difficult. The prompt below may be rendered ineffective in the future.
133133
final var prompt =
@@ -137,7 +137,7 @@ public OrchestrationChatResponse outputFiltering(@Nonnull final AzureFilterThres
137137
new AzureContentFilter().hate(policy).selfHarm(policy).sexual(policy).violence(policy);
138138

139139
final var configWithFilter = config.withOutputFiltering(filterConfig);
140-
var response = client.chatCompletion(prompt, configWithFilter);
140+
final var response = client.chatCompletion(prompt, configWithFilter);
141141

142142
try {
143143
response.getContent();

sample-code/spring-app/src/test/java/com/sap/ai/sdk/app/controllers/OrchestrationTest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ void testTemplate() {
9999
assertThat(usage.getPromptTokens()).isGreaterThan(1);
100100
assertThat(usage.getTotalTokens()).isGreaterThan(1);
101101
}
102-
102+
103103
@Test
104104
void testMessagesHistory() {
105105
CompletionPostResponse result =

0 commit comments

Comments
 (0)