@salesforce/lds-adapters-service-einsteinllm 1.287.0-dev1 → 1.287.0-dev11
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 +1338 -295
- package/dist/es/es2018/types/src/generated/artifacts/main.d.ts +1 -1
- package/dist/es/es2018/types/src/generated/types/EinsteinLlmGenerationItemRepresentation.d.ts +13 -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/EinsteinPromptTemplateGenerationsInputRepresentation.d.ts +4 -1
- package/dist/es/es2018/types/src/generated/types/EinsteinPromptTemplateGenerationsRepresentation.d.ts +16 -1
- package/dist/es/es2018/types/src/generated/types/EinsteinPromptTemplateMaskContentRepresentation.d.ts +35 -0
- package/dist/es/es2018/types/src/generated/types/EinsteinPromptTemplateMaskDataRepresentation.d.ts +34 -0
- package/dist/es/es2018/types/src/generated/types/EinsteinPromptTemplateMaskSettingsRepresentation.d.ts +28 -0
- package/package.json +4 -4
- package/sfdc/index.js +1098 -55
- package/src/raml/api.raml +147 -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$f(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$a = "4033328f65865dd5d80c68a7573a4522";
|
|
165
|
+
function validate$e(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$d = function EinsteinLlmFeedbackRepresentationSelect() {
|
|
192
192
|
return {
|
|
193
193
|
kind: 'Fragment',
|
|
194
|
-
version: VERSION$
|
|
194
|
+
version: VERSION$a,
|
|
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$a(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$e(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$a, RepresentationType$2, equals$a);
|
|
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$c(luvio, params) {
|
|
235
|
+
return select$d();
|
|
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$c(),
|
|
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$f(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$d(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$c(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$d(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,462 @@ 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$9 = "9ebac74e6f964c363d5fd1913df363af";
|
|
443
|
+
function validate$b(obj, path = 'EinsteinLlmGenerationsContentQualityRepresentation') {
|
|
444
|
+
const v_error = (() => {
|
|
445
|
+
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
446
|
+
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
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$b = function EinsteinLlmGenerationsContentQualityRepresentationSelect() {
|
|
480
|
+
return {
|
|
481
|
+
kind: 'Fragment',
|
|
482
|
+
version: VERSION$9,
|
|
483
|
+
private: [],
|
|
484
|
+
selections: [
|
|
485
|
+
{
|
|
486
|
+
name: 'isToxicityDetected',
|
|
487
|
+
kind: 'Scalar',
|
|
488
|
+
required: false
|
|
489
|
+
}
|
|
490
|
+
]
|
|
491
|
+
};
|
|
492
|
+
};
|
|
493
|
+
function equals$9(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$8 = "77af44a252cb5b45b4d9a8101368d2aa";
|
|
511
|
+
function validate$a(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$a = function EinsteinLlmGenerationsSafetyScoreRepresentationSelect() {
|
|
716
|
+
return {
|
|
717
|
+
kind: 'Fragment',
|
|
718
|
+
version: VERSION$8,
|
|
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$8(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$7 = "4a07778ff6c595d91c575188146647a1";
|
|
855
|
+
function validate$9(obj, path = 'EinsteinLlmGenerationItemRepresentation') {
|
|
444
856
|
const v_error = (() => {
|
|
445
857
|
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
446
858
|
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
447
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$b(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
|
+
}
|
|
891
|
+
if (obj.isSummarized !== undefined) {
|
|
892
|
+
const obj_isSummarized = obj.isSummarized;
|
|
893
|
+
const path_isSummarized = path + '.isSummarized';
|
|
894
|
+
if (typeof obj_isSummarized !== 'boolean') {
|
|
895
|
+
return new TypeError('Expected "boolean" but received "' + typeof obj_isSummarized + '" (at "' + path_isSummarized + '")');
|
|
896
|
+
}
|
|
897
|
+
}
|
|
448
898
|
const obj_parameters = obj.parameters;
|
|
449
899
|
const path_parameters = path + '.parameters';
|
|
450
900
|
if (typeof obj_parameters !== 'string') {
|
|
@@ -455,6 +905,37 @@ function validate$5(obj, path = 'EinsteinLlmGenerationItemRepresentation') {
|
|
|
455
905
|
if (typeof obj_responseId !== 'string') {
|
|
456
906
|
return new TypeError('Expected "string" but received "' + typeof obj_responseId + '" (at "' + path_responseId + '")');
|
|
457
907
|
}
|
|
908
|
+
if (obj.safetyScoreRepresentation !== undefined) {
|
|
909
|
+
const obj_safetyScoreRepresentation = obj.safetyScoreRepresentation;
|
|
910
|
+
const path_safetyScoreRepresentation = path + '.safetyScoreRepresentation';
|
|
911
|
+
let obj_safetyScoreRepresentation_union0 = null;
|
|
912
|
+
const obj_safetyScoreRepresentation_union0_error = (() => {
|
|
913
|
+
const referencepath_safetyScoreRepresentationValidationError = validate$a(obj_safetyScoreRepresentation, path_safetyScoreRepresentation);
|
|
914
|
+
if (referencepath_safetyScoreRepresentationValidationError !== null) {
|
|
915
|
+
let message = 'Object doesn\'t match EinsteinLlmGenerationsSafetyScoreRepresentation (at "' + path_safetyScoreRepresentation + '")\n';
|
|
916
|
+
message += referencepath_safetyScoreRepresentationValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
917
|
+
return new TypeError(message);
|
|
918
|
+
}
|
|
919
|
+
})();
|
|
920
|
+
if (obj_safetyScoreRepresentation_union0_error != null) {
|
|
921
|
+
obj_safetyScoreRepresentation_union0 = obj_safetyScoreRepresentation_union0_error.message;
|
|
922
|
+
}
|
|
923
|
+
let obj_safetyScoreRepresentation_union1 = null;
|
|
924
|
+
const obj_safetyScoreRepresentation_union1_error = (() => {
|
|
925
|
+
if (obj_safetyScoreRepresentation !== null) {
|
|
926
|
+
return new TypeError('Expected "null" but received "' + typeof obj_safetyScoreRepresentation + '" (at "' + path_safetyScoreRepresentation + '")');
|
|
927
|
+
}
|
|
928
|
+
})();
|
|
929
|
+
if (obj_safetyScoreRepresentation_union1_error != null) {
|
|
930
|
+
obj_safetyScoreRepresentation_union1 = obj_safetyScoreRepresentation_union1_error.message;
|
|
931
|
+
}
|
|
932
|
+
if (obj_safetyScoreRepresentation_union0 && obj_safetyScoreRepresentation_union1) {
|
|
933
|
+
let message = 'Object doesn\'t match union (at "' + path_safetyScoreRepresentation + '")';
|
|
934
|
+
message += '\n' + obj_safetyScoreRepresentation_union0.split('\n').map((line) => '\t' + line).join('\n');
|
|
935
|
+
message += '\n' + obj_safetyScoreRepresentation_union1.split('\n').map((line) => '\t' + line).join('\n');
|
|
936
|
+
return new TypeError(message);
|
|
937
|
+
}
|
|
938
|
+
}
|
|
458
939
|
const obj_text = obj.text;
|
|
459
940
|
const path_text = path + '.text';
|
|
460
941
|
if (typeof obj_text !== 'string') {
|
|
@@ -463,12 +944,26 @@ function validate$5(obj, path = 'EinsteinLlmGenerationItemRepresentation') {
|
|
|
463
944
|
})();
|
|
464
945
|
return v_error === undefined ? null : v_error;
|
|
465
946
|
}
|
|
466
|
-
const select$
|
|
947
|
+
const select$9 = function EinsteinLlmGenerationItemRepresentationSelect() {
|
|
948
|
+
const { selections: EinsteinLlmGenerationsContentQualityRepresentation__selections, opaque: EinsteinLlmGenerationsContentQualityRepresentation__opaque, } = select$b();
|
|
949
|
+
const { selections: EinsteinLlmGenerationsSafetyScoreRepresentation__selections, opaque: EinsteinLlmGenerationsSafetyScoreRepresentation__opaque, } = select$a();
|
|
467
950
|
return {
|
|
468
951
|
kind: 'Fragment',
|
|
469
|
-
version: VERSION$
|
|
952
|
+
version: VERSION$7,
|
|
470
953
|
private: [],
|
|
471
954
|
selections: [
|
|
955
|
+
{
|
|
956
|
+
name: 'contentQualityRepresentation',
|
|
957
|
+
kind: 'Object',
|
|
958
|
+
nullable: true,
|
|
959
|
+
selections: EinsteinLlmGenerationsContentQualityRepresentation__selections,
|
|
960
|
+
required: false
|
|
961
|
+
},
|
|
962
|
+
{
|
|
963
|
+
name: 'isSummarized',
|
|
964
|
+
kind: 'Scalar',
|
|
965
|
+
required: false
|
|
966
|
+
},
|
|
472
967
|
{
|
|
473
968
|
name: 'parameters',
|
|
474
969
|
kind: 'Scalar'
|
|
@@ -477,6 +972,13 @@ const select$5 = function EinsteinLlmGenerationItemRepresentationSelect() {
|
|
|
477
972
|
name: 'responseId',
|
|
478
973
|
kind: 'Scalar'
|
|
479
974
|
},
|
|
975
|
+
{
|
|
976
|
+
name: 'safetyScoreRepresentation',
|
|
977
|
+
kind: 'Object',
|
|
978
|
+
nullable: true,
|
|
979
|
+
selections: EinsteinLlmGenerationsSafetyScoreRepresentation__selections,
|
|
980
|
+
required: false
|
|
981
|
+
},
|
|
480
982
|
{
|
|
481
983
|
name: 'text',
|
|
482
984
|
kind: 'Scalar'
|
|
@@ -484,7 +986,20 @@ const select$5 = function EinsteinLlmGenerationItemRepresentationSelect() {
|
|
|
484
986
|
]
|
|
485
987
|
};
|
|
486
988
|
};
|
|
487
|
-
function equals$
|
|
989
|
+
function equals$7(existing, incoming) {
|
|
990
|
+
const existing_isSummarized = existing.isSummarized;
|
|
991
|
+
const incoming_isSummarized = incoming.isSummarized;
|
|
992
|
+
// if at least one of these optionals is defined
|
|
993
|
+
if (existing_isSummarized !== undefined || incoming_isSummarized !== undefined) {
|
|
994
|
+
// if one of these is not defined we know the other is defined and therefore
|
|
995
|
+
// not equal
|
|
996
|
+
if (existing_isSummarized === undefined || incoming_isSummarized === undefined) {
|
|
997
|
+
return false;
|
|
998
|
+
}
|
|
999
|
+
if (!(existing_isSummarized === incoming_isSummarized)) {
|
|
1000
|
+
return false;
|
|
1001
|
+
}
|
|
1002
|
+
}
|
|
488
1003
|
const existing_parameters = existing.parameters;
|
|
489
1004
|
const incoming_parameters = incoming.parameters;
|
|
490
1005
|
if (!(existing_parameters === incoming_parameters)) {
|
|
@@ -500,11 +1015,43 @@ function equals$3(existing, incoming) {
|
|
|
500
1015
|
if (!(existing_text === incoming_text)) {
|
|
501
1016
|
return false;
|
|
502
1017
|
}
|
|
1018
|
+
const existing_contentQualityRepresentation = existing.contentQualityRepresentation;
|
|
1019
|
+
const incoming_contentQualityRepresentation = incoming.contentQualityRepresentation;
|
|
1020
|
+
// if at least one of these optionals is defined
|
|
1021
|
+
if (existing_contentQualityRepresentation !== undefined || incoming_contentQualityRepresentation !== undefined) {
|
|
1022
|
+
// if one of these is not defined we know the other is defined and therefore
|
|
1023
|
+
// not equal
|
|
1024
|
+
if (existing_contentQualityRepresentation === undefined || incoming_contentQualityRepresentation === undefined) {
|
|
1025
|
+
return false;
|
|
1026
|
+
}
|
|
1027
|
+
if (!(existing_contentQualityRepresentation === incoming_contentQualityRepresentation
|
|
1028
|
+
|| (existing_contentQualityRepresentation != null &&
|
|
1029
|
+
incoming_contentQualityRepresentation != null &&
|
|
1030
|
+
equals$9(existing_contentQualityRepresentation, incoming_contentQualityRepresentation)))) {
|
|
1031
|
+
return false;
|
|
1032
|
+
}
|
|
1033
|
+
}
|
|
1034
|
+
const existing_safetyScoreRepresentation = existing.safetyScoreRepresentation;
|
|
1035
|
+
const incoming_safetyScoreRepresentation = incoming.safetyScoreRepresentation;
|
|
1036
|
+
// if at least one of these optionals is defined
|
|
1037
|
+
if (existing_safetyScoreRepresentation !== undefined || incoming_safetyScoreRepresentation !== undefined) {
|
|
1038
|
+
// if one of these is not defined we know the other is defined and therefore
|
|
1039
|
+
// not equal
|
|
1040
|
+
if (existing_safetyScoreRepresentation === undefined || incoming_safetyScoreRepresentation === undefined) {
|
|
1041
|
+
return false;
|
|
1042
|
+
}
|
|
1043
|
+
if (!(existing_safetyScoreRepresentation === incoming_safetyScoreRepresentation
|
|
1044
|
+
|| (existing_safetyScoreRepresentation != null &&
|
|
1045
|
+
incoming_safetyScoreRepresentation != null &&
|
|
1046
|
+
equals$8(existing_safetyScoreRepresentation, incoming_safetyScoreRepresentation)))) {
|
|
1047
|
+
return false;
|
|
1048
|
+
}
|
|
1049
|
+
}
|
|
503
1050
|
return true;
|
|
504
1051
|
}
|
|
505
1052
|
|
|
506
|
-
const VERSION$
|
|
507
|
-
function validate$
|
|
1053
|
+
const VERSION$6 = "4656c961c9d093a9e206c1db7d4de0b0";
|
|
1054
|
+
function validate$8(obj, path = 'WrappedMap') {
|
|
508
1055
|
const v_error = (() => {
|
|
509
1056
|
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
510
1057
|
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
@@ -526,15 +1073,15 @@ function validate$4(obj, path = 'WrappedMap') {
|
|
|
526
1073
|
})();
|
|
527
1074
|
return v_error === undefined ? null : v_error;
|
|
528
1075
|
}
|
|
529
|
-
const select$
|
|
1076
|
+
const select$8 = function WrappedMapSelect() {
|
|
530
1077
|
return {
|
|
531
1078
|
kind: 'Fragment',
|
|
532
|
-
version: VERSION$
|
|
1079
|
+
version: VERSION$6,
|
|
533
1080
|
private: [],
|
|
534
1081
|
selections: []
|
|
535
1082
|
};
|
|
536
1083
|
};
|
|
537
|
-
function equals$
|
|
1084
|
+
function equals$6(existing, incoming) {
|
|
538
1085
|
const existing_wrappedMap = existing.wrappedMap;
|
|
539
1086
|
const incoming_wrappedMap = incoming.wrappedMap;
|
|
540
1087
|
const equals_wrappedMap_props = equalsObject(existing_wrappedMap, incoming_wrappedMap, (existing_wrappedMap_prop, incoming_wrappedMap_prop) => {
|
|
@@ -546,8 +1093,8 @@ function equals$2(existing, incoming) {
|
|
|
546
1093
|
}
|
|
547
1094
|
|
|
548
1095
|
const TTL$1 = 100;
|
|
549
|
-
const VERSION$
|
|
550
|
-
function validate$
|
|
1096
|
+
const VERSION$5 = "d8abd72a42e842b253da1c38954dafbc";
|
|
1097
|
+
function validate$7(obj, path = 'EinsteinLlmGenerationsRepresentation') {
|
|
551
1098
|
const v_error = (() => {
|
|
552
1099
|
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
553
1100
|
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
@@ -560,7 +1107,7 @@ function validate$3(obj, path = 'EinsteinLlmGenerationsRepresentation') {
|
|
|
560
1107
|
for (let i = 0; i < obj_generations.length; i++) {
|
|
561
1108
|
const obj_generations_item = obj_generations[i];
|
|
562
1109
|
const path_generations_item = path_generations + '[' + i + ']';
|
|
563
|
-
const referencepath_generations_itemValidationError = validate$
|
|
1110
|
+
const referencepath_generations_itemValidationError = validate$9(obj_generations_item, path_generations_item);
|
|
564
1111
|
if (referencepath_generations_itemValidationError !== null) {
|
|
565
1112
|
let message = 'Object doesn\'t match EinsteinLlmGenerationItemRepresentation (at "' + path_generations_item + '")\n';
|
|
566
1113
|
message += referencepath_generations_itemValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
@@ -571,7 +1118,7 @@ function validate$3(obj, path = 'EinsteinLlmGenerationsRepresentation') {
|
|
|
571
1118
|
const path_parameters = path + '.parameters';
|
|
572
1119
|
let obj_parameters_union0 = null;
|
|
573
1120
|
const obj_parameters_union0_error = (() => {
|
|
574
|
-
const referencepath_parametersValidationError = validate$
|
|
1121
|
+
const referencepath_parametersValidationError = validate$8(obj_parameters, path_parameters);
|
|
575
1122
|
if (referencepath_parametersValidationError !== null) {
|
|
576
1123
|
let message = 'Object doesn\'t match WrappedMap (at "' + path_parameters + '")\n';
|
|
577
1124
|
message += referencepath_parametersValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
@@ -643,12 +1190,12 @@ function keyBuilderFromType$1(luvio, object) {
|
|
|
643
1190
|
function normalize$1(input, existing, path, luvio, store, timestamp) {
|
|
644
1191
|
return input;
|
|
645
1192
|
}
|
|
646
|
-
const select$
|
|
647
|
-
const { selections: EinsteinLlmGenerationItemRepresentation__selections, opaque: EinsteinLlmGenerationItemRepresentation__opaque, } = select$
|
|
648
|
-
const { selections: WrappedMap__selections, opaque: WrappedMap__opaque, } = select$
|
|
1193
|
+
const select$7 = function EinsteinLlmGenerationsRepresentationSelect() {
|
|
1194
|
+
const { selections: EinsteinLlmGenerationItemRepresentation__selections, opaque: EinsteinLlmGenerationItemRepresentation__opaque, } = select$9();
|
|
1195
|
+
const { selections: WrappedMap__selections, opaque: WrappedMap__opaque, } = select$8();
|
|
649
1196
|
return {
|
|
650
1197
|
kind: 'Fragment',
|
|
651
|
-
version: VERSION$
|
|
1198
|
+
version: VERSION$5,
|
|
652
1199
|
private: [],
|
|
653
1200
|
selections: [
|
|
654
1201
|
{
|
|
@@ -674,7 +1221,7 @@ const select$3 = function EinsteinLlmGenerationsRepresentationSelect() {
|
|
|
674
1221
|
]
|
|
675
1222
|
};
|
|
676
1223
|
};
|
|
677
|
-
function equals$
|
|
1224
|
+
function equals$5(existing, incoming) {
|
|
678
1225
|
const existing_requestId = existing.requestId;
|
|
679
1226
|
const incoming_requestId = incoming.requestId;
|
|
680
1227
|
if (!(existing_requestId === incoming_requestId)) {
|
|
@@ -683,7 +1230,7 @@ function equals$1(existing, incoming) {
|
|
|
683
1230
|
const existing_generations = existing.generations;
|
|
684
1231
|
const incoming_generations = incoming.generations;
|
|
685
1232
|
const equals_generations_items = equalsArray(existing_generations, incoming_generations, (existing_generations_item, incoming_generations_item) => {
|
|
686
|
-
if (!(equals$
|
|
1233
|
+
if (!(equals$7(existing_generations_item, incoming_generations_item))) {
|
|
687
1234
|
return false;
|
|
688
1235
|
}
|
|
689
1236
|
});
|
|
@@ -695,7 +1242,7 @@ function equals$1(existing, incoming) {
|
|
|
695
1242
|
if (!(existing_parameters === incoming_parameters
|
|
696
1243
|
|| (existing_parameters != null &&
|
|
697
1244
|
incoming_parameters != null &&
|
|
698
|
-
equals$
|
|
1245
|
+
equals$6(existing_parameters, incoming_parameters)))) {
|
|
699
1246
|
return false;
|
|
700
1247
|
}
|
|
701
1248
|
const existing_prompt = existing.prompt;
|
|
@@ -707,14 +1254,14 @@ function equals$1(existing, incoming) {
|
|
|
707
1254
|
}
|
|
708
1255
|
const ingest$1 = function EinsteinLlmGenerationsRepresentationIngest(input, path, luvio, store, timestamp) {
|
|
709
1256
|
if (process.env.NODE_ENV !== 'production') {
|
|
710
|
-
const validateError = validate$
|
|
1257
|
+
const validateError = validate$7(input);
|
|
711
1258
|
if (validateError !== null) {
|
|
712
1259
|
throw validateError;
|
|
713
1260
|
}
|
|
714
1261
|
}
|
|
715
1262
|
const key = keyBuilderFromType$1(luvio, input);
|
|
716
1263
|
const ttlToUse = TTL$1;
|
|
717
|
-
ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize$1, "EinsteinLLM", VERSION$
|
|
1264
|
+
ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize$1, "EinsteinLLM", VERSION$5, RepresentationType$1, equals$5);
|
|
718
1265
|
return createLink(key);
|
|
719
1266
|
};
|
|
720
1267
|
function getTypeCacheKeys$1(rootKeySet, luvio, input, fullPathFactory) {
|
|
@@ -727,8 +1274,8 @@ function getTypeCacheKeys$1(rootKeySet, luvio, input, fullPathFactory) {
|
|
|
727
1274
|
});
|
|
728
1275
|
}
|
|
729
1276
|
|
|
730
|
-
function select$
|
|
731
|
-
return select$
|
|
1277
|
+
function select$6(luvio, params) {
|
|
1278
|
+
return select$7();
|
|
732
1279
|
}
|
|
733
1280
|
function getResponseCacheKeys$1(storeKeyMap, luvio, resourceParams, response) {
|
|
734
1281
|
getTypeCacheKeys$1(storeKeyMap, luvio, response);
|
|
@@ -739,7 +1286,7 @@ function ingestSuccess$1(luvio, resourceParams, response) {
|
|
|
739
1286
|
luvio.storeIngest(key, ingest$1, body);
|
|
740
1287
|
const snapshot = luvio.storeLookup({
|
|
741
1288
|
recordId: key,
|
|
742
|
-
node: select$
|
|
1289
|
+
node: select$6(),
|
|
743
1290
|
variables: {},
|
|
744
1291
|
});
|
|
745
1292
|
if (process.env.NODE_ENV !== 'production') {
|
|
@@ -773,7 +1320,7 @@ const createResourceParams$1 = /*#__PURE__*/ createResourceParams$3(createGenera
|
|
|
773
1320
|
function typeCheckConfig$1(untrustedConfig) {
|
|
774
1321
|
const config = {};
|
|
775
1322
|
const untrustedConfig_generationsInput = untrustedConfig.generationsInput;
|
|
776
|
-
const referenceEinsteinLlmGenerationsInputRepresentationValidationError = validate$
|
|
1323
|
+
const referenceEinsteinLlmGenerationsInputRepresentationValidationError = validate$c(untrustedConfig_generationsInput);
|
|
777
1324
|
if (referenceEinsteinLlmGenerationsInputRepresentationValidationError === null) {
|
|
778
1325
|
config.generationsInput = untrustedConfig_generationsInput;
|
|
779
1326
|
}
|
|
@@ -821,7 +1368,7 @@ const createGenerationsAdapterFactory = (luvio) => {
|
|
|
821
1368
|
};
|
|
822
1369
|
};
|
|
823
1370
|
|
|
824
|
-
function validate$
|
|
1371
|
+
function validate$6(obj, path = 'WrappedValueMap') {
|
|
825
1372
|
const v_error = (() => {
|
|
826
1373
|
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
827
1374
|
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
@@ -844,7 +1391,7 @@ function validate$2(obj, path = 'WrappedValueMap') {
|
|
|
844
1391
|
return v_error === undefined ? null : v_error;
|
|
845
1392
|
}
|
|
846
1393
|
|
|
847
|
-
function validate$
|
|
1394
|
+
function validate$5(obj, path = 'EinsteinPromptTemplateGenerationsInputRepresentation') {
|
|
848
1395
|
const v_error = (() => {
|
|
849
1396
|
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
850
1397
|
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
@@ -852,7 +1399,7 @@ function validate$1(obj, path = 'EinsteinPromptTemplateGenerationsInputRepresent
|
|
|
852
1399
|
if (obj.additionalConfig !== undefined) {
|
|
853
1400
|
const obj_additionalConfig = obj.additionalConfig;
|
|
854
1401
|
const path_additionalConfig = path + '.additionalConfig';
|
|
855
|
-
const referencepath_additionalConfigValidationError = validate$
|
|
1402
|
+
const referencepath_additionalConfigValidationError = validate$d(obj_additionalConfig, path_additionalConfig);
|
|
856
1403
|
if (referencepath_additionalConfigValidationError !== null) {
|
|
857
1404
|
let message = 'Object doesn\'t match EinsteinLlmAdditionalConfigInputRepresentation (at "' + path_additionalConfig + '")\n';
|
|
858
1405
|
message += referencepath_additionalConfigValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
@@ -861,7 +1408,7 @@ function validate$1(obj, path = 'EinsteinPromptTemplateGenerationsInputRepresent
|
|
|
861
1408
|
}
|
|
862
1409
|
const obj_inputParams = obj.inputParams;
|
|
863
1410
|
const path_inputParams = path + '.inputParams';
|
|
864
|
-
const referencepath_inputParamsValidationError = validate$
|
|
1411
|
+
const referencepath_inputParamsValidationError = validate$6(obj_inputParams, path_inputParams);
|
|
865
1412
|
if (referencepath_inputParamsValidationError !== null) {
|
|
866
1413
|
let message = 'Object doesn\'t match WrappedValueMap (at "' + path_inputParams + '")\n';
|
|
867
1414
|
message += referencepath_inputParamsValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
@@ -872,6 +1419,13 @@ function validate$1(obj, path = 'EinsteinPromptTemplateGenerationsInputRepresent
|
|
|
872
1419
|
if (typeof obj_isPreview !== 'boolean') {
|
|
873
1420
|
return new TypeError('Expected "boolean" but received "' + typeof obj_isPreview + '" (at "' + path_isPreview + '")');
|
|
874
1421
|
}
|
|
1422
|
+
if (obj.outputLanguage !== undefined) {
|
|
1423
|
+
const obj_outputLanguage = obj.outputLanguage;
|
|
1424
|
+
const path_outputLanguage = path + '.outputLanguage';
|
|
1425
|
+
if (typeof obj_outputLanguage !== 'string') {
|
|
1426
|
+
return new TypeError('Expected "string" but received "' + typeof obj_outputLanguage + '" (at "' + path_outputLanguage + '")');
|
|
1427
|
+
}
|
|
1428
|
+
}
|
|
875
1429
|
if (obj.provider !== undefined) {
|
|
876
1430
|
const obj_provider = obj.provider;
|
|
877
1431
|
const path_provider = path + '.provider';
|
|
@@ -883,13 +1437,348 @@ function validate$1(obj, path = 'EinsteinPromptTemplateGenerationsInputRepresent
|
|
|
883
1437
|
return v_error === undefined ? null : v_error;
|
|
884
1438
|
}
|
|
885
1439
|
|
|
1440
|
+
const VERSION$4 = "6458d624e5a1691821c764b6de0badb3";
|
|
1441
|
+
function validate$4(obj, path = 'EinsteinPromptTemplateGenerationsErrorRepresentation') {
|
|
1442
|
+
const v_error = (() => {
|
|
1443
|
+
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
1444
|
+
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
1445
|
+
}
|
|
1446
|
+
const obj_errorMessage = obj.errorMessage;
|
|
1447
|
+
const path_errorMessage = path + '.errorMessage';
|
|
1448
|
+
if (typeof obj_errorMessage !== 'string') {
|
|
1449
|
+
return new TypeError('Expected "string" but received "' + typeof obj_errorMessage + '" (at "' + path_errorMessage + '")');
|
|
1450
|
+
}
|
|
1451
|
+
const obj_httpErrorCode = obj.httpErrorCode;
|
|
1452
|
+
const path_httpErrorCode = path + '.httpErrorCode';
|
|
1453
|
+
if (typeof obj_httpErrorCode !== 'string') {
|
|
1454
|
+
return new TypeError('Expected "string" but received "' + typeof obj_httpErrorCode + '" (at "' + path_httpErrorCode + '")');
|
|
1455
|
+
}
|
|
1456
|
+
if (obj.localizedErrorMessage !== undefined) {
|
|
1457
|
+
const obj_localizedErrorMessage = obj.localizedErrorMessage;
|
|
1458
|
+
const path_localizedErrorMessage = path + '.localizedErrorMessage';
|
|
1459
|
+
if (typeof obj_localizedErrorMessage !== 'string') {
|
|
1460
|
+
return new TypeError('Expected "string" but received "' + typeof obj_localizedErrorMessage + '" (at "' + path_localizedErrorMessage + '")');
|
|
1461
|
+
}
|
|
1462
|
+
}
|
|
1463
|
+
const obj_messageCode = obj.messageCode;
|
|
1464
|
+
const path_messageCode = path + '.messageCode';
|
|
1465
|
+
if (typeof obj_messageCode !== 'string') {
|
|
1466
|
+
return new TypeError('Expected "string" but received "' + typeof obj_messageCode + '" (at "' + path_messageCode + '")');
|
|
1467
|
+
}
|
|
1468
|
+
})();
|
|
1469
|
+
return v_error === undefined ? null : v_error;
|
|
1470
|
+
}
|
|
1471
|
+
const select$5 = function EinsteinPromptTemplateGenerationsErrorRepresentationSelect() {
|
|
1472
|
+
return {
|
|
1473
|
+
kind: 'Fragment',
|
|
1474
|
+
version: VERSION$4,
|
|
1475
|
+
private: [],
|
|
1476
|
+
selections: [
|
|
1477
|
+
{
|
|
1478
|
+
name: 'errorMessage',
|
|
1479
|
+
kind: 'Scalar'
|
|
1480
|
+
},
|
|
1481
|
+
{
|
|
1482
|
+
name: 'httpErrorCode',
|
|
1483
|
+
kind: 'Scalar'
|
|
1484
|
+
},
|
|
1485
|
+
{
|
|
1486
|
+
name: 'localizedErrorMessage',
|
|
1487
|
+
kind: 'Scalar',
|
|
1488
|
+
required: false
|
|
1489
|
+
},
|
|
1490
|
+
{
|
|
1491
|
+
name: 'messageCode',
|
|
1492
|
+
kind: 'Scalar'
|
|
1493
|
+
}
|
|
1494
|
+
]
|
|
1495
|
+
};
|
|
1496
|
+
};
|
|
1497
|
+
function equals$4(existing, incoming) {
|
|
1498
|
+
const existing_errorMessage = existing.errorMessage;
|
|
1499
|
+
const incoming_errorMessage = incoming.errorMessage;
|
|
1500
|
+
if (!(existing_errorMessage === incoming_errorMessage)) {
|
|
1501
|
+
return false;
|
|
1502
|
+
}
|
|
1503
|
+
const existing_httpErrorCode = existing.httpErrorCode;
|
|
1504
|
+
const incoming_httpErrorCode = incoming.httpErrorCode;
|
|
1505
|
+
if (!(existing_httpErrorCode === incoming_httpErrorCode)) {
|
|
1506
|
+
return false;
|
|
1507
|
+
}
|
|
1508
|
+
const existing_localizedErrorMessage = existing.localizedErrorMessage;
|
|
1509
|
+
const incoming_localizedErrorMessage = incoming.localizedErrorMessage;
|
|
1510
|
+
// if at least one of these optionals is defined
|
|
1511
|
+
if (existing_localizedErrorMessage !== undefined || incoming_localizedErrorMessage !== undefined) {
|
|
1512
|
+
// if one of these is not defined we know the other is defined and therefore
|
|
1513
|
+
// not equal
|
|
1514
|
+
if (existing_localizedErrorMessage === undefined || incoming_localizedErrorMessage === undefined) {
|
|
1515
|
+
return false;
|
|
1516
|
+
}
|
|
1517
|
+
if (!(existing_localizedErrorMessage === incoming_localizedErrorMessage)) {
|
|
1518
|
+
return false;
|
|
1519
|
+
}
|
|
1520
|
+
}
|
|
1521
|
+
const existing_messageCode = existing.messageCode;
|
|
1522
|
+
const incoming_messageCode = incoming.messageCode;
|
|
1523
|
+
if (!(existing_messageCode === incoming_messageCode)) {
|
|
1524
|
+
return false;
|
|
1525
|
+
}
|
|
1526
|
+
return true;
|
|
1527
|
+
}
|
|
1528
|
+
|
|
1529
|
+
const VERSION$3 = "7c417ce44e4bc05dfcc454e6825590e8";
|
|
1530
|
+
function validate$3(obj, path = 'EinsteinPromptTemplateMaskSettingsRepresentation') {
|
|
1531
|
+
const v_error = (() => {
|
|
1532
|
+
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
1533
|
+
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
1534
|
+
}
|
|
1535
|
+
const obj_enableModeration = obj.enableModeration;
|
|
1536
|
+
const path_enableModeration = path + '.enableModeration';
|
|
1537
|
+
if (typeof obj_enableModeration !== 'boolean') {
|
|
1538
|
+
return new TypeError('Expected "boolean" but received "' + typeof obj_enableModeration + '" (at "' + path_enableModeration + '")');
|
|
1539
|
+
}
|
|
1540
|
+
})();
|
|
1541
|
+
return v_error === undefined ? null : v_error;
|
|
1542
|
+
}
|
|
1543
|
+
const select$4 = function EinsteinPromptTemplateMaskSettingsRepresentationSelect() {
|
|
1544
|
+
return {
|
|
1545
|
+
kind: 'Fragment',
|
|
1546
|
+
version: VERSION$3,
|
|
1547
|
+
private: [],
|
|
1548
|
+
selections: [
|
|
1549
|
+
{
|
|
1550
|
+
name: 'enableModeration',
|
|
1551
|
+
kind: 'Scalar'
|
|
1552
|
+
}
|
|
1553
|
+
]
|
|
1554
|
+
};
|
|
1555
|
+
};
|
|
1556
|
+
function equals$3(existing, incoming) {
|
|
1557
|
+
const existing_enableModeration = existing.enableModeration;
|
|
1558
|
+
const incoming_enableModeration = incoming.enableModeration;
|
|
1559
|
+
if (!(existing_enableModeration === incoming_enableModeration)) {
|
|
1560
|
+
return false;
|
|
1561
|
+
}
|
|
1562
|
+
return true;
|
|
1563
|
+
}
|
|
1564
|
+
|
|
1565
|
+
const VERSION$2 = "92ad1abd0e2a60bc36941409cadda7e2";
|
|
1566
|
+
function validate$2(obj, path = 'EinsteinPromptTemplateMaskContentRepresentation') {
|
|
1567
|
+
const v_error = (() => {
|
|
1568
|
+
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
1569
|
+
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
1570
|
+
}
|
|
1571
|
+
const obj_content = obj.content;
|
|
1572
|
+
const path_content = path + '.content';
|
|
1573
|
+
if (typeof obj_content !== 'string') {
|
|
1574
|
+
return new TypeError('Expected "string" but received "' + typeof obj_content + '" (at "' + path_content + '")');
|
|
1575
|
+
}
|
|
1576
|
+
if (obj.moderationSettings !== undefined) {
|
|
1577
|
+
const obj_moderationSettings = obj.moderationSettings;
|
|
1578
|
+
const path_moderationSettings = path + '.moderationSettings';
|
|
1579
|
+
let obj_moderationSettings_union0 = null;
|
|
1580
|
+
const obj_moderationSettings_union0_error = (() => {
|
|
1581
|
+
const referencepath_moderationSettingsValidationError = validate$3(obj_moderationSettings, path_moderationSettings);
|
|
1582
|
+
if (referencepath_moderationSettingsValidationError !== null) {
|
|
1583
|
+
let message = 'Object doesn\'t match EinsteinPromptTemplateMaskSettingsRepresentation (at "' + path_moderationSettings + '")\n';
|
|
1584
|
+
message += referencepath_moderationSettingsValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
1585
|
+
return new TypeError(message);
|
|
1586
|
+
}
|
|
1587
|
+
})();
|
|
1588
|
+
if (obj_moderationSettings_union0_error != null) {
|
|
1589
|
+
obj_moderationSettings_union0 = obj_moderationSettings_union0_error.message;
|
|
1590
|
+
}
|
|
1591
|
+
let obj_moderationSettings_union1 = null;
|
|
1592
|
+
const obj_moderationSettings_union1_error = (() => {
|
|
1593
|
+
if (obj_moderationSettings !== null) {
|
|
1594
|
+
return new TypeError('Expected "null" but received "' + typeof obj_moderationSettings + '" (at "' + path_moderationSettings + '")');
|
|
1595
|
+
}
|
|
1596
|
+
})();
|
|
1597
|
+
if (obj_moderationSettings_union1_error != null) {
|
|
1598
|
+
obj_moderationSettings_union1 = obj_moderationSettings_union1_error.message;
|
|
1599
|
+
}
|
|
1600
|
+
if (obj_moderationSettings_union0 && obj_moderationSettings_union1) {
|
|
1601
|
+
let message = 'Object doesn\'t match union (at "' + path_moderationSettings + '")';
|
|
1602
|
+
message += '\n' + obj_moderationSettings_union0.split('\n').map((line) => '\t' + line).join('\n');
|
|
1603
|
+
message += '\n' + obj_moderationSettings_union1.split('\n').map((line) => '\t' + line).join('\n');
|
|
1604
|
+
return new TypeError(message);
|
|
1605
|
+
}
|
|
1606
|
+
}
|
|
1607
|
+
if (obj.role !== undefined) {
|
|
1608
|
+
const obj_role = obj.role;
|
|
1609
|
+
const path_role = path + '.role';
|
|
1610
|
+
if (typeof obj_role !== 'string') {
|
|
1611
|
+
return new TypeError('Expected "string" but received "' + typeof obj_role + '" (at "' + path_role + '")');
|
|
1612
|
+
}
|
|
1613
|
+
}
|
|
1614
|
+
})();
|
|
1615
|
+
return v_error === undefined ? null : v_error;
|
|
1616
|
+
}
|
|
1617
|
+
const select$3 = function EinsteinPromptTemplateMaskContentRepresentationSelect() {
|
|
1618
|
+
const { selections: EinsteinPromptTemplateMaskSettingsRepresentation__selections, opaque: EinsteinPromptTemplateMaskSettingsRepresentation__opaque, } = select$4();
|
|
1619
|
+
return {
|
|
1620
|
+
kind: 'Fragment',
|
|
1621
|
+
version: VERSION$2,
|
|
1622
|
+
private: [],
|
|
1623
|
+
selections: [
|
|
1624
|
+
{
|
|
1625
|
+
name: 'content',
|
|
1626
|
+
kind: 'Scalar'
|
|
1627
|
+
},
|
|
1628
|
+
{
|
|
1629
|
+
name: 'moderationSettings',
|
|
1630
|
+
kind: 'Object',
|
|
1631
|
+
nullable: true,
|
|
1632
|
+
selections: EinsteinPromptTemplateMaskSettingsRepresentation__selections,
|
|
1633
|
+
required: false
|
|
1634
|
+
},
|
|
1635
|
+
{
|
|
1636
|
+
name: 'role',
|
|
1637
|
+
kind: 'Scalar',
|
|
1638
|
+
required: false
|
|
1639
|
+
}
|
|
1640
|
+
]
|
|
1641
|
+
};
|
|
1642
|
+
};
|
|
1643
|
+
function equals$2(existing, incoming) {
|
|
1644
|
+
const existing_content = existing.content;
|
|
1645
|
+
const incoming_content = incoming.content;
|
|
1646
|
+
if (!(existing_content === incoming_content)) {
|
|
1647
|
+
return false;
|
|
1648
|
+
}
|
|
1649
|
+
const existing_role = existing.role;
|
|
1650
|
+
const incoming_role = incoming.role;
|
|
1651
|
+
// if at least one of these optionals is defined
|
|
1652
|
+
if (existing_role !== undefined || incoming_role !== undefined) {
|
|
1653
|
+
// if one of these is not defined we know the other is defined and therefore
|
|
1654
|
+
// not equal
|
|
1655
|
+
if (existing_role === undefined || incoming_role === undefined) {
|
|
1656
|
+
return false;
|
|
1657
|
+
}
|
|
1658
|
+
if (!(existing_role === incoming_role)) {
|
|
1659
|
+
return false;
|
|
1660
|
+
}
|
|
1661
|
+
}
|
|
1662
|
+
const existing_moderationSettings = existing.moderationSettings;
|
|
1663
|
+
const incoming_moderationSettings = incoming.moderationSettings;
|
|
1664
|
+
// if at least one of these optionals is defined
|
|
1665
|
+
if (existing_moderationSettings !== undefined || incoming_moderationSettings !== undefined) {
|
|
1666
|
+
// if one of these is not defined we know the other is defined and therefore
|
|
1667
|
+
// not equal
|
|
1668
|
+
if (existing_moderationSettings === undefined || incoming_moderationSettings === undefined) {
|
|
1669
|
+
return false;
|
|
1670
|
+
}
|
|
1671
|
+
if (!(existing_moderationSettings === incoming_moderationSettings
|
|
1672
|
+
|| (existing_moderationSettings != null &&
|
|
1673
|
+
incoming_moderationSettings != null &&
|
|
1674
|
+
equals$3(existing_moderationSettings, incoming_moderationSettings)))) {
|
|
1675
|
+
return false;
|
|
1676
|
+
}
|
|
1677
|
+
}
|
|
1678
|
+
return true;
|
|
1679
|
+
}
|
|
1680
|
+
|
|
1681
|
+
const VERSION$1 = "507a815605f8d30ae9b52b0ec513d25e";
|
|
1682
|
+
function validate$1(obj, path = 'EinsteinPromptTemplateMaskDataRepresentation') {
|
|
1683
|
+
const v_error = (() => {
|
|
1684
|
+
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
1685
|
+
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
1686
|
+
}
|
|
1687
|
+
const obj_originalValue = obj.originalValue;
|
|
1688
|
+
const path_originalValue = path + '.originalValue';
|
|
1689
|
+
if (typeof obj_originalValue !== 'string') {
|
|
1690
|
+
return new TypeError('Expected "string" but received "' + typeof obj_originalValue + '" (at "' + path_originalValue + '")');
|
|
1691
|
+
}
|
|
1692
|
+
const obj_placeHolder = obj.placeHolder;
|
|
1693
|
+
const path_placeHolder = path + '.placeHolder';
|
|
1694
|
+
if (typeof obj_placeHolder !== 'string') {
|
|
1695
|
+
return new TypeError('Expected "string" but received "' + typeof obj_placeHolder + '" (at "' + path_placeHolder + '")');
|
|
1696
|
+
}
|
|
1697
|
+
const obj_recognizers = obj.recognizers;
|
|
1698
|
+
const path_recognizers = path + '.recognizers';
|
|
1699
|
+
if (!ArrayIsArray(obj_recognizers)) {
|
|
1700
|
+
return new TypeError('Expected "array" but received "' + typeof obj_recognizers + '" (at "' + path_recognizers + '")');
|
|
1701
|
+
}
|
|
1702
|
+
for (let i = 0; i < obj_recognizers.length; i++) {
|
|
1703
|
+
const obj_recognizers_item = obj_recognizers[i];
|
|
1704
|
+
const path_recognizers_item = path_recognizers + '[' + i + ']';
|
|
1705
|
+
if (typeof obj_recognizers_item !== 'string') {
|
|
1706
|
+
return new TypeError('Expected "string" but received "' + typeof obj_recognizers_item + '" (at "' + path_recognizers_item + '")');
|
|
1707
|
+
}
|
|
1708
|
+
}
|
|
1709
|
+
})();
|
|
1710
|
+
return v_error === undefined ? null : v_error;
|
|
1711
|
+
}
|
|
1712
|
+
const select$2 = function EinsteinPromptTemplateMaskDataRepresentationSelect() {
|
|
1713
|
+
return {
|
|
1714
|
+
kind: 'Fragment',
|
|
1715
|
+
version: VERSION$1,
|
|
1716
|
+
private: [],
|
|
1717
|
+
selections: [
|
|
1718
|
+
{
|
|
1719
|
+
name: 'originalValue',
|
|
1720
|
+
kind: 'Scalar'
|
|
1721
|
+
},
|
|
1722
|
+
{
|
|
1723
|
+
name: 'placeHolder',
|
|
1724
|
+
kind: 'Scalar'
|
|
1725
|
+
},
|
|
1726
|
+
{
|
|
1727
|
+
name: 'recognizers',
|
|
1728
|
+
kind: 'Scalar',
|
|
1729
|
+
plural: true
|
|
1730
|
+
}
|
|
1731
|
+
]
|
|
1732
|
+
};
|
|
1733
|
+
};
|
|
1734
|
+
function equals$1(existing, incoming) {
|
|
1735
|
+
const existing_originalValue = existing.originalValue;
|
|
1736
|
+
const incoming_originalValue = incoming.originalValue;
|
|
1737
|
+
if (!(existing_originalValue === incoming_originalValue)) {
|
|
1738
|
+
return false;
|
|
1739
|
+
}
|
|
1740
|
+
const existing_placeHolder = existing.placeHolder;
|
|
1741
|
+
const incoming_placeHolder = incoming.placeHolder;
|
|
1742
|
+
if (!(existing_placeHolder === incoming_placeHolder)) {
|
|
1743
|
+
return false;
|
|
1744
|
+
}
|
|
1745
|
+
const existing_recognizers = existing.recognizers;
|
|
1746
|
+
const incoming_recognizers = incoming.recognizers;
|
|
1747
|
+
const equals_recognizers_items = equalsArray(existing_recognizers, incoming_recognizers, (existing_recognizers_item, incoming_recognizers_item) => {
|
|
1748
|
+
if (!(existing_recognizers_item === incoming_recognizers_item)) {
|
|
1749
|
+
return false;
|
|
1750
|
+
}
|
|
1751
|
+
});
|
|
1752
|
+
if (equals_recognizers_items === false) {
|
|
1753
|
+
return false;
|
|
1754
|
+
}
|
|
1755
|
+
return true;
|
|
1756
|
+
}
|
|
1757
|
+
|
|
886
1758
|
const TTL = 100;
|
|
887
|
-
const VERSION = "
|
|
1759
|
+
const VERSION = "af7cfa8bd9d9cdd1923263da1734499c";
|
|
888
1760
|
function validate(obj, path = 'EinsteinPromptTemplateGenerationsRepresentation') {
|
|
889
1761
|
const v_error = (() => {
|
|
890
1762
|
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
891
1763
|
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
892
1764
|
}
|
|
1765
|
+
if (obj.generationErrors !== undefined) {
|
|
1766
|
+
const obj_generationErrors = obj.generationErrors;
|
|
1767
|
+
const path_generationErrors = path + '.generationErrors';
|
|
1768
|
+
if (!ArrayIsArray(obj_generationErrors)) {
|
|
1769
|
+
return new TypeError('Expected "array" but received "' + typeof obj_generationErrors + '" (at "' + path_generationErrors + '")');
|
|
1770
|
+
}
|
|
1771
|
+
for (let i = 0; i < obj_generationErrors.length; i++) {
|
|
1772
|
+
const obj_generationErrors_item = obj_generationErrors[i];
|
|
1773
|
+
const path_generationErrors_item = path_generationErrors + '[' + i + ']';
|
|
1774
|
+
const referencepath_generationErrors_itemValidationError = validate$4(obj_generationErrors_item, path_generationErrors_item);
|
|
1775
|
+
if (referencepath_generationErrors_itemValidationError !== null) {
|
|
1776
|
+
let message = 'Object doesn\'t match EinsteinPromptTemplateGenerationsErrorRepresentation (at "' + path_generationErrors_item + '")\n';
|
|
1777
|
+
message += referencepath_generationErrors_itemValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
1778
|
+
return new TypeError(message);
|
|
1779
|
+
}
|
|
1780
|
+
}
|
|
1781
|
+
}
|
|
893
1782
|
const obj_generations = obj.generations;
|
|
894
1783
|
const path_generations = path + '.generations';
|
|
895
1784
|
if (!ArrayIsArray(obj_generations)) {
|
|
@@ -898,7 +1787,7 @@ function validate(obj, path = 'EinsteinPromptTemplateGenerationsRepresentation')
|
|
|
898
1787
|
for (let i = 0; i < obj_generations.length; i++) {
|
|
899
1788
|
const obj_generations_item = obj_generations[i];
|
|
900
1789
|
const path_generations_item = path_generations + '[' + i + ']';
|
|
901
|
-
const referencepath_generations_itemValidationError = validate$
|
|
1790
|
+
const referencepath_generations_itemValidationError = validate$9(obj_generations_item, path_generations_item);
|
|
902
1791
|
if (referencepath_generations_itemValidationError !== null) {
|
|
903
1792
|
let message = 'Object doesn\'t match EinsteinLlmGenerationItemRepresentation (at "' + path_generations_item + '")\n';
|
|
904
1793
|
message += referencepath_generations_itemValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
@@ -909,7 +1798,7 @@ function validate(obj, path = 'EinsteinPromptTemplateGenerationsRepresentation')
|
|
|
909
1798
|
const path_parameters = path + '.parameters';
|
|
910
1799
|
let obj_parameters_union0 = null;
|
|
911
1800
|
const obj_parameters_union0_error = (() => {
|
|
912
|
-
const referencepath_parametersValidationError = validate$
|
|
1801
|
+
const referencepath_parametersValidationError = validate$8(obj_parameters, path_parameters);
|
|
913
1802
|
if (referencepath_parametersValidationError !== null) {
|
|
914
1803
|
let message = 'Object doesn\'t match WrappedMap (at "' + path_parameters + '")\n';
|
|
915
1804
|
message += referencepath_parametersValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
@@ -970,6 +1859,57 @@ function validate(obj, path = 'EinsteinPromptTemplateGenerationsRepresentation')
|
|
|
970
1859
|
if (typeof obj_requestId !== 'string') {
|
|
971
1860
|
return new TypeError('Expected "string" but received "' + typeof obj_requestId + '" (at "' + path_requestId + '")');
|
|
972
1861
|
}
|
|
1862
|
+
if (obj.requestMessages !== undefined) {
|
|
1863
|
+
const obj_requestMessages = obj.requestMessages;
|
|
1864
|
+
const path_requestMessages = path + '.requestMessages';
|
|
1865
|
+
if (!ArrayIsArray(obj_requestMessages)) {
|
|
1866
|
+
return new TypeError('Expected "array" but received "' + typeof obj_requestMessages + '" (at "' + path_requestMessages + '")');
|
|
1867
|
+
}
|
|
1868
|
+
for (let i = 0; i < obj_requestMessages.length; i++) {
|
|
1869
|
+
const obj_requestMessages_item = obj_requestMessages[i];
|
|
1870
|
+
const path_requestMessages_item = path_requestMessages + '[' + i + ']';
|
|
1871
|
+
const referencepath_requestMessages_itemValidationError = validate$2(obj_requestMessages_item, path_requestMessages_item);
|
|
1872
|
+
if (referencepath_requestMessages_itemValidationError !== null) {
|
|
1873
|
+
let message = 'Object doesn\'t match EinsteinPromptTemplateMaskContentRepresentation (at "' + path_requestMessages_item + '")\n';
|
|
1874
|
+
message += referencepath_requestMessages_itemValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
1875
|
+
return new TypeError(message);
|
|
1876
|
+
}
|
|
1877
|
+
}
|
|
1878
|
+
}
|
|
1879
|
+
if (obj.responseMessages !== undefined) {
|
|
1880
|
+
const obj_responseMessages = obj.responseMessages;
|
|
1881
|
+
const path_responseMessages = path + '.responseMessages';
|
|
1882
|
+
if (!ArrayIsArray(obj_responseMessages)) {
|
|
1883
|
+
return new TypeError('Expected "array" but received "' + typeof obj_responseMessages + '" (at "' + path_responseMessages + '")');
|
|
1884
|
+
}
|
|
1885
|
+
for (let i = 0; i < obj_responseMessages.length; i++) {
|
|
1886
|
+
const obj_responseMessages_item = obj_responseMessages[i];
|
|
1887
|
+
const path_responseMessages_item = path_responseMessages + '[' + i + ']';
|
|
1888
|
+
const referencepath_responseMessages_itemValidationError = validate$2(obj_responseMessages_item, path_responseMessages_item);
|
|
1889
|
+
if (referencepath_responseMessages_itemValidationError !== null) {
|
|
1890
|
+
let message = 'Object doesn\'t match EinsteinPromptTemplateMaskContentRepresentation (at "' + path_responseMessages_item + '")\n';
|
|
1891
|
+
message += referencepath_responseMessages_itemValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
1892
|
+
return new TypeError(message);
|
|
1893
|
+
}
|
|
1894
|
+
}
|
|
1895
|
+
}
|
|
1896
|
+
if (obj.slotsMaskingInformation !== undefined) {
|
|
1897
|
+
const obj_slotsMaskingInformation = obj.slotsMaskingInformation;
|
|
1898
|
+
const path_slotsMaskingInformation = path + '.slotsMaskingInformation';
|
|
1899
|
+
if (!ArrayIsArray(obj_slotsMaskingInformation)) {
|
|
1900
|
+
return new TypeError('Expected "array" but received "' + typeof obj_slotsMaskingInformation + '" (at "' + path_slotsMaskingInformation + '")');
|
|
1901
|
+
}
|
|
1902
|
+
for (let i = 0; i < obj_slotsMaskingInformation.length; i++) {
|
|
1903
|
+
const obj_slotsMaskingInformation_item = obj_slotsMaskingInformation[i];
|
|
1904
|
+
const path_slotsMaskingInformation_item = path_slotsMaskingInformation + '[' + i + ']';
|
|
1905
|
+
const referencepath_slotsMaskingInformation_itemValidationError = validate$1(obj_slotsMaskingInformation_item, path_slotsMaskingInformation_item);
|
|
1906
|
+
if (referencepath_slotsMaskingInformation_itemValidationError !== null) {
|
|
1907
|
+
let message = 'Object doesn\'t match EinsteinPromptTemplateMaskDataRepresentation (at "' + path_slotsMaskingInformation_item + '")\n';
|
|
1908
|
+
message += referencepath_slotsMaskingInformation_itemValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
1909
|
+
return new TypeError(message);
|
|
1910
|
+
}
|
|
1911
|
+
}
|
|
1912
|
+
}
|
|
973
1913
|
})();
|
|
974
1914
|
return v_error === undefined ? null : v_error;
|
|
975
1915
|
}
|
|
@@ -987,13 +1927,23 @@ function normalize(input, existing, path, luvio, store, timestamp) {
|
|
|
987
1927
|
return input;
|
|
988
1928
|
}
|
|
989
1929
|
const select$1 = function EinsteinPromptTemplateGenerationsRepresentationSelect() {
|
|
990
|
-
const { selections:
|
|
991
|
-
const { selections:
|
|
1930
|
+
const { selections: EinsteinPromptTemplateGenerationsErrorRepresentation__selections, opaque: EinsteinPromptTemplateGenerationsErrorRepresentation__opaque, } = select$5();
|
|
1931
|
+
const { selections: EinsteinLlmGenerationItemRepresentation__selections, opaque: EinsteinLlmGenerationItemRepresentation__opaque, } = select$9();
|
|
1932
|
+
const { selections: WrappedMap__selections, opaque: WrappedMap__opaque, } = select$8();
|
|
1933
|
+
const { selections: EinsteinPromptTemplateMaskContentRepresentation__selections, opaque: EinsteinPromptTemplateMaskContentRepresentation__opaque, } = select$3();
|
|
1934
|
+
const { selections: EinsteinPromptTemplateMaskDataRepresentation__selections, opaque: EinsteinPromptTemplateMaskDataRepresentation__opaque, } = select$2();
|
|
992
1935
|
return {
|
|
993
1936
|
kind: 'Fragment',
|
|
994
1937
|
version: VERSION,
|
|
995
1938
|
private: [],
|
|
996
1939
|
selections: [
|
|
1940
|
+
{
|
|
1941
|
+
name: 'generationErrors',
|
|
1942
|
+
kind: 'Object',
|
|
1943
|
+
plural: true,
|
|
1944
|
+
selections: EinsteinPromptTemplateGenerationsErrorRepresentation__selections,
|
|
1945
|
+
required: false
|
|
1946
|
+
},
|
|
997
1947
|
{
|
|
998
1948
|
name: 'generations',
|
|
999
1949
|
kind: 'Object',
|
|
@@ -1017,6 +1967,27 @@ const select$1 = function EinsteinPromptTemplateGenerationsRepresentationSelect(
|
|
|
1017
1967
|
{
|
|
1018
1968
|
name: 'requestId',
|
|
1019
1969
|
kind: 'Scalar'
|
|
1970
|
+
},
|
|
1971
|
+
{
|
|
1972
|
+
name: 'requestMessages',
|
|
1973
|
+
kind: 'Object',
|
|
1974
|
+
plural: true,
|
|
1975
|
+
selections: EinsteinPromptTemplateMaskContentRepresentation__selections,
|
|
1976
|
+
required: false
|
|
1977
|
+
},
|
|
1978
|
+
{
|
|
1979
|
+
name: 'responseMessages',
|
|
1980
|
+
kind: 'Object',
|
|
1981
|
+
plural: true,
|
|
1982
|
+
selections: EinsteinPromptTemplateMaskContentRepresentation__selections,
|
|
1983
|
+
required: false
|
|
1984
|
+
},
|
|
1985
|
+
{
|
|
1986
|
+
name: 'slotsMaskingInformation',
|
|
1987
|
+
kind: 'Object',
|
|
1988
|
+
plural: true,
|
|
1989
|
+
selections: EinsteinPromptTemplateMaskDataRepresentation__selections,
|
|
1990
|
+
required: false
|
|
1020
1991
|
}
|
|
1021
1992
|
]
|
|
1022
1993
|
};
|
|
@@ -1032,10 +2003,28 @@ function equals(existing, incoming) {
|
|
|
1032
2003
|
if (!(existing_requestId === incoming_requestId)) {
|
|
1033
2004
|
return false;
|
|
1034
2005
|
}
|
|
2006
|
+
const existing_generationErrors = existing.generationErrors;
|
|
2007
|
+
const incoming_generationErrors = incoming.generationErrors;
|
|
2008
|
+
// if at least one of these optionals is defined
|
|
2009
|
+
if (existing_generationErrors !== undefined || incoming_generationErrors !== undefined) {
|
|
2010
|
+
// if one of these is not defined we know the other is defined and therefore
|
|
2011
|
+
// not equal
|
|
2012
|
+
if (existing_generationErrors === undefined || incoming_generationErrors === undefined) {
|
|
2013
|
+
return false;
|
|
2014
|
+
}
|
|
2015
|
+
const equals_generationErrors_items = equalsArray(existing_generationErrors, incoming_generationErrors, (existing_generationErrors_item, incoming_generationErrors_item) => {
|
|
2016
|
+
if (!(equals$4(existing_generationErrors_item, incoming_generationErrors_item))) {
|
|
2017
|
+
return false;
|
|
2018
|
+
}
|
|
2019
|
+
});
|
|
2020
|
+
if (equals_generationErrors_items === false) {
|
|
2021
|
+
return false;
|
|
2022
|
+
}
|
|
2023
|
+
}
|
|
1035
2024
|
const existing_generations = existing.generations;
|
|
1036
2025
|
const incoming_generations = incoming.generations;
|
|
1037
2026
|
const equals_generations_items = equalsArray(existing_generations, incoming_generations, (existing_generations_item, incoming_generations_item) => {
|
|
1038
|
-
if (!(equals$
|
|
2027
|
+
if (!(equals$7(existing_generations_item, incoming_generations_item))) {
|
|
1039
2028
|
return false;
|
|
1040
2029
|
}
|
|
1041
2030
|
});
|
|
@@ -1047,7 +2036,7 @@ function equals(existing, incoming) {
|
|
|
1047
2036
|
if (!(existing_parameters === incoming_parameters
|
|
1048
2037
|
|| (existing_parameters != null &&
|
|
1049
2038
|
incoming_parameters != null &&
|
|
1050
|
-
equals$
|
|
2039
|
+
equals$6(existing_parameters, incoming_parameters)))) {
|
|
1051
2040
|
return false;
|
|
1052
2041
|
}
|
|
1053
2042
|
const existing_prompt = existing.prompt;
|
|
@@ -1055,6 +2044,60 @@ function equals(existing, incoming) {
|
|
|
1055
2044
|
if (!(existing_prompt === incoming_prompt)) {
|
|
1056
2045
|
return false;
|
|
1057
2046
|
}
|
|
2047
|
+
const existing_requestMessages = existing.requestMessages;
|
|
2048
|
+
const incoming_requestMessages = incoming.requestMessages;
|
|
2049
|
+
// if at least one of these optionals is defined
|
|
2050
|
+
if (existing_requestMessages !== undefined || incoming_requestMessages !== undefined) {
|
|
2051
|
+
// if one of these is not defined we know the other is defined and therefore
|
|
2052
|
+
// not equal
|
|
2053
|
+
if (existing_requestMessages === undefined || incoming_requestMessages === undefined) {
|
|
2054
|
+
return false;
|
|
2055
|
+
}
|
|
2056
|
+
const equals_requestMessages_items = equalsArray(existing_requestMessages, incoming_requestMessages, (existing_requestMessages_item, incoming_requestMessages_item) => {
|
|
2057
|
+
if (!(equals$2(existing_requestMessages_item, incoming_requestMessages_item))) {
|
|
2058
|
+
return false;
|
|
2059
|
+
}
|
|
2060
|
+
});
|
|
2061
|
+
if (equals_requestMessages_items === false) {
|
|
2062
|
+
return false;
|
|
2063
|
+
}
|
|
2064
|
+
}
|
|
2065
|
+
const existing_responseMessages = existing.responseMessages;
|
|
2066
|
+
const incoming_responseMessages = incoming.responseMessages;
|
|
2067
|
+
// if at least one of these optionals is defined
|
|
2068
|
+
if (existing_responseMessages !== undefined || incoming_responseMessages !== undefined) {
|
|
2069
|
+
// if one of these is not defined we know the other is defined and therefore
|
|
2070
|
+
// not equal
|
|
2071
|
+
if (existing_responseMessages === undefined || incoming_responseMessages === undefined) {
|
|
2072
|
+
return false;
|
|
2073
|
+
}
|
|
2074
|
+
const equals_responseMessages_items = equalsArray(existing_responseMessages, incoming_responseMessages, (existing_responseMessages_item, incoming_responseMessages_item) => {
|
|
2075
|
+
if (!(equals$2(existing_responseMessages_item, incoming_responseMessages_item))) {
|
|
2076
|
+
return false;
|
|
2077
|
+
}
|
|
2078
|
+
});
|
|
2079
|
+
if (equals_responseMessages_items === false) {
|
|
2080
|
+
return false;
|
|
2081
|
+
}
|
|
2082
|
+
}
|
|
2083
|
+
const existing_slotsMaskingInformation = existing.slotsMaskingInformation;
|
|
2084
|
+
const incoming_slotsMaskingInformation = incoming.slotsMaskingInformation;
|
|
2085
|
+
// if at least one of these optionals is defined
|
|
2086
|
+
if (existing_slotsMaskingInformation !== undefined || incoming_slotsMaskingInformation !== undefined) {
|
|
2087
|
+
// if one of these is not defined we know the other is defined and therefore
|
|
2088
|
+
// not equal
|
|
2089
|
+
if (existing_slotsMaskingInformation === undefined || incoming_slotsMaskingInformation === undefined) {
|
|
2090
|
+
return false;
|
|
2091
|
+
}
|
|
2092
|
+
const equals_slotsMaskingInformation_items = equalsArray(existing_slotsMaskingInformation, incoming_slotsMaskingInformation, (existing_slotsMaskingInformation_item, incoming_slotsMaskingInformation_item) => {
|
|
2093
|
+
if (!(equals$1(existing_slotsMaskingInformation_item, incoming_slotsMaskingInformation_item))) {
|
|
2094
|
+
return false;
|
|
2095
|
+
}
|
|
2096
|
+
});
|
|
2097
|
+
if (equals_slotsMaskingInformation_items === false) {
|
|
2098
|
+
return false;
|
|
2099
|
+
}
|
|
2100
|
+
}
|
|
1058
2101
|
return true;
|
|
1059
2102
|
}
|
|
1060
2103
|
const ingest = function EinsteinPromptTemplateGenerationsRepresentationIngest(input, path, luvio, store, timestamp) {
|
|
@@ -1128,7 +2171,7 @@ function typeCheckConfig(untrustedConfig) {
|
|
|
1128
2171
|
const config = {};
|
|
1129
2172
|
typeCheckConfig$3(untrustedConfig, config, createGenerationsForPromptTemplate_ConfigPropertyMetadata);
|
|
1130
2173
|
const untrustedConfig_promptTemplateGenerationsInput = untrustedConfig.promptTemplateGenerationsInput;
|
|
1131
|
-
const referenceEinsteinPromptTemplateGenerationsInputRepresentationValidationError = validate$
|
|
2174
|
+
const referenceEinsteinPromptTemplateGenerationsInputRepresentationValidationError = validate$5(untrustedConfig_promptTemplateGenerationsInput);
|
|
1132
2175
|
if (referenceEinsteinPromptTemplateGenerationsInputRepresentationValidationError === null) {
|
|
1133
2176
|
config.promptTemplateGenerationsInput = untrustedConfig_promptTemplateGenerationsInput;
|
|
1134
2177
|
}
|
|
@@ -1200,4 +2243,4 @@ withDefaultLuvio((luvio) => {
|
|
|
1200
2243
|
});
|
|
1201
2244
|
|
|
1202
2245
|
export { createFeedback, createGenerations, createGenerationsForPromptTemplate };
|
|
1203
|
-
// version: 1.287.0-
|
|
2246
|
+
// version: 1.287.0-dev11-a463417190
|