Skip to content

Commit

Permalink
chore:minor API adjustments
Browse files Browse the repository at this point in the history
  • Loading branch information
KavithaSiva committed Jul 26, 2024
1 parent eb4a115 commit 11bc217
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 37 deletions.
20 changes: 10 additions & 10 deletions packages/gen-ai-hub/src/orchestration/orchestration-client.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
}
}
]
}
};

Expand Down
33 changes: 6 additions & 27 deletions packages/gen-ai-hub/src/orchestration/orchestration-types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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.
*/
Expand Down

0 comments on commit 11bc217

Please sign in to comment.