@salesforce/lds-adapters-service-einsteinllm 1.354.0-dev22 → 1.354.0-dev24
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 +392 -124
- package/dist/es/es2018/types/src/generated/types/EinsteinLlmGenerationCitationRepresentation.d.ts +29 -0
- package/dist/es/es2018/types/src/generated/types/EinsteinLlmGenerationGenAiCitedReferenceRepresentation.d.ts +40 -0
- package/dist/es/es2018/types/src/generated/types/EinsteinPromptTemplateGenerationsRepresentation.d.ts +4 -1
- package/package.json +4 -4
- package/sfdc/index.js +365 -97
- package/src/raml/api.raml +43 -0
package/sfdc/index.js
CHANGED
|
@@ -178,7 +178,7 @@ function createLink(ref) {
|
|
|
178
178
|
};
|
|
179
179
|
}
|
|
180
180
|
|
|
181
|
-
function validate$
|
|
181
|
+
function validate$u(obj, path = 'EinsteinLlmEmbeddingsAdditionalConfigInputRepresentation') {
|
|
182
182
|
const v_error = (() => {
|
|
183
183
|
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
184
184
|
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
@@ -222,7 +222,7 @@ function validate$s(obj, path = 'EinsteinLlmEmbeddingsAdditionalConfigInputRepre
|
|
|
222
222
|
return v_error === undefined ? null : v_error;
|
|
223
223
|
}
|
|
224
224
|
|
|
225
|
-
function validate$
|
|
225
|
+
function validate$t(obj, path = 'WrappedListString') {
|
|
226
226
|
const v_error = (() => {
|
|
227
227
|
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
228
228
|
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
@@ -243,14 +243,14 @@ function validate$r(obj, path = 'WrappedListString') {
|
|
|
243
243
|
return v_error === undefined ? null : v_error;
|
|
244
244
|
}
|
|
245
245
|
|
|
246
|
-
function validate$
|
|
246
|
+
function validate$s(obj, path = 'EinsteinLlmEmbeddingsInputRepresentation') {
|
|
247
247
|
const v_error = (() => {
|
|
248
248
|
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
249
249
|
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
250
250
|
}
|
|
251
251
|
const obj_additionalConfig = obj.additionalConfig;
|
|
252
252
|
const path_additionalConfig = path + '.additionalConfig';
|
|
253
|
-
const referencepath_additionalConfigValidationError = validate$
|
|
253
|
+
const referencepath_additionalConfigValidationError = validate$u(obj_additionalConfig, path_additionalConfig);
|
|
254
254
|
if (referencepath_additionalConfigValidationError !== null) {
|
|
255
255
|
let message = 'Object doesn\'t match EinsteinLlmEmbeddingsAdditionalConfigInputRepresentation (at "' + path_additionalConfig + '")\n';
|
|
256
256
|
message += referencepath_additionalConfigValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
@@ -258,7 +258,7 @@ function validate$q(obj, path = 'EinsteinLlmEmbeddingsInputRepresentation') {
|
|
|
258
258
|
}
|
|
259
259
|
const obj_prompts = obj.prompts;
|
|
260
260
|
const path_prompts = path + '.prompts';
|
|
261
|
-
const referencepath_promptsValidationError = validate$
|
|
261
|
+
const referencepath_promptsValidationError = validate$t(obj_prompts, path_prompts);
|
|
262
262
|
if (referencepath_promptsValidationError !== null) {
|
|
263
263
|
let message = 'Object doesn\'t match WrappedListString (at "' + path_prompts + '")\n';
|
|
264
264
|
message += referencepath_promptsValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
@@ -275,8 +275,8 @@ function validate$q(obj, path = 'EinsteinLlmEmbeddingsInputRepresentation') {
|
|
|
275
275
|
return v_error === undefined ? null : v_error;
|
|
276
276
|
}
|
|
277
277
|
|
|
278
|
-
const VERSION$
|
|
279
|
-
function validate$
|
|
278
|
+
const VERSION$l = "5ed5ccc6fa6f15691ec0fc1080e41fe6";
|
|
279
|
+
function validate$r(obj, path = 'EinsteinLlmEmbeddingItemRepresentation') {
|
|
280
280
|
const v_error = (() => {
|
|
281
281
|
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
282
282
|
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
@@ -297,10 +297,10 @@ function validate$p(obj, path = 'EinsteinLlmEmbeddingItemRepresentation') {
|
|
|
297
297
|
})();
|
|
298
298
|
return v_error === undefined ? null : v_error;
|
|
299
299
|
}
|
|
300
|
-
const select$
|
|
300
|
+
const select$s = function EinsteinLlmEmbeddingItemRepresentationSelect() {
|
|
301
301
|
return {
|
|
302
302
|
kind: 'Fragment',
|
|
303
|
-
version: VERSION$
|
|
303
|
+
version: VERSION$l,
|
|
304
304
|
private: [],
|
|
305
305
|
selections: [
|
|
306
306
|
{
|
|
@@ -315,7 +315,7 @@ const select$q = function EinsteinLlmEmbeddingItemRepresentationSelect() {
|
|
|
315
315
|
]
|
|
316
316
|
};
|
|
317
317
|
};
|
|
318
|
-
function equals$
|
|
318
|
+
function equals$l(existing, incoming) {
|
|
319
319
|
const existing_index = existing.index;
|
|
320
320
|
const incoming_index = incoming.index;
|
|
321
321
|
if (!(existing_index === incoming_index)) {
|
|
@@ -335,8 +335,8 @@ function equals$j(existing, incoming) {
|
|
|
335
335
|
}
|
|
336
336
|
|
|
337
337
|
const TTL$6 = 100;
|
|
338
|
-
const VERSION$
|
|
339
|
-
function validate$
|
|
338
|
+
const VERSION$k = "d9873651f09d29764ef4d4231eb653d7";
|
|
339
|
+
function validate$q(obj, path = 'EinsteinLlmEmbeddingsRepresentation') {
|
|
340
340
|
const v_error = (() => {
|
|
341
341
|
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
342
342
|
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
@@ -349,7 +349,7 @@ function validate$o(obj, path = 'EinsteinLlmEmbeddingsRepresentation') {
|
|
|
349
349
|
for (let i = 0; i < obj_embeddings.length; i++) {
|
|
350
350
|
const obj_embeddings_item = obj_embeddings[i];
|
|
351
351
|
const path_embeddings_item = path_embeddings + '[' + i + ']';
|
|
352
|
-
const referencepath_embeddings_itemValidationError = validate$
|
|
352
|
+
const referencepath_embeddings_itemValidationError = validate$r(obj_embeddings_item, path_embeddings_item);
|
|
353
353
|
if (referencepath_embeddings_itemValidationError !== null) {
|
|
354
354
|
let message = 'Object doesn\'t match EinsteinLlmEmbeddingItemRepresentation (at "' + path_embeddings_item + '")\n';
|
|
355
355
|
message += referencepath_embeddings_itemValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
@@ -377,11 +377,11 @@ const RepresentationType$6 = 'EinsteinLlmEmbeddingsRepresentation';
|
|
|
377
377
|
function normalize$6(input, existing, path, luvio, store, timestamp) {
|
|
378
378
|
return input;
|
|
379
379
|
}
|
|
380
|
-
const select$
|
|
381
|
-
const { selections: EinsteinLlmEmbeddingItemRepresentation__selections, opaque: EinsteinLlmEmbeddingItemRepresentation__opaque, } = select$
|
|
380
|
+
const select$r = function EinsteinLlmEmbeddingsRepresentationSelect() {
|
|
381
|
+
const { selections: EinsteinLlmEmbeddingItemRepresentation__selections, opaque: EinsteinLlmEmbeddingItemRepresentation__opaque, } = select$s();
|
|
382
382
|
return {
|
|
383
383
|
kind: 'Fragment',
|
|
384
|
-
version: VERSION$
|
|
384
|
+
version: VERSION$k,
|
|
385
385
|
private: [],
|
|
386
386
|
selections: [
|
|
387
387
|
{
|
|
@@ -398,11 +398,11 @@ const select$p = function EinsteinLlmEmbeddingsRepresentationSelect() {
|
|
|
398
398
|
]
|
|
399
399
|
};
|
|
400
400
|
};
|
|
401
|
-
function equals$
|
|
401
|
+
function equals$k(existing, incoming) {
|
|
402
402
|
const existing_embeddings = existing.embeddings;
|
|
403
403
|
const incoming_embeddings = incoming.embeddings;
|
|
404
404
|
const equals_embeddings_items = equalsArray(existing_embeddings, incoming_embeddings, (existing_embeddings_item, incoming_embeddings_item) => {
|
|
405
|
-
if (!(equals$
|
|
405
|
+
if (!(equals$l(existing_embeddings_item, incoming_embeddings_item))) {
|
|
406
406
|
return false;
|
|
407
407
|
}
|
|
408
408
|
});
|
|
@@ -423,14 +423,14 @@ function equals$i(existing, incoming) {
|
|
|
423
423
|
}
|
|
424
424
|
const ingest$6 = function EinsteinLlmEmbeddingsRepresentationIngest(input, path, luvio, store, timestamp) {
|
|
425
425
|
if (process.env.NODE_ENV !== 'production') {
|
|
426
|
-
const validateError = validate$
|
|
426
|
+
const validateError = validate$q(input);
|
|
427
427
|
if (validateError !== null) {
|
|
428
428
|
throw validateError;
|
|
429
429
|
}
|
|
430
430
|
}
|
|
431
431
|
const key = path.fullPath;
|
|
432
432
|
const ttlToUse = TTL$6;
|
|
433
|
-
ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize$6, "EinsteinLLM", VERSION$
|
|
433
|
+
ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize$6, "EinsteinLLM", VERSION$k, RepresentationType$6, equals$k);
|
|
434
434
|
return createLink(key);
|
|
435
435
|
};
|
|
436
436
|
function getTypeCacheKeys$6(rootKeySet, luvio, input, fullPathFactory) {
|
|
@@ -443,8 +443,8 @@ function getTypeCacheKeys$6(rootKeySet, luvio, input, fullPathFactory) {
|
|
|
443
443
|
});
|
|
444
444
|
}
|
|
445
445
|
|
|
446
|
-
function select$
|
|
447
|
-
return select$
|
|
446
|
+
function select$q(luvio, params) {
|
|
447
|
+
return select$r();
|
|
448
448
|
}
|
|
449
449
|
function keyBuilder$a(luvio, params) {
|
|
450
450
|
return keyPrefix + '::EinsteinLlmEmbeddingsRepresentation:(' + stableJSONStringify(params.body.embeddingsInput.additionalConfig.additionalParameters) + '::' + 'embeddingsInput.additionalConfig.applicationName:' + params.body.embeddingsInput.additionalConfig.applicationName + '::' + (params.body.embeddingsInput.additionalConfig.enablePiiMasking === undefined ? 'embeddingsInput.additionalConfig.enablePiiMasking' : 'embeddingsInput.additionalConfig.enablePiiMasking:' + params.body.embeddingsInput.additionalConfig.enablePiiMasking) + '::' + (params.body.embeddingsInput.additionalConfig.model === undefined ? 'embeddingsInput.additionalConfig.model' : 'embeddingsInput.additionalConfig.model:' + params.body.embeddingsInput.additionalConfig.model) + '::' + 'embeddingsInput.prompts.wrappedListString:' + params.body.embeddingsInput.prompts.wrappedListString + '::' + (params.body.embeddingsInput.provider === undefined ? 'embeddingsInput.provider' : 'embeddingsInput.provider:' + params.body.embeddingsInput.provider) + ')';
|
|
@@ -458,7 +458,7 @@ function ingestSuccess$6(luvio, resourceParams, response, snapshotRefresh) {
|
|
|
458
458
|
luvio.storeIngest(key, ingest$6, body);
|
|
459
459
|
const snapshot = luvio.storeLookup({
|
|
460
460
|
recordId: key,
|
|
461
|
-
node: select$
|
|
461
|
+
node: select$q(),
|
|
462
462
|
variables: {},
|
|
463
463
|
}, snapshotRefresh);
|
|
464
464
|
if (process.env.NODE_ENV !== 'production') {
|
|
@@ -475,7 +475,7 @@ function ingestError$3(luvio, params, error, snapshotRefresh) {
|
|
|
475
475
|
const storeMetadataParams = {
|
|
476
476
|
ttl: TTL$6,
|
|
477
477
|
namespace: keyPrefix,
|
|
478
|
-
version: VERSION$
|
|
478
|
+
version: VERSION$k,
|
|
479
479
|
representationName: RepresentationType$6
|
|
480
480
|
};
|
|
481
481
|
luvio.storeIngestError(key, errorSnapshot, storeMetadataParams);
|
|
@@ -508,7 +508,7 @@ function keyBuilder$9(luvio, config) {
|
|
|
508
508
|
function typeCheckConfig$6(untrustedConfig) {
|
|
509
509
|
const config = {};
|
|
510
510
|
const untrustedConfig_embeddingsInput = untrustedConfig.embeddingsInput;
|
|
511
|
-
const referenceEinsteinLlmEmbeddingsInputRepresentationValidationError = validate$
|
|
511
|
+
const referenceEinsteinLlmEmbeddingsInputRepresentationValidationError = validate$s(untrustedConfig_embeddingsInput);
|
|
512
512
|
if (referenceEinsteinLlmEmbeddingsInputRepresentationValidationError === null) {
|
|
513
513
|
config.embeddingsInput = untrustedConfig_embeddingsInput;
|
|
514
514
|
}
|
|
@@ -529,7 +529,7 @@ function validateAdapterConfig$6(untrustedConfig, configPropertyNames) {
|
|
|
529
529
|
}
|
|
530
530
|
function adapterFragment$3(luvio, config) {
|
|
531
531
|
createResourceParams$6(config);
|
|
532
|
-
return select$
|
|
532
|
+
return select$q();
|
|
533
533
|
}
|
|
534
534
|
function onFetchResponseSuccess$3(luvio, config, resourceParams, response) {
|
|
535
535
|
const snapshot = ingestSuccess$6(luvio, resourceParams, response, {
|
|
@@ -585,7 +585,7 @@ const createEmbeddingsAdapterFactory = (luvio) => function EinsteinLLM__createEm
|
|
|
585
585
|
buildCachedSnapshotCachePolicy$3, buildNetworkSnapshotCachePolicy$3);
|
|
586
586
|
};
|
|
587
587
|
|
|
588
|
-
function validate$
|
|
588
|
+
function validate$p(obj, path = 'EinsteinLlmFeedbackInputRepresentation') {
|
|
589
589
|
const v_error = (() => {
|
|
590
590
|
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
591
591
|
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
@@ -633,8 +633,8 @@ function validate$n(obj, path = 'EinsteinLlmFeedbackInputRepresentation') {
|
|
|
633
633
|
}
|
|
634
634
|
|
|
635
635
|
const TTL$5 = 100;
|
|
636
|
-
const VERSION$
|
|
637
|
-
function validate$
|
|
636
|
+
const VERSION$j = "4033328f65865dd5d80c68a7573a4522";
|
|
637
|
+
function validate$o(obj, path = 'EinsteinLlmFeedbackRepresentation') {
|
|
638
638
|
const v_error = (() => {
|
|
639
639
|
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
640
640
|
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
@@ -660,10 +660,10 @@ function keyBuilderFromType$2(luvio, object) {
|
|
|
660
660
|
function normalize$5(input, existing, path, luvio, store, timestamp) {
|
|
661
661
|
return input;
|
|
662
662
|
}
|
|
663
|
-
const select$
|
|
663
|
+
const select$p = function EinsteinLlmFeedbackRepresentationSelect() {
|
|
664
664
|
return {
|
|
665
665
|
kind: 'Fragment',
|
|
666
|
-
version: VERSION$
|
|
666
|
+
version: VERSION$j,
|
|
667
667
|
private: [],
|
|
668
668
|
selections: [
|
|
669
669
|
{
|
|
@@ -673,7 +673,7 @@ const select$n = function EinsteinLlmFeedbackRepresentationSelect() {
|
|
|
673
673
|
]
|
|
674
674
|
};
|
|
675
675
|
};
|
|
676
|
-
function equals$
|
|
676
|
+
function equals$j(existing, incoming) {
|
|
677
677
|
const existing_message = existing.message;
|
|
678
678
|
const incoming_message = incoming.message;
|
|
679
679
|
if (!(existing_message === incoming_message)) {
|
|
@@ -683,14 +683,14 @@ function equals$h(existing, incoming) {
|
|
|
683
683
|
}
|
|
684
684
|
const ingest$5 = function EinsteinLlmFeedbackRepresentationIngest(input, path, luvio, store, timestamp) {
|
|
685
685
|
if (process.env.NODE_ENV !== 'production') {
|
|
686
|
-
const validateError = validate$
|
|
686
|
+
const validateError = validate$o(input);
|
|
687
687
|
if (validateError !== null) {
|
|
688
688
|
throw validateError;
|
|
689
689
|
}
|
|
690
690
|
}
|
|
691
691
|
const key = keyBuilderFromType$2(luvio, input);
|
|
692
692
|
const ttlToUse = TTL$5;
|
|
693
|
-
ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize$5, "EinsteinLLM", VERSION$
|
|
693
|
+
ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize$5, "EinsteinLLM", VERSION$j, RepresentationType$5, equals$j);
|
|
694
694
|
return createLink(key);
|
|
695
695
|
};
|
|
696
696
|
function getTypeCacheKeys$5(rootKeySet, luvio, input, fullPathFactory) {
|
|
@@ -703,8 +703,8 @@ function getTypeCacheKeys$5(rootKeySet, luvio, input, fullPathFactory) {
|
|
|
703
703
|
});
|
|
704
704
|
}
|
|
705
705
|
|
|
706
|
-
function select$
|
|
707
|
-
return select$
|
|
706
|
+
function select$o(luvio, params) {
|
|
707
|
+
return select$p();
|
|
708
708
|
}
|
|
709
709
|
function getResponseCacheKeys$5(storeKeyMap, luvio, resourceParams, response) {
|
|
710
710
|
getTypeCacheKeys$5(storeKeyMap, luvio, response);
|
|
@@ -715,7 +715,7 @@ function ingestSuccess$5(luvio, resourceParams, response) {
|
|
|
715
715
|
luvio.storeIngest(key, ingest$5, body);
|
|
716
716
|
const snapshot = luvio.storeLookup({
|
|
717
717
|
recordId: key,
|
|
718
|
-
node: select$
|
|
718
|
+
node: select$o(),
|
|
719
719
|
variables: {},
|
|
720
720
|
});
|
|
721
721
|
if (process.env.NODE_ENV !== 'production') {
|
|
@@ -749,7 +749,7 @@ const createResourceParams$5 = /*#__PURE__*/ createResourceParams$7(createFeedba
|
|
|
749
749
|
function typeCheckConfig$5(untrustedConfig) {
|
|
750
750
|
const config = {};
|
|
751
751
|
const untrustedConfig_feedbackInput = untrustedConfig.feedbackInput;
|
|
752
|
-
const referenceEinsteinLlmFeedbackInputRepresentationValidationError = validate$
|
|
752
|
+
const referenceEinsteinLlmFeedbackInputRepresentationValidationError = validate$p(untrustedConfig_feedbackInput);
|
|
753
753
|
if (referenceEinsteinLlmFeedbackInputRepresentationValidationError === null) {
|
|
754
754
|
config.feedbackInput = untrustedConfig_feedbackInput;
|
|
755
755
|
}
|
|
@@ -797,7 +797,7 @@ const createFeedbackAdapterFactory = (luvio) => {
|
|
|
797
797
|
};
|
|
798
798
|
};
|
|
799
799
|
|
|
800
|
-
function validate$
|
|
800
|
+
function validate$n(obj, path = 'EinsteinLlmAdditionalConfigInputRepresentation') {
|
|
801
801
|
const v_error = (() => {
|
|
802
802
|
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
803
803
|
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
@@ -880,7 +880,7 @@ function validate$l(obj, path = 'EinsteinLlmAdditionalConfigInputRepresentation'
|
|
|
880
880
|
return v_error === undefined ? null : v_error;
|
|
881
881
|
}
|
|
882
882
|
|
|
883
|
-
function validate$
|
|
883
|
+
function validate$m(obj, path = 'EinsteinLlmGenerationsInputRepresentation') {
|
|
884
884
|
const v_error = (() => {
|
|
885
885
|
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
886
886
|
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
@@ -888,7 +888,7 @@ function validate$k(obj, path = 'EinsteinLlmGenerationsInputRepresentation') {
|
|
|
888
888
|
if (obj.additionalConfig !== undefined) {
|
|
889
889
|
const obj_additionalConfig = obj.additionalConfig;
|
|
890
890
|
const path_additionalConfig = path + '.additionalConfig';
|
|
891
|
-
const referencepath_additionalConfigValidationError = validate$
|
|
891
|
+
const referencepath_additionalConfigValidationError = validate$n(obj_additionalConfig, path_additionalConfig);
|
|
892
892
|
if (referencepath_additionalConfigValidationError !== null) {
|
|
893
893
|
let message = 'Object doesn\'t match EinsteinLlmAdditionalConfigInputRepresentation (at "' + path_additionalConfig + '")\n';
|
|
894
894
|
message += referencepath_additionalConfigValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
@@ -911,8 +911,8 @@ function validate$k(obj, path = 'EinsteinLlmGenerationsInputRepresentation') {
|
|
|
911
911
|
return v_error === undefined ? null : v_error;
|
|
912
912
|
}
|
|
913
913
|
|
|
914
|
-
const VERSION$
|
|
915
|
-
function validate$
|
|
914
|
+
const VERSION$i = "9ebac74e6f964c363d5fd1913df363af";
|
|
915
|
+
function validate$l(obj, path = 'EinsteinLlmGenerationsContentQualityRepresentation') {
|
|
916
916
|
const v_error = (() => {
|
|
917
917
|
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
918
918
|
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
@@ -948,10 +948,10 @@ function validate$j(obj, path = 'EinsteinLlmGenerationsContentQualityRepresentat
|
|
|
948
948
|
})();
|
|
949
949
|
return v_error === undefined ? null : v_error;
|
|
950
950
|
}
|
|
951
|
-
const select$
|
|
951
|
+
const select$n = function EinsteinLlmGenerationsContentQualityRepresentationSelect() {
|
|
952
952
|
return {
|
|
953
953
|
kind: 'Fragment',
|
|
954
|
-
version: VERSION$
|
|
954
|
+
version: VERSION$i,
|
|
955
955
|
private: [],
|
|
956
956
|
selections: [
|
|
957
957
|
{
|
|
@@ -962,7 +962,7 @@ const select$l = function EinsteinLlmGenerationsContentQualityRepresentationSele
|
|
|
962
962
|
]
|
|
963
963
|
};
|
|
964
964
|
};
|
|
965
|
-
function equals$
|
|
965
|
+
function equals$i(existing, incoming) {
|
|
966
966
|
const existing_isToxicityDetected = existing.isToxicityDetected;
|
|
967
967
|
const incoming_isToxicityDetected = incoming.isToxicityDetected;
|
|
968
968
|
// if at least one of these optionals is defined
|
|
@@ -979,8 +979,8 @@ function equals$g(existing, incoming) {
|
|
|
979
979
|
return true;
|
|
980
980
|
}
|
|
981
981
|
|
|
982
|
-
const VERSION$
|
|
983
|
-
function validate$
|
|
982
|
+
const VERSION$h = "77af44a252cb5b45b4d9a8101368d2aa";
|
|
983
|
+
function validate$k(obj, path = 'EinsteinLlmGenerationsSafetyScoreRepresentation') {
|
|
984
984
|
const v_error = (() => {
|
|
985
985
|
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
986
986
|
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
@@ -1184,10 +1184,10 @@ function validate$i(obj, path = 'EinsteinLlmGenerationsSafetyScoreRepresentation
|
|
|
1184
1184
|
})();
|
|
1185
1185
|
return v_error === undefined ? null : v_error;
|
|
1186
1186
|
}
|
|
1187
|
-
const select$
|
|
1187
|
+
const select$m = function EinsteinLlmGenerationsSafetyScoreRepresentationSelect() {
|
|
1188
1188
|
return {
|
|
1189
1189
|
kind: 'Fragment',
|
|
1190
|
-
version: VERSION$
|
|
1190
|
+
version: VERSION$h,
|
|
1191
1191
|
private: [],
|
|
1192
1192
|
selections: [
|
|
1193
1193
|
{
|
|
@@ -1228,7 +1228,7 @@ const select$k = function EinsteinLlmGenerationsSafetyScoreRepresentationSelect(
|
|
|
1228
1228
|
]
|
|
1229
1229
|
};
|
|
1230
1230
|
};
|
|
1231
|
-
function equals$
|
|
1231
|
+
function equals$h(existing, incoming) {
|
|
1232
1232
|
const existing_hateScore = existing.hateScore;
|
|
1233
1233
|
const incoming_hateScore = incoming.hateScore;
|
|
1234
1234
|
// if at least one of these optionals is defined
|
|
@@ -1323,8 +1323,8 @@ function equals$f(existing, incoming) {
|
|
|
1323
1323
|
return true;
|
|
1324
1324
|
}
|
|
1325
1325
|
|
|
1326
|
-
const VERSION$
|
|
1327
|
-
function validate$
|
|
1326
|
+
const VERSION$g = "4a07778ff6c595d91c575188146647a1";
|
|
1327
|
+
function validate$j(obj, path = 'EinsteinLlmGenerationItemRepresentation') {
|
|
1328
1328
|
const v_error = (() => {
|
|
1329
1329
|
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
1330
1330
|
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
@@ -1334,7 +1334,7 @@ function validate$h(obj, path = 'EinsteinLlmGenerationItemRepresentation') {
|
|
|
1334
1334
|
const path_contentQualityRepresentation = path + '.contentQualityRepresentation';
|
|
1335
1335
|
let obj_contentQualityRepresentation_union0 = null;
|
|
1336
1336
|
const obj_contentQualityRepresentation_union0_error = (() => {
|
|
1337
|
-
const referencepath_contentQualityRepresentationValidationError = validate$
|
|
1337
|
+
const referencepath_contentQualityRepresentationValidationError = validate$l(obj_contentQualityRepresentation, path_contentQualityRepresentation);
|
|
1338
1338
|
if (referencepath_contentQualityRepresentationValidationError !== null) {
|
|
1339
1339
|
let message = 'Object doesn\'t match EinsteinLlmGenerationsContentQualityRepresentation (at "' + path_contentQualityRepresentation + '")\n';
|
|
1340
1340
|
message += referencepath_contentQualityRepresentationValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
@@ -1382,7 +1382,7 @@ function validate$h(obj, path = 'EinsteinLlmGenerationItemRepresentation') {
|
|
|
1382
1382
|
const path_safetyScoreRepresentation = path + '.safetyScoreRepresentation';
|
|
1383
1383
|
let obj_safetyScoreRepresentation_union0 = null;
|
|
1384
1384
|
const obj_safetyScoreRepresentation_union0_error = (() => {
|
|
1385
|
-
const referencepath_safetyScoreRepresentationValidationError = validate$
|
|
1385
|
+
const referencepath_safetyScoreRepresentationValidationError = validate$k(obj_safetyScoreRepresentation, path_safetyScoreRepresentation);
|
|
1386
1386
|
if (referencepath_safetyScoreRepresentationValidationError !== null) {
|
|
1387
1387
|
let message = 'Object doesn\'t match EinsteinLlmGenerationsSafetyScoreRepresentation (at "' + path_safetyScoreRepresentation + '")\n';
|
|
1388
1388
|
message += referencepath_safetyScoreRepresentationValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
@@ -1416,12 +1416,12 @@ function validate$h(obj, path = 'EinsteinLlmGenerationItemRepresentation') {
|
|
|
1416
1416
|
})();
|
|
1417
1417
|
return v_error === undefined ? null : v_error;
|
|
1418
1418
|
}
|
|
1419
|
-
const select$
|
|
1420
|
-
const { selections: EinsteinLlmGenerationsContentQualityRepresentation__selections, opaque: EinsteinLlmGenerationsContentQualityRepresentation__opaque, } = select$
|
|
1421
|
-
const { selections: EinsteinLlmGenerationsSafetyScoreRepresentation__selections, opaque: EinsteinLlmGenerationsSafetyScoreRepresentation__opaque, } = select$
|
|
1419
|
+
const select$l = function EinsteinLlmGenerationItemRepresentationSelect() {
|
|
1420
|
+
const { selections: EinsteinLlmGenerationsContentQualityRepresentation__selections, opaque: EinsteinLlmGenerationsContentQualityRepresentation__opaque, } = select$n();
|
|
1421
|
+
const { selections: EinsteinLlmGenerationsSafetyScoreRepresentation__selections, opaque: EinsteinLlmGenerationsSafetyScoreRepresentation__opaque, } = select$m();
|
|
1422
1422
|
return {
|
|
1423
1423
|
kind: 'Fragment',
|
|
1424
|
-
version: VERSION$
|
|
1424
|
+
version: VERSION$g,
|
|
1425
1425
|
private: [],
|
|
1426
1426
|
selections: [
|
|
1427
1427
|
{
|
|
@@ -1458,7 +1458,7 @@ const select$j = function EinsteinLlmGenerationItemRepresentationSelect() {
|
|
|
1458
1458
|
]
|
|
1459
1459
|
};
|
|
1460
1460
|
};
|
|
1461
|
-
function equals$
|
|
1461
|
+
function equals$g(existing, incoming) {
|
|
1462
1462
|
const existing_isSummarized = existing.isSummarized;
|
|
1463
1463
|
const incoming_isSummarized = incoming.isSummarized;
|
|
1464
1464
|
// if at least one of these optionals is defined
|
|
@@ -1499,7 +1499,7 @@ function equals$e(existing, incoming) {
|
|
|
1499
1499
|
if (!(existing_contentQualityRepresentation === incoming_contentQualityRepresentation
|
|
1500
1500
|
|| (existing_contentQualityRepresentation != null &&
|
|
1501
1501
|
incoming_contentQualityRepresentation != null &&
|
|
1502
|
-
equals$
|
|
1502
|
+
equals$i(existing_contentQualityRepresentation, incoming_contentQualityRepresentation)))) {
|
|
1503
1503
|
return false;
|
|
1504
1504
|
}
|
|
1505
1505
|
}
|
|
@@ -1515,15 +1515,15 @@ function equals$e(existing, incoming) {
|
|
|
1515
1515
|
if (!(existing_safetyScoreRepresentation === incoming_safetyScoreRepresentation
|
|
1516
1516
|
|| (existing_safetyScoreRepresentation != null &&
|
|
1517
1517
|
incoming_safetyScoreRepresentation != null &&
|
|
1518
|
-
equals$
|
|
1518
|
+
equals$h(existing_safetyScoreRepresentation, incoming_safetyScoreRepresentation)))) {
|
|
1519
1519
|
return false;
|
|
1520
1520
|
}
|
|
1521
1521
|
}
|
|
1522
1522
|
return true;
|
|
1523
1523
|
}
|
|
1524
1524
|
|
|
1525
|
-
const VERSION$
|
|
1526
|
-
function validate$
|
|
1525
|
+
const VERSION$f = "4656c961c9d093a9e206c1db7d4de0b0";
|
|
1526
|
+
function validate$i(obj, path = 'WrappedMap') {
|
|
1527
1527
|
const v_error = (() => {
|
|
1528
1528
|
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
1529
1529
|
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
@@ -1545,15 +1545,15 @@ function validate$g(obj, path = 'WrappedMap') {
|
|
|
1545
1545
|
})();
|
|
1546
1546
|
return v_error === undefined ? null : v_error;
|
|
1547
1547
|
}
|
|
1548
|
-
const select$
|
|
1548
|
+
const select$k = function WrappedMapSelect() {
|
|
1549
1549
|
return {
|
|
1550
1550
|
kind: 'Fragment',
|
|
1551
|
-
version: VERSION$
|
|
1551
|
+
version: VERSION$f,
|
|
1552
1552
|
private: [],
|
|
1553
1553
|
selections: []
|
|
1554
1554
|
};
|
|
1555
1555
|
};
|
|
1556
|
-
function equals$
|
|
1556
|
+
function equals$f(existing, incoming) {
|
|
1557
1557
|
const existing_wrappedMap = existing.wrappedMap;
|
|
1558
1558
|
const incoming_wrappedMap = incoming.wrappedMap;
|
|
1559
1559
|
const equals_wrappedMap_props = equalsObject(existing_wrappedMap, incoming_wrappedMap, (existing_wrappedMap_prop, incoming_wrappedMap_prop) => {
|
|
@@ -1565,8 +1565,8 @@ function equals$d(existing, incoming) {
|
|
|
1565
1565
|
}
|
|
1566
1566
|
|
|
1567
1567
|
const TTL$4 = 100;
|
|
1568
|
-
const VERSION$
|
|
1569
|
-
function validate$
|
|
1568
|
+
const VERSION$e = "d8abd72a42e842b253da1c38954dafbc";
|
|
1569
|
+
function validate$h(obj, path = 'EinsteinLlmGenerationsRepresentation') {
|
|
1570
1570
|
const v_error = (() => {
|
|
1571
1571
|
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
1572
1572
|
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
@@ -1579,7 +1579,7 @@ function validate$f(obj, path = 'EinsteinLlmGenerationsRepresentation') {
|
|
|
1579
1579
|
for (let i = 0; i < obj_generations.length; i++) {
|
|
1580
1580
|
const obj_generations_item = obj_generations[i];
|
|
1581
1581
|
const path_generations_item = path_generations + '[' + i + ']';
|
|
1582
|
-
const referencepath_generations_itemValidationError = validate$
|
|
1582
|
+
const referencepath_generations_itemValidationError = validate$j(obj_generations_item, path_generations_item);
|
|
1583
1583
|
if (referencepath_generations_itemValidationError !== null) {
|
|
1584
1584
|
let message = 'Object doesn\'t match EinsteinLlmGenerationItemRepresentation (at "' + path_generations_item + '")\n';
|
|
1585
1585
|
message += referencepath_generations_itemValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
@@ -1590,7 +1590,7 @@ function validate$f(obj, path = 'EinsteinLlmGenerationsRepresentation') {
|
|
|
1590
1590
|
const path_parameters = path + '.parameters';
|
|
1591
1591
|
let obj_parameters_union0 = null;
|
|
1592
1592
|
const obj_parameters_union0_error = (() => {
|
|
1593
|
-
const referencepath_parametersValidationError = validate$
|
|
1593
|
+
const referencepath_parametersValidationError = validate$i(obj_parameters, path_parameters);
|
|
1594
1594
|
if (referencepath_parametersValidationError !== null) {
|
|
1595
1595
|
let message = 'Object doesn\'t match WrappedMap (at "' + path_parameters + '")\n';
|
|
1596
1596
|
message += referencepath_parametersValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
@@ -1662,12 +1662,12 @@ function keyBuilderFromType$1(luvio, object) {
|
|
|
1662
1662
|
function normalize$4(input, existing, path, luvio, store, timestamp) {
|
|
1663
1663
|
return input;
|
|
1664
1664
|
}
|
|
1665
|
-
const select$
|
|
1666
|
-
const { selections: EinsteinLlmGenerationItemRepresentation__selections, opaque: EinsteinLlmGenerationItemRepresentation__opaque, } = select$
|
|
1667
|
-
const { selections: WrappedMap__selections, opaque: WrappedMap__opaque, } = select$
|
|
1665
|
+
const select$j = function EinsteinLlmGenerationsRepresentationSelect() {
|
|
1666
|
+
const { selections: EinsteinLlmGenerationItemRepresentation__selections, opaque: EinsteinLlmGenerationItemRepresentation__opaque, } = select$l();
|
|
1667
|
+
const { selections: WrappedMap__selections, opaque: WrappedMap__opaque, } = select$k();
|
|
1668
1668
|
return {
|
|
1669
1669
|
kind: 'Fragment',
|
|
1670
|
-
version: VERSION$
|
|
1670
|
+
version: VERSION$e,
|
|
1671
1671
|
private: [],
|
|
1672
1672
|
selections: [
|
|
1673
1673
|
{
|
|
@@ -1693,7 +1693,7 @@ const select$h = function EinsteinLlmGenerationsRepresentationSelect() {
|
|
|
1693
1693
|
]
|
|
1694
1694
|
};
|
|
1695
1695
|
};
|
|
1696
|
-
function equals$
|
|
1696
|
+
function equals$e(existing, incoming) {
|
|
1697
1697
|
const existing_requestId = existing.requestId;
|
|
1698
1698
|
const incoming_requestId = incoming.requestId;
|
|
1699
1699
|
if (!(existing_requestId === incoming_requestId)) {
|
|
@@ -1702,7 +1702,7 @@ function equals$c(existing, incoming) {
|
|
|
1702
1702
|
const existing_generations = existing.generations;
|
|
1703
1703
|
const incoming_generations = incoming.generations;
|
|
1704
1704
|
const equals_generations_items = equalsArray(existing_generations, incoming_generations, (existing_generations_item, incoming_generations_item) => {
|
|
1705
|
-
if (!(equals$
|
|
1705
|
+
if (!(equals$g(existing_generations_item, incoming_generations_item))) {
|
|
1706
1706
|
return false;
|
|
1707
1707
|
}
|
|
1708
1708
|
});
|
|
@@ -1714,7 +1714,7 @@ function equals$c(existing, incoming) {
|
|
|
1714
1714
|
if (!(existing_parameters === incoming_parameters
|
|
1715
1715
|
|| (existing_parameters != null &&
|
|
1716
1716
|
incoming_parameters != null &&
|
|
1717
|
-
equals$
|
|
1717
|
+
equals$f(existing_parameters, incoming_parameters)))) {
|
|
1718
1718
|
return false;
|
|
1719
1719
|
}
|
|
1720
1720
|
const existing_prompt = existing.prompt;
|
|
@@ -1726,14 +1726,14 @@ function equals$c(existing, incoming) {
|
|
|
1726
1726
|
}
|
|
1727
1727
|
const ingest$4 = function EinsteinLlmGenerationsRepresentationIngest(input, path, luvio, store, timestamp) {
|
|
1728
1728
|
if (process.env.NODE_ENV !== 'production') {
|
|
1729
|
-
const validateError = validate$
|
|
1729
|
+
const validateError = validate$h(input);
|
|
1730
1730
|
if (validateError !== null) {
|
|
1731
1731
|
throw validateError;
|
|
1732
1732
|
}
|
|
1733
1733
|
}
|
|
1734
1734
|
const key = keyBuilderFromType$1(luvio, input);
|
|
1735
1735
|
const ttlToUse = TTL$4;
|
|
1736
|
-
ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize$4, "EinsteinLLM", VERSION$
|
|
1736
|
+
ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize$4, "EinsteinLLM", VERSION$e, RepresentationType$4, equals$e);
|
|
1737
1737
|
return createLink(key);
|
|
1738
1738
|
};
|
|
1739
1739
|
function getTypeCacheKeys$4(rootKeySet, luvio, input, fullPathFactory) {
|
|
@@ -1746,8 +1746,8 @@ function getTypeCacheKeys$4(rootKeySet, luvio, input, fullPathFactory) {
|
|
|
1746
1746
|
});
|
|
1747
1747
|
}
|
|
1748
1748
|
|
|
1749
|
-
function select$
|
|
1750
|
-
return select$
|
|
1749
|
+
function select$i(luvio, params) {
|
|
1750
|
+
return select$j();
|
|
1751
1751
|
}
|
|
1752
1752
|
function getResponseCacheKeys$4(storeKeyMap, luvio, resourceParams, response) {
|
|
1753
1753
|
getTypeCacheKeys$4(storeKeyMap, luvio, response);
|
|
@@ -1758,7 +1758,7 @@ function ingestSuccess$4(luvio, resourceParams, response) {
|
|
|
1758
1758
|
luvio.storeIngest(key, ingest$4, body);
|
|
1759
1759
|
const snapshot = luvio.storeLookup({
|
|
1760
1760
|
recordId: key,
|
|
1761
|
-
node: select$
|
|
1761
|
+
node: select$i(),
|
|
1762
1762
|
variables: {},
|
|
1763
1763
|
});
|
|
1764
1764
|
if (process.env.NODE_ENV !== 'production') {
|
|
@@ -1792,7 +1792,7 @@ const createResourceParams$4 = /*#__PURE__*/ createResourceParams$7(createGenera
|
|
|
1792
1792
|
function typeCheckConfig$4(untrustedConfig) {
|
|
1793
1793
|
const config = {};
|
|
1794
1794
|
const untrustedConfig_generationsInput = untrustedConfig.generationsInput;
|
|
1795
|
-
const referenceEinsteinLlmGenerationsInputRepresentationValidationError = validate$
|
|
1795
|
+
const referenceEinsteinLlmGenerationsInputRepresentationValidationError = validate$m(untrustedConfig_generationsInput);
|
|
1796
1796
|
if (referenceEinsteinLlmGenerationsInputRepresentationValidationError === null) {
|
|
1797
1797
|
config.generationsInput = untrustedConfig_generationsInput;
|
|
1798
1798
|
}
|
|
@@ -1840,7 +1840,7 @@ const createGenerationsAdapterFactory = (luvio) => {
|
|
|
1840
1840
|
};
|
|
1841
1841
|
};
|
|
1842
1842
|
|
|
1843
|
-
function validate$
|
|
1843
|
+
function validate$g(obj, path = 'WrappedValueMap') {
|
|
1844
1844
|
const v_error = (() => {
|
|
1845
1845
|
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
1846
1846
|
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
@@ -1863,7 +1863,7 @@ function validate$e(obj, path = 'WrappedValueMap') {
|
|
|
1863
1863
|
return v_error === undefined ? null : v_error;
|
|
1864
1864
|
}
|
|
1865
1865
|
|
|
1866
|
-
function validate$
|
|
1866
|
+
function validate$f(obj, path = 'EinsteinPromptTemplateGenerationsInputRepresentation') {
|
|
1867
1867
|
const v_error = (() => {
|
|
1868
1868
|
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
1869
1869
|
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
@@ -1871,7 +1871,7 @@ function validate$d(obj, path = 'EinsteinPromptTemplateGenerationsInputRepresent
|
|
|
1871
1871
|
if (obj.additionalConfig !== undefined) {
|
|
1872
1872
|
const obj_additionalConfig = obj.additionalConfig;
|
|
1873
1873
|
const path_additionalConfig = path + '.additionalConfig';
|
|
1874
|
-
const referencepath_additionalConfigValidationError = validate$
|
|
1874
|
+
const referencepath_additionalConfigValidationError = validate$n(obj_additionalConfig, path_additionalConfig);
|
|
1875
1875
|
if (referencepath_additionalConfigValidationError !== null) {
|
|
1876
1876
|
let message = 'Object doesn\'t match EinsteinLlmAdditionalConfigInputRepresentation (at "' + path_additionalConfig + '")\n';
|
|
1877
1877
|
message += referencepath_additionalConfigValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
@@ -1880,7 +1880,7 @@ function validate$d(obj, path = 'EinsteinPromptTemplateGenerationsInputRepresent
|
|
|
1880
1880
|
}
|
|
1881
1881
|
const obj_inputParams = obj.inputParams;
|
|
1882
1882
|
const path_inputParams = path + '.inputParams';
|
|
1883
|
-
const referencepath_inputParamsValidationError = validate$
|
|
1883
|
+
const referencepath_inputParamsValidationError = validate$g(obj_inputParams, path_inputParams);
|
|
1884
1884
|
if (referencepath_inputParamsValidationError !== null) {
|
|
1885
1885
|
let message = 'Object doesn\'t match WrappedValueMap (at "' + path_inputParams + '")\n';
|
|
1886
1886
|
message += referencepath_inputParamsValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
@@ -1916,6 +1916,244 @@ function validate$d(obj, path = 'EinsteinPromptTemplateGenerationsInputRepresent
|
|
|
1916
1916
|
return v_error === undefined ? null : v_error;
|
|
1917
1917
|
}
|
|
1918
1918
|
|
|
1919
|
+
const VERSION$d = "63584d83290e21bdff26b1bef3db119c";
|
|
1920
|
+
function validate$e(obj, path = 'EinsteinLlmGenerationGenAiCitedReferenceRepresentation') {
|
|
1921
|
+
const v_error = (() => {
|
|
1922
|
+
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
1923
|
+
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
1924
|
+
}
|
|
1925
|
+
if (obj.citationLocations !== undefined) {
|
|
1926
|
+
const obj_citationLocations = obj.citationLocations;
|
|
1927
|
+
const path_citationLocations = path + '.citationLocations';
|
|
1928
|
+
if (!ArrayIsArray(obj_citationLocations)) {
|
|
1929
|
+
return new TypeError('Expected "array" but received "' + typeof obj_citationLocations + '" (at "' + path_citationLocations + '")');
|
|
1930
|
+
}
|
|
1931
|
+
for (let i = 0; i < obj_citationLocations.length; i++) {
|
|
1932
|
+
const obj_citationLocations_item = obj_citationLocations[i];
|
|
1933
|
+
const path_citationLocations_item = path_citationLocations + '[' + i + ']';
|
|
1934
|
+
if (typeof obj_citationLocations_item !== 'number' || (typeof obj_citationLocations_item === 'number' && Math.floor(obj_citationLocations_item) !== obj_citationLocations_item)) {
|
|
1935
|
+
return new TypeError('Expected "integer" but received "' + typeof obj_citationLocations_item + '" (at "' + path_citationLocations_item + '")');
|
|
1936
|
+
}
|
|
1937
|
+
}
|
|
1938
|
+
}
|
|
1939
|
+
if (obj.claims !== undefined) {
|
|
1940
|
+
const obj_claims = obj.claims;
|
|
1941
|
+
const path_claims = path + '.claims';
|
|
1942
|
+
if (!ArrayIsArray(obj_claims)) {
|
|
1943
|
+
return new TypeError('Expected "array" but received "' + typeof obj_claims + '" (at "' + path_claims + '")');
|
|
1944
|
+
}
|
|
1945
|
+
for (let i = 0; i < obj_claims.length; i++) {
|
|
1946
|
+
const obj_claims_item = obj_claims[i];
|
|
1947
|
+
const path_claims_item = path_claims + '[' + i + ']';
|
|
1948
|
+
if (typeof obj_claims_item !== 'string') {
|
|
1949
|
+
return new TypeError('Expected "string" but received "' + typeof obj_claims_item + '" (at "' + path_claims_item + '")');
|
|
1950
|
+
}
|
|
1951
|
+
}
|
|
1952
|
+
}
|
|
1953
|
+
if (obj.link !== undefined) {
|
|
1954
|
+
const obj_link = obj.link;
|
|
1955
|
+
const path_link = path + '.link';
|
|
1956
|
+
if (typeof obj_link !== 'string') {
|
|
1957
|
+
return new TypeError('Expected "string" but received "' + typeof obj_link + '" (at "' + path_link + '")');
|
|
1958
|
+
}
|
|
1959
|
+
}
|
|
1960
|
+
if (obj.sourceObjectApiName !== undefined) {
|
|
1961
|
+
const obj_sourceObjectApiName = obj.sourceObjectApiName;
|
|
1962
|
+
const path_sourceObjectApiName = path + '.sourceObjectApiName';
|
|
1963
|
+
if (typeof obj_sourceObjectApiName !== 'string') {
|
|
1964
|
+
return new TypeError('Expected "string" but received "' + typeof obj_sourceObjectApiName + '" (at "' + path_sourceObjectApiName + '")');
|
|
1965
|
+
}
|
|
1966
|
+
}
|
|
1967
|
+
if (obj.sourceObjectRecordId !== undefined) {
|
|
1968
|
+
const obj_sourceObjectRecordId = obj.sourceObjectRecordId;
|
|
1969
|
+
const path_sourceObjectRecordId = path + '.sourceObjectRecordId';
|
|
1970
|
+
if (typeof obj_sourceObjectRecordId !== 'string') {
|
|
1971
|
+
return new TypeError('Expected "string" but received "' + typeof obj_sourceObjectRecordId + '" (at "' + path_sourceObjectRecordId + '")');
|
|
1972
|
+
}
|
|
1973
|
+
}
|
|
1974
|
+
})();
|
|
1975
|
+
return v_error === undefined ? null : v_error;
|
|
1976
|
+
}
|
|
1977
|
+
const select$h = function EinsteinLlmGenerationGenAiCitedReferenceRepresentationSelect() {
|
|
1978
|
+
return {
|
|
1979
|
+
kind: 'Fragment',
|
|
1980
|
+
version: VERSION$d,
|
|
1981
|
+
private: [],
|
|
1982
|
+
selections: [
|
|
1983
|
+
{
|
|
1984
|
+
name: 'citationLocations',
|
|
1985
|
+
kind: 'Scalar',
|
|
1986
|
+
plural: true,
|
|
1987
|
+
required: false
|
|
1988
|
+
},
|
|
1989
|
+
{
|
|
1990
|
+
name: 'claims',
|
|
1991
|
+
kind: 'Scalar',
|
|
1992
|
+
plural: true,
|
|
1993
|
+
required: false
|
|
1994
|
+
},
|
|
1995
|
+
{
|
|
1996
|
+
name: 'link',
|
|
1997
|
+
kind: 'Scalar',
|
|
1998
|
+
required: false
|
|
1999
|
+
},
|
|
2000
|
+
{
|
|
2001
|
+
name: 'sourceObjectApiName',
|
|
2002
|
+
kind: 'Scalar',
|
|
2003
|
+
required: false
|
|
2004
|
+
},
|
|
2005
|
+
{
|
|
2006
|
+
name: 'sourceObjectRecordId',
|
|
2007
|
+
kind: 'Scalar',
|
|
2008
|
+
required: false
|
|
2009
|
+
}
|
|
2010
|
+
]
|
|
2011
|
+
};
|
|
2012
|
+
};
|
|
2013
|
+
function equals$d(existing, incoming) {
|
|
2014
|
+
const existing_link = existing.link;
|
|
2015
|
+
const incoming_link = incoming.link;
|
|
2016
|
+
// if at least one of these optionals is defined
|
|
2017
|
+
if (existing_link !== undefined || incoming_link !== undefined) {
|
|
2018
|
+
// if one of these is not defined we know the other is defined and therefore
|
|
2019
|
+
// not equal
|
|
2020
|
+
if (existing_link === undefined || incoming_link === undefined) {
|
|
2021
|
+
return false;
|
|
2022
|
+
}
|
|
2023
|
+
if (!(existing_link === incoming_link)) {
|
|
2024
|
+
return false;
|
|
2025
|
+
}
|
|
2026
|
+
}
|
|
2027
|
+
const existing_sourceObjectApiName = existing.sourceObjectApiName;
|
|
2028
|
+
const incoming_sourceObjectApiName = incoming.sourceObjectApiName;
|
|
2029
|
+
// if at least one of these optionals is defined
|
|
2030
|
+
if (existing_sourceObjectApiName !== undefined || incoming_sourceObjectApiName !== undefined) {
|
|
2031
|
+
// if one of these is not defined we know the other is defined and therefore
|
|
2032
|
+
// not equal
|
|
2033
|
+
if (existing_sourceObjectApiName === undefined || incoming_sourceObjectApiName === undefined) {
|
|
2034
|
+
return false;
|
|
2035
|
+
}
|
|
2036
|
+
if (!(existing_sourceObjectApiName === incoming_sourceObjectApiName)) {
|
|
2037
|
+
return false;
|
|
2038
|
+
}
|
|
2039
|
+
}
|
|
2040
|
+
const existing_sourceObjectRecordId = existing.sourceObjectRecordId;
|
|
2041
|
+
const incoming_sourceObjectRecordId = incoming.sourceObjectRecordId;
|
|
2042
|
+
// if at least one of these optionals is defined
|
|
2043
|
+
if (existing_sourceObjectRecordId !== undefined || incoming_sourceObjectRecordId !== undefined) {
|
|
2044
|
+
// if one of these is not defined we know the other is defined and therefore
|
|
2045
|
+
// not equal
|
|
2046
|
+
if (existing_sourceObjectRecordId === undefined || incoming_sourceObjectRecordId === undefined) {
|
|
2047
|
+
return false;
|
|
2048
|
+
}
|
|
2049
|
+
if (!(existing_sourceObjectRecordId === incoming_sourceObjectRecordId)) {
|
|
2050
|
+
return false;
|
|
2051
|
+
}
|
|
2052
|
+
}
|
|
2053
|
+
const existing_citationLocations = existing.citationLocations;
|
|
2054
|
+
const incoming_citationLocations = incoming.citationLocations;
|
|
2055
|
+
// if at least one of these optionals is defined
|
|
2056
|
+
if (existing_citationLocations !== undefined || incoming_citationLocations !== undefined) {
|
|
2057
|
+
// if one of these is not defined we know the other is defined and therefore
|
|
2058
|
+
// not equal
|
|
2059
|
+
if (existing_citationLocations === undefined || incoming_citationLocations === undefined) {
|
|
2060
|
+
return false;
|
|
2061
|
+
}
|
|
2062
|
+
const equals_citationLocations_items = equalsArray(existing_citationLocations, incoming_citationLocations, (existing_citationLocations_item, incoming_citationLocations_item) => {
|
|
2063
|
+
if (!(existing_citationLocations_item === incoming_citationLocations_item)) {
|
|
2064
|
+
return false;
|
|
2065
|
+
}
|
|
2066
|
+
});
|
|
2067
|
+
if (equals_citationLocations_items === false) {
|
|
2068
|
+
return false;
|
|
2069
|
+
}
|
|
2070
|
+
}
|
|
2071
|
+
const existing_claims = existing.claims;
|
|
2072
|
+
const incoming_claims = incoming.claims;
|
|
2073
|
+
// if at least one of these optionals is defined
|
|
2074
|
+
if (existing_claims !== undefined || incoming_claims !== undefined) {
|
|
2075
|
+
// if one of these is not defined we know the other is defined and therefore
|
|
2076
|
+
// not equal
|
|
2077
|
+
if (existing_claims === undefined || incoming_claims === undefined) {
|
|
2078
|
+
return false;
|
|
2079
|
+
}
|
|
2080
|
+
const equals_claims_items = equalsArray(existing_claims, incoming_claims, (existing_claims_item, incoming_claims_item) => {
|
|
2081
|
+
if (!(existing_claims_item === incoming_claims_item)) {
|
|
2082
|
+
return false;
|
|
2083
|
+
}
|
|
2084
|
+
});
|
|
2085
|
+
if (equals_claims_items === false) {
|
|
2086
|
+
return false;
|
|
2087
|
+
}
|
|
2088
|
+
}
|
|
2089
|
+
return true;
|
|
2090
|
+
}
|
|
2091
|
+
|
|
2092
|
+
const VERSION$c = "bcc0ea08323732f4187dd2b9f70fea6c";
|
|
2093
|
+
function validate$d(obj, path = 'EinsteinLlmGenerationCitationRepresentation') {
|
|
2094
|
+
const v_error = (() => {
|
|
2095
|
+
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
2096
|
+
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
2097
|
+
}
|
|
2098
|
+
if (obj.citedReferences !== undefined) {
|
|
2099
|
+
const obj_citedReferences = obj.citedReferences;
|
|
2100
|
+
const path_citedReferences = path + '.citedReferences';
|
|
2101
|
+
if (!ArrayIsArray(obj_citedReferences)) {
|
|
2102
|
+
return new TypeError('Expected "array" but received "' + typeof obj_citedReferences + '" (at "' + path_citedReferences + '")');
|
|
2103
|
+
}
|
|
2104
|
+
for (let i = 0; i < obj_citedReferences.length; i++) {
|
|
2105
|
+
const obj_citedReferences_item = obj_citedReferences[i];
|
|
2106
|
+
const path_citedReferences_item = path_citedReferences + '[' + i + ']';
|
|
2107
|
+
const referencepath_citedReferences_itemValidationError = validate$e(obj_citedReferences_item, path_citedReferences_item);
|
|
2108
|
+
if (referencepath_citedReferences_itemValidationError !== null) {
|
|
2109
|
+
let message = 'Object doesn\'t match EinsteinLlmGenerationGenAiCitedReferenceRepresentation (at "' + path_citedReferences_item + '")\n';
|
|
2110
|
+
message += referencepath_citedReferences_itemValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
2111
|
+
return new TypeError(message);
|
|
2112
|
+
}
|
|
2113
|
+
}
|
|
2114
|
+
}
|
|
2115
|
+
})();
|
|
2116
|
+
return v_error === undefined ? null : v_error;
|
|
2117
|
+
}
|
|
2118
|
+
const select$g = function EinsteinLlmGenerationCitationRepresentationSelect() {
|
|
2119
|
+
const { selections: EinsteinLlmGenerationGenAiCitedReferenceRepresentation__selections, opaque: EinsteinLlmGenerationGenAiCitedReferenceRepresentation__opaque, } = select$h();
|
|
2120
|
+
return {
|
|
2121
|
+
kind: 'Fragment',
|
|
2122
|
+
version: VERSION$c,
|
|
2123
|
+
private: [],
|
|
2124
|
+
selections: [
|
|
2125
|
+
{
|
|
2126
|
+
name: 'citedReferences',
|
|
2127
|
+
kind: 'Object',
|
|
2128
|
+
plural: true,
|
|
2129
|
+
selections: EinsteinLlmGenerationGenAiCitedReferenceRepresentation__selections,
|
|
2130
|
+
required: false
|
|
2131
|
+
}
|
|
2132
|
+
]
|
|
2133
|
+
};
|
|
2134
|
+
};
|
|
2135
|
+
function equals$c(existing, incoming) {
|
|
2136
|
+
const existing_citedReferences = existing.citedReferences;
|
|
2137
|
+
const incoming_citedReferences = incoming.citedReferences;
|
|
2138
|
+
// if at least one of these optionals is defined
|
|
2139
|
+
if (existing_citedReferences !== undefined || incoming_citedReferences !== undefined) {
|
|
2140
|
+
// if one of these is not defined we know the other is defined and therefore
|
|
2141
|
+
// not equal
|
|
2142
|
+
if (existing_citedReferences === undefined || incoming_citedReferences === undefined) {
|
|
2143
|
+
return false;
|
|
2144
|
+
}
|
|
2145
|
+
const equals_citedReferences_items = equalsArray(existing_citedReferences, incoming_citedReferences, (existing_citedReferences_item, incoming_citedReferences_item) => {
|
|
2146
|
+
if (!(equals$d(existing_citedReferences_item, incoming_citedReferences_item))) {
|
|
2147
|
+
return false;
|
|
2148
|
+
}
|
|
2149
|
+
});
|
|
2150
|
+
if (equals_citedReferences_items === false) {
|
|
2151
|
+
return false;
|
|
2152
|
+
}
|
|
2153
|
+
}
|
|
2154
|
+
return true;
|
|
2155
|
+
}
|
|
2156
|
+
|
|
1919
2157
|
const VERSION$b = "f62ac44b024b123f079b57f349e05230";
|
|
1920
2158
|
function validate$c(obj, path = 'EinsteinPromptTemplateAttachmentExclusionInfoRepresentation') {
|
|
1921
2159
|
const v_error = (() => {
|
|
@@ -2418,12 +2656,22 @@ function equals$6(existing, incoming) {
|
|
|
2418
2656
|
}
|
|
2419
2657
|
|
|
2420
2658
|
const TTL$3 = 100;
|
|
2421
|
-
const VERSION$5 = "
|
|
2659
|
+
const VERSION$5 = "25461f267931be0754b36e2788461191";
|
|
2422
2660
|
function validate$6(obj, path = 'EinsteinPromptTemplateGenerationsRepresentation') {
|
|
2423
2661
|
const v_error = (() => {
|
|
2424
2662
|
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
2425
2663
|
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
2426
2664
|
}
|
|
2665
|
+
if (obj.citations !== undefined) {
|
|
2666
|
+
const obj_citations = obj.citations;
|
|
2667
|
+
const path_citations = path + '.citations';
|
|
2668
|
+
const referencepath_citationsValidationError = validate$d(obj_citations, path_citations);
|
|
2669
|
+
if (referencepath_citationsValidationError !== null) {
|
|
2670
|
+
let message = 'Object doesn\'t match EinsteinLlmGenerationCitationRepresentation (at "' + path_citations + '")\n';
|
|
2671
|
+
message += referencepath_citationsValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
2672
|
+
return new TypeError(message);
|
|
2673
|
+
}
|
|
2674
|
+
}
|
|
2427
2675
|
if (obj.fileData !== undefined) {
|
|
2428
2676
|
const obj_fileData = obj.fileData;
|
|
2429
2677
|
const path_fileData = path + '.fileData';
|
|
@@ -2466,7 +2714,7 @@ function validate$6(obj, path = 'EinsteinPromptTemplateGenerationsRepresentation
|
|
|
2466
2714
|
for (let i = 0; i < obj_generations.length; i++) {
|
|
2467
2715
|
const obj_generations_item = obj_generations[i];
|
|
2468
2716
|
const path_generations_item = path_generations + '[' + i + ']';
|
|
2469
|
-
const referencepath_generations_itemValidationError = validate$
|
|
2717
|
+
const referencepath_generations_itemValidationError = validate$j(obj_generations_item, path_generations_item);
|
|
2470
2718
|
if (referencepath_generations_itemValidationError !== null) {
|
|
2471
2719
|
let message = 'Object doesn\'t match EinsteinLlmGenerationItemRepresentation (at "' + path_generations_item + '")\n';
|
|
2472
2720
|
message += referencepath_generations_itemValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
@@ -2493,7 +2741,7 @@ function validate$6(obj, path = 'EinsteinPromptTemplateGenerationsRepresentation
|
|
|
2493
2741
|
const path_parameters = path + '.parameters';
|
|
2494
2742
|
let obj_parameters_union0 = null;
|
|
2495
2743
|
const obj_parameters_union0_error = (() => {
|
|
2496
|
-
const referencepath_parametersValidationError = validate$
|
|
2744
|
+
const referencepath_parametersValidationError = validate$i(obj_parameters, path_parameters);
|
|
2497
2745
|
if (referencepath_parametersValidationError !== null) {
|
|
2498
2746
|
let message = 'Object doesn\'t match WrappedMap (at "' + path_parameters + '")\n';
|
|
2499
2747
|
message += referencepath_parametersValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
@@ -2622,10 +2870,11 @@ function normalize$3(input, existing, path, luvio, store, timestamp) {
|
|
|
2622
2870
|
return input;
|
|
2623
2871
|
}
|
|
2624
2872
|
const select$9 = function EinsteinPromptTemplateGenerationsRepresentationSelect() {
|
|
2873
|
+
const { selections: EinsteinLlmGenerationCitationRepresentation__selections, opaque: EinsteinLlmGenerationCitationRepresentation__opaque, } = select$g();
|
|
2625
2874
|
const { selections: EinsteinPromptTemplateAttachmentRepresentation__selections, opaque: EinsteinPromptTemplateAttachmentRepresentation__opaque, } = select$e();
|
|
2626
2875
|
const { selections: EinsteinPromptTemplateGenerationsErrorRepresentation__selections, opaque: EinsteinPromptTemplateGenerationsErrorRepresentation__opaque, } = select$d();
|
|
2627
|
-
const { selections: EinsteinLlmGenerationItemRepresentation__selections, opaque: EinsteinLlmGenerationItemRepresentation__opaque, } = select$
|
|
2628
|
-
const { selections: WrappedMap__selections, opaque: WrappedMap__opaque, } = select$
|
|
2876
|
+
const { selections: EinsteinLlmGenerationItemRepresentation__selections, opaque: EinsteinLlmGenerationItemRepresentation__opaque, } = select$l();
|
|
2877
|
+
const { selections: WrappedMap__selections, opaque: WrappedMap__opaque, } = select$k();
|
|
2629
2878
|
const { selections: EinsteinPromptTemplateMaskContentRepresentation__selections, opaque: EinsteinPromptTemplateMaskContentRepresentation__opaque, } = select$b();
|
|
2630
2879
|
const { selections: EinsteinPromptTemplateMaskDataRepresentation__selections, opaque: EinsteinPromptTemplateMaskDataRepresentation__opaque, } = select$a();
|
|
2631
2880
|
return {
|
|
@@ -2633,6 +2882,12 @@ const select$9 = function EinsteinPromptTemplateGenerationsRepresentationSelect(
|
|
|
2633
2882
|
version: VERSION$5,
|
|
2634
2883
|
private: [],
|
|
2635
2884
|
selections: [
|
|
2885
|
+
{
|
|
2886
|
+
name: 'citations',
|
|
2887
|
+
kind: 'Object',
|
|
2888
|
+
selections: EinsteinLlmGenerationCitationRepresentation__selections,
|
|
2889
|
+
required: false
|
|
2890
|
+
},
|
|
2636
2891
|
{
|
|
2637
2892
|
name: 'fileData',
|
|
2638
2893
|
kind: 'Object',
|
|
@@ -2711,6 +2966,19 @@ function equals$5(existing, incoming) {
|
|
|
2711
2966
|
if (!(existing_requestId === incoming_requestId)) {
|
|
2712
2967
|
return false;
|
|
2713
2968
|
}
|
|
2969
|
+
const existing_citations = existing.citations;
|
|
2970
|
+
const incoming_citations = incoming.citations;
|
|
2971
|
+
// if at least one of these optionals is defined
|
|
2972
|
+
if (existing_citations !== undefined || incoming_citations !== undefined) {
|
|
2973
|
+
// if one of these is not defined we know the other is defined and therefore
|
|
2974
|
+
// not equal
|
|
2975
|
+
if (existing_citations === undefined || incoming_citations === undefined) {
|
|
2976
|
+
return false;
|
|
2977
|
+
}
|
|
2978
|
+
if (!(equals$c(existing_citations, incoming_citations))) {
|
|
2979
|
+
return false;
|
|
2980
|
+
}
|
|
2981
|
+
}
|
|
2714
2982
|
const existing_fileData = existing.fileData;
|
|
2715
2983
|
const incoming_fileData = incoming.fileData;
|
|
2716
2984
|
// if at least one of these optionals is defined
|
|
@@ -2750,7 +3018,7 @@ function equals$5(existing, incoming) {
|
|
|
2750
3018
|
const existing_generations = existing.generations;
|
|
2751
3019
|
const incoming_generations = incoming.generations;
|
|
2752
3020
|
const equals_generations_items = equalsArray(existing_generations, incoming_generations, (existing_generations_item, incoming_generations_item) => {
|
|
2753
|
-
if (!(equals$
|
|
3021
|
+
if (!(equals$g(existing_generations_item, incoming_generations_item))) {
|
|
2754
3022
|
return false;
|
|
2755
3023
|
}
|
|
2756
3024
|
});
|
|
@@ -2780,7 +3048,7 @@ function equals$5(existing, incoming) {
|
|
|
2780
3048
|
if (!(existing_parameters === incoming_parameters
|
|
2781
3049
|
|| (existing_parameters != null &&
|
|
2782
3050
|
incoming_parameters != null &&
|
|
2783
|
-
equals$
|
|
3051
|
+
equals$f(existing_parameters, incoming_parameters)))) {
|
|
2784
3052
|
return false;
|
|
2785
3053
|
}
|
|
2786
3054
|
const existing_prompt = existing.prompt;
|
|
@@ -2915,7 +3183,7 @@ function typeCheckConfig$3(untrustedConfig) {
|
|
|
2915
3183
|
const config = {};
|
|
2916
3184
|
typeCheckConfig$7(untrustedConfig, config, createGenerationsForPromptTemplate_ConfigPropertyMetadata);
|
|
2917
3185
|
const untrustedConfig_promptTemplateGenerationsInput = untrustedConfig.promptTemplateGenerationsInput;
|
|
2918
|
-
const referenceEinsteinPromptTemplateGenerationsInputRepresentationValidationError = validate$
|
|
3186
|
+
const referenceEinsteinPromptTemplateGenerationsInputRepresentationValidationError = validate$f(untrustedConfig_promptTemplateGenerationsInput);
|
|
2919
3187
|
if (referenceEinsteinPromptTemplateGenerationsInputRepresentationValidationError === null) {
|
|
2920
3188
|
config.promptTemplateGenerationsInput = untrustedConfig_promptTemplateGenerationsInput;
|
|
2921
3189
|
}
|
|
@@ -3956,4 +4224,4 @@ withDefaultLuvio((luvio) => {
|
|
|
3956
4224
|
});
|
|
3957
4225
|
|
|
3958
4226
|
export { createEmbeddings, createEmbeddings_imperative, createFeedback, createGenerations, createGenerationsForPromptTemplate, getOutputLanguages, getOutputLanguages_imperative, getPromptTemplate, getPromptTemplate_imperative, getPromptTemplates, getPromptTemplates_imperative };
|
|
3959
|
-
// version: 1.354.0-
|
|
4227
|
+
// version: 1.354.0-dev24-26a58ee8f3
|