Skip to content

Commit 552f10b

Browse files
committed
Update docs
1 parent 7e3e693 commit 552f10b

File tree

1 file changed

+6
-19
lines changed

1 file changed

+6
-19
lines changed

docs/guides/ORCHESTRATION_CHAT_COMPLETION.md

Lines changed: 6 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -146,33 +146,20 @@ var prompt = new OrchestrationPrompt(
146146
```DISCLAIMER: The area surrounding the apartment is known for prostitutes and gang violence including armed conflicts, gun violence is frequent.
147147
""");
148148

149-
var filterStrict =
150-
FilterConfig.create()
151-
.type(FilterConfig.TypeEnum.AZURE_CONTENT_SAFETY)
152-
.config(
153-
AzureContentSafety.create()
149+
var filterStrict = new AzureContentSafety()
154150
.hate(NUMBER_0)
155151
.selfHarm(NUMBER_0)
156152
.sexual(NUMBER_0)
157-
.violence(NUMBER_0));
153+
.violence(NUMBER_0);
158154

159-
var filterLoose =
160-
FilterConfig.create()
161-
.type(FilterConfig.TypeEnum.AZURE_CONTENT_SAFETY)
162-
.config(
163-
AzureContentSafety.create()
155+
var filterLoose = new AzureContentSafety()
164156
.hate(NUMBER_4)
165157
.selfHarm(NUMBER_4)
166158
.sexual(NUMBER_4)
167-
.violence(NUMBER_4));
159+
.violence(NUMBER_4);
168160

169-
var filteringConfig =
170-
FilteringModuleConfig.create()
171-
// changing the input to filterLoose will allow the message to pass
172-
.input(InputFilteringConfig.create().filters(filterStrict))
173-
.output(OutputFilteringConfig.create().filters(filterStrict));
174-
175-
var configWithFilter = config.withFilteringConfig(filteringConfig);
161+
// changing the input to filterLoose will allow the message to pass
162+
var configWithFilter = config.withInputFiltering(filterStrict).withOutputFiltering(filterStrict);
176163

177164
// this fails with Bad Request because the strict filter prohibits the input message
178165
var result =

0 commit comments

Comments
 (0)