@sap-ai-sdk/orchestration 2.0.0-20250901013207.0 → 2.0.0-20250902013117.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.ts +2 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/orchestration-types.d.ts +96 -83
- package/dist/orchestration-types.d.ts.map +1 -1
- package/dist/orchestration-types.js.map +1 -1
- package/dist/util/filtering.d.ts +7 -6
- package/dist/util/filtering.d.ts.map +1 -1
- package/dist/util/filtering.js +5 -4
- package/dist/util/filtering.js.map +1 -1
- package/dist/util/grounding.d.ts +2 -2
- package/dist/util/grounding.d.ts.map +1 -1
- package/dist/util/translation.d.ts +5 -4
- package/dist/util/translation.d.ts.map +1 -1
- package/dist/util/translation.js +4 -3
- package/dist/util/translation.js.map +1 -1
- package/package.json +4 -4
package/dist/index.d.ts
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
export type { OrchestrationModuleConfig, PromptTemplatingModule, MaskingModule, GroundingModule, FilteringModule, TranslationModule, PromptTemplate, ChatCompletionRequest, RequestOptions, StreamOptions, DocumentGroundingServiceConfig, DocumentGroundingServiceFilter, DpiMaskingConfig, LlmModelParams, LlmModelDetails,
|
|
1
|
+
export type { OrchestrationModuleConfig, PromptTemplatingModule, MaskingModule, GroundingModule, FilteringModule, TranslationModule, PromptTemplate, ChatCompletionRequest, RequestOptions, StreamOptions, DocumentGroundingServiceConfig, DocumentGroundingServiceFilter, DpiMaskingConfig, LlmModelParams, LlmModelDetails, LlamaGuard38BCategory, LlamaGuard38BFilterReturnType, LlamaGuard38BInputFilterConfig, LlamaGuard38BOutputFilterConfig, AzureFilterThreshold, AzureContentSafetyFilterInputParameters, AzureContentSafetyFilterOutputParameters, AzureContentSafetyFilterParameters, AzureContentSafetyFilterReturnType, OrchestrationErrorResponse, DpiMaskingProviderConfig, TranslationConfigParams, TranslationInputParameters, TranslationOutputParameters, TranslationReturnType, TranslationInputConfig, TranslationOutputConfig } from './orchestration-types.js';
|
|
2
2
|
export { OrchestrationStreamResponse } from './orchestration-stream-response.js';
|
|
3
3
|
export { OrchestrationStreamChunkResponse } from './orchestration-stream-chunk-response.js';
|
|
4
4
|
export { OrchestrationStream } from './orchestration-stream.js';
|
|
5
5
|
export { OrchestrationClient } from './orchestration-client.js';
|
|
6
6
|
export { OrchestrationResponse } from './orchestration-response.js';
|
|
7
7
|
export type { ChatModel } from './model-types.js';
|
|
8
|
-
export { buildAzureContentSafetyFilter,
|
|
8
|
+
export { buildAzureContentSafetyFilter, buildLlamaGuard38BFilter, buildDocumentGroundingConfig, buildDpiMaskingProvider, buildTranslationConfig } from './util/index.js';
|
|
9
9
|
/**
|
|
10
10
|
* Exporting frequently used types.
|
|
11
11
|
* In case of breaking changes, create wrappers in `orchestration-types.ts`.
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,YAAY,EACV,yBAAyB,EACzB,sBAAsB,EACtB,aAAa,EACb,eAAe,EACf,eAAe,EACf,iBAAiB,EACjB,cAAc,EACd,qBAAqB,EACrB,cAAc,EACd,aAAa,EACb,8BAA8B,EAC9B,8BAA8B,EAC9B,gBAAgB,EAChB,cAAc,EACd,eAAe,EACf,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,YAAY,EACV,yBAAyB,EACzB,sBAAsB,EACtB,aAAa,EACb,eAAe,EACf,eAAe,EACf,iBAAiB,EACjB,cAAc,EACd,qBAAqB,EACrB,cAAc,EACd,aAAa,EACb,8BAA8B,EAC9B,8BAA8B,EAC9B,gBAAgB,EAChB,cAAc,EACd,eAAe,EACf,qBAAqB,EACrB,6BAA6B,EAC7B,8BAA8B,EAC9B,+BAA+B,EAC/B,oBAAoB,EACpB,uCAAuC,EACvC,wCAAwC,EACxC,kCAAkC,EAClC,kCAAkC,EAClC,0BAA0B,EAC1B,wBAAwB,EACxB,uBAAuB,EACvB,0BAA0B,EAC1B,2BAA2B,EAC3B,qBAAqB,EACrB,sBAAsB,EACtB,uBAAuB,EACxB,MAAM,0BAA0B,CAAC;AAClC,OAAO,EAAE,2BAA2B,EAAE,MAAM,oCAAoC,CAAC;AACjF,OAAO,EAAE,gCAAgC,EAAE,MAAM,0CAA0C,CAAC;AAC5F,OAAO,EAAE,mBAAmB,EAAE,MAAM,2BAA2B,CAAC;AAChE,OAAO,EAAE,mBAAmB,EAAE,MAAM,2BAA2B,CAAC;AAChE,OAAO,EAAE,qBAAqB,EAAE,MAAM,6BAA6B,CAAC;AACpE,YAAY,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAElD,OAAO,EACL,6BAA6B,EAC7B,wBAAwB,EACxB,4BAA4B,EAC5B,uBAAuB,EACvB,sBAAsB,EACvB,MAAM,iBAAiB,CAAC;AAEzB;;;;GAIG;AACH,YAAY,EACV,WAAW,EACX,iBAAiB,EACjB,eAAe,EACf,oBAAoB,EACpB,eAAe,EACf,oBAAoB,EACpB,kBAAkB,EAClB,cAAc,EACf,MAAM,8BAA8B,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -3,5 +3,5 @@ export { OrchestrationStreamChunkResponse } from './orchestration-stream-chunk-r
|
|
|
3
3
|
export { OrchestrationStream } from './orchestration-stream.js';
|
|
4
4
|
export { OrchestrationClient } from './orchestration-client.js';
|
|
5
5
|
export { OrchestrationResponse } from './orchestration-response.js';
|
|
6
|
-
export { buildAzureContentSafetyFilter,
|
|
6
|
+
export { buildAzureContentSafetyFilter, buildLlamaGuard38BFilter, buildDocumentGroundingConfig, buildDpiMaskingProvider, buildTranslationConfig } from './util/index.js';
|
|
7
7
|
//# sourceMappingURL=index.js.map
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAkCA,OAAO,EAAE,2BAA2B,EAAE,MAAM,oCAAoC,CAAC;AACjF,OAAO,EAAE,gCAAgC,EAAE,MAAM,0CAA0C,CAAC;AAC5F,OAAO,EAAE,mBAAmB,EAAE,MAAM,2BAA2B,CAAC;AAChE,OAAO,EAAE,mBAAmB,EAAE,MAAM,2BAA2B,CAAC;AAChE,OAAO,EAAE,qBAAqB,EAAE,MAAM,6BAA6B,CAAC;AAGpE,OAAO,EACL,6BAA6B,EAC7B,wBAAwB,EACxB,4BAA4B,EAC5B,uBAAuB,EACvB,sBAAsB,EACvB,MAAM,iBAAiB,CAAC"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { Xor } from '@sap-cloud-sdk/util';
|
|
2
2
|
import type { CustomRequestConfig } from '@sap-cloud-sdk/http-client';
|
|
3
3
|
import type { ChatModel } from './model-types.js';
|
|
4
|
-
import type { ChatMessages, DataRepositoryType, DocumentGroundingFilter, DpiConfig, DpiEntities, FilteringStreamOptions, LlamaGuard38B, LLMModelDetails as OriginalLLMModelDetails, Template, TemplateRef, TemplatingChatMessage, DPIStandardEntity, DPICustomEntity, InputFilteringConfig, OutputFilteringConfig, MaskingProviderConfig, SAPDocumentTranslation, GlobalStreamOptions, ErrorResponse, AzureContentSafetyInputFilterConfig, AzureContentSafetyOutputFilterConfig,
|
|
4
|
+
import type { ChatMessages, DataRepositoryType, DocumentGroundingFilter, DpiConfig, DpiEntities, FilteringStreamOptions, LlamaGuard38B, LLMModelDetails as OriginalLLMModelDetails, Template, TemplateRef, TemplatingChatMessage, DPIStandardEntity, DPICustomEntity, InputFilteringConfig, OutputFilteringConfig, MaskingProviderConfig, SAPDocumentTranslation, GlobalStreamOptions, ErrorResponse, AzureContentSafetyInputFilterConfig, AzureContentSafetyOutputFilterConfig, LlamaGuard38BFilterConfig } from './client/api/schema/index.js';
|
|
5
5
|
/**
|
|
6
6
|
* Chat completion request configuration.
|
|
7
7
|
*/
|
|
@@ -72,7 +72,7 @@ export interface PromptTemplatingModule {
|
|
|
72
72
|
model: LlmModelDetails;
|
|
73
73
|
}
|
|
74
74
|
/**
|
|
75
|
-
* Representation of the
|
|
75
|
+
* Representation of the `FilteringModuleConfig` schema.
|
|
76
76
|
*/
|
|
77
77
|
export interface FilteringModule {
|
|
78
78
|
/**
|
|
@@ -85,7 +85,7 @@ export interface FilteringModule {
|
|
|
85
85
|
output?: OutputFilteringConfig;
|
|
86
86
|
}
|
|
87
87
|
/**
|
|
88
|
-
* Representation of the
|
|
88
|
+
* Representation of the `MaskingModuleConfig` schema.
|
|
89
89
|
*/
|
|
90
90
|
export interface MaskingModule {
|
|
91
91
|
/**
|
|
@@ -94,43 +94,6 @@ export interface MaskingModule {
|
|
|
94
94
|
*/
|
|
95
95
|
masking_providers: MaskingProviderConfig[];
|
|
96
96
|
}
|
|
97
|
-
/**
|
|
98
|
-
* Representation of the 'GroundingModuleConfig' schema.
|
|
99
|
-
*/
|
|
100
|
-
export interface GroundingModule {
|
|
101
|
-
/**
|
|
102
|
-
* @example "document_grounding_service"
|
|
103
|
-
*/
|
|
104
|
-
type: 'document_grounding_service' | any;
|
|
105
|
-
/**
|
|
106
|
-
* Grounding service configuration.
|
|
107
|
-
*/
|
|
108
|
-
config: {
|
|
109
|
-
/**
|
|
110
|
-
* Document grounding service filters to be used.
|
|
111
|
-
*/
|
|
112
|
-
filters?: DocumentGroundingFilter[];
|
|
113
|
-
/**
|
|
114
|
-
* Placeholders to be used for grounding input questions and output.
|
|
115
|
-
*/
|
|
116
|
-
placeholders: {
|
|
117
|
-
/**
|
|
118
|
-
* Contains the input parameters used for grounding input questions
|
|
119
|
-
* Min Items: 1.
|
|
120
|
-
*/
|
|
121
|
-
input: string[];
|
|
122
|
-
/**
|
|
123
|
-
* Placeholder name for grounding output.
|
|
124
|
-
* @example "groundingOutput"
|
|
125
|
-
*/
|
|
126
|
-
output: string;
|
|
127
|
-
};
|
|
128
|
-
/**
|
|
129
|
-
* Parameter name used for specifying metadata parameters.
|
|
130
|
-
*/
|
|
131
|
-
metadata_params?: string[];
|
|
132
|
-
};
|
|
133
|
-
}
|
|
134
97
|
/**
|
|
135
98
|
* Configuration for translation module.
|
|
136
99
|
*/
|
|
@@ -138,11 +101,11 @@ export interface TranslationModule {
|
|
|
138
101
|
/**
|
|
139
102
|
* Configuration for input translation.
|
|
140
103
|
*/
|
|
141
|
-
input?:
|
|
104
|
+
input?: TranslationInputConfig;
|
|
142
105
|
/**
|
|
143
106
|
* Configuration for output translation.
|
|
144
107
|
*/
|
|
145
|
-
output?:
|
|
108
|
+
output?: TranslationOutputConfig;
|
|
146
109
|
}
|
|
147
110
|
/**
|
|
148
111
|
* Orchestration error response.
|
|
@@ -191,7 +154,7 @@ export interface OrchestrationModuleConfig {
|
|
|
191
154
|
promptTemplating: PromptTemplatingModule;
|
|
192
155
|
/**
|
|
193
156
|
* Filtering module configuration for both input and output filters.
|
|
194
|
-
* To configure a filter, use convenience functions like `buildAzureContentSafetyFilter`, `
|
|
157
|
+
* To configure a filter, use convenience functions like `buildAzureContentSafetyFilter`, `buildLlamaGuard38BFilter`, etc..
|
|
195
158
|
* @example
|
|
196
159
|
* filtering: {
|
|
197
160
|
* input: {
|
|
@@ -256,6 +219,43 @@ export interface StreamOptions {
|
|
|
256
219
|
*/
|
|
257
220
|
global?: GlobalStreamOptions;
|
|
258
221
|
}
|
|
222
|
+
/**
|
|
223
|
+
* Representation of the `GroundingModuleConfig` schema.
|
|
224
|
+
*/
|
|
225
|
+
export interface GroundingModule {
|
|
226
|
+
/**
|
|
227
|
+
* @example 'document_grounding_service'
|
|
228
|
+
*/
|
|
229
|
+
type: 'document_grounding_service' | any;
|
|
230
|
+
/**
|
|
231
|
+
* Grounding service configuration.
|
|
232
|
+
*/
|
|
233
|
+
config: {
|
|
234
|
+
/**
|
|
235
|
+
* Document grounding service filters to be used.
|
|
236
|
+
*/
|
|
237
|
+
filters?: DocumentGroundingFilter[];
|
|
238
|
+
/**
|
|
239
|
+
* Placeholders to be used for grounding input questions and output.
|
|
240
|
+
*/
|
|
241
|
+
placeholders: {
|
|
242
|
+
/**
|
|
243
|
+
* Contains the input parameters used for grounding input questions
|
|
244
|
+
* Min Items: 1.
|
|
245
|
+
*/
|
|
246
|
+
input: string[];
|
|
247
|
+
/**
|
|
248
|
+
* Placeholder name for grounding output.
|
|
249
|
+
* @example 'groundingOutput'
|
|
250
|
+
*/
|
|
251
|
+
output: string;
|
|
252
|
+
};
|
|
253
|
+
/**
|
|
254
|
+
* Parameter name used for specifying metadata parameters.
|
|
255
|
+
*/
|
|
256
|
+
metadata_params?: string[];
|
|
257
|
+
};
|
|
258
|
+
}
|
|
259
259
|
/**
|
|
260
260
|
* Represents a filter configuration for the Document Grounding Service.
|
|
261
261
|
*/
|
|
@@ -308,9 +308,9 @@ export type DpiMaskingConfig = Omit<DpiConfig, 'type' | 'entities' | 'mask_groun
|
|
|
308
308
|
mask_grounding_input?: boolean;
|
|
309
309
|
};
|
|
310
310
|
/**
|
|
311
|
-
*
|
|
311
|
+
* Output Parameters for Azure content safety output filter.
|
|
312
312
|
*/
|
|
313
|
-
export interface
|
|
313
|
+
export interface AzureContentSafetyFilterOutputParameters {
|
|
314
314
|
/**
|
|
315
315
|
* The filter category for hate content.
|
|
316
316
|
*/
|
|
@@ -327,32 +327,16 @@ export interface AzureContentSafetyFilterInputParameters {
|
|
|
327
327
|
* The filter category for violence content.
|
|
328
328
|
*/
|
|
329
329
|
violence?: AzureFilterThreshold;
|
|
330
|
-
/**
|
|
331
|
-
* A flag to use prompt shield.
|
|
332
|
-
*/
|
|
333
|
-
prompt_shield?: boolean;
|
|
334
330
|
}
|
|
335
331
|
/**
|
|
336
|
-
*
|
|
332
|
+
* Input parameters for Azure content safety input filter.
|
|
337
333
|
*/
|
|
338
|
-
export
|
|
339
|
-
/**
|
|
340
|
-
* The filter category for hate content.
|
|
341
|
-
*/
|
|
342
|
-
hate?: AzureFilterThreshold;
|
|
343
|
-
/**
|
|
344
|
-
* The filter category for self-harm content.
|
|
345
|
-
*/
|
|
346
|
-
self_harm?: AzureFilterThreshold;
|
|
347
|
-
/**
|
|
348
|
-
* The filter category for sexual content.
|
|
349
|
-
*/
|
|
350
|
-
sexual?: AzureFilterThreshold;
|
|
334
|
+
export type AzureContentSafetyFilterInputParameters = AzureContentSafetyFilterOutputParameters & {
|
|
351
335
|
/**
|
|
352
|
-
*
|
|
336
|
+
* A flag to use prompt shield.
|
|
353
337
|
*/
|
|
354
|
-
|
|
355
|
-
}
|
|
338
|
+
prompt_shield?: boolean;
|
|
339
|
+
};
|
|
356
340
|
/**
|
|
357
341
|
* A descriptive constant for Azure content safety filter threshold.
|
|
358
342
|
* @internal
|
|
@@ -368,48 +352,77 @@ export declare const supportedAzureFilterThresholds: {
|
|
|
368
352
|
*/
|
|
369
353
|
export type AzureFilterThreshold = keyof typeof supportedAzureFilterThresholds;
|
|
370
354
|
/**
|
|
371
|
-
* The filter categories supported for Llama
|
|
355
|
+
* The filter categories supported for Llama Guard 3 8B filter.
|
|
372
356
|
*/
|
|
373
|
-
export type
|
|
357
|
+
export type LlamaGuard38BCategory = keyof LlamaGuard38B;
|
|
374
358
|
/**
|
|
375
|
-
*
|
|
376
|
-
*
|
|
359
|
+
* Type for module configurations (input or output).
|
|
360
|
+
* @internal
|
|
377
361
|
*/
|
|
378
|
-
export
|
|
362
|
+
export type ConfigType = 'input' | 'output';
|
|
363
|
+
/**
|
|
364
|
+
* Parameters for translation configuration.
|
|
365
|
+
* @internal
|
|
366
|
+
*/
|
|
367
|
+
interface TranslationConfigParameters {
|
|
379
368
|
/**
|
|
380
369
|
* Language of the text to be translated.
|
|
381
|
-
* @example sourceLanguage:
|
|
370
|
+
* @example sourceLanguage: 'de-DE'
|
|
382
371
|
*/
|
|
383
372
|
sourceLanguage?: string;
|
|
384
373
|
/**
|
|
385
374
|
* Language to which the text should be translated.
|
|
386
|
-
* @example targetLanguage:
|
|
375
|
+
* @example targetLanguage: 'en-US'
|
|
387
376
|
*/
|
|
388
377
|
targetLanguage: string;
|
|
389
378
|
}
|
|
379
|
+
/**
|
|
380
|
+
* Output parameters for translation output configuration.
|
|
381
|
+
*/
|
|
382
|
+
export type TranslationOutputParameters = TranslationConfigParameters;
|
|
383
|
+
/**
|
|
384
|
+
* Input parameters for translation input configuration.
|
|
385
|
+
*/
|
|
386
|
+
export type TranslationInputParameters = TranslationConfigParameters;
|
|
387
|
+
/**
|
|
388
|
+
* Parameters for translation configurations.
|
|
389
|
+
*/
|
|
390
|
+
export type TranslationConfigParams<T extends ConfigType> = T extends 'input' ? TranslationInputParameters : TranslationOutputParameters;
|
|
391
|
+
/**
|
|
392
|
+
* Input configuration for translation module.
|
|
393
|
+
*/
|
|
394
|
+
export type TranslationInputConfig = SAPDocumentTranslation;
|
|
395
|
+
/**
|
|
396
|
+
* Output configuration for translation module.
|
|
397
|
+
*/
|
|
398
|
+
export type TranslationOutputConfig = SAPDocumentTranslation;
|
|
399
|
+
/**
|
|
400
|
+
* Return type for translation configurations.
|
|
401
|
+
*/
|
|
402
|
+
export type TranslationReturnType<T extends ConfigType> = T extends 'input' ? TranslationInputConfig : TranslationOutputConfig;
|
|
390
403
|
/**
|
|
391
404
|
* Parameters for Azure content safety filters.
|
|
392
405
|
*/
|
|
393
|
-
export type AzureContentSafetyFilterParameters<T extends
|
|
406
|
+
export type AzureContentSafetyFilterParameters<T extends ConfigType> = T extends 'input' ? AzureContentSafetyFilterInputParameters : AzureContentSafetyFilterOutputParameters;
|
|
394
407
|
/**
|
|
395
408
|
* Filter return type for Azure Content Safety.
|
|
396
409
|
*/
|
|
397
|
-
export type AzureContentSafetyFilterReturnType<T extends
|
|
410
|
+
export type AzureContentSafetyFilterReturnType<T extends ConfigType> = T extends 'input' ? AzureContentSafetyInputFilterConfig : AzureContentSafetyOutputFilterConfig;
|
|
398
411
|
/**
|
|
399
|
-
*
|
|
412
|
+
* Input filter configuration for Llama Guard 3 8B.
|
|
400
413
|
*/
|
|
401
|
-
export type
|
|
414
|
+
export type LlamaGuard38BInputFilterConfig = LlamaGuard38BFilterConfig;
|
|
402
415
|
/**
|
|
403
|
-
*
|
|
416
|
+
* Output filter configuration for Llama Guard 3 8B.
|
|
404
417
|
*/
|
|
405
|
-
export type
|
|
418
|
+
export type LlamaGuard38BOutputFilterConfig = LlamaGuard38BFilterConfig;
|
|
406
419
|
/**
|
|
407
|
-
*
|
|
420
|
+
* Filter return type for Llama Guard 3 8B.
|
|
408
421
|
*/
|
|
409
|
-
export type
|
|
422
|
+
export type LlamaGuard38BFilterReturnType<T extends ConfigType> = T extends 'input' ? LlamaGuard38BInputFilterConfig : LlamaGuard38BOutputFilterConfig;
|
|
410
423
|
/**
|
|
411
|
-
* Representation of the '
|
|
424
|
+
* Representation of the 'DpiConfig' schema.
|
|
412
425
|
*/
|
|
413
|
-
export type
|
|
426
|
+
export type DpiMaskingProviderConfig = DpiConfig;
|
|
414
427
|
export {};
|
|
415
428
|
//# sourceMappingURL=orchestration-types.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"orchestration-types.d.ts","sourceRoot":"","sources":["../src/orchestration-types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,qBAAqB,CAAC;AAC/C,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,4BAA4B,CAAC;AACtE,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAClD,OAAO,KAAK,EACV,YAAY,EACZ,kBAAkB,EAClB,uBAAuB,EACvB,SAAS,EACT,WAAW,EACX,sBAAsB,EACtB,aAAa,EACb,eAAe,IAAI,uBAAuB,EAC1C,QAAQ,EACR,WAAW,EACX,qBAAqB,EACrB,iBAAiB,EACjB,eAAe,EACf,oBAAoB,EACpB,qBAAqB,EACrB,qBAAqB,EACrB,sBAAsB,EACtB,mBAAmB,EACnB,aAAa,EACb,mCAAmC,EACnC,oCAAoC,EACpC,
|
|
1
|
+
{"version":3,"file":"orchestration-types.d.ts","sourceRoot":"","sources":["../src/orchestration-types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,qBAAqB,CAAC;AAC/C,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,4BAA4B,CAAC;AACtE,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAClD,OAAO,KAAK,EACV,YAAY,EACZ,kBAAkB,EAClB,uBAAuB,EACvB,SAAS,EACT,WAAW,EACX,sBAAsB,EACtB,aAAa,EACb,eAAe,IAAI,uBAAuB,EAC1C,QAAQ,EACR,WAAW,EACX,qBAAqB,EACrB,iBAAiB,EACjB,eAAe,EACf,oBAAoB,EACpB,qBAAqB,EACrB,qBAAqB,EACrB,sBAAsB,EACtB,mBAAmB,EACnB,aAAa,EACb,mCAAmC,EACnC,oCAAoC,EACpC,yBAAyB,EAC1B,MAAM,8BAA8B,CAAC;AAEtC;;GAEG;AACH,MAAM,WAAW,qBAAqB;IACpC;;OAEG;IACH,eAAe,CAAC,EAAE,YAAY,CAAC;IAE/B;;;;;;;;;;;;;OAaG;IACH,QAAQ,CAAC,EAAE,YAAY,CAAC;IAExB;;;;;;OAMG;IACH,iBAAiB,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;CAC5C;AAED;;GAEG;AACH,MAAM,MAAM,eAAe,GAAG,IAAI,CAChC,uBAAuB,EACvB,MAAM,GAAG,QAAQ,CAClB,GAAG;IACF,IAAI,EAAE,SAAS,CAAC;IAChB,MAAM,CAAC,EAAE,cAAc,CAAC;CACzB,CAAC;AAEF;;GAEG;AACH,MAAM,WAAW,sBAAsB;IACrC;;OAEG;IACH;;;;;;;;;;;;;;;;OAgBG;IACH,MAAM,CAAC,EAAE,GAAG,CAAC,cAAc,EAAE,WAAW,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|
+
{"version":3,"file":"orchestration-types.js","sourceRoot":"","sources":["../src/orchestration-types.ts"],"names":[],"mappings":"AAwYA;;;GAGG;AACH,MAAM,CAAC,MAAM,8BAA8B,GAAG;IAC5C,UAAU,EAAE,CAAC;IACb,cAAc,EAAE,CAAC;IACjB,qBAAqB,EAAE,CAAC;IACxB,SAAS,EAAE,CAAC;CACJ,CAAC"}
|
package/dist/util/filtering.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { AzureContentSafetyFilterParameters, AzureContentSafetyFilterReturnType,
|
|
1
|
+
import type { AzureContentSafetyFilterParameters, AzureContentSafetyFilterReturnType, LlamaGuard38BCategory, LlamaGuard38BFilterReturnType, ConfigType } from '../orchestration-types.js';
|
|
2
2
|
/**
|
|
3
3
|
* Convenience function to build Azure content filter.
|
|
4
4
|
* @param type - Type of the filter, either 'input' or 'output'.
|
|
@@ -7,12 +7,13 @@ import type { AzureContentSafetyFilterParameters, AzureContentSafetyFilterReturn
|
|
|
7
7
|
* @returns Azure content safety configuration.
|
|
8
8
|
* @example "buildAzureContentSafetyFilter({ type: 'input', hate: 'ALLOW_SAFE', violence: 'ALLOW_SAFE_LOW_MEDIUM' })"
|
|
9
9
|
*/
|
|
10
|
-
export declare function buildAzureContentSafetyFilter<T extends
|
|
10
|
+
export declare function buildAzureContentSafetyFilter<T extends ConfigType>(type: T, config?: AzureContentSafetyFilterParameters<T>): AzureContentSafetyFilterReturnType<T>;
|
|
11
11
|
/**
|
|
12
|
-
* Convenience function to build Llama
|
|
12
|
+
* Convenience function to build Llama Guard 3 8B filter.
|
|
13
|
+
* @param type - Type of the filter, either `input` or `output`.
|
|
13
14
|
* @param categories - Categories to be enabled for filtering. Provide at least one category.
|
|
14
|
-
* @returns
|
|
15
|
-
* @example
|
|
15
|
+
* @returns Llama Guard 3 8B filter configuration.
|
|
16
|
+
* @example buildLlamaGuard38BFilter('input', ['elections', 'hate'])
|
|
16
17
|
*/
|
|
17
|
-
export declare function
|
|
18
|
+
export declare function buildLlamaGuard38BFilter<T extends ConfigType>(type: T, categories: [LlamaGuard38BCategory, ...LlamaGuard38BCategory[]]): LlamaGuard38BFilterReturnType<T>;
|
|
18
19
|
//# sourceMappingURL=filtering.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"filtering.d.ts","sourceRoot":"","sources":["../../src/util/filtering.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAEV,kCAAkC,EAClC,kCAAkC,EAElC,
|
|
1
|
+
{"version":3,"file":"filtering.d.ts","sourceRoot":"","sources":["../../src/util/filtering.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAEV,kCAAkC,EAClC,kCAAkC,EAElC,qBAAqB,EACrB,6BAA6B,EAC7B,UAAU,EACX,MAAM,2BAA2B,CAAC;AAEnC;;;;;;;GAOG;AACH,wBAAgB,6BAA6B,CAAC,CAAC,SAAS,UAAU,EAChE,IAAI,EAAE,CAAC,EACP,MAAM,CAAC,EAAE,kCAAkC,CAAC,CAAC,CAAC,GAC7C,kCAAkC,CAAC,CAAC,CAAC,CAuCvC;AAED;;;;;;GAMG;AACH,wBAAgB,wBAAwB,CAAC,CAAC,SAAS,UAAU,EAC3D,IAAI,EAAE,CAAC,EACP,UAAU,EAAE,CAAC,qBAAqB,EAAE,GAAG,qBAAqB,EAAE,CAAC,GAC9D,6BAA6B,CAAC,CAAC,CAAC,CAOlC"}
|
package/dist/util/filtering.js
CHANGED
|
@@ -40,12 +40,13 @@ export function buildAzureContentSafetyFilter(type, config) {
|
|
|
40
40
|
};
|
|
41
41
|
}
|
|
42
42
|
/**
|
|
43
|
-
* Convenience function to build Llama
|
|
43
|
+
* Convenience function to build Llama Guard 3 8B filter.
|
|
44
|
+
* @param type - Type of the filter, either `input` or `output`.
|
|
44
45
|
* @param categories - Categories to be enabled for filtering. Provide at least one category.
|
|
45
|
-
* @returns
|
|
46
|
-
* @example
|
|
46
|
+
* @returns Llama Guard 3 8B filter configuration.
|
|
47
|
+
* @example buildLlamaGuard38BFilter('input', ['elections', 'hate'])
|
|
47
48
|
*/
|
|
48
|
-
export function
|
|
49
|
+
export function buildLlamaGuard38BFilter(type, categories) {
|
|
49
50
|
return {
|
|
50
51
|
type: 'llama_guard_3_8b',
|
|
51
52
|
config: Object.fromEntries([...categories].map(category => [category, true]))
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"filtering.js","sourceRoot":"","sources":["../../src/util/filtering.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,8BAA8B,EAAE,MAAM,2BAA2B,CAAC;
|
|
1
|
+
{"version":3,"file":"filtering.js","sourceRoot":"","sources":["../../src/util/filtering.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,8BAA8B,EAAE,MAAM,2BAA2B,CAAC;AAe3E;;;;;;;GAOG;AACH,MAAM,UAAU,6BAA6B,CAC3C,IAAO,EACP,MAA8C;IAE9C,IAAI,CAAC,MAAM,EAAE,CAAC;QACZ,OAAO;YACL,IAAI,EAAE,sBAAsB;SAC7B,CAAC;IACJ,CAAC;IAED,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,MAAM,EAAE,CAAC;QAChC,MAAM,IAAI,KAAK,CAAC,sCAAsC,CAAC,CAAC;IAC1D,CAAC;IAED,IAAI,IAAI,KAAK,OAAO,EAAE,CAAC;QACrB,MAAM,EAAE,aAAa,EAAE,GAAG,IAAI,EAAE,GAC9B,MAAiD,CAAC;QACpD,OAAO;YACL,IAAI,EAAE,sBAAsB;YAC5B,MAAM,EAAE;gBACN,GAAG,MAAM,CAAC,WAAW,CACnB,MAAM,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,GAAG,EAAE,KAAK,CAAC,EAAE,EAAE,CAAC;oBACzC,GAAG;oBACH,8BAA8B,CAAC,KAA6B,CAAC;iBAC9D,CAAC,CACH;gBACD,GAAG,CAAC,aAAa,KAAK,SAAS,IAAI,EAAE,aAAa,EAAE,CAAC;aACtD;SACqC,CAAC;IAC3C,CAAC;IAED,OAAO;QACL,IAAI,EAAE,sBAAsB;QAC5B,MAAM,EAAE;YACN,GAAG,MAAM,CAAC,WAAW,CACnB,MAAM,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,GAAG,EAAE,KAAK,CAAC,EAAE,EAAE,CAAC;gBAC3C,GAAG;gBACH,8BAA8B,CAAC,KAA6B,CAAC;aAC9D,CAAC,CACH;SACF;KACsC,CAAC;AAC5C,CAAC;AAED;;;;;;GAMG;AACH,MAAM,UAAU,wBAAwB,CACtC,IAAO,EACP,UAA+D;IAE/D,OAAO;QACL,IAAI,EAAE,kBAAkB;QACxB,MAAM,EAAE,MAAM,CAAC,WAAW,CACxB,CAAC,GAAG,UAAU,CAAC,CAAC,GAAG,CAAC,QAAQ,CAAC,EAAE,CAAC,CAAC,QAAQ,EAAE,IAAI,CAAC,CAAC,CAClD;KACF,CAAC;AACJ,CAAC"}
|
package/dist/util/grounding.d.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import type { DocumentGroundingServiceConfig,
|
|
1
|
+
import type { DocumentGroundingServiceConfig, GroundingModule } from '../orchestration-types.js';
|
|
2
2
|
/**
|
|
3
3
|
* Convenience function to create Document Grounding configuration.
|
|
4
4
|
* @param groundingConfig - Configuration for the document grounding service.
|
|
5
5
|
* @returns An object with the full grounding configuration.
|
|
6
6
|
*/
|
|
7
|
-
export declare function buildDocumentGroundingConfig(groundingConfig: DocumentGroundingServiceConfig):
|
|
7
|
+
export declare function buildDocumentGroundingConfig(groundingConfig: DocumentGroundingServiceConfig): GroundingModule;
|
|
8
8
|
//# sourceMappingURL=grounding.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"grounding.d.ts","sourceRoot":"","sources":["../../src/util/grounding.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,8BAA8B,EAC9B,
|
|
1
|
+
{"version":3,"file":"grounding.d.ts","sourceRoot":"","sources":["../../src/util/grounding.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,8BAA8B,EAC9B,eAAe,EAChB,MAAM,2BAA2B,CAAC;AAEnC;;;;GAIG;AACH,wBAAgB,4BAA4B,CAC1C,eAAe,EAAE,8BAA8B,GAC9C,eAAe,CAmBjB"}
|
|
@@ -1,11 +1,12 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { TranslationConfigParams, TranslationReturnType, ConfigType } from '../orchestration-types.js';
|
|
2
2
|
/**
|
|
3
3
|
* Convenience function to build a document translation configuration for orchestration service.
|
|
4
|
+
* @param type - Type of the translation configuration, either `input` or `output`.
|
|
4
5
|
* @param config - Config for SAP Document Translation service.
|
|
5
6
|
* The target language is mandatory, while source language will be auto-detected if not provided.
|
|
6
7
|
* See https://help.sap.com/docs/translation-hub/sap-translation-hub/supported-languages-6854bbb1bd824ffebc3a097a7c0fd45d for list of supported languages.
|
|
7
|
-
* @returns
|
|
8
|
-
* @example
|
|
8
|
+
* @returns SAP Document Translation configuration.
|
|
9
|
+
* @example buildTranslationConfig('input', { sourceLanguage: 'de-DE', targetLanguage: 'en-US' })
|
|
9
10
|
*/
|
|
10
|
-
export declare function buildTranslationConfig(config: TranslationConfigParams):
|
|
11
|
+
export declare function buildTranslationConfig<T extends ConfigType>(type: T, config: TranslationConfigParams<T>): TranslationReturnType<T>;
|
|
11
12
|
//# sourceMappingURL=translation.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"translation.d.ts","sourceRoot":"","sources":["../../src/util/translation.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,
|
|
1
|
+
{"version":3,"file":"translation.d.ts","sourceRoot":"","sources":["../../src/util/translation.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,uBAAuB,EACvB,qBAAqB,EACrB,UAAU,EACX,MAAM,2BAA2B,CAAC;AAEnC;;;;;;;;GAQG;AACH,wBAAgB,sBAAsB,CAAC,CAAC,SAAS,UAAU,EACzD,IAAI,EAAE,CAAC,EACP,MAAM,EAAE,uBAAuB,CAAC,CAAC,CAAC,GACjC,qBAAqB,CAAC,CAAC,CAAC,CAU1B"}
|
package/dist/util/translation.js
CHANGED
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Convenience function to build a document translation configuration for orchestration service.
|
|
3
|
+
* @param type - Type of the translation configuration, either `input` or `output`.
|
|
3
4
|
* @param config - Config for SAP Document Translation service.
|
|
4
5
|
* The target language is mandatory, while source language will be auto-detected if not provided.
|
|
5
6
|
* See https://help.sap.com/docs/translation-hub/sap-translation-hub/supported-languages-6854bbb1bd824ffebc3a097a7c0fd45d for list of supported languages.
|
|
6
|
-
* @returns
|
|
7
|
-
* @example
|
|
7
|
+
* @returns SAP Document Translation configuration.
|
|
8
|
+
* @example buildTranslationConfig('input', { sourceLanguage: 'de-DE', targetLanguage: 'en-US' })
|
|
8
9
|
*/
|
|
9
|
-
export function buildTranslationConfig(config) {
|
|
10
|
+
export function buildTranslationConfig(type, config) {
|
|
10
11
|
return {
|
|
11
12
|
type: 'sap_document_translation',
|
|
12
13
|
config: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"translation.js","sourceRoot":"","sources":["../../src/util/translation.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"translation.js","sourceRoot":"","sources":["../../src/util/translation.ts"],"names":[],"mappings":"AAMA;;;;;;;;GAQG;AACH,MAAM,UAAU,sBAAsB,CACpC,IAAO,EACP,MAAkC;IAElC,OAAO;QACL,IAAI,EAAE,0BAA0B;QAChC,MAAM,EAAE;YACN,GAAG,CAAC,MAAM,CAAC,cAAc,IAAI;gBAC3B,eAAe,EAAE,MAAM,CAAC,cAAc;aACvC,CAAC;YACF,eAAe,EAAE,MAAM,CAAC,cAAc;SACvC;KACF,CAAC;AACJ,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sap-ai-sdk/orchestration",
|
|
3
|
-
"version": "2.0.0-
|
|
3
|
+
"version": "2.0.0-20250902013117.0",
|
|
4
4
|
"description": "",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"keywords": [
|
|
@@ -22,9 +22,9 @@
|
|
|
22
22
|
"dependencies": {
|
|
23
23
|
"@sap-cloud-sdk/util": "^4.1.1",
|
|
24
24
|
"yaml": "^2.8.1",
|
|
25
|
-
"@sap-ai-sdk/core": "^2.0.0-
|
|
26
|
-
"@sap-ai-sdk/ai-api": "^2.0.0-
|
|
27
|
-
"@sap-ai-sdk/prompt-registry": "^2.0.0-
|
|
25
|
+
"@sap-ai-sdk/core": "^2.0.0-20250902013117.0",
|
|
26
|
+
"@sap-ai-sdk/ai-api": "^2.0.0-20250902013117.0",
|
|
27
|
+
"@sap-ai-sdk/prompt-registry": "^2.0.0-20250902013117.0"
|
|
28
28
|
},
|
|
29
29
|
"devDependencies": {
|
|
30
30
|
"@sap-cloud-sdk/http-client": "^4.1.1",
|