@salesforce/lds-adapters-service-einsteinllm 1.288.0 → 1.290.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/sfdc/index.js CHANGED
@@ -113,7 +113,7 @@ function createLink(ref) {
113
113
  };
114
114
  }
115
115
 
116
- function validate$9(obj, path = 'EinsteinLlmFeedbackInputRepresentation') {
116
+ function validate$c(obj, path = 'EinsteinLlmFeedbackInputRepresentation') {
117
117
  const v_error = (() => {
118
118
  if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
119
119
  return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
@@ -161,8 +161,8 @@ function validate$9(obj, path = 'EinsteinLlmFeedbackInputRepresentation') {
161
161
  }
162
162
 
163
163
  const TTL$2 = 100;
164
- const VERSION$4 = "4033328f65865dd5d80c68a7573a4522";
165
- function validate$8(obj, path = 'EinsteinLlmFeedbackRepresentation') {
164
+ const VERSION$7 = "4033328f65865dd5d80c68a7573a4522";
165
+ function validate$b(obj, path = 'EinsteinLlmFeedbackRepresentation') {
166
166
  const v_error = (() => {
167
167
  if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
168
168
  return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
@@ -188,10 +188,10 @@ function keyBuilderFromType$2(luvio, object) {
188
188
  function normalize$2(input, existing, path, luvio, store, timestamp) {
189
189
  return input;
190
190
  }
191
- const select$7 = function EinsteinLlmFeedbackRepresentationSelect() {
191
+ const select$a = function EinsteinLlmFeedbackRepresentationSelect() {
192
192
  return {
193
193
  kind: 'Fragment',
194
- version: VERSION$4,
194
+ version: VERSION$7,
195
195
  private: [],
196
196
  selections: [
197
197
  {
@@ -201,7 +201,7 @@ const select$7 = function EinsteinLlmFeedbackRepresentationSelect() {
201
201
  ]
202
202
  };
203
203
  };
204
- function equals$4(existing, incoming) {
204
+ function equals$7(existing, incoming) {
205
205
  const existing_message = existing.message;
206
206
  const incoming_message = incoming.message;
207
207
  if (!(existing_message === incoming_message)) {
@@ -211,14 +211,14 @@ function equals$4(existing, incoming) {
211
211
  }
212
212
  const ingest$2 = function EinsteinLlmFeedbackRepresentationIngest(input, path, luvio, store, timestamp) {
213
213
  if (process.env.NODE_ENV !== 'production') {
214
- const validateError = validate$8(input);
214
+ const validateError = validate$b(input);
215
215
  if (validateError !== null) {
216
216
  throw validateError;
217
217
  }
218
218
  }
219
219
  const key = keyBuilderFromType$2(luvio, input);
220
220
  const ttlToUse = TTL$2;
221
- ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize$2, "EinsteinLLM", VERSION$4, RepresentationType$2, equals$4);
221
+ ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize$2, "EinsteinLLM", VERSION$7, RepresentationType$2, equals$7);
222
222
  return createLink(key);
223
223
  };
224
224
  function getTypeCacheKeys$2(rootKeySet, luvio, input, fullPathFactory) {
@@ -231,8 +231,8 @@ function getTypeCacheKeys$2(rootKeySet, luvio, input, fullPathFactory) {
231
231
  });
232
232
  }
233
233
 
234
- function select$6(luvio, params) {
235
- return select$7();
234
+ function select$9(luvio, params) {
235
+ return select$a();
236
236
  }
237
237
  function getResponseCacheKeys$2(storeKeyMap, luvio, resourceParams, response) {
238
238
  getTypeCacheKeys$2(storeKeyMap, luvio, response);
@@ -243,7 +243,7 @@ function ingestSuccess$2(luvio, resourceParams, response) {
243
243
  luvio.storeIngest(key, ingest$2, body);
244
244
  const snapshot = luvio.storeLookup({
245
245
  recordId: key,
246
- node: select$6(),
246
+ node: select$9(),
247
247
  variables: {},
248
248
  });
249
249
  if (process.env.NODE_ENV !== 'production') {
@@ -257,7 +257,7 @@ function ingestSuccess$2(luvio, resourceParams, response) {
257
257
  function createResourceRequest$2(config) {
258
258
  const headers = {};
259
259
  return {
260
- baseUri: '/services/data/v61.0',
260
+ baseUri: '/services/data/v62.0',
261
261
  basePath: '/einstein/llm/feedback',
262
262
  method: 'post',
263
263
  body: config.body,
@@ -277,7 +277,7 @@ const createResourceParams$2 = /*#__PURE__*/ createResourceParams$3(createFeedba
277
277
  function typeCheckConfig$2(untrustedConfig) {
278
278
  const config = {};
279
279
  const untrustedConfig_feedbackInput = untrustedConfig.feedbackInput;
280
- const referenceEinsteinLlmFeedbackInputRepresentationValidationError = validate$9(untrustedConfig_feedbackInput);
280
+ const referenceEinsteinLlmFeedbackInputRepresentationValidationError = validate$c(untrustedConfig_feedbackInput);
281
281
  if (referenceEinsteinLlmFeedbackInputRepresentationValidationError === null) {
282
282
  config.feedbackInput = untrustedConfig_feedbackInput;
283
283
  }
@@ -325,7 +325,7 @@ const createFeedbackAdapterFactory = (luvio) => {
325
325
  };
326
326
  };
327
327
 
328
- function validate$7(obj, path = 'EinsteinLlmAdditionalConfigInputRepresentation') {
328
+ function validate$a(obj, path = 'EinsteinLlmAdditionalConfigInputRepresentation') {
329
329
  const v_error = (() => {
330
330
  if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
331
331
  return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
@@ -408,7 +408,7 @@ function validate$7(obj, path = 'EinsteinLlmAdditionalConfigInputRepresentation'
408
408
  return v_error === undefined ? null : v_error;
409
409
  }
410
410
 
411
- function validate$6(obj, path = 'EinsteinLlmGenerationsInputRepresentation') {
411
+ function validate$9(obj, path = 'EinsteinLlmGenerationsInputRepresentation') {
412
412
  const v_error = (() => {
413
413
  if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
414
414
  return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
@@ -416,7 +416,7 @@ function validate$6(obj, path = 'EinsteinLlmGenerationsInputRepresentation') {
416
416
  if (obj.additionalConfig !== undefined) {
417
417
  const obj_additionalConfig = obj.additionalConfig;
418
418
  const path_additionalConfig = path + '.additionalConfig';
419
- const referencepath_additionalConfigValidationError = validate$7(obj_additionalConfig, path_additionalConfig);
419
+ const referencepath_additionalConfigValidationError = validate$a(obj_additionalConfig, path_additionalConfig);
420
420
  if (referencepath_additionalConfigValidationError !== null) {
421
421
  let message = 'Object doesn\'t match EinsteinLlmAdditionalConfigInputRepresentation (at "' + path_additionalConfig + '")\n';
422
422
  message += referencepath_additionalConfigValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
@@ -439,12 +439,455 @@ function validate$6(obj, path = 'EinsteinLlmGenerationsInputRepresentation') {
439
439
  return v_error === undefined ? null : v_error;
440
440
  }
441
441
 
442
- const VERSION$3 = "9b45c0734fec120819b03e3b115caf64";
443
- function validate$5(obj, path = 'EinsteinLlmGenerationItemRepresentation') {
442
+ const VERSION$6 = "9ebac74e6f964c363d5fd1913df363af";
443
+ function validate$8(obj, path = 'EinsteinLlmGenerationsContentQualityRepresentation') {
444
444
  const v_error = (() => {
445
445
  if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
446
446
  return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
447
447
  }
448
+ if (obj.isToxicityDetected !== undefined) {
449
+ const obj_isToxicityDetected = obj.isToxicityDetected;
450
+ const path_isToxicityDetected = path + '.isToxicityDetected';
451
+ let obj_isToxicityDetected_union0 = null;
452
+ const obj_isToxicityDetected_union0_error = (() => {
453
+ if (typeof obj_isToxicityDetected !== 'boolean') {
454
+ return new TypeError('Expected "boolean" but received "' + typeof obj_isToxicityDetected + '" (at "' + path_isToxicityDetected + '")');
455
+ }
456
+ })();
457
+ if (obj_isToxicityDetected_union0_error != null) {
458
+ obj_isToxicityDetected_union0 = obj_isToxicityDetected_union0_error.message;
459
+ }
460
+ let obj_isToxicityDetected_union1 = null;
461
+ const obj_isToxicityDetected_union1_error = (() => {
462
+ if (obj_isToxicityDetected !== null) {
463
+ return new TypeError('Expected "null" but received "' + typeof obj_isToxicityDetected + '" (at "' + path_isToxicityDetected + '")');
464
+ }
465
+ })();
466
+ if (obj_isToxicityDetected_union1_error != null) {
467
+ obj_isToxicityDetected_union1 = obj_isToxicityDetected_union1_error.message;
468
+ }
469
+ if (obj_isToxicityDetected_union0 && obj_isToxicityDetected_union1) {
470
+ let message = 'Object doesn\'t match union (at "' + path_isToxicityDetected + '")';
471
+ message += '\n' + obj_isToxicityDetected_union0.split('\n').map((line) => '\t' + line).join('\n');
472
+ message += '\n' + obj_isToxicityDetected_union1.split('\n').map((line) => '\t' + line).join('\n');
473
+ return new TypeError(message);
474
+ }
475
+ }
476
+ })();
477
+ return v_error === undefined ? null : v_error;
478
+ }
479
+ const select$8 = function EinsteinLlmGenerationsContentQualityRepresentationSelect() {
480
+ return {
481
+ kind: 'Fragment',
482
+ version: VERSION$6,
483
+ private: [],
484
+ selections: [
485
+ {
486
+ name: 'isToxicityDetected',
487
+ kind: 'Scalar',
488
+ required: false
489
+ }
490
+ ]
491
+ };
492
+ };
493
+ function equals$6(existing, incoming) {
494
+ const existing_isToxicityDetected = existing.isToxicityDetected;
495
+ const incoming_isToxicityDetected = incoming.isToxicityDetected;
496
+ // if at least one of these optionals is defined
497
+ if (existing_isToxicityDetected !== undefined || incoming_isToxicityDetected !== undefined) {
498
+ // if one of these is not defined we know the other is defined and therefore
499
+ // not equal
500
+ if (existing_isToxicityDetected === undefined || incoming_isToxicityDetected === undefined) {
501
+ return false;
502
+ }
503
+ if (!(existing_isToxicityDetected === incoming_isToxicityDetected)) {
504
+ return false;
505
+ }
506
+ }
507
+ return true;
508
+ }
509
+
510
+ const VERSION$5 = "77af44a252cb5b45b4d9a8101368d2aa";
511
+ function validate$7(obj, path = 'EinsteinLlmGenerationsSafetyScoreRepresentation') {
512
+ const v_error = (() => {
513
+ if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
514
+ return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
515
+ }
516
+ if (obj.hateScore !== undefined) {
517
+ const obj_hateScore = obj.hateScore;
518
+ const path_hateScore = path + '.hateScore';
519
+ let obj_hateScore_union0 = null;
520
+ const obj_hateScore_union0_error = (() => {
521
+ if (typeof obj_hateScore !== 'number') {
522
+ return new TypeError('Expected "number" but received "' + typeof obj_hateScore + '" (at "' + path_hateScore + '")');
523
+ }
524
+ })();
525
+ if (obj_hateScore_union0_error != null) {
526
+ obj_hateScore_union0 = obj_hateScore_union0_error.message;
527
+ }
528
+ let obj_hateScore_union1 = null;
529
+ const obj_hateScore_union1_error = (() => {
530
+ if (obj_hateScore !== null) {
531
+ return new TypeError('Expected "null" but received "' + typeof obj_hateScore + '" (at "' + path_hateScore + '")');
532
+ }
533
+ })();
534
+ if (obj_hateScore_union1_error != null) {
535
+ obj_hateScore_union1 = obj_hateScore_union1_error.message;
536
+ }
537
+ if (obj_hateScore_union0 && obj_hateScore_union1) {
538
+ let message = 'Object doesn\'t match union (at "' + path_hateScore + '")';
539
+ message += '\n' + obj_hateScore_union0.split('\n').map((line) => '\t' + line).join('\n');
540
+ message += '\n' + obj_hateScore_union1.split('\n').map((line) => '\t' + line).join('\n');
541
+ return new TypeError(message);
542
+ }
543
+ }
544
+ if (obj.physicalScore !== undefined) {
545
+ const obj_physicalScore = obj.physicalScore;
546
+ const path_physicalScore = path + '.physicalScore';
547
+ let obj_physicalScore_union0 = null;
548
+ const obj_physicalScore_union0_error = (() => {
549
+ if (typeof obj_physicalScore !== 'number') {
550
+ return new TypeError('Expected "number" but received "' + typeof obj_physicalScore + '" (at "' + path_physicalScore + '")');
551
+ }
552
+ })();
553
+ if (obj_physicalScore_union0_error != null) {
554
+ obj_physicalScore_union0 = obj_physicalScore_union0_error.message;
555
+ }
556
+ let obj_physicalScore_union1 = null;
557
+ const obj_physicalScore_union1_error = (() => {
558
+ if (obj_physicalScore !== null) {
559
+ return new TypeError('Expected "null" but received "' + typeof obj_physicalScore + '" (at "' + path_physicalScore + '")');
560
+ }
561
+ })();
562
+ if (obj_physicalScore_union1_error != null) {
563
+ obj_physicalScore_union1 = obj_physicalScore_union1_error.message;
564
+ }
565
+ if (obj_physicalScore_union0 && obj_physicalScore_union1) {
566
+ let message = 'Object doesn\'t match union (at "' + path_physicalScore + '")';
567
+ message += '\n' + obj_physicalScore_union0.split('\n').map((line) => '\t' + line).join('\n');
568
+ message += '\n' + obj_physicalScore_union1.split('\n').map((line) => '\t' + line).join('\n');
569
+ return new TypeError(message);
570
+ }
571
+ }
572
+ if (obj.profanityScore !== undefined) {
573
+ const obj_profanityScore = obj.profanityScore;
574
+ const path_profanityScore = path + '.profanityScore';
575
+ let obj_profanityScore_union0 = null;
576
+ const obj_profanityScore_union0_error = (() => {
577
+ if (typeof obj_profanityScore !== 'number') {
578
+ return new TypeError('Expected "number" but received "' + typeof obj_profanityScore + '" (at "' + path_profanityScore + '")');
579
+ }
580
+ })();
581
+ if (obj_profanityScore_union0_error != null) {
582
+ obj_profanityScore_union0 = obj_profanityScore_union0_error.message;
583
+ }
584
+ let obj_profanityScore_union1 = null;
585
+ const obj_profanityScore_union1_error = (() => {
586
+ if (obj_profanityScore !== null) {
587
+ return new TypeError('Expected "null" but received "' + typeof obj_profanityScore + '" (at "' + path_profanityScore + '")');
588
+ }
589
+ })();
590
+ if (obj_profanityScore_union1_error != null) {
591
+ obj_profanityScore_union1 = obj_profanityScore_union1_error.message;
592
+ }
593
+ if (obj_profanityScore_union0 && obj_profanityScore_union1) {
594
+ let message = 'Object doesn\'t match union (at "' + path_profanityScore + '")';
595
+ message += '\n' + obj_profanityScore_union0.split('\n').map((line) => '\t' + line).join('\n');
596
+ message += '\n' + obj_profanityScore_union1.split('\n').map((line) => '\t' + line).join('\n');
597
+ return new TypeError(message);
598
+ }
599
+ }
600
+ if (obj.safetyScore !== undefined) {
601
+ const obj_safetyScore = obj.safetyScore;
602
+ const path_safetyScore = path + '.safetyScore';
603
+ let obj_safetyScore_union0 = null;
604
+ const obj_safetyScore_union0_error = (() => {
605
+ if (typeof obj_safetyScore !== 'number') {
606
+ return new TypeError('Expected "number" but received "' + typeof obj_safetyScore + '" (at "' + path_safetyScore + '")');
607
+ }
608
+ })();
609
+ if (obj_safetyScore_union0_error != null) {
610
+ obj_safetyScore_union0 = obj_safetyScore_union0_error.message;
611
+ }
612
+ let obj_safetyScore_union1 = null;
613
+ const obj_safetyScore_union1_error = (() => {
614
+ if (obj_safetyScore !== null) {
615
+ return new TypeError('Expected "null" but received "' + typeof obj_safetyScore + '" (at "' + path_safetyScore + '")');
616
+ }
617
+ })();
618
+ if (obj_safetyScore_union1_error != null) {
619
+ obj_safetyScore_union1 = obj_safetyScore_union1_error.message;
620
+ }
621
+ if (obj_safetyScore_union0 && obj_safetyScore_union1) {
622
+ let message = 'Object doesn\'t match union (at "' + path_safetyScore + '")';
623
+ message += '\n' + obj_safetyScore_union0.split('\n').map((line) => '\t' + line).join('\n');
624
+ message += '\n' + obj_safetyScore_union1.split('\n').map((line) => '\t' + line).join('\n');
625
+ return new TypeError(message);
626
+ }
627
+ }
628
+ if (obj.sexualScore !== undefined) {
629
+ const obj_sexualScore = obj.sexualScore;
630
+ const path_sexualScore = path + '.sexualScore';
631
+ let obj_sexualScore_union0 = null;
632
+ const obj_sexualScore_union0_error = (() => {
633
+ if (typeof obj_sexualScore !== 'number') {
634
+ return new TypeError('Expected "number" but received "' + typeof obj_sexualScore + '" (at "' + path_sexualScore + '")');
635
+ }
636
+ })();
637
+ if (obj_sexualScore_union0_error != null) {
638
+ obj_sexualScore_union0 = obj_sexualScore_union0_error.message;
639
+ }
640
+ let obj_sexualScore_union1 = null;
641
+ const obj_sexualScore_union1_error = (() => {
642
+ if (obj_sexualScore !== null) {
643
+ return new TypeError('Expected "null" but received "' + typeof obj_sexualScore + '" (at "' + path_sexualScore + '")');
644
+ }
645
+ })();
646
+ if (obj_sexualScore_union1_error != null) {
647
+ obj_sexualScore_union1 = obj_sexualScore_union1_error.message;
648
+ }
649
+ if (obj_sexualScore_union0 && obj_sexualScore_union1) {
650
+ let message = 'Object doesn\'t match union (at "' + path_sexualScore + '")';
651
+ message += '\n' + obj_sexualScore_union0.split('\n').map((line) => '\t' + line).join('\n');
652
+ message += '\n' + obj_sexualScore_union1.split('\n').map((line) => '\t' + line).join('\n');
653
+ return new TypeError(message);
654
+ }
655
+ }
656
+ if (obj.toxicityScore !== undefined) {
657
+ const obj_toxicityScore = obj.toxicityScore;
658
+ const path_toxicityScore = path + '.toxicityScore';
659
+ let obj_toxicityScore_union0 = null;
660
+ const obj_toxicityScore_union0_error = (() => {
661
+ if (typeof obj_toxicityScore !== 'number') {
662
+ return new TypeError('Expected "number" but received "' + typeof obj_toxicityScore + '" (at "' + path_toxicityScore + '")');
663
+ }
664
+ })();
665
+ if (obj_toxicityScore_union0_error != null) {
666
+ obj_toxicityScore_union0 = obj_toxicityScore_union0_error.message;
667
+ }
668
+ let obj_toxicityScore_union1 = null;
669
+ const obj_toxicityScore_union1_error = (() => {
670
+ if (obj_toxicityScore !== null) {
671
+ return new TypeError('Expected "null" but received "' + typeof obj_toxicityScore + '" (at "' + path_toxicityScore + '")');
672
+ }
673
+ })();
674
+ if (obj_toxicityScore_union1_error != null) {
675
+ obj_toxicityScore_union1 = obj_toxicityScore_union1_error.message;
676
+ }
677
+ if (obj_toxicityScore_union0 && obj_toxicityScore_union1) {
678
+ let message = 'Object doesn\'t match union (at "' + path_toxicityScore + '")';
679
+ message += '\n' + obj_toxicityScore_union0.split('\n').map((line) => '\t' + line).join('\n');
680
+ message += '\n' + obj_toxicityScore_union1.split('\n').map((line) => '\t' + line).join('\n');
681
+ return new TypeError(message);
682
+ }
683
+ }
684
+ if (obj.violenceScore !== undefined) {
685
+ const obj_violenceScore = obj.violenceScore;
686
+ const path_violenceScore = path + '.violenceScore';
687
+ let obj_violenceScore_union0 = null;
688
+ const obj_violenceScore_union0_error = (() => {
689
+ if (typeof obj_violenceScore !== 'number') {
690
+ return new TypeError('Expected "number" but received "' + typeof obj_violenceScore + '" (at "' + path_violenceScore + '")');
691
+ }
692
+ })();
693
+ if (obj_violenceScore_union0_error != null) {
694
+ obj_violenceScore_union0 = obj_violenceScore_union0_error.message;
695
+ }
696
+ let obj_violenceScore_union1 = null;
697
+ const obj_violenceScore_union1_error = (() => {
698
+ if (obj_violenceScore !== null) {
699
+ return new TypeError('Expected "null" but received "' + typeof obj_violenceScore + '" (at "' + path_violenceScore + '")');
700
+ }
701
+ })();
702
+ if (obj_violenceScore_union1_error != null) {
703
+ obj_violenceScore_union1 = obj_violenceScore_union1_error.message;
704
+ }
705
+ if (obj_violenceScore_union0 && obj_violenceScore_union1) {
706
+ let message = 'Object doesn\'t match union (at "' + path_violenceScore + '")';
707
+ message += '\n' + obj_violenceScore_union0.split('\n').map((line) => '\t' + line).join('\n');
708
+ message += '\n' + obj_violenceScore_union1.split('\n').map((line) => '\t' + line).join('\n');
709
+ return new TypeError(message);
710
+ }
711
+ }
712
+ })();
713
+ return v_error === undefined ? null : v_error;
714
+ }
715
+ const select$7 = function EinsteinLlmGenerationsSafetyScoreRepresentationSelect() {
716
+ return {
717
+ kind: 'Fragment',
718
+ version: VERSION$5,
719
+ private: [],
720
+ selections: [
721
+ {
722
+ name: 'hateScore',
723
+ kind: 'Scalar',
724
+ required: false
725
+ },
726
+ {
727
+ name: 'physicalScore',
728
+ kind: 'Scalar',
729
+ required: false
730
+ },
731
+ {
732
+ name: 'profanityScore',
733
+ kind: 'Scalar',
734
+ required: false
735
+ },
736
+ {
737
+ name: 'safetyScore',
738
+ kind: 'Scalar',
739
+ required: false
740
+ },
741
+ {
742
+ name: 'sexualScore',
743
+ kind: 'Scalar',
744
+ required: false
745
+ },
746
+ {
747
+ name: 'toxicityScore',
748
+ kind: 'Scalar',
749
+ required: false
750
+ },
751
+ {
752
+ name: 'violenceScore',
753
+ kind: 'Scalar',
754
+ required: false
755
+ }
756
+ ]
757
+ };
758
+ };
759
+ function equals$5(existing, incoming) {
760
+ const existing_hateScore = existing.hateScore;
761
+ const incoming_hateScore = incoming.hateScore;
762
+ // if at least one of these optionals is defined
763
+ if (existing_hateScore !== undefined || incoming_hateScore !== undefined) {
764
+ // if one of these is not defined we know the other is defined and therefore
765
+ // not equal
766
+ if (existing_hateScore === undefined || incoming_hateScore === undefined) {
767
+ return false;
768
+ }
769
+ if (!(existing_hateScore === incoming_hateScore)) {
770
+ return false;
771
+ }
772
+ }
773
+ const existing_physicalScore = existing.physicalScore;
774
+ const incoming_physicalScore = incoming.physicalScore;
775
+ // if at least one of these optionals is defined
776
+ if (existing_physicalScore !== undefined || incoming_physicalScore !== undefined) {
777
+ // if one of these is not defined we know the other is defined and therefore
778
+ // not equal
779
+ if (existing_physicalScore === undefined || incoming_physicalScore === undefined) {
780
+ return false;
781
+ }
782
+ if (!(existing_physicalScore === incoming_physicalScore)) {
783
+ return false;
784
+ }
785
+ }
786
+ const existing_profanityScore = existing.profanityScore;
787
+ const incoming_profanityScore = incoming.profanityScore;
788
+ // if at least one of these optionals is defined
789
+ if (existing_profanityScore !== undefined || incoming_profanityScore !== undefined) {
790
+ // if one of these is not defined we know the other is defined and therefore
791
+ // not equal
792
+ if (existing_profanityScore === undefined || incoming_profanityScore === undefined) {
793
+ return false;
794
+ }
795
+ if (!(existing_profanityScore === incoming_profanityScore)) {
796
+ return false;
797
+ }
798
+ }
799
+ const existing_safetyScore = existing.safetyScore;
800
+ const incoming_safetyScore = incoming.safetyScore;
801
+ // if at least one of these optionals is defined
802
+ if (existing_safetyScore !== undefined || incoming_safetyScore !== undefined) {
803
+ // if one of these is not defined we know the other is defined and therefore
804
+ // not equal
805
+ if (existing_safetyScore === undefined || incoming_safetyScore === undefined) {
806
+ return false;
807
+ }
808
+ if (!(existing_safetyScore === incoming_safetyScore)) {
809
+ return false;
810
+ }
811
+ }
812
+ const existing_sexualScore = existing.sexualScore;
813
+ const incoming_sexualScore = incoming.sexualScore;
814
+ // if at least one of these optionals is defined
815
+ if (existing_sexualScore !== undefined || incoming_sexualScore !== undefined) {
816
+ // if one of these is not defined we know the other is defined and therefore
817
+ // not equal
818
+ if (existing_sexualScore === undefined || incoming_sexualScore === undefined) {
819
+ return false;
820
+ }
821
+ if (!(existing_sexualScore === incoming_sexualScore)) {
822
+ return false;
823
+ }
824
+ }
825
+ const existing_toxicityScore = existing.toxicityScore;
826
+ const incoming_toxicityScore = incoming.toxicityScore;
827
+ // if at least one of these optionals is defined
828
+ if (existing_toxicityScore !== undefined || incoming_toxicityScore !== undefined) {
829
+ // if one of these is not defined we know the other is defined and therefore
830
+ // not equal
831
+ if (existing_toxicityScore === undefined || incoming_toxicityScore === undefined) {
832
+ return false;
833
+ }
834
+ if (!(existing_toxicityScore === incoming_toxicityScore)) {
835
+ return false;
836
+ }
837
+ }
838
+ const existing_violenceScore = existing.violenceScore;
839
+ const incoming_violenceScore = incoming.violenceScore;
840
+ // if at least one of these optionals is defined
841
+ if (existing_violenceScore !== undefined || incoming_violenceScore !== undefined) {
842
+ // if one of these is not defined we know the other is defined and therefore
843
+ // not equal
844
+ if (existing_violenceScore === undefined || incoming_violenceScore === undefined) {
845
+ return false;
846
+ }
847
+ if (!(existing_violenceScore === incoming_violenceScore)) {
848
+ return false;
849
+ }
850
+ }
851
+ return true;
852
+ }
853
+
854
+ const VERSION$4 = "aebe0f32437ab18bd126a1fb5ff48d9b";
855
+ function validate$6(obj, path = 'EinsteinLlmGenerationItemRepresentation') {
856
+ const v_error = (() => {
857
+ if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
858
+ return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
859
+ }
860
+ if (obj.contentQualityRepresentation !== undefined) {
861
+ const obj_contentQualityRepresentation = obj.contentQualityRepresentation;
862
+ const path_contentQualityRepresentation = path + '.contentQualityRepresentation';
863
+ let obj_contentQualityRepresentation_union0 = null;
864
+ const obj_contentQualityRepresentation_union0_error = (() => {
865
+ const referencepath_contentQualityRepresentationValidationError = validate$8(obj_contentQualityRepresentation, path_contentQualityRepresentation);
866
+ if (referencepath_contentQualityRepresentationValidationError !== null) {
867
+ let message = 'Object doesn\'t match EinsteinLlmGenerationsContentQualityRepresentation (at "' + path_contentQualityRepresentation + '")\n';
868
+ message += referencepath_contentQualityRepresentationValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
869
+ return new TypeError(message);
870
+ }
871
+ })();
872
+ if (obj_contentQualityRepresentation_union0_error != null) {
873
+ obj_contentQualityRepresentation_union0 = obj_contentQualityRepresentation_union0_error.message;
874
+ }
875
+ let obj_contentQualityRepresentation_union1 = null;
876
+ const obj_contentQualityRepresentation_union1_error = (() => {
877
+ if (obj_contentQualityRepresentation !== null) {
878
+ return new TypeError('Expected "null" but received "' + typeof obj_contentQualityRepresentation + '" (at "' + path_contentQualityRepresentation + '")');
879
+ }
880
+ })();
881
+ if (obj_contentQualityRepresentation_union1_error != null) {
882
+ obj_contentQualityRepresentation_union1 = obj_contentQualityRepresentation_union1_error.message;
883
+ }
884
+ if (obj_contentQualityRepresentation_union0 && obj_contentQualityRepresentation_union1) {
885
+ let message = 'Object doesn\'t match union (at "' + path_contentQualityRepresentation + '")';
886
+ message += '\n' + obj_contentQualityRepresentation_union0.split('\n').map((line) => '\t' + line).join('\n');
887
+ message += '\n' + obj_contentQualityRepresentation_union1.split('\n').map((line) => '\t' + line).join('\n');
888
+ return new TypeError(message);
889
+ }
890
+ }
448
891
  const obj_parameters = obj.parameters;
449
892
  const path_parameters = path + '.parameters';
450
893
  if (typeof obj_parameters !== 'string') {
@@ -455,6 +898,37 @@ function validate$5(obj, path = 'EinsteinLlmGenerationItemRepresentation') {
455
898
  if (typeof obj_responseId !== 'string') {
456
899
  return new TypeError('Expected "string" but received "' + typeof obj_responseId + '" (at "' + path_responseId + '")');
457
900
  }
901
+ if (obj.safetyScoreRepresentation !== undefined) {
902
+ const obj_safetyScoreRepresentation = obj.safetyScoreRepresentation;
903
+ const path_safetyScoreRepresentation = path + '.safetyScoreRepresentation';
904
+ let obj_safetyScoreRepresentation_union0 = null;
905
+ const obj_safetyScoreRepresentation_union0_error = (() => {
906
+ const referencepath_safetyScoreRepresentationValidationError = validate$7(obj_safetyScoreRepresentation, path_safetyScoreRepresentation);
907
+ if (referencepath_safetyScoreRepresentationValidationError !== null) {
908
+ let message = 'Object doesn\'t match EinsteinLlmGenerationsSafetyScoreRepresentation (at "' + path_safetyScoreRepresentation + '")\n';
909
+ message += referencepath_safetyScoreRepresentationValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
910
+ return new TypeError(message);
911
+ }
912
+ })();
913
+ if (obj_safetyScoreRepresentation_union0_error != null) {
914
+ obj_safetyScoreRepresentation_union0 = obj_safetyScoreRepresentation_union0_error.message;
915
+ }
916
+ let obj_safetyScoreRepresentation_union1 = null;
917
+ const obj_safetyScoreRepresentation_union1_error = (() => {
918
+ if (obj_safetyScoreRepresentation !== null) {
919
+ return new TypeError('Expected "null" but received "' + typeof obj_safetyScoreRepresentation + '" (at "' + path_safetyScoreRepresentation + '")');
920
+ }
921
+ })();
922
+ if (obj_safetyScoreRepresentation_union1_error != null) {
923
+ obj_safetyScoreRepresentation_union1 = obj_safetyScoreRepresentation_union1_error.message;
924
+ }
925
+ if (obj_safetyScoreRepresentation_union0 && obj_safetyScoreRepresentation_union1) {
926
+ let message = 'Object doesn\'t match union (at "' + path_safetyScoreRepresentation + '")';
927
+ message += '\n' + obj_safetyScoreRepresentation_union0.split('\n').map((line) => '\t' + line).join('\n');
928
+ message += '\n' + obj_safetyScoreRepresentation_union1.split('\n').map((line) => '\t' + line).join('\n');
929
+ return new TypeError(message);
930
+ }
931
+ }
458
932
  const obj_text = obj.text;
459
933
  const path_text = path + '.text';
460
934
  if (typeof obj_text !== 'string') {
@@ -463,12 +937,21 @@ function validate$5(obj, path = 'EinsteinLlmGenerationItemRepresentation') {
463
937
  })();
464
938
  return v_error === undefined ? null : v_error;
465
939
  }
466
- const select$5 = function EinsteinLlmGenerationItemRepresentationSelect() {
940
+ const select$6 = function EinsteinLlmGenerationItemRepresentationSelect() {
941
+ const { selections: EinsteinLlmGenerationsContentQualityRepresentation__selections, opaque: EinsteinLlmGenerationsContentQualityRepresentation__opaque, } = select$8();
942
+ const { selections: EinsteinLlmGenerationsSafetyScoreRepresentation__selections, opaque: EinsteinLlmGenerationsSafetyScoreRepresentation__opaque, } = select$7();
467
943
  return {
468
944
  kind: 'Fragment',
469
- version: VERSION$3,
945
+ version: VERSION$4,
470
946
  private: [],
471
947
  selections: [
948
+ {
949
+ name: 'contentQualityRepresentation',
950
+ kind: 'Object',
951
+ nullable: true,
952
+ selections: EinsteinLlmGenerationsContentQualityRepresentation__selections,
953
+ required: false
954
+ },
472
955
  {
473
956
  name: 'parameters',
474
957
  kind: 'Scalar'
@@ -477,6 +960,13 @@ const select$5 = function EinsteinLlmGenerationItemRepresentationSelect() {
477
960
  name: 'responseId',
478
961
  kind: 'Scalar'
479
962
  },
963
+ {
964
+ name: 'safetyScoreRepresentation',
965
+ kind: 'Object',
966
+ nullable: true,
967
+ selections: EinsteinLlmGenerationsSafetyScoreRepresentation__selections,
968
+ required: false
969
+ },
480
970
  {
481
971
  name: 'text',
482
972
  kind: 'Scalar'
@@ -484,7 +974,7 @@ const select$5 = function EinsteinLlmGenerationItemRepresentationSelect() {
484
974
  ]
485
975
  };
486
976
  };
487
- function equals$3(existing, incoming) {
977
+ function equals$4(existing, incoming) {
488
978
  const existing_parameters = existing.parameters;
489
979
  const incoming_parameters = incoming.parameters;
490
980
  if (!(existing_parameters === incoming_parameters)) {
@@ -500,11 +990,43 @@ function equals$3(existing, incoming) {
500
990
  if (!(existing_text === incoming_text)) {
501
991
  return false;
502
992
  }
993
+ const existing_contentQualityRepresentation = existing.contentQualityRepresentation;
994
+ const incoming_contentQualityRepresentation = incoming.contentQualityRepresentation;
995
+ // if at least one of these optionals is defined
996
+ if (existing_contentQualityRepresentation !== undefined || incoming_contentQualityRepresentation !== undefined) {
997
+ // if one of these is not defined we know the other is defined and therefore
998
+ // not equal
999
+ if (existing_contentQualityRepresentation === undefined || incoming_contentQualityRepresentation === undefined) {
1000
+ return false;
1001
+ }
1002
+ if (!(existing_contentQualityRepresentation === incoming_contentQualityRepresentation
1003
+ || (existing_contentQualityRepresentation != null &&
1004
+ incoming_contentQualityRepresentation != null &&
1005
+ equals$6(existing_contentQualityRepresentation, incoming_contentQualityRepresentation)))) {
1006
+ return false;
1007
+ }
1008
+ }
1009
+ const existing_safetyScoreRepresentation = existing.safetyScoreRepresentation;
1010
+ const incoming_safetyScoreRepresentation = incoming.safetyScoreRepresentation;
1011
+ // if at least one of these optionals is defined
1012
+ if (existing_safetyScoreRepresentation !== undefined || incoming_safetyScoreRepresentation !== undefined) {
1013
+ // if one of these is not defined we know the other is defined and therefore
1014
+ // not equal
1015
+ if (existing_safetyScoreRepresentation === undefined || incoming_safetyScoreRepresentation === undefined) {
1016
+ return false;
1017
+ }
1018
+ if (!(existing_safetyScoreRepresentation === incoming_safetyScoreRepresentation
1019
+ || (existing_safetyScoreRepresentation != null &&
1020
+ incoming_safetyScoreRepresentation != null &&
1021
+ equals$5(existing_safetyScoreRepresentation, incoming_safetyScoreRepresentation)))) {
1022
+ return false;
1023
+ }
1024
+ }
503
1025
  return true;
504
1026
  }
505
1027
 
506
- const VERSION$2 = "4656c961c9d093a9e206c1db7d4de0b0";
507
- function validate$4(obj, path = 'WrappedMap') {
1028
+ const VERSION$3 = "4656c961c9d093a9e206c1db7d4de0b0";
1029
+ function validate$5(obj, path = 'WrappedMap') {
508
1030
  const v_error = (() => {
509
1031
  if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
510
1032
  return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
@@ -526,15 +1048,15 @@ function validate$4(obj, path = 'WrappedMap') {
526
1048
  })();
527
1049
  return v_error === undefined ? null : v_error;
528
1050
  }
529
- const select$4 = function WrappedMapSelect() {
1051
+ const select$5 = function WrappedMapSelect() {
530
1052
  return {
531
1053
  kind: 'Fragment',
532
- version: VERSION$2,
1054
+ version: VERSION$3,
533
1055
  private: [],
534
1056
  selections: []
535
1057
  };
536
1058
  };
537
- function equals$2(existing, incoming) {
1059
+ function equals$3(existing, incoming) {
538
1060
  const existing_wrappedMap = existing.wrappedMap;
539
1061
  const incoming_wrappedMap = incoming.wrappedMap;
540
1062
  const equals_wrappedMap_props = equalsObject(existing_wrappedMap, incoming_wrappedMap, (existing_wrappedMap_prop, incoming_wrappedMap_prop) => {
@@ -546,8 +1068,8 @@ function equals$2(existing, incoming) {
546
1068
  }
547
1069
 
548
1070
  const TTL$1 = 100;
549
- const VERSION$1 = "d8abd72a42e842b253da1c38954dafbc";
550
- function validate$3(obj, path = 'EinsteinLlmGenerationsRepresentation') {
1071
+ const VERSION$2 = "d8abd72a42e842b253da1c38954dafbc";
1072
+ function validate$4(obj, path = 'EinsteinLlmGenerationsRepresentation') {
551
1073
  const v_error = (() => {
552
1074
  if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
553
1075
  return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
@@ -560,7 +1082,7 @@ function validate$3(obj, path = 'EinsteinLlmGenerationsRepresentation') {
560
1082
  for (let i = 0; i < obj_generations.length; i++) {
561
1083
  const obj_generations_item = obj_generations[i];
562
1084
  const path_generations_item = path_generations + '[' + i + ']';
563
- const referencepath_generations_itemValidationError = validate$5(obj_generations_item, path_generations_item);
1085
+ const referencepath_generations_itemValidationError = validate$6(obj_generations_item, path_generations_item);
564
1086
  if (referencepath_generations_itemValidationError !== null) {
565
1087
  let message = 'Object doesn\'t match EinsteinLlmGenerationItemRepresentation (at "' + path_generations_item + '")\n';
566
1088
  message += referencepath_generations_itemValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
@@ -571,7 +1093,7 @@ function validate$3(obj, path = 'EinsteinLlmGenerationsRepresentation') {
571
1093
  const path_parameters = path + '.parameters';
572
1094
  let obj_parameters_union0 = null;
573
1095
  const obj_parameters_union0_error = (() => {
574
- const referencepath_parametersValidationError = validate$4(obj_parameters, path_parameters);
1096
+ const referencepath_parametersValidationError = validate$5(obj_parameters, path_parameters);
575
1097
  if (referencepath_parametersValidationError !== null) {
576
1098
  let message = 'Object doesn\'t match WrappedMap (at "' + path_parameters + '")\n';
577
1099
  message += referencepath_parametersValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
@@ -643,12 +1165,12 @@ function keyBuilderFromType$1(luvio, object) {
643
1165
  function normalize$1(input, existing, path, luvio, store, timestamp) {
644
1166
  return input;
645
1167
  }
646
- const select$3 = function EinsteinLlmGenerationsRepresentationSelect() {
647
- const { selections: EinsteinLlmGenerationItemRepresentation__selections, opaque: EinsteinLlmGenerationItemRepresentation__opaque, } = select$5();
648
- const { selections: WrappedMap__selections, opaque: WrappedMap__opaque, } = select$4();
1168
+ const select$4 = function EinsteinLlmGenerationsRepresentationSelect() {
1169
+ const { selections: EinsteinLlmGenerationItemRepresentation__selections, opaque: EinsteinLlmGenerationItemRepresentation__opaque, } = select$6();
1170
+ const { selections: WrappedMap__selections, opaque: WrappedMap__opaque, } = select$5();
649
1171
  return {
650
1172
  kind: 'Fragment',
651
- version: VERSION$1,
1173
+ version: VERSION$2,
652
1174
  private: [],
653
1175
  selections: [
654
1176
  {
@@ -674,7 +1196,7 @@ const select$3 = function EinsteinLlmGenerationsRepresentationSelect() {
674
1196
  ]
675
1197
  };
676
1198
  };
677
- function equals$1(existing, incoming) {
1199
+ function equals$2(existing, incoming) {
678
1200
  const existing_requestId = existing.requestId;
679
1201
  const incoming_requestId = incoming.requestId;
680
1202
  if (!(existing_requestId === incoming_requestId)) {
@@ -683,7 +1205,7 @@ function equals$1(existing, incoming) {
683
1205
  const existing_generations = existing.generations;
684
1206
  const incoming_generations = incoming.generations;
685
1207
  const equals_generations_items = equalsArray(existing_generations, incoming_generations, (existing_generations_item, incoming_generations_item) => {
686
- if (!(equals$3(existing_generations_item, incoming_generations_item))) {
1208
+ if (!(equals$4(existing_generations_item, incoming_generations_item))) {
687
1209
  return false;
688
1210
  }
689
1211
  });
@@ -695,7 +1217,7 @@ function equals$1(existing, incoming) {
695
1217
  if (!(existing_parameters === incoming_parameters
696
1218
  || (existing_parameters != null &&
697
1219
  incoming_parameters != null &&
698
- equals$2(existing_parameters, incoming_parameters)))) {
1220
+ equals$3(existing_parameters, incoming_parameters)))) {
699
1221
  return false;
700
1222
  }
701
1223
  const existing_prompt = existing.prompt;
@@ -707,14 +1229,14 @@ function equals$1(existing, incoming) {
707
1229
  }
708
1230
  const ingest$1 = function EinsteinLlmGenerationsRepresentationIngest(input, path, luvio, store, timestamp) {
709
1231
  if (process.env.NODE_ENV !== 'production') {
710
- const validateError = validate$3(input);
1232
+ const validateError = validate$4(input);
711
1233
  if (validateError !== null) {
712
1234
  throw validateError;
713
1235
  }
714
1236
  }
715
1237
  const key = keyBuilderFromType$1(luvio, input);
716
1238
  const ttlToUse = TTL$1;
717
- ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize$1, "EinsteinLLM", VERSION$1, RepresentationType$1, equals$1);
1239
+ ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize$1, "EinsteinLLM", VERSION$2, RepresentationType$1, equals$2);
718
1240
  return createLink(key);
719
1241
  };
720
1242
  function getTypeCacheKeys$1(rootKeySet, luvio, input, fullPathFactory) {
@@ -727,8 +1249,8 @@ function getTypeCacheKeys$1(rootKeySet, luvio, input, fullPathFactory) {
727
1249
  });
728
1250
  }
729
1251
 
730
- function select$2(luvio, params) {
731
- return select$3();
1252
+ function select$3(luvio, params) {
1253
+ return select$4();
732
1254
  }
733
1255
  function getResponseCacheKeys$1(storeKeyMap, luvio, resourceParams, response) {
734
1256
  getTypeCacheKeys$1(storeKeyMap, luvio, response);
@@ -739,7 +1261,7 @@ function ingestSuccess$1(luvio, resourceParams, response) {
739
1261
  luvio.storeIngest(key, ingest$1, body);
740
1262
  const snapshot = luvio.storeLookup({
741
1263
  recordId: key,
742
- node: select$2(),
1264
+ node: select$3(),
743
1265
  variables: {},
744
1266
  });
745
1267
  if (process.env.NODE_ENV !== 'production') {
@@ -753,7 +1275,7 @@ function ingestSuccess$1(luvio, resourceParams, response) {
753
1275
  function createResourceRequest$1(config) {
754
1276
  const headers = {};
755
1277
  return {
756
- baseUri: '/services/data/v61.0',
1278
+ baseUri: '/services/data/v62.0',
757
1279
  basePath: '/einstein/llm/prompt/generations',
758
1280
  method: 'post',
759
1281
  body: config.body,
@@ -773,7 +1295,7 @@ const createResourceParams$1 = /*#__PURE__*/ createResourceParams$3(createGenera
773
1295
  function typeCheckConfig$1(untrustedConfig) {
774
1296
  const config = {};
775
1297
  const untrustedConfig_generationsInput = untrustedConfig.generationsInput;
776
- const referenceEinsteinLlmGenerationsInputRepresentationValidationError = validate$6(untrustedConfig_generationsInput);
1298
+ const referenceEinsteinLlmGenerationsInputRepresentationValidationError = validate$9(untrustedConfig_generationsInput);
777
1299
  if (referenceEinsteinLlmGenerationsInputRepresentationValidationError === null) {
778
1300
  config.generationsInput = untrustedConfig_generationsInput;
779
1301
  }
@@ -821,7 +1343,7 @@ const createGenerationsAdapterFactory = (luvio) => {
821
1343
  };
822
1344
  };
823
1345
 
824
- function validate$2(obj, path = 'WrappedValueMap') {
1346
+ function validate$3(obj, path = 'WrappedValueMap') {
825
1347
  const v_error = (() => {
826
1348
  if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
827
1349
  return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
@@ -844,7 +1366,7 @@ function validate$2(obj, path = 'WrappedValueMap') {
844
1366
  return v_error === undefined ? null : v_error;
845
1367
  }
846
1368
 
847
- function validate$1(obj, path = 'EinsteinPromptTemplateGenerationsInputRepresentation') {
1369
+ function validate$2(obj, path = 'EinsteinPromptTemplateGenerationsInputRepresentation') {
848
1370
  const v_error = (() => {
849
1371
  if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
850
1372
  return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
@@ -852,7 +1374,7 @@ function validate$1(obj, path = 'EinsteinPromptTemplateGenerationsInputRepresent
852
1374
  if (obj.additionalConfig !== undefined) {
853
1375
  const obj_additionalConfig = obj.additionalConfig;
854
1376
  const path_additionalConfig = path + '.additionalConfig';
855
- const referencepath_additionalConfigValidationError = validate$7(obj_additionalConfig, path_additionalConfig);
1377
+ const referencepath_additionalConfigValidationError = validate$a(obj_additionalConfig, path_additionalConfig);
856
1378
  if (referencepath_additionalConfigValidationError !== null) {
857
1379
  let message = 'Object doesn\'t match EinsteinLlmAdditionalConfigInputRepresentation (at "' + path_additionalConfig + '")\n';
858
1380
  message += referencepath_additionalConfigValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
@@ -861,7 +1383,7 @@ function validate$1(obj, path = 'EinsteinPromptTemplateGenerationsInputRepresent
861
1383
  }
862
1384
  const obj_inputParams = obj.inputParams;
863
1385
  const path_inputParams = path + '.inputParams';
864
- const referencepath_inputParamsValidationError = validate$2(obj_inputParams, path_inputParams);
1386
+ const referencepath_inputParamsValidationError = validate$3(obj_inputParams, path_inputParams);
865
1387
  if (referencepath_inputParamsValidationError !== null) {
866
1388
  let message = 'Object doesn\'t match WrappedValueMap (at "' + path_inputParams + '")\n';
867
1389
  message += referencepath_inputParamsValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
@@ -883,13 +1405,119 @@ function validate$1(obj, path = 'EinsteinPromptTemplateGenerationsInputRepresent
883
1405
  return v_error === undefined ? null : v_error;
884
1406
  }
885
1407
 
1408
+ const VERSION$1 = "6458d624e5a1691821c764b6de0badb3";
1409
+ function validate$1(obj, path = 'EinsteinPromptTemplateGenerationsErrorRepresentation') {
1410
+ const v_error = (() => {
1411
+ if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
1412
+ return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
1413
+ }
1414
+ const obj_errorMessage = obj.errorMessage;
1415
+ const path_errorMessage = path + '.errorMessage';
1416
+ if (typeof obj_errorMessage !== 'string') {
1417
+ return new TypeError('Expected "string" but received "' + typeof obj_errorMessage + '" (at "' + path_errorMessage + '")');
1418
+ }
1419
+ const obj_httpErrorCode = obj.httpErrorCode;
1420
+ const path_httpErrorCode = path + '.httpErrorCode';
1421
+ if (typeof obj_httpErrorCode !== 'string') {
1422
+ return new TypeError('Expected "string" but received "' + typeof obj_httpErrorCode + '" (at "' + path_httpErrorCode + '")');
1423
+ }
1424
+ if (obj.localizedErrorMessage !== undefined) {
1425
+ const obj_localizedErrorMessage = obj.localizedErrorMessage;
1426
+ const path_localizedErrorMessage = path + '.localizedErrorMessage';
1427
+ if (typeof obj_localizedErrorMessage !== 'string') {
1428
+ return new TypeError('Expected "string" but received "' + typeof obj_localizedErrorMessage + '" (at "' + path_localizedErrorMessage + '")');
1429
+ }
1430
+ }
1431
+ const obj_messageCode = obj.messageCode;
1432
+ const path_messageCode = path + '.messageCode';
1433
+ if (typeof obj_messageCode !== 'string') {
1434
+ return new TypeError('Expected "string" but received "' + typeof obj_messageCode + '" (at "' + path_messageCode + '")');
1435
+ }
1436
+ })();
1437
+ return v_error === undefined ? null : v_error;
1438
+ }
1439
+ const select$2 = function EinsteinPromptTemplateGenerationsErrorRepresentationSelect() {
1440
+ return {
1441
+ kind: 'Fragment',
1442
+ version: VERSION$1,
1443
+ private: [],
1444
+ selections: [
1445
+ {
1446
+ name: 'errorMessage',
1447
+ kind: 'Scalar'
1448
+ },
1449
+ {
1450
+ name: 'httpErrorCode',
1451
+ kind: 'Scalar'
1452
+ },
1453
+ {
1454
+ name: 'localizedErrorMessage',
1455
+ kind: 'Scalar',
1456
+ required: false
1457
+ },
1458
+ {
1459
+ name: 'messageCode',
1460
+ kind: 'Scalar'
1461
+ }
1462
+ ]
1463
+ };
1464
+ };
1465
+ function equals$1(existing, incoming) {
1466
+ const existing_errorMessage = existing.errorMessage;
1467
+ const incoming_errorMessage = incoming.errorMessage;
1468
+ if (!(existing_errorMessage === incoming_errorMessage)) {
1469
+ return false;
1470
+ }
1471
+ const existing_httpErrorCode = existing.httpErrorCode;
1472
+ const incoming_httpErrorCode = incoming.httpErrorCode;
1473
+ if (!(existing_httpErrorCode === incoming_httpErrorCode)) {
1474
+ return false;
1475
+ }
1476
+ const existing_localizedErrorMessage = existing.localizedErrorMessage;
1477
+ const incoming_localizedErrorMessage = incoming.localizedErrorMessage;
1478
+ // if at least one of these optionals is defined
1479
+ if (existing_localizedErrorMessage !== undefined || incoming_localizedErrorMessage !== undefined) {
1480
+ // if one of these is not defined we know the other is defined and therefore
1481
+ // not equal
1482
+ if (existing_localizedErrorMessage === undefined || incoming_localizedErrorMessage === undefined) {
1483
+ return false;
1484
+ }
1485
+ if (!(existing_localizedErrorMessage === incoming_localizedErrorMessage)) {
1486
+ return false;
1487
+ }
1488
+ }
1489
+ const existing_messageCode = existing.messageCode;
1490
+ const incoming_messageCode = incoming.messageCode;
1491
+ if (!(existing_messageCode === incoming_messageCode)) {
1492
+ return false;
1493
+ }
1494
+ return true;
1495
+ }
1496
+
886
1497
  const TTL = 100;
887
- const VERSION = "72c96c11855d430a55c0a79c239c0838";
1498
+ const VERSION = "a4c71dd12b7b696b7b04ebf6cf5101a3";
888
1499
  function validate(obj, path = 'EinsteinPromptTemplateGenerationsRepresentation') {
889
1500
  const v_error = (() => {
890
1501
  if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
891
1502
  return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
892
1503
  }
1504
+ if (obj.generationErrors !== undefined) {
1505
+ const obj_generationErrors = obj.generationErrors;
1506
+ const path_generationErrors = path + '.generationErrors';
1507
+ if (!ArrayIsArray(obj_generationErrors)) {
1508
+ return new TypeError('Expected "array" but received "' + typeof obj_generationErrors + '" (at "' + path_generationErrors + '")');
1509
+ }
1510
+ for (let i = 0; i < obj_generationErrors.length; i++) {
1511
+ const obj_generationErrors_item = obj_generationErrors[i];
1512
+ const path_generationErrors_item = path_generationErrors + '[' + i + ']';
1513
+ const referencepath_generationErrors_itemValidationError = validate$1(obj_generationErrors_item, path_generationErrors_item);
1514
+ if (referencepath_generationErrors_itemValidationError !== null) {
1515
+ let message = 'Object doesn\'t match EinsteinPromptTemplateGenerationsErrorRepresentation (at "' + path_generationErrors_item + '")\n';
1516
+ message += referencepath_generationErrors_itemValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
1517
+ return new TypeError(message);
1518
+ }
1519
+ }
1520
+ }
893
1521
  const obj_generations = obj.generations;
894
1522
  const path_generations = path + '.generations';
895
1523
  if (!ArrayIsArray(obj_generations)) {
@@ -898,7 +1526,7 @@ function validate(obj, path = 'EinsteinPromptTemplateGenerationsRepresentation')
898
1526
  for (let i = 0; i < obj_generations.length; i++) {
899
1527
  const obj_generations_item = obj_generations[i];
900
1528
  const path_generations_item = path_generations + '[' + i + ']';
901
- const referencepath_generations_itemValidationError = validate$5(obj_generations_item, path_generations_item);
1529
+ const referencepath_generations_itemValidationError = validate$6(obj_generations_item, path_generations_item);
902
1530
  if (referencepath_generations_itemValidationError !== null) {
903
1531
  let message = 'Object doesn\'t match EinsteinLlmGenerationItemRepresentation (at "' + path_generations_item + '")\n';
904
1532
  message += referencepath_generations_itemValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
@@ -909,7 +1537,7 @@ function validate(obj, path = 'EinsteinPromptTemplateGenerationsRepresentation')
909
1537
  const path_parameters = path + '.parameters';
910
1538
  let obj_parameters_union0 = null;
911
1539
  const obj_parameters_union0_error = (() => {
912
- const referencepath_parametersValidationError = validate$4(obj_parameters, path_parameters);
1540
+ const referencepath_parametersValidationError = validate$5(obj_parameters, path_parameters);
913
1541
  if (referencepath_parametersValidationError !== null) {
914
1542
  let message = 'Object doesn\'t match WrappedMap (at "' + path_parameters + '")\n';
915
1543
  message += referencepath_parametersValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
@@ -987,13 +1615,21 @@ function normalize(input, existing, path, luvio, store, timestamp) {
987
1615
  return input;
988
1616
  }
989
1617
  const select$1 = function EinsteinPromptTemplateGenerationsRepresentationSelect() {
990
- const { selections: EinsteinLlmGenerationItemRepresentation__selections, opaque: EinsteinLlmGenerationItemRepresentation__opaque, } = select$5();
991
- const { selections: WrappedMap__selections, opaque: WrappedMap__opaque, } = select$4();
1618
+ const { selections: EinsteinPromptTemplateGenerationsErrorRepresentation__selections, opaque: EinsteinPromptTemplateGenerationsErrorRepresentation__opaque, } = select$2();
1619
+ const { selections: EinsteinLlmGenerationItemRepresentation__selections, opaque: EinsteinLlmGenerationItemRepresentation__opaque, } = select$6();
1620
+ const { selections: WrappedMap__selections, opaque: WrappedMap__opaque, } = select$5();
992
1621
  return {
993
1622
  kind: 'Fragment',
994
1623
  version: VERSION,
995
1624
  private: [],
996
1625
  selections: [
1626
+ {
1627
+ name: 'generationErrors',
1628
+ kind: 'Object',
1629
+ plural: true,
1630
+ selections: EinsteinPromptTemplateGenerationsErrorRepresentation__selections,
1631
+ required: false
1632
+ },
997
1633
  {
998
1634
  name: 'generations',
999
1635
  kind: 'Object',
@@ -1032,10 +1668,28 @@ function equals(existing, incoming) {
1032
1668
  if (!(existing_requestId === incoming_requestId)) {
1033
1669
  return false;
1034
1670
  }
1671
+ const existing_generationErrors = existing.generationErrors;
1672
+ const incoming_generationErrors = incoming.generationErrors;
1673
+ // if at least one of these optionals is defined
1674
+ if (existing_generationErrors !== undefined || incoming_generationErrors !== undefined) {
1675
+ // if one of these is not defined we know the other is defined and therefore
1676
+ // not equal
1677
+ if (existing_generationErrors === undefined || incoming_generationErrors === undefined) {
1678
+ return false;
1679
+ }
1680
+ const equals_generationErrors_items = equalsArray(existing_generationErrors, incoming_generationErrors, (existing_generationErrors_item, incoming_generationErrors_item) => {
1681
+ if (!(equals$1(existing_generationErrors_item, incoming_generationErrors_item))) {
1682
+ return false;
1683
+ }
1684
+ });
1685
+ if (equals_generationErrors_items === false) {
1686
+ return false;
1687
+ }
1688
+ }
1035
1689
  const existing_generations = existing.generations;
1036
1690
  const incoming_generations = incoming.generations;
1037
1691
  const equals_generations_items = equalsArray(existing_generations, incoming_generations, (existing_generations_item, incoming_generations_item) => {
1038
- if (!(equals$3(existing_generations_item, incoming_generations_item))) {
1692
+ if (!(equals$4(existing_generations_item, incoming_generations_item))) {
1039
1693
  return false;
1040
1694
  }
1041
1695
  });
@@ -1047,7 +1701,7 @@ function equals(existing, incoming) {
1047
1701
  if (!(existing_parameters === incoming_parameters
1048
1702
  || (existing_parameters != null &&
1049
1703
  incoming_parameters != null &&
1050
- equals$2(existing_parameters, incoming_parameters)))) {
1704
+ equals$3(existing_parameters, incoming_parameters)))) {
1051
1705
  return false;
1052
1706
  }
1053
1707
  const existing_prompt = existing.prompt;
@@ -1105,7 +1759,7 @@ function ingestSuccess(luvio, resourceParams, response) {
1105
1759
  function createResourceRequest(config) {
1106
1760
  const headers = {};
1107
1761
  return {
1108
- baseUri: '/services/data/v61.0',
1762
+ baseUri: '/services/data/v62.0',
1109
1763
  basePath: '/einstein/prompt-templates/' + config.urlParams.promptTemplateDevName + '/generations',
1110
1764
  method: 'post',
1111
1765
  body: config.body,
@@ -1128,7 +1782,7 @@ function typeCheckConfig(untrustedConfig) {
1128
1782
  const config = {};
1129
1783
  typeCheckConfig$3(untrustedConfig, config, createGenerationsForPromptTemplate_ConfigPropertyMetadata);
1130
1784
  const untrustedConfig_promptTemplateGenerationsInput = untrustedConfig.promptTemplateGenerationsInput;
1131
- const referenceEinsteinPromptTemplateGenerationsInputRepresentationValidationError = validate$1(untrustedConfig_promptTemplateGenerationsInput);
1785
+ const referenceEinsteinPromptTemplateGenerationsInputRepresentationValidationError = validate$2(untrustedConfig_promptTemplateGenerationsInput);
1132
1786
  if (referenceEinsteinPromptTemplateGenerationsInputRepresentationValidationError === null) {
1133
1787
  config.promptTemplateGenerationsInput = untrustedConfig_promptTemplateGenerationsInput;
1134
1788
  }
@@ -1200,4 +1854,4 @@ withDefaultLuvio((luvio) => {
1200
1854
  });
1201
1855
 
1202
1856
  export { createFeedback, createGenerations, createGenerationsForPromptTemplate };
1203
- // version: 1.288.0-a5619da7d
1857
+ // version: 1.290.0-e2ccd0161