Skip to content

Commit 9c8a7b7

Browse files
committed
chore: Improve e2e test robustness
1 parent de3ea51 commit 9c8a7b7

File tree

2 files changed

+6
-3
lines changed

2 files changed

+6
-3
lines changed

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

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -216,8 +216,11 @@ public OrchestrationChatResponse outputFiltering(@Nonnull final AzureFilterThres
216216
@Nonnull
217217
public OrchestrationChatResponse llamaGuardInputFilter(final boolean filter)
218218
throws OrchestrationClientException {
219-
val prompt =
220-
new OrchestrationPrompt("'We shall spill blood tonight', said the operation in-charge.");
219+
val message =
220+
filter
221+
? "We shall spill blood tonight"
222+
: "'We shall spill blood tonight', said the operation in-charge.";
223+
val prompt = new OrchestrationPrompt(message);
221224

222225
// values not set are disabled by default
223226
val config =

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ public ChatResponse runAgent(@Nonnull final String userInput) {
5555
List.of(
5656
"You are a traveling planning agent for a single day trip. Where appropriate, use the provided tools. First, start by suggesting some restaurants for the mentioned city.",
5757
"Now, check the whether for the city.",
58-
"Finally, combine the suggested itinerary from this conversation into a short, one-sentence plan for the day trip.");
58+
"Finally, combine the suggested itinerary from this conversation into a short, one-sentence plan for the day trip. Make sure to include all the restaurants suggested by the tools and the actual temperature in your reply.");
5959

6060
// Perform the chain workflow
6161
String responseText = userInput;

0 commit comments

Comments
 (0)