File tree Expand file tree Collapse file tree 2 files changed +3
-3
lines changed
sample-code/spring-app/src
main/java/com/sap/ai/sdk/app/services
test/java/com/sap/ai/sdk/app/controllers Expand file tree Collapse file tree 2 files changed +3
-3
lines changed Original file line number Diff line number Diff 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 ();
Original file line number Diff line number Diff 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 =
You can’t perform that action at this time.
0 commit comments