File tree Expand file tree Collapse file tree 2 files changed +6
-6
lines changed
sample-code/spring-app/src/test/java/com/sap/ai/sdk/app/controllers Expand file tree Collapse file tree 2 files changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -243,7 +243,7 @@ void testInputFilteringStrict() {
243243
244244 assertThatThrownBy (() -> service .inputFiltering (policy ))
245245 .hasMessageContaining (
246- "Prompt filtered due to safety violations. Please modify the prompt and try again." )
246+ "Content filtered due to safety violations. Please modify the prompt and try again." )
247247 .hasMessageContaining ("400 (Bad Request)" )
248248 .isInstanceOfSatisfying (
249249 OrchestrationFilterException .Input .class ,
@@ -299,15 +299,15 @@ void testOutputFilteringLenient() {
299299 assertThat (response .getContent ()).isNotEmpty ();
300300
301301 var filterResult = response .getOriginalResponse ().getIntermediateResults ().getOutputFiltering ();
302- assertThat (filterResult .getMessage ()).containsPattern ("Choice 0: Output Filter was skipped" );
302+ assertThat (filterResult .getMessage ()).containsPattern ("Choice 0: Filtering was skipped. " );
303303 }
304304
305305 @ Test
306306 void testLlamaGuardEnabled () {
307307 assertThatThrownBy (() -> service .llamaGuardInputFilter (true ))
308308 .isInstanceOf (OrchestrationFilterException .Input .class )
309309 .hasMessageContaining (
310- "Prompt filtered due to safety violations. Please modify the prompt and try again." )
310+ "Content filtered due to safety violations. Please modify the prompt and try again." )
311311 .hasMessageContaining ("400 (Bad Request)" )
312312 .isInstanceOfSatisfying (
313313 OrchestrationFilterException .Input .class ,
Original file line number Diff line number Diff line change @@ -67,7 +67,7 @@ void testInputFilteringStrict() {
6767 assertThatThrownBy (() -> service .inputFiltering (policy ))
6868 .isInstanceOf (OrchestrationClientException .class )
6969 .hasMessageContaining (
70- "Prompt filtered due to safety violations. Please modify the prompt and try again." )
70+ "Content filtered due to safety violations. Please modify the prompt and try again." )
7171 .hasMessageContaining ("400 (Bad Request)" );
7272 }
7373
@@ -105,7 +105,7 @@ void testOutputFilteringStrict() {
105105 .getIntermediateResults ()
106106 .getOutputFiltering ();
107107 assertThat (filterResult .getMessage ())
108- .contains ("Choice 0: LLM response filtered due to safety violations" );
108+ .contains ("Choice 0: Content filtered due to safety violations. " );
109109 }
110110
111111 @ Test
@@ -123,7 +123,7 @@ void testOutputFilteringLenient() {
123123 .getOriginalResponse ()
124124 .getIntermediateResults ()
125125 .getOutputFiltering ();
126- assertThat (filterResult .getMessage ()).contains ("Choice 0: Output Filter was skipped" );
126+ assertThat (filterResult .getMessage ()).contains ("Choice 0: Filtering was skipped. " );
127127 }
128128
129129 @ Test
You can’t perform that action at this time.
0 commit comments