You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/guides/ORCHESTRATION_CHAT_COMPLETION.md
+9-3Lines changed: 9 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -164,10 +164,16 @@ var result =
164
164
```
165
165
#### Behavior of Input and Output Filters
166
166
167
-
-**Input Filter**: Triggers a `400 Bad Request` in response during the `chatCompletion` call if the input message violates the filter policy.
168
-
-**Output Filter**: Allows the request to complete but throws an exception when accessing filtered content via `result.getContent()`.
167
+
-**Input Filter**:
168
+
If the input message violates the filter policy, a `400 (Bad Request)` response will be received during the `chatCompletion` call.
169
+
An `OrchestrationClientException` will be thrown.
169
170
170
-
You will find [some examples](../../sample-code/spring-app/src/main/java/com/sap/ai/sdk/app/controllers/OrchestrationController.java) in our Spring Boot application demonstrating response handling with filters.
171
+
-**Output Filter**:
172
+
If the response message violates the output filter policy, the `chatCompletion` call will complete without exception.
173
+
The convenience method `getContent()` on the resulting object will throw an `OrchestrationClientException` upon invocation.
174
+
The low level API under `getOriginalResponse()` will not throw an exception.
175
+
176
+
You will find [some examples](../../sample-code/spring-app/src/main/java/com/sap/ai/sdk/app/controllers/OrchestrationController.java) in our Spring Boot application demonstrating response handling with filters.
0 commit comments