generated from SAP/repository-template
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: Add content filtering with convenience functions (#58)
* chore:add generated content filtering schema * chore: Initial API design * chore:minor API adjustments * chore:add test * feat:initial implementation * chore: fix build failure * chore: cleanup * chore: fix build * feat: switch to adding filter config in OrchestrationCompletionParameters * chore:simplify implementation * fix: pipeline * chore:switch to varargs * chore: cleanup API proposal Co-authored-by: Kuhr, Matthias <[email protected]> * chore: enhance test * chore: fix build issues * chore:add additional tests * chore: cleanup * chore: minor fixes * fix: Changes from lint * chore: address review comments * chore: address review comments * fix: Changes from lint * chore: address review comments * chore: regenerate client * chore: remove non-relevant generated files * chore: cleanup function * chore: improve JSDoc * chore: make input_params optional again * Update packages/gen-ai-hub/src/orchestration/orchestration-client.ts Co-authored-by: Marika Marszalkowski <[email protected]> * Update packages/gen-ai-hub/src/orchestration/orchestration-filter-utility.test.ts Co-authored-by: Marika Marszalkowski <[email protected]> * fix: Changes from lint * Update packages/gen-ai-hub/src/orchestration/orchestration-filter-utility.ts Co-authored-by: Marika Marszalkowski <[email protected]> * Update packages/gen-ai-hub/src/orchestration/orchestration-filter-utility.ts Co-authored-by: Marika Marszalkowski <[email protected]> * Update packages/gen-ai-hub/src/orchestration/orchestration-filter-utility.ts Co-authored-by: Marika Marszalkowski <[email protected]> * fix: typo * Update packages/gen-ai-hub/src/orchestration/orchestration-filter-utility.test.ts Co-authored-by: Marika Marszalkowski <[email protected]> * Update packages/gen-ai-hub/src/orchestration/orchestration-filter-utility.test.ts Co-authored-by: Marika Marszalkowski <[email protected]> * fix: test * chore: address review comments --------- Co-authored-by: Kuhr, Matthias <[email protected]> Co-authored-by: cloud-sdk-js <[email protected]> Co-authored-by: Marika Marszalkowski <[email protected]>
- Loading branch information
1 parent
9541e91
commit 5bf34b5
Showing
17 changed files
with
452 additions
and
64 deletions.
There are no files selected for viewing
19 changes: 19 additions & 0 deletions
19
...ages/gen-ai-hub/src/orchestration/client/api/schema/azure-content-safety-filter-config.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
/* | ||
* Copyright (c) 2024 SAP SE or an SAP affiliate company. All rights reserved. | ||
* | ||
* This is a generated file powered by the SAP Cloud SDK for JavaScript. | ||
*/ | ||
import type { AzureContentSafety } from './azure-content-safety.js'; | ||
/** | ||
* Representation of the 'AzureContentSafetyFilterConfig' schema. | ||
*/ | ||
export type AzureContentSafetyFilterConfig = { | ||
/** | ||
* String represents name of the filter provider. | ||
*/ | ||
type: 'azure_content_safety'; | ||
/** | ||
* Filter configuration for Azure Content Azure Content Safety. | ||
*/ | ||
config?: AzureContentSafety; | ||
} & Record<string, any>; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
10 changes: 10 additions & 0 deletions
10
packages/gen-ai-hub/src/orchestration/client/api/schema/filter-config.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
/* | ||
* Copyright (c) 2024 SAP SE or an SAP affiliate company. All rights reserved. | ||
* | ||
* This is a generated file powered by the SAP Cloud SDK for JavaScript. | ||
*/ | ||
import type { AzureContentSafetyFilterConfig } from './azure-content-safety-filter-config.js'; | ||
/** | ||
* Representation of the 'FilterConfig' schema. | ||
*/ | ||
export type FilterConfig = AzureContentSafetyFilterConfig; |
16 changes: 0 additions & 16 deletions
16
packages/gen-ai-hub/src/orchestration/client/api/schema/filter.ts
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
10 changes: 0 additions & 10 deletions
10
packages/gen-ai-hub/src/orchestration/client/api/schema/provider-type.ts
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
export * from './client/api/index.js'; | ||
export * from './orchestration-client.js'; | ||
export * from './orchestration-types.js'; | ||
export * from './orchestration-filter-utility.js'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.