@salesforce/lds-adapters-service-einsteinllm 1.287.0-dev1 → 1.287.0-dev10

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.
@@ -104,7 +104,219 @@ function createLink(ref) {
104
104
  };
105
105
  }
106
106
 
107
- function validate$9(obj, path = 'EinsteinLlmAdditionalConfigInputRepresentation') {
107
+ function validate$f(obj, path = 'EinsteinLlmFeedbackInputRepresentation') {
108
+ const v_error = (() => {
109
+ if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
110
+ return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
111
+ }
112
+ if (obj.appFeedback !== undefined) {
113
+ const obj_appFeedback = obj.appFeedback;
114
+ const path_appFeedback = path + '.appFeedback';
115
+ if (typeof obj_appFeedback !== 'object' || ArrayIsArray(obj_appFeedback) || obj_appFeedback === null) {
116
+ return new TypeError('Expected "object" but received "' + typeof obj_appFeedback + '" (at "' + path_appFeedback + '")');
117
+ }
118
+ const obj_appFeedback_keys = ObjectKeys(obj_appFeedback);
119
+ for (let i = 0; i < obj_appFeedback_keys.length; i++) {
120
+ const key = obj_appFeedback_keys[i];
121
+ const obj_appFeedback_prop = obj_appFeedback[key];
122
+ const path_appFeedback_prop = path_appFeedback + '["' + key + '"]';
123
+ if (typeof obj_appFeedback_prop !== 'object' || ArrayIsArray(obj_appFeedback_prop) || obj_appFeedback_prop === null) {
124
+ return new TypeError('Expected "object" but received "' + typeof obj_appFeedback_prop + '" (at "' + path_appFeedback_prop + '")');
125
+ }
126
+ }
127
+ }
128
+ if (obj.feedback !== undefined) {
129
+ const obj_feedback = obj.feedback;
130
+ const path_feedback = path + '.feedback';
131
+ if (typeof obj_feedback !== 'string') {
132
+ return new TypeError('Expected "string" but received "' + typeof obj_feedback + '" (at "' + path_feedback + '")');
133
+ }
134
+ }
135
+ const obj_feedbackText = obj.feedbackText;
136
+ const path_feedbackText = path + '.feedbackText';
137
+ if (typeof obj_feedbackText !== 'string') {
138
+ return new TypeError('Expected "string" but received "' + typeof obj_feedbackText + '" (at "' + path_feedbackText + '")');
139
+ }
140
+ const obj_generationId = obj.generationId;
141
+ const path_generationId = path + '.generationId';
142
+ if (typeof obj_generationId !== 'string') {
143
+ return new TypeError('Expected "string" but received "' + typeof obj_generationId + '" (at "' + path_generationId + '")');
144
+ }
145
+ const obj_id = obj.id;
146
+ const path_id = path + '.id';
147
+ if (typeof obj_id !== 'string') {
148
+ return new TypeError('Expected "string" but received "' + typeof obj_id + '" (at "' + path_id + '")');
149
+ }
150
+ })();
151
+ return v_error === undefined ? null : v_error;
152
+ }
153
+
154
+ const TTL$2 = 100;
155
+ const VERSION$a = "4033328f65865dd5d80c68a7573a4522";
156
+ function validate$e(obj, path = 'EinsteinLlmFeedbackRepresentation') {
157
+ const v_error = (() => {
158
+ if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
159
+ return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
160
+ }
161
+ const obj_message = obj.message;
162
+ const path_message = path + '.message';
163
+ if (typeof obj_message !== 'string') {
164
+ return new TypeError('Expected "string" but received "' + typeof obj_message + '" (at "' + path_message + '")');
165
+ }
166
+ })();
167
+ return v_error === undefined ? null : v_error;
168
+ }
169
+ const RepresentationType$2 = 'EinsteinLlmFeedbackRepresentation';
170
+ function keyBuilder$2(luvio, config) {
171
+ return keyPrefix + '::' + RepresentationType$2 + ':' + config.message;
172
+ }
173
+ function keyBuilderFromType$2(luvio, object) {
174
+ const keyParams = {
175
+ message: object.message
176
+ };
177
+ return keyBuilder$2(luvio, keyParams);
178
+ }
179
+ function normalize$2(input, existing, path, luvio, store, timestamp) {
180
+ return input;
181
+ }
182
+ const select$d = function EinsteinLlmFeedbackRepresentationSelect() {
183
+ return {
184
+ kind: 'Fragment',
185
+ version: VERSION$a,
186
+ private: [],
187
+ selections: [
188
+ {
189
+ name: 'message',
190
+ kind: 'Scalar'
191
+ }
192
+ ]
193
+ };
194
+ };
195
+ function equals$a(existing, incoming) {
196
+ const existing_message = existing.message;
197
+ const incoming_message = incoming.message;
198
+ if (!(existing_message === incoming_message)) {
199
+ return false;
200
+ }
201
+ return true;
202
+ }
203
+ const ingest$2 = function EinsteinLlmFeedbackRepresentationIngest(input, path, luvio, store, timestamp) {
204
+ if (process.env.NODE_ENV !== 'production') {
205
+ const validateError = validate$e(input);
206
+ if (validateError !== null) {
207
+ throw validateError;
208
+ }
209
+ }
210
+ const key = keyBuilderFromType$2(luvio, input);
211
+ const ttlToUse = TTL$2;
212
+ ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize$2, "EinsteinLLM", VERSION$a, RepresentationType$2, equals$a);
213
+ return createLink(key);
214
+ };
215
+ function getTypeCacheKeys$2(rootKeySet, luvio, input, fullPathFactory) {
216
+ // root cache key (uses fullPathFactory if keyBuilderFromType isn't defined)
217
+ const rootKey = keyBuilderFromType$2(luvio, input);
218
+ rootKeySet.set(rootKey, {
219
+ namespace: keyPrefix,
220
+ representationName: RepresentationType$2,
221
+ mergeable: false
222
+ });
223
+ }
224
+
225
+ function select$c(luvio, params) {
226
+ return select$d();
227
+ }
228
+ function getResponseCacheKeys$2(storeKeyMap, luvio, resourceParams, response) {
229
+ getTypeCacheKeys$2(storeKeyMap, luvio, response);
230
+ }
231
+ function ingestSuccess$2(luvio, resourceParams, response) {
232
+ const { body } = response;
233
+ const key = keyBuilderFromType$2(luvio, body);
234
+ luvio.storeIngest(key, ingest$2, body);
235
+ const snapshot = luvio.storeLookup({
236
+ recordId: key,
237
+ node: select$c(),
238
+ variables: {},
239
+ });
240
+ if (process.env.NODE_ENV !== 'production') {
241
+ if (snapshot.state !== 'Fulfilled') {
242
+ throw new Error('Invalid network response. Expected resource response to result in Fulfilled snapshot');
243
+ }
244
+ }
245
+ deepFreeze(snapshot.data);
246
+ return snapshot;
247
+ }
248
+ function createResourceRequest$2(config) {
249
+ const headers = {};
250
+ return {
251
+ baseUri: '/services/data/v61.0',
252
+ basePath: '/einstein/llm/feedback',
253
+ method: 'post',
254
+ body: config.body,
255
+ urlParams: {},
256
+ queryParams: {},
257
+ headers,
258
+ priority: 'normal',
259
+ };
260
+ }
261
+
262
+ const adapterName$2 = 'createFeedback';
263
+ const createFeedback_ConfigPropertyMetadata = [
264
+ generateParamConfigMetadata('feedbackInput', true, 2 /* Body */, 4 /* Unsupported */),
265
+ ];
266
+ const createFeedback_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$2, createFeedback_ConfigPropertyMetadata);
267
+ const createResourceParams$2 = /*#__PURE__*/ createResourceParams$3(createFeedback_ConfigPropertyMetadata);
268
+ function typeCheckConfig$2(untrustedConfig) {
269
+ const config = {};
270
+ const untrustedConfig_feedbackInput = untrustedConfig.feedbackInput;
271
+ const referenceEinsteinLlmFeedbackInputRepresentationValidationError = validate$f(untrustedConfig_feedbackInput);
272
+ if (referenceEinsteinLlmFeedbackInputRepresentationValidationError === null) {
273
+ config.feedbackInput = untrustedConfig_feedbackInput;
274
+ }
275
+ return config;
276
+ }
277
+ function validateAdapterConfig$2(untrustedConfig, configPropertyNames) {
278
+ if (!untrustedIsObject(untrustedConfig)) {
279
+ return null;
280
+ }
281
+ if (process.env.NODE_ENV !== 'production') {
282
+ validateConfig(untrustedConfig, configPropertyNames);
283
+ }
284
+ const config = typeCheckConfig$2(untrustedConfig);
285
+ if (!areRequiredParametersPresent(config, configPropertyNames)) {
286
+ return null;
287
+ }
288
+ return config;
289
+ }
290
+ function buildNetworkSnapshot$2(luvio, config, options) {
291
+ const resourceParams = createResourceParams$2(config);
292
+ const request = createResourceRequest$2(resourceParams);
293
+ return luvio.dispatchResourceRequest(request, options)
294
+ .then((response) => {
295
+ return luvio.handleSuccessResponse(() => {
296
+ const snapshot = ingestSuccess$2(luvio, resourceParams, response);
297
+ return luvio.storeBroadcast().then(() => snapshot);
298
+ }, () => {
299
+ const cache = new StoreKeyMap();
300
+ getResponseCacheKeys$2(cache, luvio, resourceParams, response.body);
301
+ return cache;
302
+ });
303
+ }, (response) => {
304
+ deepFreeze(response);
305
+ throw response;
306
+ });
307
+ }
308
+ const createFeedbackAdapterFactory = (luvio) => {
309
+ return function createFeedback(untrustedConfig) {
310
+ const config = validateAdapterConfig$2(untrustedConfig, createFeedback_ConfigPropertyNames);
311
+ // Invalid or incomplete config
312
+ if (config === null) {
313
+ throw new Error('Invalid config for "createFeedback"');
314
+ }
315
+ return buildNetworkSnapshot$2(luvio, config);
316
+ };
317
+ };
318
+
319
+ function validate$d(obj, path = 'EinsteinLlmAdditionalConfigInputRepresentation') {
108
320
  const v_error = (() => {
109
321
  if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
110
322
  return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
@@ -187,7 +399,7 @@ function validate$9(obj, path = 'EinsteinLlmAdditionalConfigInputRepresentation'
187
399
  return v_error === undefined ? null : v_error;
188
400
  }
189
401
 
190
- function validate$8(obj, path = 'EinsteinLlmGenerationsInputRepresentation') {
402
+ function validate$c(obj, path = 'EinsteinLlmGenerationsInputRepresentation') {
191
403
  const v_error = (() => {
192
404
  if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
193
405
  return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
@@ -195,7 +407,7 @@ function validate$8(obj, path = 'EinsteinLlmGenerationsInputRepresentation') {
195
407
  if (obj.additionalConfig !== undefined) {
196
408
  const obj_additionalConfig = obj.additionalConfig;
197
409
  const path_additionalConfig = path + '.additionalConfig';
198
- const referencepath_additionalConfigValidationError = validate$9(obj_additionalConfig, path_additionalConfig);
410
+ const referencepath_additionalConfigValidationError = validate$d(obj_additionalConfig, path_additionalConfig);
199
411
  if (referencepath_additionalConfigValidationError !== null) {
200
412
  let message = 'Object doesn\'t match EinsteinLlmAdditionalConfigInputRepresentation (at "' + path_additionalConfig + '")\n';
201
413
  message += referencepath_additionalConfigValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
@@ -218,12 +430,455 @@ function validate$8(obj, path = 'EinsteinLlmGenerationsInputRepresentation') {
218
430
  return v_error === undefined ? null : v_error;
219
431
  }
220
432
 
221
- const VERSION$4 = "9b45c0734fec120819b03e3b115caf64";
222
- function validate$7(obj, path = 'EinsteinLlmGenerationItemRepresentation') {
433
+ const VERSION$9 = "9ebac74e6f964c363d5fd1913df363af";
434
+ function validate$b(obj, path = 'EinsteinLlmGenerationsContentQualityRepresentation') {
435
+ const v_error = (() => {
436
+ if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
437
+ return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
438
+ }
439
+ if (obj.isToxicityDetected !== undefined) {
440
+ const obj_isToxicityDetected = obj.isToxicityDetected;
441
+ const path_isToxicityDetected = path + '.isToxicityDetected';
442
+ let obj_isToxicityDetected_union0 = null;
443
+ const obj_isToxicityDetected_union0_error = (() => {
444
+ if (typeof obj_isToxicityDetected !== 'boolean') {
445
+ return new TypeError('Expected "boolean" but received "' + typeof obj_isToxicityDetected + '" (at "' + path_isToxicityDetected + '")');
446
+ }
447
+ })();
448
+ if (obj_isToxicityDetected_union0_error != null) {
449
+ obj_isToxicityDetected_union0 = obj_isToxicityDetected_union0_error.message;
450
+ }
451
+ let obj_isToxicityDetected_union1 = null;
452
+ const obj_isToxicityDetected_union1_error = (() => {
453
+ if (obj_isToxicityDetected !== null) {
454
+ return new TypeError('Expected "null" but received "' + typeof obj_isToxicityDetected + '" (at "' + path_isToxicityDetected + '")');
455
+ }
456
+ })();
457
+ if (obj_isToxicityDetected_union1_error != null) {
458
+ obj_isToxicityDetected_union1 = obj_isToxicityDetected_union1_error.message;
459
+ }
460
+ if (obj_isToxicityDetected_union0 && obj_isToxicityDetected_union1) {
461
+ let message = 'Object doesn\'t match union (at "' + path_isToxicityDetected + '")';
462
+ message += '\n' + obj_isToxicityDetected_union0.split('\n').map((line) => '\t' + line).join('\n');
463
+ message += '\n' + obj_isToxicityDetected_union1.split('\n').map((line) => '\t' + line).join('\n');
464
+ return new TypeError(message);
465
+ }
466
+ }
467
+ })();
468
+ return v_error === undefined ? null : v_error;
469
+ }
470
+ const select$b = function EinsteinLlmGenerationsContentQualityRepresentationSelect() {
471
+ return {
472
+ kind: 'Fragment',
473
+ version: VERSION$9,
474
+ private: [],
475
+ selections: [
476
+ {
477
+ name: 'isToxicityDetected',
478
+ kind: 'Scalar',
479
+ required: false
480
+ }
481
+ ]
482
+ };
483
+ };
484
+ function equals$9(existing, incoming) {
485
+ const existing_isToxicityDetected = existing.isToxicityDetected;
486
+ const incoming_isToxicityDetected = incoming.isToxicityDetected;
487
+ // if at least one of these optionals is defined
488
+ if (existing_isToxicityDetected !== undefined || incoming_isToxicityDetected !== undefined) {
489
+ // if one of these is not defined we know the other is defined and therefore
490
+ // not equal
491
+ if (existing_isToxicityDetected === undefined || incoming_isToxicityDetected === undefined) {
492
+ return false;
493
+ }
494
+ if (!(existing_isToxicityDetected === incoming_isToxicityDetected)) {
495
+ return false;
496
+ }
497
+ }
498
+ return true;
499
+ }
500
+
501
+ const VERSION$8 = "77af44a252cb5b45b4d9a8101368d2aa";
502
+ function validate$a(obj, path = 'EinsteinLlmGenerationsSafetyScoreRepresentation') {
503
+ const v_error = (() => {
504
+ if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
505
+ return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
506
+ }
507
+ if (obj.hateScore !== undefined) {
508
+ const obj_hateScore = obj.hateScore;
509
+ const path_hateScore = path + '.hateScore';
510
+ let obj_hateScore_union0 = null;
511
+ const obj_hateScore_union0_error = (() => {
512
+ if (typeof obj_hateScore !== 'number') {
513
+ return new TypeError('Expected "number" but received "' + typeof obj_hateScore + '" (at "' + path_hateScore + '")');
514
+ }
515
+ })();
516
+ if (obj_hateScore_union0_error != null) {
517
+ obj_hateScore_union0 = obj_hateScore_union0_error.message;
518
+ }
519
+ let obj_hateScore_union1 = null;
520
+ const obj_hateScore_union1_error = (() => {
521
+ if (obj_hateScore !== null) {
522
+ return new TypeError('Expected "null" but received "' + typeof obj_hateScore + '" (at "' + path_hateScore + '")');
523
+ }
524
+ })();
525
+ if (obj_hateScore_union1_error != null) {
526
+ obj_hateScore_union1 = obj_hateScore_union1_error.message;
527
+ }
528
+ if (obj_hateScore_union0 && obj_hateScore_union1) {
529
+ let message = 'Object doesn\'t match union (at "' + path_hateScore + '")';
530
+ message += '\n' + obj_hateScore_union0.split('\n').map((line) => '\t' + line).join('\n');
531
+ message += '\n' + obj_hateScore_union1.split('\n').map((line) => '\t' + line).join('\n');
532
+ return new TypeError(message);
533
+ }
534
+ }
535
+ if (obj.physicalScore !== undefined) {
536
+ const obj_physicalScore = obj.physicalScore;
537
+ const path_physicalScore = path + '.physicalScore';
538
+ let obj_physicalScore_union0 = null;
539
+ const obj_physicalScore_union0_error = (() => {
540
+ if (typeof obj_physicalScore !== 'number') {
541
+ return new TypeError('Expected "number" but received "' + typeof obj_physicalScore + '" (at "' + path_physicalScore + '")');
542
+ }
543
+ })();
544
+ if (obj_physicalScore_union0_error != null) {
545
+ obj_physicalScore_union0 = obj_physicalScore_union0_error.message;
546
+ }
547
+ let obj_physicalScore_union1 = null;
548
+ const obj_physicalScore_union1_error = (() => {
549
+ if (obj_physicalScore !== null) {
550
+ return new TypeError('Expected "null" but received "' + typeof obj_physicalScore + '" (at "' + path_physicalScore + '")');
551
+ }
552
+ })();
553
+ if (obj_physicalScore_union1_error != null) {
554
+ obj_physicalScore_union1 = obj_physicalScore_union1_error.message;
555
+ }
556
+ if (obj_physicalScore_union0 && obj_physicalScore_union1) {
557
+ let message = 'Object doesn\'t match union (at "' + path_physicalScore + '")';
558
+ message += '\n' + obj_physicalScore_union0.split('\n').map((line) => '\t' + line).join('\n');
559
+ message += '\n' + obj_physicalScore_union1.split('\n').map((line) => '\t' + line).join('\n');
560
+ return new TypeError(message);
561
+ }
562
+ }
563
+ if (obj.profanityScore !== undefined) {
564
+ const obj_profanityScore = obj.profanityScore;
565
+ const path_profanityScore = path + '.profanityScore';
566
+ let obj_profanityScore_union0 = null;
567
+ const obj_profanityScore_union0_error = (() => {
568
+ if (typeof obj_profanityScore !== 'number') {
569
+ return new TypeError('Expected "number" but received "' + typeof obj_profanityScore + '" (at "' + path_profanityScore + '")');
570
+ }
571
+ })();
572
+ if (obj_profanityScore_union0_error != null) {
573
+ obj_profanityScore_union0 = obj_profanityScore_union0_error.message;
574
+ }
575
+ let obj_profanityScore_union1 = null;
576
+ const obj_profanityScore_union1_error = (() => {
577
+ if (obj_profanityScore !== null) {
578
+ return new TypeError('Expected "null" but received "' + typeof obj_profanityScore + '" (at "' + path_profanityScore + '")');
579
+ }
580
+ })();
581
+ if (obj_profanityScore_union1_error != null) {
582
+ obj_profanityScore_union1 = obj_profanityScore_union1_error.message;
583
+ }
584
+ if (obj_profanityScore_union0 && obj_profanityScore_union1) {
585
+ let message = 'Object doesn\'t match union (at "' + path_profanityScore + '")';
586
+ message += '\n' + obj_profanityScore_union0.split('\n').map((line) => '\t' + line).join('\n');
587
+ message += '\n' + obj_profanityScore_union1.split('\n').map((line) => '\t' + line).join('\n');
588
+ return new TypeError(message);
589
+ }
590
+ }
591
+ if (obj.safetyScore !== undefined) {
592
+ const obj_safetyScore = obj.safetyScore;
593
+ const path_safetyScore = path + '.safetyScore';
594
+ let obj_safetyScore_union0 = null;
595
+ const obj_safetyScore_union0_error = (() => {
596
+ if (typeof obj_safetyScore !== 'number') {
597
+ return new TypeError('Expected "number" but received "' + typeof obj_safetyScore + '" (at "' + path_safetyScore + '")');
598
+ }
599
+ })();
600
+ if (obj_safetyScore_union0_error != null) {
601
+ obj_safetyScore_union0 = obj_safetyScore_union0_error.message;
602
+ }
603
+ let obj_safetyScore_union1 = null;
604
+ const obj_safetyScore_union1_error = (() => {
605
+ if (obj_safetyScore !== null) {
606
+ return new TypeError('Expected "null" but received "' + typeof obj_safetyScore + '" (at "' + path_safetyScore + '")');
607
+ }
608
+ })();
609
+ if (obj_safetyScore_union1_error != null) {
610
+ obj_safetyScore_union1 = obj_safetyScore_union1_error.message;
611
+ }
612
+ if (obj_safetyScore_union0 && obj_safetyScore_union1) {
613
+ let message = 'Object doesn\'t match union (at "' + path_safetyScore + '")';
614
+ message += '\n' + obj_safetyScore_union0.split('\n').map((line) => '\t' + line).join('\n');
615
+ message += '\n' + obj_safetyScore_union1.split('\n').map((line) => '\t' + line).join('\n');
616
+ return new TypeError(message);
617
+ }
618
+ }
619
+ if (obj.sexualScore !== undefined) {
620
+ const obj_sexualScore = obj.sexualScore;
621
+ const path_sexualScore = path + '.sexualScore';
622
+ let obj_sexualScore_union0 = null;
623
+ const obj_sexualScore_union0_error = (() => {
624
+ if (typeof obj_sexualScore !== 'number') {
625
+ return new TypeError('Expected "number" but received "' + typeof obj_sexualScore + '" (at "' + path_sexualScore + '")');
626
+ }
627
+ })();
628
+ if (obj_sexualScore_union0_error != null) {
629
+ obj_sexualScore_union0 = obj_sexualScore_union0_error.message;
630
+ }
631
+ let obj_sexualScore_union1 = null;
632
+ const obj_sexualScore_union1_error = (() => {
633
+ if (obj_sexualScore !== null) {
634
+ return new TypeError('Expected "null" but received "' + typeof obj_sexualScore + '" (at "' + path_sexualScore + '")');
635
+ }
636
+ })();
637
+ if (obj_sexualScore_union1_error != null) {
638
+ obj_sexualScore_union1 = obj_sexualScore_union1_error.message;
639
+ }
640
+ if (obj_sexualScore_union0 && obj_sexualScore_union1) {
641
+ let message = 'Object doesn\'t match union (at "' + path_sexualScore + '")';
642
+ message += '\n' + obj_sexualScore_union0.split('\n').map((line) => '\t' + line).join('\n');
643
+ message += '\n' + obj_sexualScore_union1.split('\n').map((line) => '\t' + line).join('\n');
644
+ return new TypeError(message);
645
+ }
646
+ }
647
+ if (obj.toxicityScore !== undefined) {
648
+ const obj_toxicityScore = obj.toxicityScore;
649
+ const path_toxicityScore = path + '.toxicityScore';
650
+ let obj_toxicityScore_union0 = null;
651
+ const obj_toxicityScore_union0_error = (() => {
652
+ if (typeof obj_toxicityScore !== 'number') {
653
+ return new TypeError('Expected "number" but received "' + typeof obj_toxicityScore + '" (at "' + path_toxicityScore + '")');
654
+ }
655
+ })();
656
+ if (obj_toxicityScore_union0_error != null) {
657
+ obj_toxicityScore_union0 = obj_toxicityScore_union0_error.message;
658
+ }
659
+ let obj_toxicityScore_union1 = null;
660
+ const obj_toxicityScore_union1_error = (() => {
661
+ if (obj_toxicityScore !== null) {
662
+ return new TypeError('Expected "null" but received "' + typeof obj_toxicityScore + '" (at "' + path_toxicityScore + '")');
663
+ }
664
+ })();
665
+ if (obj_toxicityScore_union1_error != null) {
666
+ obj_toxicityScore_union1 = obj_toxicityScore_union1_error.message;
667
+ }
668
+ if (obj_toxicityScore_union0 && obj_toxicityScore_union1) {
669
+ let message = 'Object doesn\'t match union (at "' + path_toxicityScore + '")';
670
+ message += '\n' + obj_toxicityScore_union0.split('\n').map((line) => '\t' + line).join('\n');
671
+ message += '\n' + obj_toxicityScore_union1.split('\n').map((line) => '\t' + line).join('\n');
672
+ return new TypeError(message);
673
+ }
674
+ }
675
+ if (obj.violenceScore !== undefined) {
676
+ const obj_violenceScore = obj.violenceScore;
677
+ const path_violenceScore = path + '.violenceScore';
678
+ let obj_violenceScore_union0 = null;
679
+ const obj_violenceScore_union0_error = (() => {
680
+ if (typeof obj_violenceScore !== 'number') {
681
+ return new TypeError('Expected "number" but received "' + typeof obj_violenceScore + '" (at "' + path_violenceScore + '")');
682
+ }
683
+ })();
684
+ if (obj_violenceScore_union0_error != null) {
685
+ obj_violenceScore_union0 = obj_violenceScore_union0_error.message;
686
+ }
687
+ let obj_violenceScore_union1 = null;
688
+ const obj_violenceScore_union1_error = (() => {
689
+ if (obj_violenceScore !== null) {
690
+ return new TypeError('Expected "null" but received "' + typeof obj_violenceScore + '" (at "' + path_violenceScore + '")');
691
+ }
692
+ })();
693
+ if (obj_violenceScore_union1_error != null) {
694
+ obj_violenceScore_union1 = obj_violenceScore_union1_error.message;
695
+ }
696
+ if (obj_violenceScore_union0 && obj_violenceScore_union1) {
697
+ let message = 'Object doesn\'t match union (at "' + path_violenceScore + '")';
698
+ message += '\n' + obj_violenceScore_union0.split('\n').map((line) => '\t' + line).join('\n');
699
+ message += '\n' + obj_violenceScore_union1.split('\n').map((line) => '\t' + line).join('\n');
700
+ return new TypeError(message);
701
+ }
702
+ }
703
+ })();
704
+ return v_error === undefined ? null : v_error;
705
+ }
706
+ const select$a = function EinsteinLlmGenerationsSafetyScoreRepresentationSelect() {
707
+ return {
708
+ kind: 'Fragment',
709
+ version: VERSION$8,
710
+ private: [],
711
+ selections: [
712
+ {
713
+ name: 'hateScore',
714
+ kind: 'Scalar',
715
+ required: false
716
+ },
717
+ {
718
+ name: 'physicalScore',
719
+ kind: 'Scalar',
720
+ required: false
721
+ },
722
+ {
723
+ name: 'profanityScore',
724
+ kind: 'Scalar',
725
+ required: false
726
+ },
727
+ {
728
+ name: 'safetyScore',
729
+ kind: 'Scalar',
730
+ required: false
731
+ },
732
+ {
733
+ name: 'sexualScore',
734
+ kind: 'Scalar',
735
+ required: false
736
+ },
737
+ {
738
+ name: 'toxicityScore',
739
+ kind: 'Scalar',
740
+ required: false
741
+ },
742
+ {
743
+ name: 'violenceScore',
744
+ kind: 'Scalar',
745
+ required: false
746
+ }
747
+ ]
748
+ };
749
+ };
750
+ function equals$8(existing, incoming) {
751
+ const existing_hateScore = existing.hateScore;
752
+ const incoming_hateScore = incoming.hateScore;
753
+ // if at least one of these optionals is defined
754
+ if (existing_hateScore !== undefined || incoming_hateScore !== undefined) {
755
+ // if one of these is not defined we know the other is defined and therefore
756
+ // not equal
757
+ if (existing_hateScore === undefined || incoming_hateScore === undefined) {
758
+ return false;
759
+ }
760
+ if (!(existing_hateScore === incoming_hateScore)) {
761
+ return false;
762
+ }
763
+ }
764
+ const existing_physicalScore = existing.physicalScore;
765
+ const incoming_physicalScore = incoming.physicalScore;
766
+ // if at least one of these optionals is defined
767
+ if (existing_physicalScore !== undefined || incoming_physicalScore !== undefined) {
768
+ // if one of these is not defined we know the other is defined and therefore
769
+ // not equal
770
+ if (existing_physicalScore === undefined || incoming_physicalScore === undefined) {
771
+ return false;
772
+ }
773
+ if (!(existing_physicalScore === incoming_physicalScore)) {
774
+ return false;
775
+ }
776
+ }
777
+ const existing_profanityScore = existing.profanityScore;
778
+ const incoming_profanityScore = incoming.profanityScore;
779
+ // if at least one of these optionals is defined
780
+ if (existing_profanityScore !== undefined || incoming_profanityScore !== undefined) {
781
+ // if one of these is not defined we know the other is defined and therefore
782
+ // not equal
783
+ if (existing_profanityScore === undefined || incoming_profanityScore === undefined) {
784
+ return false;
785
+ }
786
+ if (!(existing_profanityScore === incoming_profanityScore)) {
787
+ return false;
788
+ }
789
+ }
790
+ const existing_safetyScore = existing.safetyScore;
791
+ const incoming_safetyScore = incoming.safetyScore;
792
+ // if at least one of these optionals is defined
793
+ if (existing_safetyScore !== undefined || incoming_safetyScore !== undefined) {
794
+ // if one of these is not defined we know the other is defined and therefore
795
+ // not equal
796
+ if (existing_safetyScore === undefined || incoming_safetyScore === undefined) {
797
+ return false;
798
+ }
799
+ if (!(existing_safetyScore === incoming_safetyScore)) {
800
+ return false;
801
+ }
802
+ }
803
+ const existing_sexualScore = existing.sexualScore;
804
+ const incoming_sexualScore = incoming.sexualScore;
805
+ // if at least one of these optionals is defined
806
+ if (existing_sexualScore !== undefined || incoming_sexualScore !== undefined) {
807
+ // if one of these is not defined we know the other is defined and therefore
808
+ // not equal
809
+ if (existing_sexualScore === undefined || incoming_sexualScore === undefined) {
810
+ return false;
811
+ }
812
+ if (!(existing_sexualScore === incoming_sexualScore)) {
813
+ return false;
814
+ }
815
+ }
816
+ const existing_toxicityScore = existing.toxicityScore;
817
+ const incoming_toxicityScore = incoming.toxicityScore;
818
+ // if at least one of these optionals is defined
819
+ if (existing_toxicityScore !== undefined || incoming_toxicityScore !== undefined) {
820
+ // if one of these is not defined we know the other is defined and therefore
821
+ // not equal
822
+ if (existing_toxicityScore === undefined || incoming_toxicityScore === undefined) {
823
+ return false;
824
+ }
825
+ if (!(existing_toxicityScore === incoming_toxicityScore)) {
826
+ return false;
827
+ }
828
+ }
829
+ const existing_violenceScore = existing.violenceScore;
830
+ const incoming_violenceScore = incoming.violenceScore;
831
+ // if at least one of these optionals is defined
832
+ if (existing_violenceScore !== undefined || incoming_violenceScore !== undefined) {
833
+ // if one of these is not defined we know the other is defined and therefore
834
+ // not equal
835
+ if (existing_violenceScore === undefined || incoming_violenceScore === undefined) {
836
+ return false;
837
+ }
838
+ if (!(existing_violenceScore === incoming_violenceScore)) {
839
+ return false;
840
+ }
841
+ }
842
+ return true;
843
+ }
844
+
845
+ const VERSION$7 = "aebe0f32437ab18bd126a1fb5ff48d9b";
846
+ function validate$9(obj, path = 'EinsteinLlmGenerationItemRepresentation') {
223
847
  const v_error = (() => {
224
848
  if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
225
849
  return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
226
850
  }
851
+ if (obj.contentQualityRepresentation !== undefined) {
852
+ const obj_contentQualityRepresentation = obj.contentQualityRepresentation;
853
+ const path_contentQualityRepresentation = path + '.contentQualityRepresentation';
854
+ let obj_contentQualityRepresentation_union0 = null;
855
+ const obj_contentQualityRepresentation_union0_error = (() => {
856
+ const referencepath_contentQualityRepresentationValidationError = validate$b(obj_contentQualityRepresentation, path_contentQualityRepresentation);
857
+ if (referencepath_contentQualityRepresentationValidationError !== null) {
858
+ let message = 'Object doesn\'t match EinsteinLlmGenerationsContentQualityRepresentation (at "' + path_contentQualityRepresentation + '")\n';
859
+ message += referencepath_contentQualityRepresentationValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
860
+ return new TypeError(message);
861
+ }
862
+ })();
863
+ if (obj_contentQualityRepresentation_union0_error != null) {
864
+ obj_contentQualityRepresentation_union0 = obj_contentQualityRepresentation_union0_error.message;
865
+ }
866
+ let obj_contentQualityRepresentation_union1 = null;
867
+ const obj_contentQualityRepresentation_union1_error = (() => {
868
+ if (obj_contentQualityRepresentation !== null) {
869
+ return new TypeError('Expected "null" but received "' + typeof obj_contentQualityRepresentation + '" (at "' + path_contentQualityRepresentation + '")');
870
+ }
871
+ })();
872
+ if (obj_contentQualityRepresentation_union1_error != null) {
873
+ obj_contentQualityRepresentation_union1 = obj_contentQualityRepresentation_union1_error.message;
874
+ }
875
+ if (obj_contentQualityRepresentation_union0 && obj_contentQualityRepresentation_union1) {
876
+ let message = 'Object doesn\'t match union (at "' + path_contentQualityRepresentation + '")';
877
+ message += '\n' + obj_contentQualityRepresentation_union0.split('\n').map((line) => '\t' + line).join('\n');
878
+ message += '\n' + obj_contentQualityRepresentation_union1.split('\n').map((line) => '\t' + line).join('\n');
879
+ return new TypeError(message);
880
+ }
881
+ }
227
882
  const obj_parameters = obj.parameters;
228
883
  const path_parameters = path + '.parameters';
229
884
  if (typeof obj_parameters !== 'string') {
@@ -234,6 +889,37 @@ function validate$7(obj, path = 'EinsteinLlmGenerationItemRepresentation') {
234
889
  if (typeof obj_responseId !== 'string') {
235
890
  return new TypeError('Expected "string" but received "' + typeof obj_responseId + '" (at "' + path_responseId + '")');
236
891
  }
892
+ if (obj.safetyScoreRepresentation !== undefined) {
893
+ const obj_safetyScoreRepresentation = obj.safetyScoreRepresentation;
894
+ const path_safetyScoreRepresentation = path + '.safetyScoreRepresentation';
895
+ let obj_safetyScoreRepresentation_union0 = null;
896
+ const obj_safetyScoreRepresentation_union0_error = (() => {
897
+ const referencepath_safetyScoreRepresentationValidationError = validate$a(obj_safetyScoreRepresentation, path_safetyScoreRepresentation);
898
+ if (referencepath_safetyScoreRepresentationValidationError !== null) {
899
+ let message = 'Object doesn\'t match EinsteinLlmGenerationsSafetyScoreRepresentation (at "' + path_safetyScoreRepresentation + '")\n';
900
+ message += referencepath_safetyScoreRepresentationValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
901
+ return new TypeError(message);
902
+ }
903
+ })();
904
+ if (obj_safetyScoreRepresentation_union0_error != null) {
905
+ obj_safetyScoreRepresentation_union0 = obj_safetyScoreRepresentation_union0_error.message;
906
+ }
907
+ let obj_safetyScoreRepresentation_union1 = null;
908
+ const obj_safetyScoreRepresentation_union1_error = (() => {
909
+ if (obj_safetyScoreRepresentation !== null) {
910
+ return new TypeError('Expected "null" but received "' + typeof obj_safetyScoreRepresentation + '" (at "' + path_safetyScoreRepresentation + '")');
911
+ }
912
+ })();
913
+ if (obj_safetyScoreRepresentation_union1_error != null) {
914
+ obj_safetyScoreRepresentation_union1 = obj_safetyScoreRepresentation_union1_error.message;
915
+ }
916
+ if (obj_safetyScoreRepresentation_union0 && obj_safetyScoreRepresentation_union1) {
917
+ let message = 'Object doesn\'t match union (at "' + path_safetyScoreRepresentation + '")';
918
+ message += '\n' + obj_safetyScoreRepresentation_union0.split('\n').map((line) => '\t' + line).join('\n');
919
+ message += '\n' + obj_safetyScoreRepresentation_union1.split('\n').map((line) => '\t' + line).join('\n');
920
+ return new TypeError(message);
921
+ }
922
+ }
237
923
  const obj_text = obj.text;
238
924
  const path_text = path + '.text';
239
925
  if (typeof obj_text !== 'string') {
@@ -242,12 +928,21 @@ function validate$7(obj, path = 'EinsteinLlmGenerationItemRepresentation') {
242
928
  })();
243
929
  return v_error === undefined ? null : v_error;
244
930
  }
245
- const select$7 = function EinsteinLlmGenerationItemRepresentationSelect() {
931
+ const select$9 = function EinsteinLlmGenerationItemRepresentationSelect() {
932
+ const { selections: EinsteinLlmGenerationsContentQualityRepresentation__selections, opaque: EinsteinLlmGenerationsContentQualityRepresentation__opaque, } = select$b();
933
+ const { selections: EinsteinLlmGenerationsSafetyScoreRepresentation__selections, opaque: EinsteinLlmGenerationsSafetyScoreRepresentation__opaque, } = select$a();
246
934
  return {
247
935
  kind: 'Fragment',
248
- version: VERSION$4,
936
+ version: VERSION$7,
249
937
  private: [],
250
938
  selections: [
939
+ {
940
+ name: 'contentQualityRepresentation',
941
+ kind: 'Object',
942
+ nullable: true,
943
+ selections: EinsteinLlmGenerationsContentQualityRepresentation__selections,
944
+ required: false
945
+ },
251
946
  {
252
947
  name: 'parameters',
253
948
  kind: 'Scalar'
@@ -256,6 +951,13 @@ const select$7 = function EinsteinLlmGenerationItemRepresentationSelect() {
256
951
  name: 'responseId',
257
952
  kind: 'Scalar'
258
953
  },
954
+ {
955
+ name: 'safetyScoreRepresentation',
956
+ kind: 'Object',
957
+ nullable: true,
958
+ selections: EinsteinLlmGenerationsSafetyScoreRepresentation__selections,
959
+ required: false
960
+ },
259
961
  {
260
962
  name: 'text',
261
963
  kind: 'Scalar'
@@ -263,7 +965,7 @@ const select$7 = function EinsteinLlmGenerationItemRepresentationSelect() {
263
965
  ]
264
966
  };
265
967
  };
266
- function equals$4(existing, incoming) {
968
+ function equals$7(existing, incoming) {
267
969
  const existing_parameters = existing.parameters;
268
970
  const incoming_parameters = incoming.parameters;
269
971
  if (!(existing_parameters === incoming_parameters)) {
@@ -279,11 +981,43 @@ function equals$4(existing, incoming) {
279
981
  if (!(existing_text === incoming_text)) {
280
982
  return false;
281
983
  }
984
+ const existing_contentQualityRepresentation = existing.contentQualityRepresentation;
985
+ const incoming_contentQualityRepresentation = incoming.contentQualityRepresentation;
986
+ // if at least one of these optionals is defined
987
+ if (existing_contentQualityRepresentation !== undefined || incoming_contentQualityRepresentation !== undefined) {
988
+ // if one of these is not defined we know the other is defined and therefore
989
+ // not equal
990
+ if (existing_contentQualityRepresentation === undefined || incoming_contentQualityRepresentation === undefined) {
991
+ return false;
992
+ }
993
+ if (!(existing_contentQualityRepresentation === incoming_contentQualityRepresentation
994
+ || (existing_contentQualityRepresentation != null &&
995
+ incoming_contentQualityRepresentation != null &&
996
+ equals$9(existing_contentQualityRepresentation, incoming_contentQualityRepresentation)))) {
997
+ return false;
998
+ }
999
+ }
1000
+ const existing_safetyScoreRepresentation = existing.safetyScoreRepresentation;
1001
+ const incoming_safetyScoreRepresentation = incoming.safetyScoreRepresentation;
1002
+ // if at least one of these optionals is defined
1003
+ if (existing_safetyScoreRepresentation !== undefined || incoming_safetyScoreRepresentation !== undefined) {
1004
+ // if one of these is not defined we know the other is defined and therefore
1005
+ // not equal
1006
+ if (existing_safetyScoreRepresentation === undefined || incoming_safetyScoreRepresentation === undefined) {
1007
+ return false;
1008
+ }
1009
+ if (!(existing_safetyScoreRepresentation === incoming_safetyScoreRepresentation
1010
+ || (existing_safetyScoreRepresentation != null &&
1011
+ incoming_safetyScoreRepresentation != null &&
1012
+ equals$8(existing_safetyScoreRepresentation, incoming_safetyScoreRepresentation)))) {
1013
+ return false;
1014
+ }
1015
+ }
282
1016
  return true;
283
1017
  }
284
1018
 
285
- const VERSION$3 = "4656c961c9d093a9e206c1db7d4de0b0";
286
- function validate$6(obj, path = 'WrappedMap') {
1019
+ const VERSION$6 = "4656c961c9d093a9e206c1db7d4de0b0";
1020
+ function validate$8(obj, path = 'WrappedMap') {
287
1021
  const v_error = (() => {
288
1022
  if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
289
1023
  return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
@@ -305,15 +1039,15 @@ function validate$6(obj, path = 'WrappedMap') {
305
1039
  })();
306
1040
  return v_error === undefined ? null : v_error;
307
1041
  }
308
- const select$6 = function WrappedMapSelect() {
1042
+ const select$8 = function WrappedMapSelect() {
309
1043
  return {
310
1044
  kind: 'Fragment',
311
- version: VERSION$3,
1045
+ version: VERSION$6,
312
1046
  private: [],
313
1047
  selections: []
314
1048
  };
315
1049
  };
316
- function equals$3(existing, incoming) {
1050
+ function equals$6(existing, incoming) {
317
1051
  const existing_wrappedMap = existing.wrappedMap;
318
1052
  const incoming_wrappedMap = incoming.wrappedMap;
319
1053
  const equals_wrappedMap_props = equalsObject(existing_wrappedMap, incoming_wrappedMap, (existing_wrappedMap_prop, incoming_wrappedMap_prop) => {
@@ -324,9 +1058,9 @@ function equals$3(existing, incoming) {
324
1058
  return true;
325
1059
  }
326
1060
 
327
- const TTL$2 = 100;
328
- const VERSION$2 = "d8abd72a42e842b253da1c38954dafbc";
329
- function validate$5(obj, path = 'EinsteinLlmGenerationsRepresentation') {
1061
+ const TTL$1 = 100;
1062
+ const VERSION$5 = "d8abd72a42e842b253da1c38954dafbc";
1063
+ function validate$7(obj, path = 'EinsteinLlmGenerationsRepresentation') {
330
1064
  const v_error = (() => {
331
1065
  if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
332
1066
  return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
@@ -339,7 +1073,7 @@ function validate$5(obj, path = 'EinsteinLlmGenerationsRepresentation') {
339
1073
  for (let i = 0; i < obj_generations.length; i++) {
340
1074
  const obj_generations_item = obj_generations[i];
341
1075
  const path_generations_item = path_generations + '[' + i + ']';
342
- const referencepath_generations_itemValidationError = validate$7(obj_generations_item, path_generations_item);
1076
+ const referencepath_generations_itemValidationError = validate$9(obj_generations_item, path_generations_item);
343
1077
  if (referencepath_generations_itemValidationError !== null) {
344
1078
  let message = 'Object doesn\'t match EinsteinLlmGenerationItemRepresentation (at "' + path_generations_item + '")\n';
345
1079
  message += referencepath_generations_itemValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
@@ -350,7 +1084,7 @@ function validate$5(obj, path = 'EinsteinLlmGenerationsRepresentation') {
350
1084
  const path_parameters = path + '.parameters';
351
1085
  let obj_parameters_union0 = null;
352
1086
  const obj_parameters_union0_error = (() => {
353
- const referencepath_parametersValidationError = validate$6(obj_parameters, path_parameters);
1087
+ const referencepath_parametersValidationError = validate$8(obj_parameters, path_parameters);
354
1088
  if (referencepath_parametersValidationError !== null) {
355
1089
  let message = 'Object doesn\'t match WrappedMap (at "' + path_parameters + '")\n';
356
1090
  message += referencepath_parametersValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
@@ -409,25 +1143,25 @@ function validate$5(obj, path = 'EinsteinLlmGenerationsRepresentation') {
409
1143
  })();
410
1144
  return v_error === undefined ? null : v_error;
411
1145
  }
412
- const RepresentationType$2 = 'EinsteinLlmGenerationsRepresentation';
413
- function keyBuilder$2(luvio, config) {
414
- return keyPrefix + '::' + RepresentationType$2 + ':' + config.requestId;
1146
+ const RepresentationType$1 = 'EinsteinLlmGenerationsRepresentation';
1147
+ function keyBuilder$1(luvio, config) {
1148
+ return keyPrefix + '::' + RepresentationType$1 + ':' + config.requestId;
415
1149
  }
416
- function keyBuilderFromType$2(luvio, object) {
1150
+ function keyBuilderFromType$1(luvio, object) {
417
1151
  const keyParams = {
418
1152
  requestId: object.requestId
419
1153
  };
420
- return keyBuilder$2(luvio, keyParams);
1154
+ return keyBuilder$1(luvio, keyParams);
421
1155
  }
422
- function normalize$2(input, existing, path, luvio, store, timestamp) {
1156
+ function normalize$1(input, existing, path, luvio, store, timestamp) {
423
1157
  return input;
424
1158
  }
425
- const select$5 = function EinsteinLlmGenerationsRepresentationSelect() {
426
- const { selections: EinsteinLlmGenerationItemRepresentation__selections, opaque: EinsteinLlmGenerationItemRepresentation__opaque, } = select$7();
427
- const { selections: WrappedMap__selections, opaque: WrappedMap__opaque, } = select$6();
1159
+ const select$7 = function EinsteinLlmGenerationsRepresentationSelect() {
1160
+ const { selections: EinsteinLlmGenerationItemRepresentation__selections, opaque: EinsteinLlmGenerationItemRepresentation__opaque, } = select$9();
1161
+ const { selections: WrappedMap__selections, opaque: WrappedMap__opaque, } = select$8();
428
1162
  return {
429
1163
  kind: 'Fragment',
430
- version: VERSION$2,
1164
+ version: VERSION$5,
431
1165
  private: [],
432
1166
  selections: [
433
1167
  {
@@ -453,259 +1187,47 @@ const select$5 = function EinsteinLlmGenerationsRepresentationSelect() {
453
1187
  ]
454
1188
  };
455
1189
  };
456
- function equals$2(existing, incoming) {
1190
+ function equals$5(existing, incoming) {
457
1191
  const existing_requestId = existing.requestId;
458
1192
  const incoming_requestId = incoming.requestId;
459
- if (!(existing_requestId === incoming_requestId)) {
460
- return false;
461
- }
462
- const existing_generations = existing.generations;
463
- const incoming_generations = incoming.generations;
464
- const equals_generations_items = equalsArray(existing_generations, incoming_generations, (existing_generations_item, incoming_generations_item) => {
465
- if (!(equals$4(existing_generations_item, incoming_generations_item))) {
466
- return false;
467
- }
468
- });
469
- if (equals_generations_items === false) {
470
- return false;
471
- }
472
- const existing_parameters = existing.parameters;
473
- const incoming_parameters = incoming.parameters;
474
- if (!(existing_parameters === incoming_parameters
475
- || (existing_parameters != null &&
476
- incoming_parameters != null &&
477
- equals$3(existing_parameters, incoming_parameters)))) {
478
- return false;
479
- }
480
- const existing_prompt = existing.prompt;
481
- const incoming_prompt = incoming.prompt;
482
- if (!(existing_prompt === incoming_prompt)) {
483
- return false;
484
- }
485
- return true;
486
- }
487
- const ingest$2 = function EinsteinLlmGenerationsRepresentationIngest(input, path, luvio, store, timestamp) {
488
- if (process.env.NODE_ENV !== 'production') {
489
- const validateError = validate$5(input);
490
- if (validateError !== null) {
491
- throw validateError;
492
- }
493
- }
494
- const key = keyBuilderFromType$2(luvio, input);
495
- const ttlToUse = TTL$2;
496
- ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize$2, "EinsteinLLM", VERSION$2, RepresentationType$2, equals$2);
497
- return createLink(key);
498
- };
499
- function getTypeCacheKeys$2(rootKeySet, luvio, input, fullPathFactory) {
500
- // root cache key (uses fullPathFactory if keyBuilderFromType isn't defined)
501
- const rootKey = keyBuilderFromType$2(luvio, input);
502
- rootKeySet.set(rootKey, {
503
- namespace: keyPrefix,
504
- representationName: RepresentationType$2,
505
- mergeable: false
506
- });
507
- }
508
-
509
- function select$4(luvio, params) {
510
- return select$5();
511
- }
512
- function getResponseCacheKeys$2(storeKeyMap, luvio, resourceParams, response) {
513
- getTypeCacheKeys$2(storeKeyMap, luvio, response);
514
- }
515
- function ingestSuccess$2(luvio, resourceParams, response) {
516
- const { body } = response;
517
- const key = keyBuilderFromType$2(luvio, body);
518
- luvio.storeIngest(key, ingest$2, body);
519
- const snapshot = luvio.storeLookup({
520
- recordId: key,
521
- node: select$4(),
522
- variables: {},
523
- });
524
- if (process.env.NODE_ENV !== 'production') {
525
- if (snapshot.state !== 'Fulfilled') {
526
- throw new Error('Invalid network response. Expected resource response to result in Fulfilled snapshot');
527
- }
528
- }
529
- deepFreeze(snapshot.data);
530
- return snapshot;
531
- }
532
- function createResourceRequest$2(config) {
533
- const headers = {};
534
- return {
535
- baseUri: '/services/data/v61.0',
536
- basePath: '/einstein/llm/prompt/generations',
537
- method: 'post',
538
- body: config.body,
539
- urlParams: {},
540
- queryParams: {},
541
- headers,
542
- priority: 'normal',
543
- };
544
- }
545
-
546
- const adapterName$2 = 'createGenerations';
547
- const createGenerations_ConfigPropertyMetadata = [
548
- generateParamConfigMetadata('generationsInput', true, 2 /* Body */, 4 /* Unsupported */),
549
- ];
550
- const createGenerations_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$2, createGenerations_ConfigPropertyMetadata);
551
- const createResourceParams$2 = /*#__PURE__*/ createResourceParams$3(createGenerations_ConfigPropertyMetadata);
552
- function typeCheckConfig$2(untrustedConfig) {
553
- const config = {};
554
- const untrustedConfig_generationsInput = untrustedConfig.generationsInput;
555
- const referenceEinsteinLlmGenerationsInputRepresentationValidationError = validate$8(untrustedConfig_generationsInput);
556
- if (referenceEinsteinLlmGenerationsInputRepresentationValidationError === null) {
557
- config.generationsInput = untrustedConfig_generationsInput;
558
- }
559
- return config;
560
- }
561
- function validateAdapterConfig$2(untrustedConfig, configPropertyNames) {
562
- if (!untrustedIsObject(untrustedConfig)) {
563
- return null;
564
- }
565
- if (process.env.NODE_ENV !== 'production') {
566
- validateConfig(untrustedConfig, configPropertyNames);
567
- }
568
- const config = typeCheckConfig$2(untrustedConfig);
569
- if (!areRequiredParametersPresent(config, configPropertyNames)) {
570
- return null;
571
- }
572
- return config;
573
- }
574
- function buildNetworkSnapshot$2(luvio, config, options) {
575
- const resourceParams = createResourceParams$2(config);
576
- const request = createResourceRequest$2(resourceParams);
577
- return luvio.dispatchResourceRequest(request, options)
578
- .then((response) => {
579
- return luvio.handleSuccessResponse(() => {
580
- const snapshot = ingestSuccess$2(luvio, resourceParams, response);
581
- return luvio.storeBroadcast().then(() => snapshot);
582
- }, () => {
583
- const cache = new StoreKeyMap();
584
- getResponseCacheKeys$2(cache, luvio, resourceParams, response.body);
585
- return cache;
586
- });
587
- }, (response) => {
588
- deepFreeze(response);
589
- throw response;
590
- });
591
- }
592
- const createGenerationsAdapterFactory = (luvio) => {
593
- return function createGenerations(untrustedConfig) {
594
- const config = validateAdapterConfig$2(untrustedConfig, createGenerations_ConfigPropertyNames);
595
- // Invalid or incomplete config
596
- if (config === null) {
597
- throw new Error('Invalid config for "createGenerations"');
598
- }
599
- return buildNetworkSnapshot$2(luvio, config);
600
- };
601
- };
602
-
603
- function validate$4(obj, path = 'EinsteinLlmFeedbackInputRepresentation') {
604
- const v_error = (() => {
605
- if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
606
- return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
607
- }
608
- if (obj.appFeedback !== undefined) {
609
- const obj_appFeedback = obj.appFeedback;
610
- const path_appFeedback = path + '.appFeedback';
611
- if (typeof obj_appFeedback !== 'object' || ArrayIsArray(obj_appFeedback) || obj_appFeedback === null) {
612
- return new TypeError('Expected "object" but received "' + typeof obj_appFeedback + '" (at "' + path_appFeedback + '")');
613
- }
614
- const obj_appFeedback_keys = ObjectKeys(obj_appFeedback);
615
- for (let i = 0; i < obj_appFeedback_keys.length; i++) {
616
- const key = obj_appFeedback_keys[i];
617
- const obj_appFeedback_prop = obj_appFeedback[key];
618
- const path_appFeedback_prop = path_appFeedback + '["' + key + '"]';
619
- if (typeof obj_appFeedback_prop !== 'object' || ArrayIsArray(obj_appFeedback_prop) || obj_appFeedback_prop === null) {
620
- return new TypeError('Expected "object" but received "' + typeof obj_appFeedback_prop + '" (at "' + path_appFeedback_prop + '")');
621
- }
622
- }
623
- }
624
- if (obj.feedback !== undefined) {
625
- const obj_feedback = obj.feedback;
626
- const path_feedback = path + '.feedback';
627
- if (typeof obj_feedback !== 'string') {
628
- return new TypeError('Expected "string" but received "' + typeof obj_feedback + '" (at "' + path_feedback + '")');
629
- }
630
- }
631
- const obj_feedbackText = obj.feedbackText;
632
- const path_feedbackText = path + '.feedbackText';
633
- if (typeof obj_feedbackText !== 'string') {
634
- return new TypeError('Expected "string" but received "' + typeof obj_feedbackText + '" (at "' + path_feedbackText + '")');
635
- }
636
- const obj_generationId = obj.generationId;
637
- const path_generationId = path + '.generationId';
638
- if (typeof obj_generationId !== 'string') {
639
- return new TypeError('Expected "string" but received "' + typeof obj_generationId + '" (at "' + path_generationId + '")');
640
- }
641
- const obj_id = obj.id;
642
- const path_id = path + '.id';
643
- if (typeof obj_id !== 'string') {
644
- return new TypeError('Expected "string" but received "' + typeof obj_id + '" (at "' + path_id + '")');
645
- }
646
- })();
647
- return v_error === undefined ? null : v_error;
648
- }
649
-
650
- const TTL$1 = 100;
651
- const VERSION$1 = "4033328f65865dd5d80c68a7573a4522";
652
- function validate$3(obj, path = 'EinsteinLlmFeedbackRepresentation') {
653
- const v_error = (() => {
654
- if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
655
- return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
656
- }
657
- const obj_message = obj.message;
658
- const path_message = path + '.message';
659
- if (typeof obj_message !== 'string') {
660
- return new TypeError('Expected "string" but received "' + typeof obj_message + '" (at "' + path_message + '")');
661
- }
662
- })();
663
- return v_error === undefined ? null : v_error;
664
- }
665
- const RepresentationType$1 = 'EinsteinLlmFeedbackRepresentation';
666
- function keyBuilder$1(luvio, config) {
667
- return keyPrefix + '::' + RepresentationType$1 + ':' + config.message;
668
- }
669
- function keyBuilderFromType$1(luvio, object) {
670
- const keyParams = {
671
- message: object.message
672
- };
673
- return keyBuilder$1(luvio, keyParams);
674
- }
675
- function normalize$1(input, existing, path, luvio, store, timestamp) {
676
- return input;
677
- }
678
- const select$3 = function EinsteinLlmFeedbackRepresentationSelect() {
679
- return {
680
- kind: 'Fragment',
681
- version: VERSION$1,
682
- private: [],
683
- selections: [
684
- {
685
- name: 'message',
686
- kind: 'Scalar'
687
- }
688
- ]
689
- };
690
- };
691
- function equals$1(existing, incoming) {
692
- const existing_message = existing.message;
693
- const incoming_message = incoming.message;
694
- if (!(existing_message === incoming_message)) {
1193
+ if (!(existing_requestId === incoming_requestId)) {
1194
+ return false;
1195
+ }
1196
+ const existing_generations = existing.generations;
1197
+ const incoming_generations = incoming.generations;
1198
+ const equals_generations_items = equalsArray(existing_generations, incoming_generations, (existing_generations_item, incoming_generations_item) => {
1199
+ if (!(equals$7(existing_generations_item, incoming_generations_item))) {
1200
+ return false;
1201
+ }
1202
+ });
1203
+ if (equals_generations_items === false) {
1204
+ return false;
1205
+ }
1206
+ const existing_parameters = existing.parameters;
1207
+ const incoming_parameters = incoming.parameters;
1208
+ if (!(existing_parameters === incoming_parameters
1209
+ || (existing_parameters != null &&
1210
+ incoming_parameters != null &&
1211
+ equals$6(existing_parameters, incoming_parameters)))) {
1212
+ return false;
1213
+ }
1214
+ const existing_prompt = existing.prompt;
1215
+ const incoming_prompt = incoming.prompt;
1216
+ if (!(existing_prompt === incoming_prompt)) {
695
1217
  return false;
696
1218
  }
697
1219
  return true;
698
1220
  }
699
- const ingest$1 = function EinsteinLlmFeedbackRepresentationIngest(input, path, luvio, store, timestamp) {
1221
+ const ingest$1 = function EinsteinLlmGenerationsRepresentationIngest(input, path, luvio, store, timestamp) {
700
1222
  if (process.env.NODE_ENV !== 'production') {
701
- const validateError = validate$3(input);
1223
+ const validateError = validate$7(input);
702
1224
  if (validateError !== null) {
703
1225
  throw validateError;
704
1226
  }
705
1227
  }
706
1228
  const key = keyBuilderFromType$1(luvio, input);
707
1229
  const ttlToUse = TTL$1;
708
- ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize$1, "EinsteinLLM", VERSION$1, RepresentationType$1, equals$1);
1230
+ ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize$1, "EinsteinLLM", VERSION$5, RepresentationType$1, equals$5);
709
1231
  return createLink(key);
710
1232
  };
711
1233
  function getTypeCacheKeys$1(rootKeySet, luvio, input, fullPathFactory) {
@@ -718,8 +1240,8 @@ function getTypeCacheKeys$1(rootKeySet, luvio, input, fullPathFactory) {
718
1240
  });
719
1241
  }
720
1242
 
721
- function select$2(luvio, params) {
722
- return select$3();
1243
+ function select$6(luvio, params) {
1244
+ return select$7();
723
1245
  }
724
1246
  function getResponseCacheKeys$1(storeKeyMap, luvio, resourceParams, response) {
725
1247
  getTypeCacheKeys$1(storeKeyMap, luvio, response);
@@ -730,7 +1252,7 @@ function ingestSuccess$1(luvio, resourceParams, response) {
730
1252
  luvio.storeIngest(key, ingest$1, body);
731
1253
  const snapshot = luvio.storeLookup({
732
1254
  recordId: key,
733
- node: select$2(),
1255
+ node: select$6(),
734
1256
  variables: {},
735
1257
  });
736
1258
  if (process.env.NODE_ENV !== 'production') {
@@ -745,7 +1267,7 @@ function createResourceRequest$1(config) {
745
1267
  const headers = {};
746
1268
  return {
747
1269
  baseUri: '/services/data/v61.0',
748
- basePath: '/einstein/llm/feedback',
1270
+ basePath: '/einstein/llm/prompt/generations',
749
1271
  method: 'post',
750
1272
  body: config.body,
751
1273
  urlParams: {},
@@ -755,18 +1277,18 @@ function createResourceRequest$1(config) {
755
1277
  };
756
1278
  }
757
1279
 
758
- const adapterName$1 = 'createFeedback';
759
- const createFeedback_ConfigPropertyMetadata = [
760
- generateParamConfigMetadata('feedbackInput', true, 2 /* Body */, 4 /* Unsupported */),
1280
+ const adapterName$1 = 'createGenerations';
1281
+ const createGenerations_ConfigPropertyMetadata = [
1282
+ generateParamConfigMetadata('generationsInput', true, 2 /* Body */, 4 /* Unsupported */),
761
1283
  ];
762
- const createFeedback_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$1, createFeedback_ConfigPropertyMetadata);
763
- const createResourceParams$1 = /*#__PURE__*/ createResourceParams$3(createFeedback_ConfigPropertyMetadata);
1284
+ const createGenerations_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$1, createGenerations_ConfigPropertyMetadata);
1285
+ const createResourceParams$1 = /*#__PURE__*/ createResourceParams$3(createGenerations_ConfigPropertyMetadata);
764
1286
  function typeCheckConfig$1(untrustedConfig) {
765
1287
  const config = {};
766
- const untrustedConfig_feedbackInput = untrustedConfig.feedbackInput;
767
- const referenceEinsteinLlmFeedbackInputRepresentationValidationError = validate$4(untrustedConfig_feedbackInput);
768
- if (referenceEinsteinLlmFeedbackInputRepresentationValidationError === null) {
769
- config.feedbackInput = untrustedConfig_feedbackInput;
1288
+ const untrustedConfig_generationsInput = untrustedConfig.generationsInput;
1289
+ const referenceEinsteinLlmGenerationsInputRepresentationValidationError = validate$c(untrustedConfig_generationsInput);
1290
+ if (referenceEinsteinLlmGenerationsInputRepresentationValidationError === null) {
1291
+ config.generationsInput = untrustedConfig_generationsInput;
770
1292
  }
771
1293
  return config;
772
1294
  }
@@ -801,18 +1323,18 @@ function buildNetworkSnapshot$1(luvio, config, options) {
801
1323
  throw response;
802
1324
  });
803
1325
  }
804
- const createFeedbackAdapterFactory = (luvio) => {
805
- return function createFeedback(untrustedConfig) {
806
- const config = validateAdapterConfig$1(untrustedConfig, createFeedback_ConfigPropertyNames);
1326
+ const createGenerationsAdapterFactory = (luvio) => {
1327
+ return function createGenerations(untrustedConfig) {
1328
+ const config = validateAdapterConfig$1(untrustedConfig, createGenerations_ConfigPropertyNames);
807
1329
  // Invalid or incomplete config
808
1330
  if (config === null) {
809
- throw new Error('Invalid config for "createFeedback"');
1331
+ throw new Error('Invalid config for "createGenerations"');
810
1332
  }
811
1333
  return buildNetworkSnapshot$1(luvio, config);
812
1334
  };
813
1335
  };
814
1336
 
815
- function validate$2(obj, path = 'WrappedValueMap') {
1337
+ function validate$6(obj, path = 'WrappedValueMap') {
816
1338
  const v_error = (() => {
817
1339
  if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
818
1340
  return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
@@ -835,7 +1357,7 @@ function validate$2(obj, path = 'WrappedValueMap') {
835
1357
  return v_error === undefined ? null : v_error;
836
1358
  }
837
1359
 
838
- function validate$1(obj, path = 'EinsteinPromptTemplateGenerationsInputRepresentation') {
1360
+ function validate$5(obj, path = 'EinsteinPromptTemplateGenerationsInputRepresentation') {
839
1361
  const v_error = (() => {
840
1362
  if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
841
1363
  return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
@@ -843,7 +1365,7 @@ function validate$1(obj, path = 'EinsteinPromptTemplateGenerationsInputRepresent
843
1365
  if (obj.additionalConfig !== undefined) {
844
1366
  const obj_additionalConfig = obj.additionalConfig;
845
1367
  const path_additionalConfig = path + '.additionalConfig';
846
- const referencepath_additionalConfigValidationError = validate$9(obj_additionalConfig, path_additionalConfig);
1368
+ const referencepath_additionalConfigValidationError = validate$d(obj_additionalConfig, path_additionalConfig);
847
1369
  if (referencepath_additionalConfigValidationError !== null) {
848
1370
  let message = 'Object doesn\'t match EinsteinLlmAdditionalConfigInputRepresentation (at "' + path_additionalConfig + '")\n';
849
1371
  message += referencepath_additionalConfigValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
@@ -852,7 +1374,7 @@ function validate$1(obj, path = 'EinsteinPromptTemplateGenerationsInputRepresent
852
1374
  }
853
1375
  const obj_inputParams = obj.inputParams;
854
1376
  const path_inputParams = path + '.inputParams';
855
- const referencepath_inputParamsValidationError = validate$2(obj_inputParams, path_inputParams);
1377
+ const referencepath_inputParamsValidationError = validate$6(obj_inputParams, path_inputParams);
856
1378
  if (referencepath_inputParamsValidationError !== null) {
857
1379
  let message = 'Object doesn\'t match WrappedValueMap (at "' + path_inputParams + '")\n';
858
1380
  message += referencepath_inputParamsValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
@@ -874,13 +1396,348 @@ function validate$1(obj, path = 'EinsteinPromptTemplateGenerationsInputRepresent
874
1396
  return v_error === undefined ? null : v_error;
875
1397
  }
876
1398
 
1399
+ const VERSION$4 = "6458d624e5a1691821c764b6de0badb3";
1400
+ function validate$4(obj, path = 'EinsteinPromptTemplateGenerationsErrorRepresentation') {
1401
+ const v_error = (() => {
1402
+ if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
1403
+ return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
1404
+ }
1405
+ const obj_errorMessage = obj.errorMessage;
1406
+ const path_errorMessage = path + '.errorMessage';
1407
+ if (typeof obj_errorMessage !== 'string') {
1408
+ return new TypeError('Expected "string" but received "' + typeof obj_errorMessage + '" (at "' + path_errorMessage + '")');
1409
+ }
1410
+ const obj_httpErrorCode = obj.httpErrorCode;
1411
+ const path_httpErrorCode = path + '.httpErrorCode';
1412
+ if (typeof obj_httpErrorCode !== 'string') {
1413
+ return new TypeError('Expected "string" but received "' + typeof obj_httpErrorCode + '" (at "' + path_httpErrorCode + '")');
1414
+ }
1415
+ if (obj.localizedErrorMessage !== undefined) {
1416
+ const obj_localizedErrorMessage = obj.localizedErrorMessage;
1417
+ const path_localizedErrorMessage = path + '.localizedErrorMessage';
1418
+ if (typeof obj_localizedErrorMessage !== 'string') {
1419
+ return new TypeError('Expected "string" but received "' + typeof obj_localizedErrorMessage + '" (at "' + path_localizedErrorMessage + '")');
1420
+ }
1421
+ }
1422
+ const obj_messageCode = obj.messageCode;
1423
+ const path_messageCode = path + '.messageCode';
1424
+ if (typeof obj_messageCode !== 'string') {
1425
+ return new TypeError('Expected "string" but received "' + typeof obj_messageCode + '" (at "' + path_messageCode + '")');
1426
+ }
1427
+ })();
1428
+ return v_error === undefined ? null : v_error;
1429
+ }
1430
+ const select$5 = function EinsteinPromptTemplateGenerationsErrorRepresentationSelect() {
1431
+ return {
1432
+ kind: 'Fragment',
1433
+ version: VERSION$4,
1434
+ private: [],
1435
+ selections: [
1436
+ {
1437
+ name: 'errorMessage',
1438
+ kind: 'Scalar'
1439
+ },
1440
+ {
1441
+ name: 'httpErrorCode',
1442
+ kind: 'Scalar'
1443
+ },
1444
+ {
1445
+ name: 'localizedErrorMessage',
1446
+ kind: 'Scalar',
1447
+ required: false
1448
+ },
1449
+ {
1450
+ name: 'messageCode',
1451
+ kind: 'Scalar'
1452
+ }
1453
+ ]
1454
+ };
1455
+ };
1456
+ function equals$4(existing, incoming) {
1457
+ const existing_errorMessage = existing.errorMessage;
1458
+ const incoming_errorMessage = incoming.errorMessage;
1459
+ if (!(existing_errorMessage === incoming_errorMessage)) {
1460
+ return false;
1461
+ }
1462
+ const existing_httpErrorCode = existing.httpErrorCode;
1463
+ const incoming_httpErrorCode = incoming.httpErrorCode;
1464
+ if (!(existing_httpErrorCode === incoming_httpErrorCode)) {
1465
+ return false;
1466
+ }
1467
+ const existing_localizedErrorMessage = existing.localizedErrorMessage;
1468
+ const incoming_localizedErrorMessage = incoming.localizedErrorMessage;
1469
+ // if at least one of these optionals is defined
1470
+ if (existing_localizedErrorMessage !== undefined || incoming_localizedErrorMessage !== undefined) {
1471
+ // if one of these is not defined we know the other is defined and therefore
1472
+ // not equal
1473
+ if (existing_localizedErrorMessage === undefined || incoming_localizedErrorMessage === undefined) {
1474
+ return false;
1475
+ }
1476
+ if (!(existing_localizedErrorMessage === incoming_localizedErrorMessage)) {
1477
+ return false;
1478
+ }
1479
+ }
1480
+ const existing_messageCode = existing.messageCode;
1481
+ const incoming_messageCode = incoming.messageCode;
1482
+ if (!(existing_messageCode === incoming_messageCode)) {
1483
+ return false;
1484
+ }
1485
+ return true;
1486
+ }
1487
+
1488
+ const VERSION$3 = "7c417ce44e4bc05dfcc454e6825590e8";
1489
+ function validate$3(obj, path = 'EinsteinPromptTemplateMaskSettingsRepresentation') {
1490
+ const v_error = (() => {
1491
+ if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
1492
+ return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
1493
+ }
1494
+ const obj_enableModeration = obj.enableModeration;
1495
+ const path_enableModeration = path + '.enableModeration';
1496
+ if (typeof obj_enableModeration !== 'boolean') {
1497
+ return new TypeError('Expected "boolean" but received "' + typeof obj_enableModeration + '" (at "' + path_enableModeration + '")');
1498
+ }
1499
+ })();
1500
+ return v_error === undefined ? null : v_error;
1501
+ }
1502
+ const select$4 = function EinsteinPromptTemplateMaskSettingsRepresentationSelect() {
1503
+ return {
1504
+ kind: 'Fragment',
1505
+ version: VERSION$3,
1506
+ private: [],
1507
+ selections: [
1508
+ {
1509
+ name: 'enableModeration',
1510
+ kind: 'Scalar'
1511
+ }
1512
+ ]
1513
+ };
1514
+ };
1515
+ function equals$3(existing, incoming) {
1516
+ const existing_enableModeration = existing.enableModeration;
1517
+ const incoming_enableModeration = incoming.enableModeration;
1518
+ if (!(existing_enableModeration === incoming_enableModeration)) {
1519
+ return false;
1520
+ }
1521
+ return true;
1522
+ }
1523
+
1524
+ const VERSION$2 = "92ad1abd0e2a60bc36941409cadda7e2";
1525
+ function validate$2(obj, path = 'EinsteinPromptTemplateMaskContentRepresentation') {
1526
+ const v_error = (() => {
1527
+ if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
1528
+ return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
1529
+ }
1530
+ const obj_content = obj.content;
1531
+ const path_content = path + '.content';
1532
+ if (typeof obj_content !== 'string') {
1533
+ return new TypeError('Expected "string" but received "' + typeof obj_content + '" (at "' + path_content + '")');
1534
+ }
1535
+ if (obj.moderationSettings !== undefined) {
1536
+ const obj_moderationSettings = obj.moderationSettings;
1537
+ const path_moderationSettings = path + '.moderationSettings';
1538
+ let obj_moderationSettings_union0 = null;
1539
+ const obj_moderationSettings_union0_error = (() => {
1540
+ const referencepath_moderationSettingsValidationError = validate$3(obj_moderationSettings, path_moderationSettings);
1541
+ if (referencepath_moderationSettingsValidationError !== null) {
1542
+ let message = 'Object doesn\'t match EinsteinPromptTemplateMaskSettingsRepresentation (at "' + path_moderationSettings + '")\n';
1543
+ message += referencepath_moderationSettingsValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
1544
+ return new TypeError(message);
1545
+ }
1546
+ })();
1547
+ if (obj_moderationSettings_union0_error != null) {
1548
+ obj_moderationSettings_union0 = obj_moderationSettings_union0_error.message;
1549
+ }
1550
+ let obj_moderationSettings_union1 = null;
1551
+ const obj_moderationSettings_union1_error = (() => {
1552
+ if (obj_moderationSettings !== null) {
1553
+ return new TypeError('Expected "null" but received "' + typeof obj_moderationSettings + '" (at "' + path_moderationSettings + '")');
1554
+ }
1555
+ })();
1556
+ if (obj_moderationSettings_union1_error != null) {
1557
+ obj_moderationSettings_union1 = obj_moderationSettings_union1_error.message;
1558
+ }
1559
+ if (obj_moderationSettings_union0 && obj_moderationSettings_union1) {
1560
+ let message = 'Object doesn\'t match union (at "' + path_moderationSettings + '")';
1561
+ message += '\n' + obj_moderationSettings_union0.split('\n').map((line) => '\t' + line).join('\n');
1562
+ message += '\n' + obj_moderationSettings_union1.split('\n').map((line) => '\t' + line).join('\n');
1563
+ return new TypeError(message);
1564
+ }
1565
+ }
1566
+ if (obj.role !== undefined) {
1567
+ const obj_role = obj.role;
1568
+ const path_role = path + '.role';
1569
+ if (typeof obj_role !== 'string') {
1570
+ return new TypeError('Expected "string" but received "' + typeof obj_role + '" (at "' + path_role + '")');
1571
+ }
1572
+ }
1573
+ })();
1574
+ return v_error === undefined ? null : v_error;
1575
+ }
1576
+ const select$3 = function EinsteinPromptTemplateMaskContentRepresentationSelect() {
1577
+ const { selections: EinsteinPromptTemplateMaskSettingsRepresentation__selections, opaque: EinsteinPromptTemplateMaskSettingsRepresentation__opaque, } = select$4();
1578
+ return {
1579
+ kind: 'Fragment',
1580
+ version: VERSION$2,
1581
+ private: [],
1582
+ selections: [
1583
+ {
1584
+ name: 'content',
1585
+ kind: 'Scalar'
1586
+ },
1587
+ {
1588
+ name: 'moderationSettings',
1589
+ kind: 'Object',
1590
+ nullable: true,
1591
+ selections: EinsteinPromptTemplateMaskSettingsRepresentation__selections,
1592
+ required: false
1593
+ },
1594
+ {
1595
+ name: 'role',
1596
+ kind: 'Scalar',
1597
+ required: false
1598
+ }
1599
+ ]
1600
+ };
1601
+ };
1602
+ function equals$2(existing, incoming) {
1603
+ const existing_content = existing.content;
1604
+ const incoming_content = incoming.content;
1605
+ if (!(existing_content === incoming_content)) {
1606
+ return false;
1607
+ }
1608
+ const existing_role = existing.role;
1609
+ const incoming_role = incoming.role;
1610
+ // if at least one of these optionals is defined
1611
+ if (existing_role !== undefined || incoming_role !== undefined) {
1612
+ // if one of these is not defined we know the other is defined and therefore
1613
+ // not equal
1614
+ if (existing_role === undefined || incoming_role === undefined) {
1615
+ return false;
1616
+ }
1617
+ if (!(existing_role === incoming_role)) {
1618
+ return false;
1619
+ }
1620
+ }
1621
+ const existing_moderationSettings = existing.moderationSettings;
1622
+ const incoming_moderationSettings = incoming.moderationSettings;
1623
+ // if at least one of these optionals is defined
1624
+ if (existing_moderationSettings !== undefined || incoming_moderationSettings !== undefined) {
1625
+ // if one of these is not defined we know the other is defined and therefore
1626
+ // not equal
1627
+ if (existing_moderationSettings === undefined || incoming_moderationSettings === undefined) {
1628
+ return false;
1629
+ }
1630
+ if (!(existing_moderationSettings === incoming_moderationSettings
1631
+ || (existing_moderationSettings != null &&
1632
+ incoming_moderationSettings != null &&
1633
+ equals$3(existing_moderationSettings, incoming_moderationSettings)))) {
1634
+ return false;
1635
+ }
1636
+ }
1637
+ return true;
1638
+ }
1639
+
1640
+ const VERSION$1 = "507a815605f8d30ae9b52b0ec513d25e";
1641
+ function validate$1(obj, path = 'EinsteinPromptTemplateMaskDataRepresentation') {
1642
+ const v_error = (() => {
1643
+ if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
1644
+ return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
1645
+ }
1646
+ const obj_originalValue = obj.originalValue;
1647
+ const path_originalValue = path + '.originalValue';
1648
+ if (typeof obj_originalValue !== 'string') {
1649
+ return new TypeError('Expected "string" but received "' + typeof obj_originalValue + '" (at "' + path_originalValue + '")');
1650
+ }
1651
+ const obj_placeHolder = obj.placeHolder;
1652
+ const path_placeHolder = path + '.placeHolder';
1653
+ if (typeof obj_placeHolder !== 'string') {
1654
+ return new TypeError('Expected "string" but received "' + typeof obj_placeHolder + '" (at "' + path_placeHolder + '")');
1655
+ }
1656
+ const obj_recognizers = obj.recognizers;
1657
+ const path_recognizers = path + '.recognizers';
1658
+ if (!ArrayIsArray(obj_recognizers)) {
1659
+ return new TypeError('Expected "array" but received "' + typeof obj_recognizers + '" (at "' + path_recognizers + '")');
1660
+ }
1661
+ for (let i = 0; i < obj_recognizers.length; i++) {
1662
+ const obj_recognizers_item = obj_recognizers[i];
1663
+ const path_recognizers_item = path_recognizers + '[' + i + ']';
1664
+ if (typeof obj_recognizers_item !== 'string') {
1665
+ return new TypeError('Expected "string" but received "' + typeof obj_recognizers_item + '" (at "' + path_recognizers_item + '")');
1666
+ }
1667
+ }
1668
+ })();
1669
+ return v_error === undefined ? null : v_error;
1670
+ }
1671
+ const select$2 = function EinsteinPromptTemplateMaskDataRepresentationSelect() {
1672
+ return {
1673
+ kind: 'Fragment',
1674
+ version: VERSION$1,
1675
+ private: [],
1676
+ selections: [
1677
+ {
1678
+ name: 'originalValue',
1679
+ kind: 'Scalar'
1680
+ },
1681
+ {
1682
+ name: 'placeHolder',
1683
+ kind: 'Scalar'
1684
+ },
1685
+ {
1686
+ name: 'recognizers',
1687
+ kind: 'Scalar',
1688
+ plural: true
1689
+ }
1690
+ ]
1691
+ };
1692
+ };
1693
+ function equals$1(existing, incoming) {
1694
+ const existing_originalValue = existing.originalValue;
1695
+ const incoming_originalValue = incoming.originalValue;
1696
+ if (!(existing_originalValue === incoming_originalValue)) {
1697
+ return false;
1698
+ }
1699
+ const existing_placeHolder = existing.placeHolder;
1700
+ const incoming_placeHolder = incoming.placeHolder;
1701
+ if (!(existing_placeHolder === incoming_placeHolder)) {
1702
+ return false;
1703
+ }
1704
+ const existing_recognizers = existing.recognizers;
1705
+ const incoming_recognizers = incoming.recognizers;
1706
+ const equals_recognizers_items = equalsArray(existing_recognizers, incoming_recognizers, (existing_recognizers_item, incoming_recognizers_item) => {
1707
+ if (!(existing_recognizers_item === incoming_recognizers_item)) {
1708
+ return false;
1709
+ }
1710
+ });
1711
+ if (equals_recognizers_items === false) {
1712
+ return false;
1713
+ }
1714
+ return true;
1715
+ }
1716
+
877
1717
  const TTL = 100;
878
- const VERSION = "72c96c11855d430a55c0a79c239c0838";
1718
+ const VERSION = "af7cfa8bd9d9cdd1923263da1734499c";
879
1719
  function validate(obj, path = 'EinsteinPromptTemplateGenerationsRepresentation') {
880
1720
  const v_error = (() => {
881
1721
  if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
882
1722
  return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
883
1723
  }
1724
+ if (obj.generationErrors !== undefined) {
1725
+ const obj_generationErrors = obj.generationErrors;
1726
+ const path_generationErrors = path + '.generationErrors';
1727
+ if (!ArrayIsArray(obj_generationErrors)) {
1728
+ return new TypeError('Expected "array" but received "' + typeof obj_generationErrors + '" (at "' + path_generationErrors + '")');
1729
+ }
1730
+ for (let i = 0; i < obj_generationErrors.length; i++) {
1731
+ const obj_generationErrors_item = obj_generationErrors[i];
1732
+ const path_generationErrors_item = path_generationErrors + '[' + i + ']';
1733
+ const referencepath_generationErrors_itemValidationError = validate$4(obj_generationErrors_item, path_generationErrors_item);
1734
+ if (referencepath_generationErrors_itemValidationError !== null) {
1735
+ let message = 'Object doesn\'t match EinsteinPromptTemplateGenerationsErrorRepresentation (at "' + path_generationErrors_item + '")\n';
1736
+ message += referencepath_generationErrors_itemValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
1737
+ return new TypeError(message);
1738
+ }
1739
+ }
1740
+ }
884
1741
  const obj_generations = obj.generations;
885
1742
  const path_generations = path + '.generations';
886
1743
  if (!ArrayIsArray(obj_generations)) {
@@ -889,7 +1746,7 @@ function validate(obj, path = 'EinsteinPromptTemplateGenerationsRepresentation')
889
1746
  for (let i = 0; i < obj_generations.length; i++) {
890
1747
  const obj_generations_item = obj_generations[i];
891
1748
  const path_generations_item = path_generations + '[' + i + ']';
892
- const referencepath_generations_itemValidationError = validate$7(obj_generations_item, path_generations_item);
1749
+ const referencepath_generations_itemValidationError = validate$9(obj_generations_item, path_generations_item);
893
1750
  if (referencepath_generations_itemValidationError !== null) {
894
1751
  let message = 'Object doesn\'t match EinsteinLlmGenerationItemRepresentation (at "' + path_generations_item + '")\n';
895
1752
  message += referencepath_generations_itemValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
@@ -900,7 +1757,7 @@ function validate(obj, path = 'EinsteinPromptTemplateGenerationsRepresentation')
900
1757
  const path_parameters = path + '.parameters';
901
1758
  let obj_parameters_union0 = null;
902
1759
  const obj_parameters_union0_error = (() => {
903
- const referencepath_parametersValidationError = validate$6(obj_parameters, path_parameters);
1760
+ const referencepath_parametersValidationError = validate$8(obj_parameters, path_parameters);
904
1761
  if (referencepath_parametersValidationError !== null) {
905
1762
  let message = 'Object doesn\'t match WrappedMap (at "' + path_parameters + '")\n';
906
1763
  message += referencepath_parametersValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
@@ -961,6 +1818,57 @@ function validate(obj, path = 'EinsteinPromptTemplateGenerationsRepresentation')
961
1818
  if (typeof obj_requestId !== 'string') {
962
1819
  return new TypeError('Expected "string" but received "' + typeof obj_requestId + '" (at "' + path_requestId + '")');
963
1820
  }
1821
+ if (obj.requestMessages !== undefined) {
1822
+ const obj_requestMessages = obj.requestMessages;
1823
+ const path_requestMessages = path + '.requestMessages';
1824
+ if (!ArrayIsArray(obj_requestMessages)) {
1825
+ return new TypeError('Expected "array" but received "' + typeof obj_requestMessages + '" (at "' + path_requestMessages + '")');
1826
+ }
1827
+ for (let i = 0; i < obj_requestMessages.length; i++) {
1828
+ const obj_requestMessages_item = obj_requestMessages[i];
1829
+ const path_requestMessages_item = path_requestMessages + '[' + i + ']';
1830
+ const referencepath_requestMessages_itemValidationError = validate$2(obj_requestMessages_item, path_requestMessages_item);
1831
+ if (referencepath_requestMessages_itemValidationError !== null) {
1832
+ let message = 'Object doesn\'t match EinsteinPromptTemplateMaskContentRepresentation (at "' + path_requestMessages_item + '")\n';
1833
+ message += referencepath_requestMessages_itemValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
1834
+ return new TypeError(message);
1835
+ }
1836
+ }
1837
+ }
1838
+ if (obj.responseMessages !== undefined) {
1839
+ const obj_responseMessages = obj.responseMessages;
1840
+ const path_responseMessages = path + '.responseMessages';
1841
+ if (!ArrayIsArray(obj_responseMessages)) {
1842
+ return new TypeError('Expected "array" but received "' + typeof obj_responseMessages + '" (at "' + path_responseMessages + '")');
1843
+ }
1844
+ for (let i = 0; i < obj_responseMessages.length; i++) {
1845
+ const obj_responseMessages_item = obj_responseMessages[i];
1846
+ const path_responseMessages_item = path_responseMessages + '[' + i + ']';
1847
+ const referencepath_responseMessages_itemValidationError = validate$2(obj_responseMessages_item, path_responseMessages_item);
1848
+ if (referencepath_responseMessages_itemValidationError !== null) {
1849
+ let message = 'Object doesn\'t match EinsteinPromptTemplateMaskContentRepresentation (at "' + path_responseMessages_item + '")\n';
1850
+ message += referencepath_responseMessages_itemValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
1851
+ return new TypeError(message);
1852
+ }
1853
+ }
1854
+ }
1855
+ if (obj.slotsMaskingInformation !== undefined) {
1856
+ const obj_slotsMaskingInformation = obj.slotsMaskingInformation;
1857
+ const path_slotsMaskingInformation = path + '.slotsMaskingInformation';
1858
+ if (!ArrayIsArray(obj_slotsMaskingInformation)) {
1859
+ return new TypeError('Expected "array" but received "' + typeof obj_slotsMaskingInformation + '" (at "' + path_slotsMaskingInformation + '")');
1860
+ }
1861
+ for (let i = 0; i < obj_slotsMaskingInformation.length; i++) {
1862
+ const obj_slotsMaskingInformation_item = obj_slotsMaskingInformation[i];
1863
+ const path_slotsMaskingInformation_item = path_slotsMaskingInformation + '[' + i + ']';
1864
+ const referencepath_slotsMaskingInformation_itemValidationError = validate$1(obj_slotsMaskingInformation_item, path_slotsMaskingInformation_item);
1865
+ if (referencepath_slotsMaskingInformation_itemValidationError !== null) {
1866
+ let message = 'Object doesn\'t match EinsteinPromptTemplateMaskDataRepresentation (at "' + path_slotsMaskingInformation_item + '")\n';
1867
+ message += referencepath_slotsMaskingInformation_itemValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
1868
+ return new TypeError(message);
1869
+ }
1870
+ }
1871
+ }
964
1872
  })();
965
1873
  return v_error === undefined ? null : v_error;
966
1874
  }
@@ -978,13 +1886,23 @@ function normalize(input, existing, path, luvio, store, timestamp) {
978
1886
  return input;
979
1887
  }
980
1888
  const select$1 = function EinsteinPromptTemplateGenerationsRepresentationSelect() {
981
- const { selections: EinsteinLlmGenerationItemRepresentation__selections, opaque: EinsteinLlmGenerationItemRepresentation__opaque, } = select$7();
982
- const { selections: WrappedMap__selections, opaque: WrappedMap__opaque, } = select$6();
1889
+ const { selections: EinsteinPromptTemplateGenerationsErrorRepresentation__selections, opaque: EinsteinPromptTemplateGenerationsErrorRepresentation__opaque, } = select$5();
1890
+ const { selections: EinsteinLlmGenerationItemRepresentation__selections, opaque: EinsteinLlmGenerationItemRepresentation__opaque, } = select$9();
1891
+ const { selections: WrappedMap__selections, opaque: WrappedMap__opaque, } = select$8();
1892
+ const { selections: EinsteinPromptTemplateMaskContentRepresentation__selections, opaque: EinsteinPromptTemplateMaskContentRepresentation__opaque, } = select$3();
1893
+ const { selections: EinsteinPromptTemplateMaskDataRepresentation__selections, opaque: EinsteinPromptTemplateMaskDataRepresentation__opaque, } = select$2();
983
1894
  return {
984
1895
  kind: 'Fragment',
985
1896
  version: VERSION,
986
1897
  private: [],
987
1898
  selections: [
1899
+ {
1900
+ name: 'generationErrors',
1901
+ kind: 'Object',
1902
+ plural: true,
1903
+ selections: EinsteinPromptTemplateGenerationsErrorRepresentation__selections,
1904
+ required: false
1905
+ },
988
1906
  {
989
1907
  name: 'generations',
990
1908
  kind: 'Object',
@@ -1008,6 +1926,27 @@ const select$1 = function EinsteinPromptTemplateGenerationsRepresentationSelect(
1008
1926
  {
1009
1927
  name: 'requestId',
1010
1928
  kind: 'Scalar'
1929
+ },
1930
+ {
1931
+ name: 'requestMessages',
1932
+ kind: 'Object',
1933
+ plural: true,
1934
+ selections: EinsteinPromptTemplateMaskContentRepresentation__selections,
1935
+ required: false
1936
+ },
1937
+ {
1938
+ name: 'responseMessages',
1939
+ kind: 'Object',
1940
+ plural: true,
1941
+ selections: EinsteinPromptTemplateMaskContentRepresentation__selections,
1942
+ required: false
1943
+ },
1944
+ {
1945
+ name: 'slotsMaskingInformation',
1946
+ kind: 'Object',
1947
+ plural: true,
1948
+ selections: EinsteinPromptTemplateMaskDataRepresentation__selections,
1949
+ required: false
1011
1950
  }
1012
1951
  ]
1013
1952
  };
@@ -1023,10 +1962,28 @@ function equals(existing, incoming) {
1023
1962
  if (!(existing_requestId === incoming_requestId)) {
1024
1963
  return false;
1025
1964
  }
1965
+ const existing_generationErrors = existing.generationErrors;
1966
+ const incoming_generationErrors = incoming.generationErrors;
1967
+ // if at least one of these optionals is defined
1968
+ if (existing_generationErrors !== undefined || incoming_generationErrors !== undefined) {
1969
+ // if one of these is not defined we know the other is defined and therefore
1970
+ // not equal
1971
+ if (existing_generationErrors === undefined || incoming_generationErrors === undefined) {
1972
+ return false;
1973
+ }
1974
+ const equals_generationErrors_items = equalsArray(existing_generationErrors, incoming_generationErrors, (existing_generationErrors_item, incoming_generationErrors_item) => {
1975
+ if (!(equals$4(existing_generationErrors_item, incoming_generationErrors_item))) {
1976
+ return false;
1977
+ }
1978
+ });
1979
+ if (equals_generationErrors_items === false) {
1980
+ return false;
1981
+ }
1982
+ }
1026
1983
  const existing_generations = existing.generations;
1027
1984
  const incoming_generations = incoming.generations;
1028
1985
  const equals_generations_items = equalsArray(existing_generations, incoming_generations, (existing_generations_item, incoming_generations_item) => {
1029
- if (!(equals$4(existing_generations_item, incoming_generations_item))) {
1986
+ if (!(equals$7(existing_generations_item, incoming_generations_item))) {
1030
1987
  return false;
1031
1988
  }
1032
1989
  });
@@ -1038,7 +1995,7 @@ function equals(existing, incoming) {
1038
1995
  if (!(existing_parameters === incoming_parameters
1039
1996
  || (existing_parameters != null &&
1040
1997
  incoming_parameters != null &&
1041
- equals$3(existing_parameters, incoming_parameters)))) {
1998
+ equals$6(existing_parameters, incoming_parameters)))) {
1042
1999
  return false;
1043
2000
  }
1044
2001
  const existing_prompt = existing.prompt;
@@ -1046,6 +2003,60 @@ function equals(existing, incoming) {
1046
2003
  if (!(existing_prompt === incoming_prompt)) {
1047
2004
  return false;
1048
2005
  }
2006
+ const existing_requestMessages = existing.requestMessages;
2007
+ const incoming_requestMessages = incoming.requestMessages;
2008
+ // if at least one of these optionals is defined
2009
+ if (existing_requestMessages !== undefined || incoming_requestMessages !== undefined) {
2010
+ // if one of these is not defined we know the other is defined and therefore
2011
+ // not equal
2012
+ if (existing_requestMessages === undefined || incoming_requestMessages === undefined) {
2013
+ return false;
2014
+ }
2015
+ const equals_requestMessages_items = equalsArray(existing_requestMessages, incoming_requestMessages, (existing_requestMessages_item, incoming_requestMessages_item) => {
2016
+ if (!(equals$2(existing_requestMessages_item, incoming_requestMessages_item))) {
2017
+ return false;
2018
+ }
2019
+ });
2020
+ if (equals_requestMessages_items === false) {
2021
+ return false;
2022
+ }
2023
+ }
2024
+ const existing_responseMessages = existing.responseMessages;
2025
+ const incoming_responseMessages = incoming.responseMessages;
2026
+ // if at least one of these optionals is defined
2027
+ if (existing_responseMessages !== undefined || incoming_responseMessages !== undefined) {
2028
+ // if one of these is not defined we know the other is defined and therefore
2029
+ // not equal
2030
+ if (existing_responseMessages === undefined || incoming_responseMessages === undefined) {
2031
+ return false;
2032
+ }
2033
+ const equals_responseMessages_items = equalsArray(existing_responseMessages, incoming_responseMessages, (existing_responseMessages_item, incoming_responseMessages_item) => {
2034
+ if (!(equals$2(existing_responseMessages_item, incoming_responseMessages_item))) {
2035
+ return false;
2036
+ }
2037
+ });
2038
+ if (equals_responseMessages_items === false) {
2039
+ return false;
2040
+ }
2041
+ }
2042
+ const existing_slotsMaskingInformation = existing.slotsMaskingInformation;
2043
+ const incoming_slotsMaskingInformation = incoming.slotsMaskingInformation;
2044
+ // if at least one of these optionals is defined
2045
+ if (existing_slotsMaskingInformation !== undefined || incoming_slotsMaskingInformation !== undefined) {
2046
+ // if one of these is not defined we know the other is defined and therefore
2047
+ // not equal
2048
+ if (existing_slotsMaskingInformation === undefined || incoming_slotsMaskingInformation === undefined) {
2049
+ return false;
2050
+ }
2051
+ const equals_slotsMaskingInformation_items = equalsArray(existing_slotsMaskingInformation, incoming_slotsMaskingInformation, (existing_slotsMaskingInformation_item, incoming_slotsMaskingInformation_item) => {
2052
+ if (!(equals$1(existing_slotsMaskingInformation_item, incoming_slotsMaskingInformation_item))) {
2053
+ return false;
2054
+ }
2055
+ });
2056
+ if (equals_slotsMaskingInformation_items === false) {
2057
+ return false;
2058
+ }
2059
+ }
1049
2060
  return true;
1050
2061
  }
1051
2062
  const ingest = function EinsteinPromptTemplateGenerationsRepresentationIngest(input, path, luvio, store, timestamp) {
@@ -1119,7 +2130,7 @@ function typeCheckConfig(untrustedConfig) {
1119
2130
  const config = {};
1120
2131
  typeCheckConfig$3(untrustedConfig, config, createGenerationsForPromptTemplate_ConfigPropertyMetadata);
1121
2132
  const untrustedConfig_promptTemplateGenerationsInput = untrustedConfig.promptTemplateGenerationsInput;
1122
- const referenceEinsteinPromptTemplateGenerationsInputRepresentationValidationError = validate$1(untrustedConfig_promptTemplateGenerationsInput);
2133
+ const referenceEinsteinPromptTemplateGenerationsInputRepresentationValidationError = validate$5(untrustedConfig_promptTemplateGenerationsInput);
1123
2134
  if (referenceEinsteinPromptTemplateGenerationsInputRepresentationValidationError === null) {
1124
2135
  config.promptTemplateGenerationsInput = untrustedConfig_promptTemplateGenerationsInput;
1125
2136
  }