diff --git a/packages/gen-ai-hub/src/orchestration/orchestration-client.test.ts b/packages/gen-ai-hub/src/orchestration/orchestration-client.test.ts index bd9456bc..38a0c8da 100644 --- a/packages/gen-ai-hub/src/orchestration/orchestration-client.test.ts +++ b/packages/gen-ai-hub/src/orchestration/orchestration-client.test.ts @@ -40,19 +40,19 @@ describe('GenAiHubClient', () => { input: { AzureContentSafety: { Hate: 0, - SelfHarm: 2, - Sexual: 4, - Violence: 6 + SelfHarm: 2 } }, - output: { - AzureContentSafety: { - Hate: 0, - SelfHarm: 2, - Sexual: 4, - Violence: 6 + output: [ + { + AzureContentSafety: { + Hate: 0, + SelfHarm: 2, + Sexual: 4, + Violence: 6 + } } - } + ] } }; diff --git a/packages/gen-ai-hub/src/orchestration/orchestration-types.ts b/packages/gen-ai-hub/src/orchestration/orchestration-types.ts index 40844557..f36f1c6d 100644 --- a/packages/gen-ai-hub/src/orchestration/orchestration-types.ts +++ b/packages/gen-ai-hub/src/orchestration/orchestration-types.ts @@ -56,33 +56,12 @@ export interface FilterConfig { /** * Wrapper object to configure the filter service provider. */ -export interface FilterServiceProvider { - /** - * Azure filtering service provider. - */ - AzureContentSafety: AzureContentSafety; -} - -/** - * Azure content safety service provider. - */ -export interface AzureContentSafetyServiceProvider { - /** - * Azure content safety filter configuration. - */ - AzureContentSafety?: AzureContentSafety; -} - -/** - * Azure content safety service provider. - */ -export interface OpenAIContentSafetyServiceProvider { - /** - * Azure content safety filter configuration. - */ - OpenAIContentSafety?: AzureContentSafety; -} - +export type FilterServiceProvider = + | { AzureContentSafety: AzureContentSafety; SomeOtherServiceProvider?: never } + | { + SomeOtherServiceProvider: AzureContentSafety; + AzureContentSafety?: never; + }; /** * Wrapper object to encompass Orchestration options. */