File tree Expand file tree Collapse file tree 1 file changed +6
-19
lines changed
Expand file tree Collapse file tree 1 file changed +6
-19
lines changed Original file line number Diff line number Diff 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
178165var result =
You can’t perform that action at this time.
0 commit comments