@salesforce/lds-adapters-service-einsteinllm 1.288.0 → 1.289.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/es/es2018/service-einsteinllm.js +700 -380
- package/dist/es/es2018/types/src/generated/artifacts/main.d.ts +1 -1
- package/dist/es/es2018/types/src/generated/types/EinsteinLlmGenerationItemRepresentation.d.ts +8 -2
- package/dist/es/es2018/types/src/generated/types/EinsteinLlmGenerationsContentQualityRepresentation.d.ts +28 -0
- package/dist/es/es2018/types/src/generated/types/EinsteinLlmGenerationsSafetyScoreRepresentation.d.ts +46 -0
- package/dist/es/es2018/types/src/generated/types/EinsteinPromptTemplateGenerationsErrorRepresentation.d.ts +37 -0
- package/dist/es/es2018/types/src/generated/types/EinsteinPromptTemplateGenerationsRepresentation.d.ts +5 -1
- package/package.json +4 -4
- package/sfdc/index.js +375 -55
- package/src/raml/api.raml +88 -17
package/sfdc/index.js
CHANGED
|
@@ -113,7 +113,7 @@ function createLink(ref) {
|
|
|
113
113
|
};
|
|
114
114
|
}
|
|
115
115
|
|
|
116
|
-
function validate$
|
|
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$
|
|
165
|
-
function validate$
|
|
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$
|
|
191
|
+
const select$a = function EinsteinLlmFeedbackRepresentationSelect() {
|
|
192
192
|
return {
|
|
193
193
|
kind: 'Fragment',
|
|
194
|
-
version: VERSION$
|
|
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$
|
|
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$
|
|
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$
|
|
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$
|
|
235
|
-
return select$
|
|
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$
|
|
246
|
+
node: select$9(),
|
|
247
247
|
variables: {},
|
|
248
248
|
});
|
|
249
249
|
if (process.env.NODE_ENV !== 'production') {
|
|
@@ -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$
|
|
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$
|
|
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$
|
|
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$
|
|
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,150 @@ function validate$6(obj, path = 'EinsteinLlmGenerationsInputRepresentation') {
|
|
|
439
439
|
return v_error === undefined ? null : v_error;
|
|
440
440
|
}
|
|
441
441
|
|
|
442
|
-
const VERSION$
|
|
443
|
-
function validate$
|
|
442
|
+
const VERSION$6 = "6ee3138e459fdb5a6bad0e0a8e4f4fd8";
|
|
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
|
+
const obj_isToxicityDetected = obj.isToxicityDetected;
|
|
449
|
+
const path_isToxicityDetected = path + '.isToxicityDetected';
|
|
450
|
+
if (typeof obj_isToxicityDetected !== 'boolean') {
|
|
451
|
+
return new TypeError('Expected "boolean" but received "' + typeof obj_isToxicityDetected + '" (at "' + path_isToxicityDetected + '")');
|
|
452
|
+
}
|
|
453
|
+
})();
|
|
454
|
+
return v_error === undefined ? null : v_error;
|
|
455
|
+
}
|
|
456
|
+
const select$8 = function EinsteinLlmGenerationsContentQualityRepresentationSelect() {
|
|
457
|
+
return {
|
|
458
|
+
kind: 'Fragment',
|
|
459
|
+
version: VERSION$6,
|
|
460
|
+
private: [],
|
|
461
|
+
selections: [
|
|
462
|
+
{
|
|
463
|
+
name: 'isToxicityDetected',
|
|
464
|
+
kind: 'Scalar'
|
|
465
|
+
}
|
|
466
|
+
]
|
|
467
|
+
};
|
|
468
|
+
};
|
|
469
|
+
function equals$6(existing, incoming) {
|
|
470
|
+
const existing_isToxicityDetected = existing.isToxicityDetected;
|
|
471
|
+
const incoming_isToxicityDetected = incoming.isToxicityDetected;
|
|
472
|
+
if (!(existing_isToxicityDetected === incoming_isToxicityDetected)) {
|
|
473
|
+
return false;
|
|
474
|
+
}
|
|
475
|
+
return true;
|
|
476
|
+
}
|
|
477
|
+
|
|
478
|
+
const VERSION$5 = "adf07d0c188c76ccfc6796d610950421";
|
|
479
|
+
function validate$7(obj, path = 'EinsteinLlmGenerationsSafetyScoreRepresentation') {
|
|
480
|
+
const v_error = (() => {
|
|
481
|
+
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
482
|
+
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
483
|
+
}
|
|
484
|
+
obj.hateScore;
|
|
485
|
+
obj.physicalScore;
|
|
486
|
+
obj.profanityScore;
|
|
487
|
+
obj.safetyScore;
|
|
488
|
+
obj.sexualScore;
|
|
489
|
+
obj.toxicityScore;
|
|
490
|
+
obj.violenceScore;
|
|
491
|
+
})();
|
|
492
|
+
return v_error === undefined ? null : v_error;
|
|
493
|
+
}
|
|
494
|
+
const select$7 = function EinsteinLlmGenerationsSafetyScoreRepresentationSelect() {
|
|
495
|
+
return {
|
|
496
|
+
kind: 'Fragment',
|
|
497
|
+
version: VERSION$5,
|
|
498
|
+
private: [],
|
|
499
|
+
selections: [
|
|
500
|
+
{
|
|
501
|
+
name: 'hateScore',
|
|
502
|
+
kind: 'Scalar'
|
|
503
|
+
},
|
|
504
|
+
{
|
|
505
|
+
name: 'physicalScore',
|
|
506
|
+
kind: 'Scalar'
|
|
507
|
+
},
|
|
508
|
+
{
|
|
509
|
+
name: 'profanityScore',
|
|
510
|
+
kind: 'Scalar'
|
|
511
|
+
},
|
|
512
|
+
{
|
|
513
|
+
name: 'safetyScore',
|
|
514
|
+
kind: 'Scalar'
|
|
515
|
+
},
|
|
516
|
+
{
|
|
517
|
+
name: 'sexualScore',
|
|
518
|
+
kind: 'Scalar'
|
|
519
|
+
},
|
|
520
|
+
{
|
|
521
|
+
name: 'toxicityScore',
|
|
522
|
+
kind: 'Scalar'
|
|
523
|
+
},
|
|
524
|
+
{
|
|
525
|
+
name: 'violenceScore',
|
|
526
|
+
kind: 'Scalar'
|
|
527
|
+
}
|
|
528
|
+
]
|
|
529
|
+
};
|
|
530
|
+
};
|
|
531
|
+
function equals$5(existing, incoming) {
|
|
532
|
+
const existing_hateScore = existing.hateScore;
|
|
533
|
+
const incoming_hateScore = incoming.hateScore;
|
|
534
|
+
if (!(existing_hateScore === incoming_hateScore)) {
|
|
535
|
+
return false;
|
|
536
|
+
}
|
|
537
|
+
const existing_physicalScore = existing.physicalScore;
|
|
538
|
+
const incoming_physicalScore = incoming.physicalScore;
|
|
539
|
+
if (!(existing_physicalScore === incoming_physicalScore)) {
|
|
540
|
+
return false;
|
|
541
|
+
}
|
|
542
|
+
const existing_profanityScore = existing.profanityScore;
|
|
543
|
+
const incoming_profanityScore = incoming.profanityScore;
|
|
544
|
+
if (!(existing_profanityScore === incoming_profanityScore)) {
|
|
545
|
+
return false;
|
|
546
|
+
}
|
|
547
|
+
const existing_safetyScore = existing.safetyScore;
|
|
548
|
+
const incoming_safetyScore = incoming.safetyScore;
|
|
549
|
+
if (!(existing_safetyScore === incoming_safetyScore)) {
|
|
550
|
+
return false;
|
|
551
|
+
}
|
|
552
|
+
const existing_sexualScore = existing.sexualScore;
|
|
553
|
+
const incoming_sexualScore = incoming.sexualScore;
|
|
554
|
+
if (!(existing_sexualScore === incoming_sexualScore)) {
|
|
555
|
+
return false;
|
|
556
|
+
}
|
|
557
|
+
const existing_toxicityScore = existing.toxicityScore;
|
|
558
|
+
const incoming_toxicityScore = incoming.toxicityScore;
|
|
559
|
+
if (!(existing_toxicityScore === incoming_toxicityScore)) {
|
|
560
|
+
return false;
|
|
561
|
+
}
|
|
562
|
+
const existing_violenceScore = existing.violenceScore;
|
|
563
|
+
const incoming_violenceScore = incoming.violenceScore;
|
|
564
|
+
if (!(existing_violenceScore === incoming_violenceScore)) {
|
|
565
|
+
return false;
|
|
566
|
+
}
|
|
567
|
+
return true;
|
|
568
|
+
}
|
|
569
|
+
|
|
570
|
+
const VERSION$4 = "ac8fee86830c1fbf10c9d8746373fedf";
|
|
571
|
+
function validate$6(obj, path = 'EinsteinLlmGenerationItemRepresentation') {
|
|
572
|
+
const v_error = (() => {
|
|
573
|
+
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
574
|
+
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
575
|
+
}
|
|
576
|
+
if (obj.contentQualityRepresentation !== undefined) {
|
|
577
|
+
const obj_contentQualityRepresentation = obj.contentQualityRepresentation;
|
|
578
|
+
const path_contentQualityRepresentation = path + '.contentQualityRepresentation';
|
|
579
|
+
const referencepath_contentQualityRepresentationValidationError = validate$8(obj_contentQualityRepresentation, path_contentQualityRepresentation);
|
|
580
|
+
if (referencepath_contentQualityRepresentationValidationError !== null) {
|
|
581
|
+
let message = 'Object doesn\'t match EinsteinLlmGenerationsContentQualityRepresentation (at "' + path_contentQualityRepresentation + '")\n';
|
|
582
|
+
message += referencepath_contentQualityRepresentationValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
583
|
+
return new TypeError(message);
|
|
584
|
+
}
|
|
585
|
+
}
|
|
448
586
|
const obj_parameters = obj.parameters;
|
|
449
587
|
const path_parameters = path + '.parameters';
|
|
450
588
|
if (typeof obj_parameters !== 'string') {
|
|
@@ -455,6 +593,16 @@ function validate$5(obj, path = 'EinsteinLlmGenerationItemRepresentation') {
|
|
|
455
593
|
if (typeof obj_responseId !== 'string') {
|
|
456
594
|
return new TypeError('Expected "string" but received "' + typeof obj_responseId + '" (at "' + path_responseId + '")');
|
|
457
595
|
}
|
|
596
|
+
if (obj.safetyScoreRepresentation !== undefined) {
|
|
597
|
+
const obj_safetyScoreRepresentation = obj.safetyScoreRepresentation;
|
|
598
|
+
const path_safetyScoreRepresentation = path + '.safetyScoreRepresentation';
|
|
599
|
+
const referencepath_safetyScoreRepresentationValidationError = validate$7(obj_safetyScoreRepresentation, path_safetyScoreRepresentation);
|
|
600
|
+
if (referencepath_safetyScoreRepresentationValidationError !== null) {
|
|
601
|
+
let message = 'Object doesn\'t match EinsteinLlmGenerationsSafetyScoreRepresentation (at "' + path_safetyScoreRepresentation + '")\n';
|
|
602
|
+
message += referencepath_safetyScoreRepresentationValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
603
|
+
return new TypeError(message);
|
|
604
|
+
}
|
|
605
|
+
}
|
|
458
606
|
const obj_text = obj.text;
|
|
459
607
|
const path_text = path + '.text';
|
|
460
608
|
if (typeof obj_text !== 'string') {
|
|
@@ -463,12 +611,20 @@ function validate$5(obj, path = 'EinsteinLlmGenerationItemRepresentation') {
|
|
|
463
611
|
})();
|
|
464
612
|
return v_error === undefined ? null : v_error;
|
|
465
613
|
}
|
|
466
|
-
const select$
|
|
614
|
+
const select$6 = function EinsteinLlmGenerationItemRepresentationSelect() {
|
|
615
|
+
const { selections: EinsteinLlmGenerationsContentQualityRepresentation__selections, opaque: EinsteinLlmGenerationsContentQualityRepresentation__opaque, } = select$8();
|
|
616
|
+
const { selections: EinsteinLlmGenerationsSafetyScoreRepresentation__selections, opaque: EinsteinLlmGenerationsSafetyScoreRepresentation__opaque, } = select$7();
|
|
467
617
|
return {
|
|
468
618
|
kind: 'Fragment',
|
|
469
|
-
version: VERSION$
|
|
619
|
+
version: VERSION$4,
|
|
470
620
|
private: [],
|
|
471
621
|
selections: [
|
|
622
|
+
{
|
|
623
|
+
name: 'contentQualityRepresentation',
|
|
624
|
+
kind: 'Object',
|
|
625
|
+
selections: EinsteinLlmGenerationsContentQualityRepresentation__selections,
|
|
626
|
+
required: false
|
|
627
|
+
},
|
|
472
628
|
{
|
|
473
629
|
name: 'parameters',
|
|
474
630
|
kind: 'Scalar'
|
|
@@ -477,6 +633,12 @@ const select$5 = function EinsteinLlmGenerationItemRepresentationSelect() {
|
|
|
477
633
|
name: 'responseId',
|
|
478
634
|
kind: 'Scalar'
|
|
479
635
|
},
|
|
636
|
+
{
|
|
637
|
+
name: 'safetyScoreRepresentation',
|
|
638
|
+
kind: 'Object',
|
|
639
|
+
selections: EinsteinLlmGenerationsSafetyScoreRepresentation__selections,
|
|
640
|
+
required: false
|
|
641
|
+
},
|
|
480
642
|
{
|
|
481
643
|
name: 'text',
|
|
482
644
|
kind: 'Scalar'
|
|
@@ -484,7 +646,7 @@ const select$5 = function EinsteinLlmGenerationItemRepresentationSelect() {
|
|
|
484
646
|
]
|
|
485
647
|
};
|
|
486
648
|
};
|
|
487
|
-
function equals$
|
|
649
|
+
function equals$4(existing, incoming) {
|
|
488
650
|
const existing_parameters = existing.parameters;
|
|
489
651
|
const incoming_parameters = incoming.parameters;
|
|
490
652
|
if (!(existing_parameters === incoming_parameters)) {
|
|
@@ -500,11 +662,37 @@ function equals$3(existing, incoming) {
|
|
|
500
662
|
if (!(existing_text === incoming_text)) {
|
|
501
663
|
return false;
|
|
502
664
|
}
|
|
665
|
+
const existing_contentQualityRepresentation = existing.contentQualityRepresentation;
|
|
666
|
+
const incoming_contentQualityRepresentation = incoming.contentQualityRepresentation;
|
|
667
|
+
// if at least one of these optionals is defined
|
|
668
|
+
if (existing_contentQualityRepresentation !== undefined || incoming_contentQualityRepresentation !== undefined) {
|
|
669
|
+
// if one of these is not defined we know the other is defined and therefore
|
|
670
|
+
// not equal
|
|
671
|
+
if (existing_contentQualityRepresentation === undefined || incoming_contentQualityRepresentation === undefined) {
|
|
672
|
+
return false;
|
|
673
|
+
}
|
|
674
|
+
if (!(equals$6(existing_contentQualityRepresentation, incoming_contentQualityRepresentation))) {
|
|
675
|
+
return false;
|
|
676
|
+
}
|
|
677
|
+
}
|
|
678
|
+
const existing_safetyScoreRepresentation = existing.safetyScoreRepresentation;
|
|
679
|
+
const incoming_safetyScoreRepresentation = incoming.safetyScoreRepresentation;
|
|
680
|
+
// if at least one of these optionals is defined
|
|
681
|
+
if (existing_safetyScoreRepresentation !== undefined || incoming_safetyScoreRepresentation !== undefined) {
|
|
682
|
+
// if one of these is not defined we know the other is defined and therefore
|
|
683
|
+
// not equal
|
|
684
|
+
if (existing_safetyScoreRepresentation === undefined || incoming_safetyScoreRepresentation === undefined) {
|
|
685
|
+
return false;
|
|
686
|
+
}
|
|
687
|
+
if (!(equals$5(existing_safetyScoreRepresentation, incoming_safetyScoreRepresentation))) {
|
|
688
|
+
return false;
|
|
689
|
+
}
|
|
690
|
+
}
|
|
503
691
|
return true;
|
|
504
692
|
}
|
|
505
693
|
|
|
506
|
-
const VERSION$
|
|
507
|
-
function validate$
|
|
694
|
+
const VERSION$3 = "4656c961c9d093a9e206c1db7d4de0b0";
|
|
695
|
+
function validate$5(obj, path = 'WrappedMap') {
|
|
508
696
|
const v_error = (() => {
|
|
509
697
|
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
510
698
|
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
@@ -526,15 +714,15 @@ function validate$4(obj, path = 'WrappedMap') {
|
|
|
526
714
|
})();
|
|
527
715
|
return v_error === undefined ? null : v_error;
|
|
528
716
|
}
|
|
529
|
-
const select$
|
|
717
|
+
const select$5 = function WrappedMapSelect() {
|
|
530
718
|
return {
|
|
531
719
|
kind: 'Fragment',
|
|
532
|
-
version: VERSION$
|
|
720
|
+
version: VERSION$3,
|
|
533
721
|
private: [],
|
|
534
722
|
selections: []
|
|
535
723
|
};
|
|
536
724
|
};
|
|
537
|
-
function equals$
|
|
725
|
+
function equals$3(existing, incoming) {
|
|
538
726
|
const existing_wrappedMap = existing.wrappedMap;
|
|
539
727
|
const incoming_wrappedMap = incoming.wrappedMap;
|
|
540
728
|
const equals_wrappedMap_props = equalsObject(existing_wrappedMap, incoming_wrappedMap, (existing_wrappedMap_prop, incoming_wrappedMap_prop) => {
|
|
@@ -546,8 +734,8 @@ function equals$2(existing, incoming) {
|
|
|
546
734
|
}
|
|
547
735
|
|
|
548
736
|
const TTL$1 = 100;
|
|
549
|
-
const VERSION$
|
|
550
|
-
function validate$
|
|
737
|
+
const VERSION$2 = "d8abd72a42e842b253da1c38954dafbc";
|
|
738
|
+
function validate$4(obj, path = 'EinsteinLlmGenerationsRepresentation') {
|
|
551
739
|
const v_error = (() => {
|
|
552
740
|
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
553
741
|
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
@@ -560,7 +748,7 @@ function validate$3(obj, path = 'EinsteinLlmGenerationsRepresentation') {
|
|
|
560
748
|
for (let i = 0; i < obj_generations.length; i++) {
|
|
561
749
|
const obj_generations_item = obj_generations[i];
|
|
562
750
|
const path_generations_item = path_generations + '[' + i + ']';
|
|
563
|
-
const referencepath_generations_itemValidationError = validate$
|
|
751
|
+
const referencepath_generations_itemValidationError = validate$6(obj_generations_item, path_generations_item);
|
|
564
752
|
if (referencepath_generations_itemValidationError !== null) {
|
|
565
753
|
let message = 'Object doesn\'t match EinsteinLlmGenerationItemRepresentation (at "' + path_generations_item + '")\n';
|
|
566
754
|
message += referencepath_generations_itemValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
@@ -571,7 +759,7 @@ function validate$3(obj, path = 'EinsteinLlmGenerationsRepresentation') {
|
|
|
571
759
|
const path_parameters = path + '.parameters';
|
|
572
760
|
let obj_parameters_union0 = null;
|
|
573
761
|
const obj_parameters_union0_error = (() => {
|
|
574
|
-
const referencepath_parametersValidationError = validate$
|
|
762
|
+
const referencepath_parametersValidationError = validate$5(obj_parameters, path_parameters);
|
|
575
763
|
if (referencepath_parametersValidationError !== null) {
|
|
576
764
|
let message = 'Object doesn\'t match WrappedMap (at "' + path_parameters + '")\n';
|
|
577
765
|
message += referencepath_parametersValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
@@ -643,12 +831,12 @@ function keyBuilderFromType$1(luvio, object) {
|
|
|
643
831
|
function normalize$1(input, existing, path, luvio, store, timestamp) {
|
|
644
832
|
return input;
|
|
645
833
|
}
|
|
646
|
-
const select$
|
|
647
|
-
const { selections: EinsteinLlmGenerationItemRepresentation__selections, opaque: EinsteinLlmGenerationItemRepresentation__opaque, } = select$
|
|
648
|
-
const { selections: WrappedMap__selections, opaque: WrappedMap__opaque, } = select$
|
|
834
|
+
const select$4 = function EinsteinLlmGenerationsRepresentationSelect() {
|
|
835
|
+
const { selections: EinsteinLlmGenerationItemRepresentation__selections, opaque: EinsteinLlmGenerationItemRepresentation__opaque, } = select$6();
|
|
836
|
+
const { selections: WrappedMap__selections, opaque: WrappedMap__opaque, } = select$5();
|
|
649
837
|
return {
|
|
650
838
|
kind: 'Fragment',
|
|
651
|
-
version: VERSION$
|
|
839
|
+
version: VERSION$2,
|
|
652
840
|
private: [],
|
|
653
841
|
selections: [
|
|
654
842
|
{
|
|
@@ -674,7 +862,7 @@ const select$3 = function EinsteinLlmGenerationsRepresentationSelect() {
|
|
|
674
862
|
]
|
|
675
863
|
};
|
|
676
864
|
};
|
|
677
|
-
function equals$
|
|
865
|
+
function equals$2(existing, incoming) {
|
|
678
866
|
const existing_requestId = existing.requestId;
|
|
679
867
|
const incoming_requestId = incoming.requestId;
|
|
680
868
|
if (!(existing_requestId === incoming_requestId)) {
|
|
@@ -683,7 +871,7 @@ function equals$1(existing, incoming) {
|
|
|
683
871
|
const existing_generations = existing.generations;
|
|
684
872
|
const incoming_generations = incoming.generations;
|
|
685
873
|
const equals_generations_items = equalsArray(existing_generations, incoming_generations, (existing_generations_item, incoming_generations_item) => {
|
|
686
|
-
if (!(equals$
|
|
874
|
+
if (!(equals$4(existing_generations_item, incoming_generations_item))) {
|
|
687
875
|
return false;
|
|
688
876
|
}
|
|
689
877
|
});
|
|
@@ -695,7 +883,7 @@ function equals$1(existing, incoming) {
|
|
|
695
883
|
if (!(existing_parameters === incoming_parameters
|
|
696
884
|
|| (existing_parameters != null &&
|
|
697
885
|
incoming_parameters != null &&
|
|
698
|
-
equals$
|
|
886
|
+
equals$3(existing_parameters, incoming_parameters)))) {
|
|
699
887
|
return false;
|
|
700
888
|
}
|
|
701
889
|
const existing_prompt = existing.prompt;
|
|
@@ -707,14 +895,14 @@ function equals$1(existing, incoming) {
|
|
|
707
895
|
}
|
|
708
896
|
const ingest$1 = function EinsteinLlmGenerationsRepresentationIngest(input, path, luvio, store, timestamp) {
|
|
709
897
|
if (process.env.NODE_ENV !== 'production') {
|
|
710
|
-
const validateError = validate$
|
|
898
|
+
const validateError = validate$4(input);
|
|
711
899
|
if (validateError !== null) {
|
|
712
900
|
throw validateError;
|
|
713
901
|
}
|
|
714
902
|
}
|
|
715
903
|
const key = keyBuilderFromType$1(luvio, input);
|
|
716
904
|
const ttlToUse = TTL$1;
|
|
717
|
-
ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize$1, "EinsteinLLM", VERSION$
|
|
905
|
+
ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize$1, "EinsteinLLM", VERSION$2, RepresentationType$1, equals$2);
|
|
718
906
|
return createLink(key);
|
|
719
907
|
};
|
|
720
908
|
function getTypeCacheKeys$1(rootKeySet, luvio, input, fullPathFactory) {
|
|
@@ -727,8 +915,8 @@ function getTypeCacheKeys$1(rootKeySet, luvio, input, fullPathFactory) {
|
|
|
727
915
|
});
|
|
728
916
|
}
|
|
729
917
|
|
|
730
|
-
function select$
|
|
731
|
-
return select$
|
|
918
|
+
function select$3(luvio, params) {
|
|
919
|
+
return select$4();
|
|
732
920
|
}
|
|
733
921
|
function getResponseCacheKeys$1(storeKeyMap, luvio, resourceParams, response) {
|
|
734
922
|
getTypeCacheKeys$1(storeKeyMap, luvio, response);
|
|
@@ -739,7 +927,7 @@ function ingestSuccess$1(luvio, resourceParams, response) {
|
|
|
739
927
|
luvio.storeIngest(key, ingest$1, body);
|
|
740
928
|
const snapshot = luvio.storeLookup({
|
|
741
929
|
recordId: key,
|
|
742
|
-
node: select$
|
|
930
|
+
node: select$3(),
|
|
743
931
|
variables: {},
|
|
744
932
|
});
|
|
745
933
|
if (process.env.NODE_ENV !== 'production') {
|
|
@@ -773,7 +961,7 @@ const createResourceParams$1 = /*#__PURE__*/ createResourceParams$3(createGenera
|
|
|
773
961
|
function typeCheckConfig$1(untrustedConfig) {
|
|
774
962
|
const config = {};
|
|
775
963
|
const untrustedConfig_generationsInput = untrustedConfig.generationsInput;
|
|
776
|
-
const referenceEinsteinLlmGenerationsInputRepresentationValidationError = validate$
|
|
964
|
+
const referenceEinsteinLlmGenerationsInputRepresentationValidationError = validate$9(untrustedConfig_generationsInput);
|
|
777
965
|
if (referenceEinsteinLlmGenerationsInputRepresentationValidationError === null) {
|
|
778
966
|
config.generationsInput = untrustedConfig_generationsInput;
|
|
779
967
|
}
|
|
@@ -821,7 +1009,7 @@ const createGenerationsAdapterFactory = (luvio) => {
|
|
|
821
1009
|
};
|
|
822
1010
|
};
|
|
823
1011
|
|
|
824
|
-
function validate$
|
|
1012
|
+
function validate$3(obj, path = 'WrappedValueMap') {
|
|
825
1013
|
const v_error = (() => {
|
|
826
1014
|
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
827
1015
|
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
@@ -844,7 +1032,7 @@ function validate$2(obj, path = 'WrappedValueMap') {
|
|
|
844
1032
|
return v_error === undefined ? null : v_error;
|
|
845
1033
|
}
|
|
846
1034
|
|
|
847
|
-
function validate$
|
|
1035
|
+
function validate$2(obj, path = 'EinsteinPromptTemplateGenerationsInputRepresentation') {
|
|
848
1036
|
const v_error = (() => {
|
|
849
1037
|
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
850
1038
|
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
@@ -852,7 +1040,7 @@ function validate$1(obj, path = 'EinsteinPromptTemplateGenerationsInputRepresent
|
|
|
852
1040
|
if (obj.additionalConfig !== undefined) {
|
|
853
1041
|
const obj_additionalConfig = obj.additionalConfig;
|
|
854
1042
|
const path_additionalConfig = path + '.additionalConfig';
|
|
855
|
-
const referencepath_additionalConfigValidationError = validate$
|
|
1043
|
+
const referencepath_additionalConfigValidationError = validate$a(obj_additionalConfig, path_additionalConfig);
|
|
856
1044
|
if (referencepath_additionalConfigValidationError !== null) {
|
|
857
1045
|
let message = 'Object doesn\'t match EinsteinLlmAdditionalConfigInputRepresentation (at "' + path_additionalConfig + '")\n';
|
|
858
1046
|
message += referencepath_additionalConfigValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
@@ -861,7 +1049,7 @@ function validate$1(obj, path = 'EinsteinPromptTemplateGenerationsInputRepresent
|
|
|
861
1049
|
}
|
|
862
1050
|
const obj_inputParams = obj.inputParams;
|
|
863
1051
|
const path_inputParams = path + '.inputParams';
|
|
864
|
-
const referencepath_inputParamsValidationError = validate$
|
|
1052
|
+
const referencepath_inputParamsValidationError = validate$3(obj_inputParams, path_inputParams);
|
|
865
1053
|
if (referencepath_inputParamsValidationError !== null) {
|
|
866
1054
|
let message = 'Object doesn\'t match WrappedValueMap (at "' + path_inputParams + '")\n';
|
|
867
1055
|
message += referencepath_inputParamsValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
@@ -883,13 +1071,119 @@ function validate$1(obj, path = 'EinsteinPromptTemplateGenerationsInputRepresent
|
|
|
883
1071
|
return v_error === undefined ? null : v_error;
|
|
884
1072
|
}
|
|
885
1073
|
|
|
1074
|
+
const VERSION$1 = "6458d624e5a1691821c764b6de0badb3";
|
|
1075
|
+
function validate$1(obj, path = 'EinsteinPromptTemplateGenerationsErrorRepresentation') {
|
|
1076
|
+
const v_error = (() => {
|
|
1077
|
+
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
1078
|
+
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
1079
|
+
}
|
|
1080
|
+
const obj_errorMessage = obj.errorMessage;
|
|
1081
|
+
const path_errorMessage = path + '.errorMessage';
|
|
1082
|
+
if (typeof obj_errorMessage !== 'string') {
|
|
1083
|
+
return new TypeError('Expected "string" but received "' + typeof obj_errorMessage + '" (at "' + path_errorMessage + '")');
|
|
1084
|
+
}
|
|
1085
|
+
const obj_httpErrorCode = obj.httpErrorCode;
|
|
1086
|
+
const path_httpErrorCode = path + '.httpErrorCode';
|
|
1087
|
+
if (typeof obj_httpErrorCode !== 'string') {
|
|
1088
|
+
return new TypeError('Expected "string" but received "' + typeof obj_httpErrorCode + '" (at "' + path_httpErrorCode + '")');
|
|
1089
|
+
}
|
|
1090
|
+
if (obj.localizedErrorMessage !== undefined) {
|
|
1091
|
+
const obj_localizedErrorMessage = obj.localizedErrorMessage;
|
|
1092
|
+
const path_localizedErrorMessage = path + '.localizedErrorMessage';
|
|
1093
|
+
if (typeof obj_localizedErrorMessage !== 'string') {
|
|
1094
|
+
return new TypeError('Expected "string" but received "' + typeof obj_localizedErrorMessage + '" (at "' + path_localizedErrorMessage + '")');
|
|
1095
|
+
}
|
|
1096
|
+
}
|
|
1097
|
+
const obj_messageCode = obj.messageCode;
|
|
1098
|
+
const path_messageCode = path + '.messageCode';
|
|
1099
|
+
if (typeof obj_messageCode !== 'string') {
|
|
1100
|
+
return new TypeError('Expected "string" but received "' + typeof obj_messageCode + '" (at "' + path_messageCode + '")');
|
|
1101
|
+
}
|
|
1102
|
+
})();
|
|
1103
|
+
return v_error === undefined ? null : v_error;
|
|
1104
|
+
}
|
|
1105
|
+
const select$2 = function EinsteinPromptTemplateGenerationsErrorRepresentationSelect() {
|
|
1106
|
+
return {
|
|
1107
|
+
kind: 'Fragment',
|
|
1108
|
+
version: VERSION$1,
|
|
1109
|
+
private: [],
|
|
1110
|
+
selections: [
|
|
1111
|
+
{
|
|
1112
|
+
name: 'errorMessage',
|
|
1113
|
+
kind: 'Scalar'
|
|
1114
|
+
},
|
|
1115
|
+
{
|
|
1116
|
+
name: 'httpErrorCode',
|
|
1117
|
+
kind: 'Scalar'
|
|
1118
|
+
},
|
|
1119
|
+
{
|
|
1120
|
+
name: 'localizedErrorMessage',
|
|
1121
|
+
kind: 'Scalar',
|
|
1122
|
+
required: false
|
|
1123
|
+
},
|
|
1124
|
+
{
|
|
1125
|
+
name: 'messageCode',
|
|
1126
|
+
kind: 'Scalar'
|
|
1127
|
+
}
|
|
1128
|
+
]
|
|
1129
|
+
};
|
|
1130
|
+
};
|
|
1131
|
+
function equals$1(existing, incoming) {
|
|
1132
|
+
const existing_errorMessage = existing.errorMessage;
|
|
1133
|
+
const incoming_errorMessage = incoming.errorMessage;
|
|
1134
|
+
if (!(existing_errorMessage === incoming_errorMessage)) {
|
|
1135
|
+
return false;
|
|
1136
|
+
}
|
|
1137
|
+
const existing_httpErrorCode = existing.httpErrorCode;
|
|
1138
|
+
const incoming_httpErrorCode = incoming.httpErrorCode;
|
|
1139
|
+
if (!(existing_httpErrorCode === incoming_httpErrorCode)) {
|
|
1140
|
+
return false;
|
|
1141
|
+
}
|
|
1142
|
+
const existing_localizedErrorMessage = existing.localizedErrorMessage;
|
|
1143
|
+
const incoming_localizedErrorMessage = incoming.localizedErrorMessage;
|
|
1144
|
+
// if at least one of these optionals is defined
|
|
1145
|
+
if (existing_localizedErrorMessage !== undefined || incoming_localizedErrorMessage !== undefined) {
|
|
1146
|
+
// if one of these is not defined we know the other is defined and therefore
|
|
1147
|
+
// not equal
|
|
1148
|
+
if (existing_localizedErrorMessage === undefined || incoming_localizedErrorMessage === undefined) {
|
|
1149
|
+
return false;
|
|
1150
|
+
}
|
|
1151
|
+
if (!(existing_localizedErrorMessage === incoming_localizedErrorMessage)) {
|
|
1152
|
+
return false;
|
|
1153
|
+
}
|
|
1154
|
+
}
|
|
1155
|
+
const existing_messageCode = existing.messageCode;
|
|
1156
|
+
const incoming_messageCode = incoming.messageCode;
|
|
1157
|
+
if (!(existing_messageCode === incoming_messageCode)) {
|
|
1158
|
+
return false;
|
|
1159
|
+
}
|
|
1160
|
+
return true;
|
|
1161
|
+
}
|
|
1162
|
+
|
|
886
1163
|
const TTL = 100;
|
|
887
|
-
const VERSION = "
|
|
1164
|
+
const VERSION = "a4c71dd12b7b696b7b04ebf6cf5101a3";
|
|
888
1165
|
function validate(obj, path = 'EinsteinPromptTemplateGenerationsRepresentation') {
|
|
889
1166
|
const v_error = (() => {
|
|
890
1167
|
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
891
1168
|
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
892
1169
|
}
|
|
1170
|
+
if (obj.generationErrors !== undefined) {
|
|
1171
|
+
const obj_generationErrors = obj.generationErrors;
|
|
1172
|
+
const path_generationErrors = path + '.generationErrors';
|
|
1173
|
+
if (!ArrayIsArray(obj_generationErrors)) {
|
|
1174
|
+
return new TypeError('Expected "array" but received "' + typeof obj_generationErrors + '" (at "' + path_generationErrors + '")');
|
|
1175
|
+
}
|
|
1176
|
+
for (let i = 0; i < obj_generationErrors.length; i++) {
|
|
1177
|
+
const obj_generationErrors_item = obj_generationErrors[i];
|
|
1178
|
+
const path_generationErrors_item = path_generationErrors + '[' + i + ']';
|
|
1179
|
+
const referencepath_generationErrors_itemValidationError = validate$1(obj_generationErrors_item, path_generationErrors_item);
|
|
1180
|
+
if (referencepath_generationErrors_itemValidationError !== null) {
|
|
1181
|
+
let message = 'Object doesn\'t match EinsteinPromptTemplateGenerationsErrorRepresentation (at "' + path_generationErrors_item + '")\n';
|
|
1182
|
+
message += referencepath_generationErrors_itemValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
1183
|
+
return new TypeError(message);
|
|
1184
|
+
}
|
|
1185
|
+
}
|
|
1186
|
+
}
|
|
893
1187
|
const obj_generations = obj.generations;
|
|
894
1188
|
const path_generations = path + '.generations';
|
|
895
1189
|
if (!ArrayIsArray(obj_generations)) {
|
|
@@ -898,7 +1192,7 @@ function validate(obj, path = 'EinsteinPromptTemplateGenerationsRepresentation')
|
|
|
898
1192
|
for (let i = 0; i < obj_generations.length; i++) {
|
|
899
1193
|
const obj_generations_item = obj_generations[i];
|
|
900
1194
|
const path_generations_item = path_generations + '[' + i + ']';
|
|
901
|
-
const referencepath_generations_itemValidationError = validate$
|
|
1195
|
+
const referencepath_generations_itemValidationError = validate$6(obj_generations_item, path_generations_item);
|
|
902
1196
|
if (referencepath_generations_itemValidationError !== null) {
|
|
903
1197
|
let message = 'Object doesn\'t match EinsteinLlmGenerationItemRepresentation (at "' + path_generations_item + '")\n';
|
|
904
1198
|
message += referencepath_generations_itemValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
@@ -909,7 +1203,7 @@ function validate(obj, path = 'EinsteinPromptTemplateGenerationsRepresentation')
|
|
|
909
1203
|
const path_parameters = path + '.parameters';
|
|
910
1204
|
let obj_parameters_union0 = null;
|
|
911
1205
|
const obj_parameters_union0_error = (() => {
|
|
912
|
-
const referencepath_parametersValidationError = validate$
|
|
1206
|
+
const referencepath_parametersValidationError = validate$5(obj_parameters, path_parameters);
|
|
913
1207
|
if (referencepath_parametersValidationError !== null) {
|
|
914
1208
|
let message = 'Object doesn\'t match WrappedMap (at "' + path_parameters + '")\n';
|
|
915
1209
|
message += referencepath_parametersValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
@@ -987,13 +1281,21 @@ function normalize(input, existing, path, luvio, store, timestamp) {
|
|
|
987
1281
|
return input;
|
|
988
1282
|
}
|
|
989
1283
|
const select$1 = function EinsteinPromptTemplateGenerationsRepresentationSelect() {
|
|
990
|
-
const { selections:
|
|
991
|
-
const { selections:
|
|
1284
|
+
const { selections: EinsteinPromptTemplateGenerationsErrorRepresentation__selections, opaque: EinsteinPromptTemplateGenerationsErrorRepresentation__opaque, } = select$2();
|
|
1285
|
+
const { selections: EinsteinLlmGenerationItemRepresentation__selections, opaque: EinsteinLlmGenerationItemRepresentation__opaque, } = select$6();
|
|
1286
|
+
const { selections: WrappedMap__selections, opaque: WrappedMap__opaque, } = select$5();
|
|
992
1287
|
return {
|
|
993
1288
|
kind: 'Fragment',
|
|
994
1289
|
version: VERSION,
|
|
995
1290
|
private: [],
|
|
996
1291
|
selections: [
|
|
1292
|
+
{
|
|
1293
|
+
name: 'generationErrors',
|
|
1294
|
+
kind: 'Object',
|
|
1295
|
+
plural: true,
|
|
1296
|
+
selections: EinsteinPromptTemplateGenerationsErrorRepresentation__selections,
|
|
1297
|
+
required: false
|
|
1298
|
+
},
|
|
997
1299
|
{
|
|
998
1300
|
name: 'generations',
|
|
999
1301
|
kind: 'Object',
|
|
@@ -1032,10 +1334,28 @@ function equals(existing, incoming) {
|
|
|
1032
1334
|
if (!(existing_requestId === incoming_requestId)) {
|
|
1033
1335
|
return false;
|
|
1034
1336
|
}
|
|
1337
|
+
const existing_generationErrors = existing.generationErrors;
|
|
1338
|
+
const incoming_generationErrors = incoming.generationErrors;
|
|
1339
|
+
// if at least one of these optionals is defined
|
|
1340
|
+
if (existing_generationErrors !== undefined || incoming_generationErrors !== undefined) {
|
|
1341
|
+
// if one of these is not defined we know the other is defined and therefore
|
|
1342
|
+
// not equal
|
|
1343
|
+
if (existing_generationErrors === undefined || incoming_generationErrors === undefined) {
|
|
1344
|
+
return false;
|
|
1345
|
+
}
|
|
1346
|
+
const equals_generationErrors_items = equalsArray(existing_generationErrors, incoming_generationErrors, (existing_generationErrors_item, incoming_generationErrors_item) => {
|
|
1347
|
+
if (!(equals$1(existing_generationErrors_item, incoming_generationErrors_item))) {
|
|
1348
|
+
return false;
|
|
1349
|
+
}
|
|
1350
|
+
});
|
|
1351
|
+
if (equals_generationErrors_items === false) {
|
|
1352
|
+
return false;
|
|
1353
|
+
}
|
|
1354
|
+
}
|
|
1035
1355
|
const existing_generations = existing.generations;
|
|
1036
1356
|
const incoming_generations = incoming.generations;
|
|
1037
1357
|
const equals_generations_items = equalsArray(existing_generations, incoming_generations, (existing_generations_item, incoming_generations_item) => {
|
|
1038
|
-
if (!(equals$
|
|
1358
|
+
if (!(equals$4(existing_generations_item, incoming_generations_item))) {
|
|
1039
1359
|
return false;
|
|
1040
1360
|
}
|
|
1041
1361
|
});
|
|
@@ -1047,7 +1367,7 @@ function equals(existing, incoming) {
|
|
|
1047
1367
|
if (!(existing_parameters === incoming_parameters
|
|
1048
1368
|
|| (existing_parameters != null &&
|
|
1049
1369
|
incoming_parameters != null &&
|
|
1050
|
-
equals$
|
|
1370
|
+
equals$3(existing_parameters, incoming_parameters)))) {
|
|
1051
1371
|
return false;
|
|
1052
1372
|
}
|
|
1053
1373
|
const existing_prompt = existing.prompt;
|
|
@@ -1128,7 +1448,7 @@ function typeCheckConfig(untrustedConfig) {
|
|
|
1128
1448
|
const config = {};
|
|
1129
1449
|
typeCheckConfig$3(untrustedConfig, config, createGenerationsForPromptTemplate_ConfigPropertyMetadata);
|
|
1130
1450
|
const untrustedConfig_promptTemplateGenerationsInput = untrustedConfig.promptTemplateGenerationsInput;
|
|
1131
|
-
const referenceEinsteinPromptTemplateGenerationsInputRepresentationValidationError = validate$
|
|
1451
|
+
const referenceEinsteinPromptTemplateGenerationsInputRepresentationValidationError = validate$2(untrustedConfig_promptTemplateGenerationsInput);
|
|
1132
1452
|
if (referenceEinsteinPromptTemplateGenerationsInputRepresentationValidationError === null) {
|
|
1133
1453
|
config.promptTemplateGenerationsInput = untrustedConfig_promptTemplateGenerationsInput;
|
|
1134
1454
|
}
|
|
@@ -1200,4 +1520,4 @@ withDefaultLuvio((luvio) => {
|
|
|
1200
1520
|
});
|
|
1201
1521
|
|
|
1202
1522
|
export { createFeedback, createGenerations, createGenerationsForPromptTemplate };
|
|
1203
|
-
// version: 1.
|
|
1523
|
+
// version: 1.289.0-72256e363
|