@sap-ai-sdk/orchestration 1.10.0 → 1.10.1-20250321013142.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/README.md CHANGED
@@ -101,8 +101,6 @@ Use the orchestration client with templating to pass a prompt containing placeho
101
101
  This allows for variations in the prompt based on the input parameters.
102
102
 
103
103
  ```ts
104
- import { OrchestrationClient } from '@sap-ai-sdk/orchestration';
105
-
106
104
  const orchestrationClient = new OrchestrationClient({
107
105
  llm: {
108
106
  model_name: 'gpt-4o',
@@ -152,6 +150,7 @@ templating: {
152
150
  },
153
151
  required: ['x'],
154
152
  additionalProperties: false
153
+ }
155
154
  ]
156
155
  }
157
156
  ```
@@ -164,50 +163,50 @@ It is useful when the model is **not calling a tool**, but rather, responding to
164
163
  The example below demonstrates how to use `response_format` to return a JSON Schema, with `strict: true` ensuring the outputs conform precisely to the schema.
165
164
 
166
165
  ```ts
167
- templating: {
168
- template: [
169
- { role: 'user', content: 'What is the capital of {{?country}}?' }
170
- ],
171
- response_format: {
172
- type: 'json_schema',
173
- json_schema: {
174
- name: 'capital_response',
175
- strict: true,
176
- schema: {
177
- type: 'object',
178
- properties: {
179
- country_name: {
180
- type: "string",
181
- description: "The name of the country provided by the user."
182
- },
183
- capital: {
184
- type: "string",
185
- description: "The capital city of the country."
186
- }
187
- },
188
- required: ["country_name", "capital"]
166
+ const templating: TemplateModuleConfig = {
167
+ template: [{ role: 'user', content: 'What is the capital of {{?country}}?' }],
168
+ response_format: {
169
+ type: 'json_schema',
170
+ json_schema: {
171
+ name: 'capital_response',
172
+ strict: true,
173
+ schema: {
174
+ type: 'object',
175
+ properties: {
176
+ country_name: {
177
+ type: 'string',
178
+ description: 'The name of the country provided by the user.'
179
+ },
180
+ capital: {
181
+ type: 'string',
182
+ description: 'The capital city of the country.'
189
183
  }
190
- }
184
+ },
185
+ required: ['country_name', 'capital']
191
186
  }
187
+ }
192
188
  }
189
+ };
193
190
  ```
194
191
 
195
192
  You can also initialize `json_schema` using a Zod schema, as shown below:
196
193
 
197
194
  ```ts
198
- const countryCapitalSchema = z.object({
195
+ const countryCapitalSchema = z
196
+ .object({
199
197
  country_name: z.string(),
200
198
  capital: z.string()
201
- }).strict();
199
+ })
200
+ .strict();
202
201
 
203
- response_format: {
202
+ const response_format: ResponseFormatJsonSchema = {
204
203
  type: 'json_schema',
205
204
  json_schema: {
206
205
  name: 'capital_response',
207
206
  strict: true,
208
207
  schema: zodToJsonSchema(countryCapitalSchema)
209
208
  }
210
- }
209
+ };
211
210
  ```
212
211
 
213
212
  ### Prompt Registry
@@ -240,8 +239,6 @@ It is possible to provide a history of a conversation to the model.
240
239
  Use the following snippet to send a chat completion request with history and a system message:
241
240
 
242
241
  ```ts
243
- import { OrchestrationClient } from '@sap-ai-sdk/orchestration';
244
-
245
242
  const orchestrationClient = new OrchestrationClient({
246
243
  llm: {
247
244
  model_name: 'gpt-4o',
@@ -282,8 +279,6 @@ Many models in the orchestration service have image recognition capabilities, me
282
279
  > Attempting to use `image_url` in non-user messages will result in an error.
283
280
 
284
281
  ```ts
285
- import { OrchestrationClient } from '@sap-ai-sdk/orchestration';
286
-
287
282
  const orchestrationClient = new OrchestrationClient({
288
283
  llm: {
289
284
  model_name: 'gpt-4o'
@@ -330,17 +325,15 @@ The following example demonstrates how to use content filtering with the orchest
330
325
  See the sections below for details on the available content filters and how to build them.
331
326
 
332
327
  ```ts
333
- import { OrchestrationClient } from '@sap-ai-sdk/orchestration';
334
-
335
- const llm = {
328
+ const llm: LlmModuleConfig = {
336
329
  model_name: 'gpt-4o',
337
330
  model_params: { max_tokens: 50, temperature: 0.1 }
338
331
  };
339
- const templating = {
332
+ const templating: TemplatingModuleConfig = {
340
333
  template: [{ role: 'user', content: '{{?input}}' }]
341
334
  };
342
335
 
343
- const filter = ... // Use a build function to create a content filter
336
+ const filter: FilterConfig = ... // Use a build function to create a content filter
344
337
 
345
338
  const orchestrationClient = new OrchestrationClient({
346
339
  llm,
@@ -400,35 +393,38 @@ Available categories can be found with autocompletion.
400
393
  Pass the categories as arguments to the function to enable them.
401
394
 
402
395
  ```ts
403
- const filter = buildLlamaGuardFilter('hate', 'violent_crimes');
396
+ const filter: FilterConfig = buildLlamaGuardFilter('hate', 'violent_crimes');
404
397
  ```
405
398
 
406
399
  ### Data Masking
407
400
 
408
- You can anonymize or pseudonomize the prompt using the data masking capabilities of the orchestration service.
401
+ Use the orchestration client with masking to mask sensitive information in the prompt while preserving necessary context for the generative AI model.
402
+
403
+ The following example demonstrates how to use data masking with the orchestration client.
404
+ See the sections below for details on the available masking providers and how to build them.
409
405
 
410
406
  ```ts
407
+ const llm: LlmModuleConfig = {
408
+ model_name: 'gpt-4o',
409
+ model_params: { max_tokens: 50, temperature: 0.1 }
410
+ };
411
+ const templating: TemplatingModuleConfig = {
412
+ template: [
413
+ {
414
+ role: 'user',
415
+ content:
416
+ 'Please write an email to {{?user}} ({{?email}}), informing them about the amazing capabilities of generative AI! Be brief and concise, write at most 6 sentences.'
417
+ }
418
+ ]
419
+ };
420
+
421
+ const maskingProvider: MaskingProviderConfig = ... // Use a build function to create a masking provider
422
+
411
423
  const orchestrationClient = new OrchestrationClient({
412
- llm: {
413
- model_name: 'gpt-4o'
414
- },
415
- templating: {
416
- template: [
417
- {
418
- role: 'user',
419
- content:
420
- 'Please write an email to {{?user}} ({{?email}}), informing them about the amazing capabilities of generative AI! Be brief and concise, write at most 6 sentences.'
421
- }
422
- ]
423
- },
424
+ llm,
425
+ templating,
424
426
  masking: {
425
- masking_providers: [
426
- {
427
- type: 'sap_data_privacy_integration',
428
- method: 'pseudonymization',
429
- entities: [{ type: 'profile-email' }, { type: 'profile-person' }]
430
- }
431
- ]
427
+ masking_providers: [maskingProvider] // Multiple masking providers can be applied
432
428
  }
433
429
  });
434
430
 
@@ -438,6 +434,23 @@ const response = await orchestrationClient.chatCompletion({
438
434
  return response.getContent();
439
435
  ```
440
436
 
437
+ #### SAP Data Privacy Integration
438
+
439
+ Orchestration service offers a masking provider SAP Data Privacy Integration (DPI) to anonymize or pseudonomize sensitive information.
440
+ Use `buildDpiMaskingProvider()` function to build a DPI masking provider.
441
+
442
+ ```ts
443
+ const maskingProvider: MaskingProviderConfig = buildDpiMaskingProvider({
444
+ method: 'annonymization',
445
+ entities: [{ type: 'profile-email' }, { type: 'profile-person' }],
446
+ allowlist: ['SAP']
447
+ });
448
+ ```
449
+
450
+ The `allowlist` property specifies terms will be kept unmasked.
451
+ Set `mask_grounding_input` to `true` to mask grounding input as well.
452
+ For more information about groundings, refer to the [grounding](#grounding) section.
453
+
441
454
  ### Grounding
442
455
 
443
456
  Grounding enables integrating external, contextually relevant, domain-specific, or real-time data into AI processes.
@@ -482,29 +495,6 @@ Set it to `help.sap.com` to retrieve context from the SAP Help Portal.
482
495
  Set `data_respotiories` property with an array of `REPOSITORY_ID` values to search in specific data repositories.
483
496
  Skip this property to search in all available data repositories.
484
497
 
485
- #### Data Masking in Grounding
486
-
487
- You can also configure masking of the grounding input to anonymize sensitive information while preserving necessary context for the Orchestration service.
488
- A masking configuration can be added in the grounding example above to mask the grounding input.
489
-
490
- ```ts
491
- masking: {
492
- masking_providers: [
493
- {
494
- type: 'sap_data_privacy_integration',
495
- method: 'pseudonymization',
496
- entities: [{ type: 'profile-email' }, { type: 'profile-person' }],
497
- mask_grounding_input: {
498
- enabled: true
499
- },
500
- allowlist: ['AI Core']
501
- }
502
- ];
503
- }
504
- ```
505
-
506
- The `allowlist` property allows you to specify terms that should remain unmasked, ensuring important context-specific terminology is preserved in the grounding input.
507
-
508
498
  ### Using a JSON Configuration from AI Launchpad
509
499
 
510
500
  If you already have an orchestration workflow created in AI Launchpad, you can either download the configuration as a JSON file or copy the JSON string directly to use it with the orchestration client.
package/dist/index.d.ts CHANGED
@@ -1,10 +1,10 @@
1
1
  export * from './client/api/schema/index.js';
2
- export type { OrchestrationModuleConfig, LlmModuleConfig, Prompt, RequestOptions, StreamOptions, DocumentGroundingServiceConfig, DocumentGroundingServiceFilter, LlmModelParams, LlamaGuardCategory, AzureContentFilter, AzureFilterThreshold } from './orchestration-types.js';
2
+ export type { OrchestrationModuleConfig, LlmModuleConfig, Prompt, RequestOptions, StreamOptions, DocumentGroundingServiceConfig, DocumentGroundingServiceFilter, DpiMaskingConfig, LlmModelParams, LlamaGuardCategory, AzureContentFilter, AzureFilterThreshold } from './orchestration-types.js';
3
3
  export { OrchestrationStreamResponse } from './orchestration-stream-response.js';
4
4
  export { OrchestrationStreamChunkResponse } from './orchestration-stream-chunk-response.js';
5
5
  export { OrchestrationStream } from './orchestration-stream.js';
6
6
  export { OrchestrationClient } from './orchestration-client.js';
7
- export { buildAzureContentFilter, buildAzureContentSafetyFilter, buildLlamaGuardFilter, buildDocumentGroundingConfig } from './util/index.js';
7
+ export { buildAzureContentFilter, buildAzureContentSafetyFilter, buildLlamaGuardFilter, buildDocumentGroundingConfig, buildDpiMaskingProvider } from './util/index.js';
8
8
  export { OrchestrationResponse } from './orchestration-response.js';
9
9
  export type { ChatModel } from './model-types.js';
10
10
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,8BAA8B,CAAC;AAE7C,YAAY,EACV,yBAAyB,EACzB,eAAe,EACf,MAAM,EACN,cAAc,EACd,aAAa,EACb,8BAA8B,EAC9B,8BAA8B,EAC9B,cAAc,EACd,kBAAkB,EAClB,kBAAkB,EAClB,oBAAoB,EACrB,MAAM,0BAA0B,CAAC;AAElC,OAAO,EAAE,2BAA2B,EAAE,MAAM,oCAAoC,CAAC;AAEjF,OAAO,EAAE,gCAAgC,EAAE,MAAM,0CAA0C,CAAC;AAE5F,OAAO,EAAE,mBAAmB,EAAE,MAAM,2BAA2B,CAAC;AAEhE,OAAO,EAAE,mBAAmB,EAAE,MAAM,2BAA2B,CAAC;AAEhE,OAAO,EACL,uBAAuB,EACvB,6BAA6B,EAC7B,qBAAqB,EACrB,4BAA4B,EAC7B,MAAM,iBAAiB,CAAC;AAEzB,OAAO,EAAE,qBAAqB,EAAE,MAAM,6BAA6B,CAAC;AAEpE,YAAY,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,8BAA8B,CAAC;AAE7C,YAAY,EACV,yBAAyB,EACzB,eAAe,EACf,MAAM,EACN,cAAc,EACd,aAAa,EACb,8BAA8B,EAC9B,8BAA8B,EAC9B,gBAAgB,EAChB,cAAc,EACd,kBAAkB,EAClB,kBAAkB,EAClB,oBAAoB,EACrB,MAAM,0BAA0B,CAAC;AAElC,OAAO,EAAE,2BAA2B,EAAE,MAAM,oCAAoC,CAAC;AAEjF,OAAO,EAAE,gCAAgC,EAAE,MAAM,0CAA0C,CAAC;AAE5F,OAAO,EAAE,mBAAmB,EAAE,MAAM,2BAA2B,CAAC;AAEhE,OAAO,EAAE,mBAAmB,EAAE,MAAM,2BAA2B,CAAC;AAEhE,OAAO,EACL,uBAAuB,EACvB,6BAA6B,EAC7B,qBAAqB,EACrB,4BAA4B,EAC5B,uBAAuB,EACxB,MAAM,iBAAiB,CAAC;AAEzB,OAAO,EAAE,qBAAqB,EAAE,MAAM,6BAA6B,CAAC;AAEpE,YAAY,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC"}
package/dist/index.js CHANGED
@@ -3,6 +3,6 @@ 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
- export { buildAzureContentFilter, buildAzureContentSafetyFilter, buildLlamaGuardFilter, buildDocumentGroundingConfig } from './util/index.js';
6
+ export { buildAzureContentFilter, buildAzureContentSafetyFilter, buildLlamaGuardFilter, buildDocumentGroundingConfig, buildDpiMaskingProvider } from './util/index.js';
7
7
  export { OrchestrationResponse } from './orchestration-response.js';
8
8
  //# 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":"AAAA,cAAc,8BAA8B,CAAC;AAgB7C,OAAO,EAAE,2BAA2B,EAAE,MAAM,oCAAoC,CAAC;AAEjF,OAAO,EAAE,gCAAgC,EAAE,MAAM,0CAA0C,CAAC;AAE5F,OAAO,EAAE,mBAAmB,EAAE,MAAM,2BAA2B,CAAC;AAEhE,OAAO,EAAE,mBAAmB,EAAE,MAAM,2BAA2B,CAAC;AAEhE,OAAO,EACL,uBAAuB,EACvB,6BAA6B,EAC7B,qBAAqB,EACrB,4BAA4B,EAC7B,MAAM,iBAAiB,CAAC;AAEzB,OAAO,EAAE,qBAAqB,EAAE,MAAM,6BAA6B,CAAC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,8BAA8B,CAAC;AAiB7C,OAAO,EAAE,2BAA2B,EAAE,MAAM,oCAAoC,CAAC;AAEjF,OAAO,EAAE,gCAAgC,EAAE,MAAM,0CAA0C,CAAC;AAE5F,OAAO,EAAE,mBAAmB,EAAE,MAAM,2BAA2B,CAAC;AAEhE,OAAO,EAAE,mBAAmB,EAAE,MAAM,2BAA2B,CAAC;AAEhE,OAAO,EACL,uBAAuB,EACvB,6BAA6B,EAC7B,qBAAqB,EACrB,4BAA4B,EAC5B,uBAAuB,EACxB,MAAM,iBAAiB,CAAC;AAEzB,OAAO,EAAE,qBAAqB,EAAE,MAAM,6BAA6B,CAAC"}
@@ -1,6 +1,6 @@
1
1
  import type { CustomRequestConfig } from '@sap-cloud-sdk/http-client';
2
2
  import type { ChatModel } from './model-types.js';
3
- import type { ChatMessages, DataRepositoryType, DocumentGroundingFilter, FilteringModuleConfig, FilteringStreamOptions, GlobalStreamOptions, GroundingModuleConfig, LlamaGuard38B, MaskingModuleConfig, LlmModuleConfig as OriginalLlmModuleConfig, TemplatingModuleConfig } from './client/api/schema/index.js';
3
+ import type { ChatMessages, DataRepositoryType, DocumentGroundingFilter, DpiConfig, DpiEntities, FilteringModuleConfig, FilteringStreamOptions, GlobalStreamOptions, GroundingModuleConfig, LlamaGuard38B, MaskingModuleConfig, LlmModuleConfig as OriginalLlmModuleConfig, TemplatingModuleConfig } from './client/api/schema/index.js';
4
4
  /**
5
5
  * Prompt configuration.
6
6
  */
@@ -142,6 +142,13 @@ export interface DocumentGroundingServiceConfig {
142
142
  */
143
143
  output_param: string;
144
144
  }
145
+ /**
146
+ * Represents the configuration for the masking provider SAP Data Privacy Integration.
147
+ */
148
+ export type DpiMaskingConfig = Omit<DpiConfig, 'type' | 'entities' | 'mask_grounding_input'> & {
149
+ entities: [DpiEntities, ...DpiEntities[]];
150
+ mask_grounding_input?: boolean;
151
+ };
145
152
  /**
146
153
  * Filter configuration for Azure content safety Filter.
147
154
  */
@@ -1 +1 @@
1
- {"version":3,"file":"orchestration-types.d.ts","sourceRoot":"","sources":["../src/orchestration-types.ts"],"names":[],"mappings":"AAAA,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,qBAAqB,EACrB,sBAAsB,EACtB,mBAAmB,EACnB,qBAAqB,EACrB,aAAa,EACb,mBAAmB,EACnB,eAAe,IAAI,uBAAuB,EAC1C,sBAAsB,EACvB,MAAM,8BAA8B,CAAC;AAEtC;;GAEG;AACH,MAAM,WAAW,MAAM;IACrB;;OAEG;IACH,eAAe,CAAC,EAAE,YAAY,CAAC;IAE/B;;OAEG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;CACtC;AAED;;GAEG;AACH,MAAM,MAAM,eAAe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AE,sBAAsB,CAAC;IACzC;;OAEG;IACH,MAAM,CAAC,EAAE,mBAAmB,CAAC;CAC9B;AAED;;GAEG;AACH,MAAM,MAAM,8BAA8B,GAAG,IAAI,CAC/C,uBAAuB,EACvB,sBAAsB,CACvB,GAAG;IACF;;;OAGG;IACH,oBAAoB,CAAC,EAAE,kBAAkB,CAAC;CAC3C,CAAC;AAEF;;GAEG;AACH,MAAM,WAAW,8BAA8B;IAC7C;;OAEG;IACH,OAAO,CAAC,EAAE,8BAA8B,EAAE,CAAC;IAC3C;;OAEG;IACH,YAAY,EAAE,MAAM,EAAE,CAAC;IACvB;;;OAGG;IACH,YAAY,EAAE,MAAM,CAAC;CACtB;AAED;;GAEG;AACH,MAAM,WAAW,kBAAkB;IACjC;;OAEG;IACH,IAAI,CAAC,EAAE,oBAAoB,CAAC;IAC5B;;OAEG;IACH,QAAQ,CAAC,EAAE,oBAAoB,CAAC;IAChC;;OAEG;IACH,MAAM,CAAC,EAAE,oBAAoB,CAAC;IAC9B;;OAEG;IACH,QAAQ,CAAC,EAAE,oBAAoB,CAAC;CACjC;AAED;;;GAGG;AACH,eAAO,MAAM,8BAA8B;;;;;CAKjC,CAAC;AAEX;;;GAGG;AACH,MAAM,MAAM,oBAAoB,GAAG,MAAM,OAAO,8BAA8B,CAAC;AAE/E;;GAEG;AACH,MAAM,MAAM,kBAAkB,GAAG,MAAM,aAAa,CAAC"}
1
+ {"version":3,"file":"orchestration-types.d.ts","sourceRoot":"","sources":["../src/orchestration-types.ts"],"names":[],"mappings":"AAAA,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,qBAAqB,EACrB,sBAAsB,EACtB,mBAAmB,EACnB,qBAAqB,EACrB,aAAa,EACb,mBAAmB,EACn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AC;AAEX;;;GAGG;AACH,MAAM,MAAM,oBAAoB,GAAG,MAAM,OAAO,8BAA8B,CAAC;AAE/E;;GAEG;AACH,MAAM,MAAM,kBAAkB,GAAG,MAAM,aAAa,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"orchestration-types.js","sourceRoot":"","sources":["../src/orchestration-types.ts"],"names":[],"mappings":"AA4LA;;;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"}
1
+ {"version":3,"file":"orchestration-types.js","sourceRoot":"","sources":["../src/orchestration-types.ts"],"names":[],"mappings":"AAyMA;;;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"}
@@ -1,4 +1,5 @@
1
1
  export * from './filtering.js';
2
2
  export * from './grounding.js';
3
3
  export * from './module-config.js';
4
+ export * from './masking.js';
4
5
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/util/index.ts"],"names":[],"mappings":"AAAA,cAAc,gBAAgB,CAAC;AAC/B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,oBAAoB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/util/index.ts"],"names":[],"mappings":"AAAA,cAAc,gBAAgB,CAAC;AAC/B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,oBAAoB,CAAC;AACnC,cAAc,cAAc,CAAC"}
@@ -1,4 +1,5 @@
1
1
  export * from './filtering.js';
2
2
  export * from './grounding.js';
3
3
  export * from './module-config.js';
4
+ export * from './masking.js';
4
5
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/util/index.ts"],"names":[],"mappings":"AAAA,cAAc,gBAAgB,CAAC;AAC/B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,oBAAoB,CAAC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/util/index.ts"],"names":[],"mappings":"AAAA,cAAc,gBAAgB,CAAC;AAC/B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,oBAAoB,CAAC;AACnC,cAAc,cAAc,CAAC"}
@@ -0,0 +1,9 @@
1
+ import type { DpiConfig } from '../client/api/schema/index.js';
2
+ import type { DpiMaskingConfig } from '../orchestration-types.js';
3
+ /**
4
+ * Convenience function to create masking provider SAP Data Privacy Integration.
5
+ * @param dpiMaskingConfig - Configuration for the masking provider SAP Data Privacy Integration.
6
+ * @returns An object with the masking provider configuration.
7
+ */
8
+ export declare function buildDpiMaskingProvider(dpiMaskingConfig: DpiMaskingConfig): DpiConfig;
9
+ //# sourceMappingURL=masking.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"masking.d.ts","sourceRoot":"","sources":["../../src/util/masking.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,+BAA+B,CAAC;AAC/D,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,2BAA2B,CAAC;AAElE;;;;GAIG;AACH,wBAAgB,uBAAuB,CACrC,gBAAgB,EAAE,gBAAgB,GACjC,SAAS,CAkBX"}
@@ -0,0 +1,24 @@
1
+ /**
2
+ * Convenience function to create masking provider SAP Data Privacy Integration.
3
+ * @param dpiMaskingConfig - Configuration for the masking provider SAP Data Privacy Integration.
4
+ * @returns An object with the masking provider configuration.
5
+ */
6
+ export function buildDpiMaskingProvider(dpiMaskingConfig) {
7
+ const { method, mask_grounding_input, entities, allowlist } = dpiMaskingConfig;
8
+ return {
9
+ type: 'sap_data_privacy_integration',
10
+ method,
11
+ entities: entities.map(entity => ({
12
+ type: entity
13
+ })),
14
+ ...(mask_grounding_input !== undefined && {
15
+ mask_grounding_input: {
16
+ enabled: mask_grounding_input
17
+ }
18
+ }),
19
+ ...(allowlist && {
20
+ allowlist
21
+ })
22
+ };
23
+ }
24
+ //# sourceMappingURL=masking.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"masking.js","sourceRoot":"","sources":["../../src/util/masking.ts"],"names":[],"mappings":"AAGA;;;;GAIG;AACH,MAAM,UAAU,uBAAuB,CACrC,gBAAkC;IAElC,MAAM,EAAE,MAAM,EAAE,oBAAoB,EAAE,QAAQ,EAAE,SAAS,EAAE,GACzD,gBAAgB,CAAC;IACnB,OAAO;QACL,IAAI,EAAE,8BAA8B;QACpC,MAAM;QACN,QAAQ,EAAE,QAAQ,CAAC,GAAG,CAAC,MAAM,CAAC,EAAE,CAAC,CAAC;YAChC,IAAI,EAAE,MAAM;SACb,CAAC,CAAC;QACH,GAAG,CAAC,oBAAoB,KAAK,SAAS,IAAI;YACxC,oBAAoB,EAAE;gBACpB,OAAO,EAAE,oBAAoB;aAC9B;SACF,CAAC;QACF,GAAG,CAAC,SAAS,IAAI;YACf,SAAS;SACV,CAAC;KACH,CAAC;AACJ,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sap-ai-sdk/orchestration",
3
- "version": "1.10.0",
3
+ "version": "1.10.1-20250321013142.0",
4
4
  "description": "",
5
5
  "license": "Apache-2.0",
6
6
  "keywords": [
@@ -21,8 +21,8 @@
21
21
  ],
22
22
  "dependencies": {
23
23
  "@sap-cloud-sdk/util": "^4.0.2",
24
- "@sap-ai-sdk/core": "^1.10.0",
25
- "@sap-ai-sdk/ai-api": "^1.10.0"
24
+ "@sap-ai-sdk/core": "^1.10.1-20250321013142.0",
25
+ "@sap-ai-sdk/ai-api": "^1.10.1-20250321013142.0"
26
26
  },
27
27
  "devDependencies": {
28
28
  "@sap-cloud-sdk/http-client": "^4.0.2",