@salesforce/lds-adapters-service-einsteinllm 1.332.0-dev11 → 1.332.0-dev12
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 +372 -192
- package/dist/es/es2018/types/src/generated/adapters/getPromptTemplate.d.ts +28 -0
- package/dist/es/es2018/types/src/generated/artifacts/main.d.ts +1 -0
- package/dist/es/es2018/types/src/generated/artifacts/sfdc.d.ts +3 -1
- package/dist/es/es2018/types/src/generated/resources/getEinsteinPromptTemplatesByPromptTemplateDevName.d.ts +18 -0
- package/dist/es/es2018/types/src/generated/types/EinsteinPromptRecordCollectionOutputRepresentation.d.ts +3 -3
- package/dist/es/es2018/types/src/generated/types/EinsteinPromptRecordRepresentation.d.ts +5 -4
- package/package.json +4 -4
- package/sfdc/index.js +500 -312
- package/src/raml/api.raml +19 -1
- package/src/raml/luvio.raml +8 -0
package/sfdc/index.js
CHANGED
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
/* proxy-compat-disable */
|
|
15
15
|
import { createInstrumentedAdapter, createLDSAdapter, createWireAdapterConstructor, createImperativeAdapter } from 'force/ldsBindings';
|
|
16
16
|
import { withDefaultLuvio } from 'force/ldsEngine';
|
|
17
|
-
import { serializeStructuredKey, ingestShape, deepFreeze, buildNetworkSnapshotCachePolicy as buildNetworkSnapshotCachePolicy$
|
|
17
|
+
import { serializeStructuredKey, ingestShape, deepFreeze, buildNetworkSnapshotCachePolicy as buildNetworkSnapshotCachePolicy$4, StoreKeyMap, createResourceParams as createResourceParams$7, typeCheckConfig as typeCheckConfig$7 } from 'force/luvioEngine';
|
|
18
18
|
|
|
19
19
|
const { hasOwnProperty: ObjectPrototypeHasOwnProperty } = Object.prototype;
|
|
20
20
|
const { keys: ObjectKeys$1, create: ObjectCreate$1 } = Object;
|
|
@@ -275,7 +275,7 @@ function validate$p(obj, path = 'EinsteinLlmEmbeddingsInputRepresentation') {
|
|
|
275
275
|
return v_error === undefined ? null : v_error;
|
|
276
276
|
}
|
|
277
277
|
|
|
278
|
-
const VERSION$
|
|
278
|
+
const VERSION$i = "5ed5ccc6fa6f15691ec0fc1080e41fe6";
|
|
279
279
|
function validate$o(obj, path = 'EinsteinLlmEmbeddingItemRepresentation') {
|
|
280
280
|
const v_error = (() => {
|
|
281
281
|
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
@@ -297,10 +297,10 @@ function validate$o(obj, path = 'EinsteinLlmEmbeddingItemRepresentation') {
|
|
|
297
297
|
})();
|
|
298
298
|
return v_error === undefined ? null : v_error;
|
|
299
299
|
}
|
|
300
|
-
const select$
|
|
300
|
+
const select$p = function EinsteinLlmEmbeddingItemRepresentationSelect() {
|
|
301
301
|
return {
|
|
302
302
|
kind: 'Fragment',
|
|
303
|
-
version: VERSION$
|
|
303
|
+
version: VERSION$i,
|
|
304
304
|
private: [],
|
|
305
305
|
selections: [
|
|
306
306
|
{
|
|
@@ -315,7 +315,7 @@ const select$n = function EinsteinLlmEmbeddingItemRepresentationSelect() {
|
|
|
315
315
|
]
|
|
316
316
|
};
|
|
317
317
|
};
|
|
318
|
-
function equals$
|
|
318
|
+
function equals$i(existing, incoming) {
|
|
319
319
|
const existing_index = existing.index;
|
|
320
320
|
const incoming_index = incoming.index;
|
|
321
321
|
if (!(existing_index === incoming_index)) {
|
|
@@ -334,8 +334,8 @@ function equals$h(existing, incoming) {
|
|
|
334
334
|
return true;
|
|
335
335
|
}
|
|
336
336
|
|
|
337
|
-
const TTL$
|
|
338
|
-
const VERSION$
|
|
337
|
+
const TTL$6 = 100;
|
|
338
|
+
const VERSION$h = "d9873651f09d29764ef4d4231eb653d7";
|
|
339
339
|
function validate$n(obj, path = 'EinsteinLlmEmbeddingsRepresentation') {
|
|
340
340
|
const v_error = (() => {
|
|
341
341
|
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
@@ -373,15 +373,15 @@ function validate$n(obj, path = 'EinsteinLlmEmbeddingsRepresentation') {
|
|
|
373
373
|
})();
|
|
374
374
|
return v_error === undefined ? null : v_error;
|
|
375
375
|
}
|
|
376
|
-
const RepresentationType$
|
|
377
|
-
function normalize$
|
|
376
|
+
const RepresentationType$6 = 'EinsteinLlmEmbeddingsRepresentation';
|
|
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$o = function EinsteinLlmEmbeddingsRepresentationSelect() {
|
|
381
|
+
const { selections: EinsteinLlmEmbeddingItemRepresentation__selections, opaque: EinsteinLlmEmbeddingItemRepresentation__opaque, } = select$p();
|
|
382
382
|
return {
|
|
383
383
|
kind: 'Fragment',
|
|
384
|
-
version: VERSION$
|
|
384
|
+
version: VERSION$h,
|
|
385
385
|
private: [],
|
|
386
386
|
selections: [
|
|
387
387
|
{
|
|
@@ -398,11 +398,11 @@ const select$m = function EinsteinLlmEmbeddingsRepresentationSelect() {
|
|
|
398
398
|
]
|
|
399
399
|
};
|
|
400
400
|
};
|
|
401
|
-
function equals$
|
|
401
|
+
function equals$h(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$i(existing_embeddings_item, incoming_embeddings_item))) {
|
|
406
406
|
return false;
|
|
407
407
|
}
|
|
408
408
|
});
|
|
@@ -421,7 +421,7 @@ function equals$g(existing, incoming) {
|
|
|
421
421
|
}
|
|
422
422
|
return true;
|
|
423
423
|
}
|
|
424
|
-
const ingest$
|
|
424
|
+
const ingest$6 = function EinsteinLlmEmbeddingsRepresentationIngest(input, path, luvio, store, timestamp) {
|
|
425
425
|
if (process.env.NODE_ENV !== 'production') {
|
|
426
426
|
const validateError = validate$n(input);
|
|
427
427
|
if (validateError !== null) {
|
|
@@ -429,36 +429,36 @@ const ingest$5 = function EinsteinLlmEmbeddingsRepresentationIngest(input, path,
|
|
|
429
429
|
}
|
|
430
430
|
}
|
|
431
431
|
const key = path.fullPath;
|
|
432
|
-
const ttlToUse = TTL$
|
|
433
|
-
ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize$
|
|
432
|
+
const ttlToUse = TTL$6;
|
|
433
|
+
ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize$6, "EinsteinLLM", VERSION$h, RepresentationType$6, equals$h);
|
|
434
434
|
return createLink(key);
|
|
435
435
|
};
|
|
436
|
-
function getTypeCacheKeys$
|
|
436
|
+
function getTypeCacheKeys$6(rootKeySet, luvio, input, fullPathFactory) {
|
|
437
437
|
// root cache key (uses fullPathFactory if keyBuilderFromType isn't defined)
|
|
438
438
|
const rootKey = fullPathFactory();
|
|
439
439
|
rootKeySet.set(rootKey, {
|
|
440
440
|
namespace: keyPrefix,
|
|
441
|
-
representationName: RepresentationType$
|
|
441
|
+
representationName: RepresentationType$6,
|
|
442
442
|
mergeable: false
|
|
443
443
|
});
|
|
444
444
|
}
|
|
445
445
|
|
|
446
|
-
function select$
|
|
447
|
-
return select$
|
|
446
|
+
function select$n(luvio, params) {
|
|
447
|
+
return select$o();
|
|
448
448
|
}
|
|
449
|
-
function keyBuilder$
|
|
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) + ')';
|
|
451
451
|
}
|
|
452
|
-
function getResponseCacheKeys$
|
|
453
|
-
getTypeCacheKeys$
|
|
452
|
+
function getResponseCacheKeys$6(storeKeyMap, luvio, resourceParams, response) {
|
|
453
|
+
getTypeCacheKeys$6(storeKeyMap, luvio, response, () => keyBuilder$a(luvio, resourceParams));
|
|
454
454
|
}
|
|
455
|
-
function ingestSuccess$
|
|
455
|
+
function ingestSuccess$6(luvio, resourceParams, response, snapshotRefresh) {
|
|
456
456
|
const { body } = response;
|
|
457
|
-
const key = keyBuilder$
|
|
458
|
-
luvio.storeIngest(key, ingest$
|
|
457
|
+
const key = keyBuilder$a(luvio, resourceParams);
|
|
458
|
+
luvio.storeIngest(key, ingest$6, body);
|
|
459
459
|
const snapshot = luvio.storeLookup({
|
|
460
460
|
recordId: key,
|
|
461
|
-
node: select$
|
|
461
|
+
node: select$n(),
|
|
462
462
|
variables: {},
|
|
463
463
|
}, snapshotRefresh);
|
|
464
464
|
if (process.env.NODE_ENV !== 'production') {
|
|
@@ -469,19 +469,19 @@ function ingestSuccess$5(luvio, resourceParams, response, snapshotRefresh) {
|
|
|
469
469
|
deepFreeze(snapshot.data);
|
|
470
470
|
return snapshot;
|
|
471
471
|
}
|
|
472
|
-
function ingestError$
|
|
473
|
-
const key = keyBuilder$
|
|
472
|
+
function ingestError$3(luvio, params, error, snapshotRefresh) {
|
|
473
|
+
const key = keyBuilder$a(luvio, params);
|
|
474
474
|
const errorSnapshot = luvio.errorSnapshot(error, snapshotRefresh);
|
|
475
475
|
const storeMetadataParams = {
|
|
476
|
-
ttl: TTL$
|
|
476
|
+
ttl: TTL$6,
|
|
477
477
|
namespace: keyPrefix,
|
|
478
|
-
version: VERSION$
|
|
479
|
-
representationName: RepresentationType$
|
|
478
|
+
version: VERSION$h,
|
|
479
|
+
representationName: RepresentationType$6
|
|
480
480
|
};
|
|
481
481
|
luvio.storeIngestError(key, errorSnapshot, storeMetadataParams);
|
|
482
482
|
return errorSnapshot;
|
|
483
483
|
}
|
|
484
|
-
function createResourceRequest$
|
|
484
|
+
function createResourceRequest$6(config) {
|
|
485
485
|
const headers = {};
|
|
486
486
|
return {
|
|
487
487
|
baseUri: '/services/data/v63.0',
|
|
@@ -495,17 +495,17 @@ function createResourceRequest$5(config) {
|
|
|
495
495
|
};
|
|
496
496
|
}
|
|
497
497
|
|
|
498
|
-
const adapterName$
|
|
498
|
+
const adapterName$6 = 'createEmbeddings';
|
|
499
499
|
const createEmbeddings_ConfigPropertyMetadata = [
|
|
500
500
|
generateParamConfigMetadata('embeddingsInput', true, 2 /* Body */, 4 /* Unsupported */),
|
|
501
501
|
];
|
|
502
|
-
const createEmbeddings_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$
|
|
503
|
-
const createResourceParams$
|
|
504
|
-
function keyBuilder$
|
|
505
|
-
const resourceParams = createResourceParams$
|
|
506
|
-
return keyBuilder$
|
|
502
|
+
const createEmbeddings_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$6, createEmbeddings_ConfigPropertyMetadata);
|
|
503
|
+
const createResourceParams$6 = /*#__PURE__*/ createResourceParams$7(createEmbeddings_ConfigPropertyMetadata);
|
|
504
|
+
function keyBuilder$9(luvio, config) {
|
|
505
|
+
const resourceParams = createResourceParams$6(config);
|
|
506
|
+
return keyBuilder$a(luvio, resourceParams);
|
|
507
507
|
}
|
|
508
|
-
function typeCheckConfig$
|
|
508
|
+
function typeCheckConfig$6(untrustedConfig) {
|
|
509
509
|
const config = {};
|
|
510
510
|
const untrustedConfig_embeddingsInput = untrustedConfig.embeddingsInput;
|
|
511
511
|
const referenceEinsteinLlmEmbeddingsInputRepresentationValidationError = validate$p(untrustedConfig_embeddingsInput);
|
|
@@ -514,75 +514,75 @@ function typeCheckConfig$5(untrustedConfig) {
|
|
|
514
514
|
}
|
|
515
515
|
return config;
|
|
516
516
|
}
|
|
517
|
-
function validateAdapterConfig$
|
|
517
|
+
function validateAdapterConfig$6(untrustedConfig, configPropertyNames) {
|
|
518
518
|
if (!untrustedIsObject(untrustedConfig)) {
|
|
519
519
|
return null;
|
|
520
520
|
}
|
|
521
521
|
if (process.env.NODE_ENV !== 'production') {
|
|
522
522
|
validateConfig(untrustedConfig, configPropertyNames);
|
|
523
523
|
}
|
|
524
|
-
const config = typeCheckConfig$
|
|
524
|
+
const config = typeCheckConfig$6(untrustedConfig);
|
|
525
525
|
if (!areRequiredParametersPresent(config, configPropertyNames)) {
|
|
526
526
|
return null;
|
|
527
527
|
}
|
|
528
528
|
return config;
|
|
529
529
|
}
|
|
530
|
-
function adapterFragment$
|
|
531
|
-
createResourceParams$
|
|
532
|
-
return select$
|
|
530
|
+
function adapterFragment$3(luvio, config) {
|
|
531
|
+
createResourceParams$6(config);
|
|
532
|
+
return select$n();
|
|
533
533
|
}
|
|
534
|
-
function onFetchResponseSuccess$
|
|
535
|
-
const snapshot = ingestSuccess$
|
|
534
|
+
function onFetchResponseSuccess$3(luvio, config, resourceParams, response) {
|
|
535
|
+
const snapshot = ingestSuccess$6(luvio, resourceParams, response, {
|
|
536
536
|
config,
|
|
537
|
-
resolve: () => buildNetworkSnapshot$
|
|
537
|
+
resolve: () => buildNetworkSnapshot$6(luvio, config, snapshotRefreshOptions)
|
|
538
538
|
});
|
|
539
539
|
return luvio.storeBroadcast().then(() => snapshot);
|
|
540
540
|
}
|
|
541
|
-
function onFetchResponseError$
|
|
542
|
-
const snapshot = ingestError$
|
|
541
|
+
function onFetchResponseError$3(luvio, config, resourceParams, response) {
|
|
542
|
+
const snapshot = ingestError$3(luvio, resourceParams, response, {
|
|
543
543
|
config,
|
|
544
|
-
resolve: () => buildNetworkSnapshot$
|
|
544
|
+
resolve: () => buildNetworkSnapshot$6(luvio, config, snapshotRefreshOptions)
|
|
545
545
|
});
|
|
546
546
|
return luvio.storeBroadcast().then(() => snapshot);
|
|
547
547
|
}
|
|
548
|
-
function buildNetworkSnapshot$
|
|
549
|
-
const resourceParams = createResourceParams$
|
|
550
|
-
const request = createResourceRequest$
|
|
548
|
+
function buildNetworkSnapshot$6(luvio, config, options) {
|
|
549
|
+
const resourceParams = createResourceParams$6(config);
|
|
550
|
+
const request = createResourceRequest$6(resourceParams);
|
|
551
551
|
return luvio.dispatchResourceRequest(request, options)
|
|
552
552
|
.then((response) => {
|
|
553
|
-
return luvio.handleSuccessResponse(() => onFetchResponseSuccess$
|
|
553
|
+
return luvio.handleSuccessResponse(() => onFetchResponseSuccess$3(luvio, config, resourceParams, response), () => {
|
|
554
554
|
const cache = new StoreKeyMap();
|
|
555
|
-
getResponseCacheKeys$
|
|
555
|
+
getResponseCacheKeys$6(cache, luvio, resourceParams, response.body);
|
|
556
556
|
return cache;
|
|
557
557
|
});
|
|
558
558
|
}, (response) => {
|
|
559
|
-
return luvio.handleErrorResponse(() => onFetchResponseError$
|
|
559
|
+
return luvio.handleErrorResponse(() => onFetchResponseError$3(luvio, config, resourceParams, response));
|
|
560
560
|
});
|
|
561
561
|
}
|
|
562
|
-
function buildNetworkSnapshotCachePolicy$
|
|
563
|
-
return buildNetworkSnapshotCachePolicy$
|
|
562
|
+
function buildNetworkSnapshotCachePolicy$3(context, coercedAdapterRequestContext) {
|
|
563
|
+
return buildNetworkSnapshotCachePolicy$4(context, coercedAdapterRequestContext, buildNetworkSnapshot$6, 'get', false);
|
|
564
564
|
}
|
|
565
|
-
function buildCachedSnapshotCachePolicy$
|
|
565
|
+
function buildCachedSnapshotCachePolicy$3(context, storeLookup) {
|
|
566
566
|
const { luvio, config } = context;
|
|
567
567
|
const selector = {
|
|
568
|
-
recordId: keyBuilder$
|
|
569
|
-
node: adapterFragment$
|
|
568
|
+
recordId: keyBuilder$9(luvio, config),
|
|
569
|
+
node: adapterFragment$3(luvio, config),
|
|
570
570
|
variables: {},
|
|
571
571
|
};
|
|
572
572
|
const cacheSnapshot = storeLookup(selector, {
|
|
573
573
|
config,
|
|
574
|
-
resolve: () => buildNetworkSnapshot$
|
|
574
|
+
resolve: () => buildNetworkSnapshot$6(luvio, config, snapshotRefreshOptions)
|
|
575
575
|
});
|
|
576
576
|
return cacheSnapshot;
|
|
577
577
|
}
|
|
578
578
|
const createEmbeddingsAdapterFactory = (luvio) => function EinsteinLLM__createEmbeddings(untrustedConfig, requestContext) {
|
|
579
|
-
const config = validateAdapterConfig$
|
|
579
|
+
const config = validateAdapterConfig$6(untrustedConfig, createEmbeddings_ConfigPropertyNames);
|
|
580
580
|
// Invalid or incomplete config
|
|
581
581
|
if (config === null) {
|
|
582
582
|
return null;
|
|
583
583
|
}
|
|
584
584
|
return luvio.applyCachePolicy((requestContext || {}), { config, luvio }, // BuildSnapshotContext
|
|
585
|
-
buildCachedSnapshotCachePolicy$
|
|
585
|
+
buildCachedSnapshotCachePolicy$3, buildNetworkSnapshotCachePolicy$3);
|
|
586
586
|
};
|
|
587
587
|
|
|
588
588
|
function validate$m(obj, path = 'EinsteinLlmFeedbackInputRepresentation') {
|
|
@@ -632,8 +632,8 @@ function validate$m(obj, path = 'EinsteinLlmFeedbackInputRepresentation') {
|
|
|
632
632
|
return v_error === undefined ? null : v_error;
|
|
633
633
|
}
|
|
634
634
|
|
|
635
|
-
const TTL$
|
|
636
|
-
const VERSION$
|
|
635
|
+
const TTL$5 = 100;
|
|
636
|
+
const VERSION$g = "4033328f65865dd5d80c68a7573a4522";
|
|
637
637
|
function validate$l(obj, path = 'EinsteinLlmFeedbackRepresentation') {
|
|
638
638
|
const v_error = (() => {
|
|
639
639
|
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
@@ -647,23 +647,23 @@ function validate$l(obj, path = 'EinsteinLlmFeedbackRepresentation') {
|
|
|
647
647
|
})();
|
|
648
648
|
return v_error === undefined ? null : v_error;
|
|
649
649
|
}
|
|
650
|
-
const RepresentationType$
|
|
651
|
-
function keyBuilder$
|
|
652
|
-
return keyPrefix + '::' + RepresentationType$
|
|
650
|
+
const RepresentationType$5 = 'EinsteinLlmFeedbackRepresentation';
|
|
651
|
+
function keyBuilder$8(luvio, config) {
|
|
652
|
+
return keyPrefix + '::' + RepresentationType$5 + ':' + config.message;
|
|
653
653
|
}
|
|
654
654
|
function keyBuilderFromType$2(luvio, object) {
|
|
655
655
|
const keyParams = {
|
|
656
656
|
message: object.message
|
|
657
657
|
};
|
|
658
|
-
return keyBuilder$
|
|
658
|
+
return keyBuilder$8(luvio, keyParams);
|
|
659
659
|
}
|
|
660
|
-
function normalize$
|
|
660
|
+
function normalize$5(input, existing, path, luvio, store, timestamp) {
|
|
661
661
|
return input;
|
|
662
662
|
}
|
|
663
|
-
const select$
|
|
663
|
+
const select$m = function EinsteinLlmFeedbackRepresentationSelect() {
|
|
664
664
|
return {
|
|
665
665
|
kind: 'Fragment',
|
|
666
|
-
version: VERSION$
|
|
666
|
+
version: VERSION$g,
|
|
667
667
|
private: [],
|
|
668
668
|
selections: [
|
|
669
669
|
{
|
|
@@ -673,7 +673,7 @@ const select$k = function EinsteinLlmFeedbackRepresentationSelect() {
|
|
|
673
673
|
]
|
|
674
674
|
};
|
|
675
675
|
};
|
|
676
|
-
function equals$
|
|
676
|
+
function equals$g(existing, incoming) {
|
|
677
677
|
const existing_message = existing.message;
|
|
678
678
|
const incoming_message = incoming.message;
|
|
679
679
|
if (!(existing_message === incoming_message)) {
|
|
@@ -681,7 +681,7 @@ function equals$f(existing, incoming) {
|
|
|
681
681
|
}
|
|
682
682
|
return true;
|
|
683
683
|
}
|
|
684
|
-
const ingest$
|
|
684
|
+
const ingest$5 = function EinsteinLlmFeedbackRepresentationIngest(input, path, luvio, store, timestamp) {
|
|
685
685
|
if (process.env.NODE_ENV !== 'production') {
|
|
686
686
|
const validateError = validate$l(input);
|
|
687
687
|
if (validateError !== null) {
|
|
@@ -689,33 +689,33 @@ const ingest$4 = function EinsteinLlmFeedbackRepresentationIngest(input, path, l
|
|
|
689
689
|
}
|
|
690
690
|
}
|
|
691
691
|
const key = keyBuilderFromType$2(luvio, input);
|
|
692
|
-
const ttlToUse = TTL$
|
|
693
|
-
ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize$
|
|
692
|
+
const ttlToUse = TTL$5;
|
|
693
|
+
ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize$5, "EinsteinLLM", VERSION$g, RepresentationType$5, equals$g);
|
|
694
694
|
return createLink(key);
|
|
695
695
|
};
|
|
696
|
-
function getTypeCacheKeys$
|
|
696
|
+
function getTypeCacheKeys$5(rootKeySet, luvio, input, fullPathFactory) {
|
|
697
697
|
// root cache key (uses fullPathFactory if keyBuilderFromType isn't defined)
|
|
698
698
|
const rootKey = keyBuilderFromType$2(luvio, input);
|
|
699
699
|
rootKeySet.set(rootKey, {
|
|
700
700
|
namespace: keyPrefix,
|
|
701
|
-
representationName: RepresentationType$
|
|
701
|
+
representationName: RepresentationType$5,
|
|
702
702
|
mergeable: false
|
|
703
703
|
});
|
|
704
704
|
}
|
|
705
705
|
|
|
706
|
-
function select$
|
|
707
|
-
return select$
|
|
706
|
+
function select$l(luvio, params) {
|
|
707
|
+
return select$m();
|
|
708
708
|
}
|
|
709
|
-
function getResponseCacheKeys$
|
|
710
|
-
getTypeCacheKeys$
|
|
709
|
+
function getResponseCacheKeys$5(storeKeyMap, luvio, resourceParams, response) {
|
|
710
|
+
getTypeCacheKeys$5(storeKeyMap, luvio, response);
|
|
711
711
|
}
|
|
712
|
-
function ingestSuccess$
|
|
712
|
+
function ingestSuccess$5(luvio, resourceParams, response) {
|
|
713
713
|
const { body } = response;
|
|
714
714
|
const key = keyBuilderFromType$2(luvio, body);
|
|
715
|
-
luvio.storeIngest(key, ingest$
|
|
715
|
+
luvio.storeIngest(key, ingest$5, body);
|
|
716
716
|
const snapshot = luvio.storeLookup({
|
|
717
717
|
recordId: key,
|
|
718
|
-
node: select$
|
|
718
|
+
node: select$l(),
|
|
719
719
|
variables: {},
|
|
720
720
|
});
|
|
721
721
|
if (process.env.NODE_ENV !== 'production') {
|
|
@@ -726,7 +726,7 @@ function ingestSuccess$4(luvio, resourceParams, response) {
|
|
|
726
726
|
deepFreeze(snapshot.data);
|
|
727
727
|
return snapshot;
|
|
728
728
|
}
|
|
729
|
-
function createResourceRequest$
|
|
729
|
+
function createResourceRequest$5(config) {
|
|
730
730
|
const headers = {};
|
|
731
731
|
return {
|
|
732
732
|
baseUri: '/services/data/v63.0',
|
|
@@ -740,13 +740,13 @@ function createResourceRequest$4(config) {
|
|
|
740
740
|
};
|
|
741
741
|
}
|
|
742
742
|
|
|
743
|
-
const adapterName$
|
|
743
|
+
const adapterName$5 = 'createFeedback';
|
|
744
744
|
const createFeedback_ConfigPropertyMetadata = [
|
|
745
745
|
generateParamConfigMetadata('feedbackInput', true, 2 /* Body */, 4 /* Unsupported */),
|
|
746
746
|
];
|
|
747
|
-
const createFeedback_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$
|
|
748
|
-
const createResourceParams$
|
|
749
|
-
function typeCheckConfig$
|
|
747
|
+
const createFeedback_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$5, createFeedback_ConfigPropertyMetadata);
|
|
748
|
+
const createResourceParams$5 = /*#__PURE__*/ createResourceParams$7(createFeedback_ConfigPropertyMetadata);
|
|
749
|
+
function typeCheckConfig$5(untrustedConfig) {
|
|
750
750
|
const config = {};
|
|
751
751
|
const untrustedConfig_feedbackInput = untrustedConfig.feedbackInput;
|
|
752
752
|
const referenceEinsteinLlmFeedbackInputRepresentationValidationError = validate$m(untrustedConfig_feedbackInput);
|
|
@@ -755,30 +755,30 @@ function typeCheckConfig$4(untrustedConfig) {
|
|
|
755
755
|
}
|
|
756
756
|
return config;
|
|
757
757
|
}
|
|
758
|
-
function validateAdapterConfig$
|
|
758
|
+
function validateAdapterConfig$5(untrustedConfig, configPropertyNames) {
|
|
759
759
|
if (!untrustedIsObject(untrustedConfig)) {
|
|
760
760
|
return null;
|
|
761
761
|
}
|
|
762
762
|
if (process.env.NODE_ENV !== 'production') {
|
|
763
763
|
validateConfig(untrustedConfig, configPropertyNames);
|
|
764
764
|
}
|
|
765
|
-
const config = typeCheckConfig$
|
|
765
|
+
const config = typeCheckConfig$5(untrustedConfig);
|
|
766
766
|
if (!areRequiredParametersPresent(config, configPropertyNames)) {
|
|
767
767
|
return null;
|
|
768
768
|
}
|
|
769
769
|
return config;
|
|
770
770
|
}
|
|
771
|
-
function buildNetworkSnapshot$
|
|
772
|
-
const resourceParams = createResourceParams$
|
|
773
|
-
const request = createResourceRequest$
|
|
771
|
+
function buildNetworkSnapshot$5(luvio, config, options) {
|
|
772
|
+
const resourceParams = createResourceParams$5(config);
|
|
773
|
+
const request = createResourceRequest$5(resourceParams);
|
|
774
774
|
return luvio.dispatchResourceRequest(request, options)
|
|
775
775
|
.then((response) => {
|
|
776
776
|
return luvio.handleSuccessResponse(() => {
|
|
777
|
-
const snapshot = ingestSuccess$
|
|
777
|
+
const snapshot = ingestSuccess$5(luvio, resourceParams, response);
|
|
778
778
|
return luvio.storeBroadcast().then(() => snapshot);
|
|
779
779
|
}, () => {
|
|
780
780
|
const cache = new StoreKeyMap();
|
|
781
|
-
getResponseCacheKeys$
|
|
781
|
+
getResponseCacheKeys$5(cache, luvio, resourceParams, response.body);
|
|
782
782
|
return cache;
|
|
783
783
|
});
|
|
784
784
|
}, (response) => {
|
|
@@ -788,12 +788,12 @@ function buildNetworkSnapshot$4(luvio, config, options) {
|
|
|
788
788
|
}
|
|
789
789
|
const createFeedbackAdapterFactory = (luvio) => {
|
|
790
790
|
return function createFeedback(untrustedConfig) {
|
|
791
|
-
const config = validateAdapterConfig$
|
|
791
|
+
const config = validateAdapterConfig$5(untrustedConfig, createFeedback_ConfigPropertyNames);
|
|
792
792
|
// Invalid or incomplete config
|
|
793
793
|
if (config === null) {
|
|
794
794
|
throw new Error('Invalid config for "createFeedback"');
|
|
795
795
|
}
|
|
796
|
-
return buildNetworkSnapshot$
|
|
796
|
+
return buildNetworkSnapshot$5(luvio, config);
|
|
797
797
|
};
|
|
798
798
|
};
|
|
799
799
|
|
|
@@ -911,7 +911,7 @@ function validate$j(obj, path = 'EinsteinLlmGenerationsInputRepresentation') {
|
|
|
911
911
|
return v_error === undefined ? null : v_error;
|
|
912
912
|
}
|
|
913
913
|
|
|
914
|
-
const VERSION$
|
|
914
|
+
const VERSION$f = "9ebac74e6f964c363d5fd1913df363af";
|
|
915
915
|
function validate$i(obj, path = 'EinsteinLlmGenerationsContentQualityRepresentation') {
|
|
916
916
|
const v_error = (() => {
|
|
917
917
|
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
@@ -948,10 +948,10 @@ function validate$i(obj, path = 'EinsteinLlmGenerationsContentQualityRepresentat
|
|
|
948
948
|
})();
|
|
949
949
|
return v_error === undefined ? null : v_error;
|
|
950
950
|
}
|
|
951
|
-
const select$
|
|
951
|
+
const select$k = function EinsteinLlmGenerationsContentQualityRepresentationSelect() {
|
|
952
952
|
return {
|
|
953
953
|
kind: 'Fragment',
|
|
954
|
-
version: VERSION$
|
|
954
|
+
version: VERSION$f,
|
|
955
955
|
private: [],
|
|
956
956
|
selections: [
|
|
957
957
|
{
|
|
@@ -962,7 +962,7 @@ const select$i = function EinsteinLlmGenerationsContentQualityRepresentationSele
|
|
|
962
962
|
]
|
|
963
963
|
};
|
|
964
964
|
};
|
|
965
|
-
function equals$
|
|
965
|
+
function equals$f(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,7 +979,7 @@ function equals$e(existing, incoming) {
|
|
|
979
979
|
return true;
|
|
980
980
|
}
|
|
981
981
|
|
|
982
|
-
const VERSION$
|
|
982
|
+
const VERSION$e = "77af44a252cb5b45b4d9a8101368d2aa";
|
|
983
983
|
function validate$h(obj, path = 'EinsteinLlmGenerationsSafetyScoreRepresentation') {
|
|
984
984
|
const v_error = (() => {
|
|
985
985
|
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
@@ -1184,10 +1184,10 @@ function validate$h(obj, path = 'EinsteinLlmGenerationsSafetyScoreRepresentation
|
|
|
1184
1184
|
})();
|
|
1185
1185
|
return v_error === undefined ? null : v_error;
|
|
1186
1186
|
}
|
|
1187
|
-
const select$
|
|
1187
|
+
const select$j = function EinsteinLlmGenerationsSafetyScoreRepresentationSelect() {
|
|
1188
1188
|
return {
|
|
1189
1189
|
kind: 'Fragment',
|
|
1190
|
-
version: VERSION$
|
|
1190
|
+
version: VERSION$e,
|
|
1191
1191
|
private: [],
|
|
1192
1192
|
selections: [
|
|
1193
1193
|
{
|
|
@@ -1228,7 +1228,7 @@ const select$h = function EinsteinLlmGenerationsSafetyScoreRepresentationSelect(
|
|
|
1228
1228
|
]
|
|
1229
1229
|
};
|
|
1230
1230
|
};
|
|
1231
|
-
function equals$
|
|
1231
|
+
function equals$e(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,7 +1323,7 @@ function equals$d(existing, incoming) {
|
|
|
1323
1323
|
return true;
|
|
1324
1324
|
}
|
|
1325
1325
|
|
|
1326
|
-
const VERSION$
|
|
1326
|
+
const VERSION$d = "4a07778ff6c595d91c575188146647a1";
|
|
1327
1327
|
function validate$g(obj, path = 'EinsteinLlmGenerationItemRepresentation') {
|
|
1328
1328
|
const v_error = (() => {
|
|
1329
1329
|
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
@@ -1416,12 +1416,12 @@ function validate$g(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$i = function EinsteinLlmGenerationItemRepresentationSelect() {
|
|
1420
|
+
const { selections: EinsteinLlmGenerationsContentQualityRepresentation__selections, opaque: EinsteinLlmGenerationsContentQualityRepresentation__opaque, } = select$k();
|
|
1421
|
+
const { selections: EinsteinLlmGenerationsSafetyScoreRepresentation__selections, opaque: EinsteinLlmGenerationsSafetyScoreRepresentation__opaque, } = select$j();
|
|
1422
1422
|
return {
|
|
1423
1423
|
kind: 'Fragment',
|
|
1424
|
-
version: VERSION$
|
|
1424
|
+
version: VERSION$d,
|
|
1425
1425
|
private: [],
|
|
1426
1426
|
selections: [
|
|
1427
1427
|
{
|
|
@@ -1458,7 +1458,7 @@ const select$g = function EinsteinLlmGenerationItemRepresentationSelect() {
|
|
|
1458
1458
|
]
|
|
1459
1459
|
};
|
|
1460
1460
|
};
|
|
1461
|
-
function equals$
|
|
1461
|
+
function equals$d(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$c(existing, incoming) {
|
|
|
1499
1499
|
if (!(existing_contentQualityRepresentation === incoming_contentQualityRepresentation
|
|
1500
1500
|
|| (existing_contentQualityRepresentation != null &&
|
|
1501
1501
|
incoming_contentQualityRepresentation != null &&
|
|
1502
|
-
equals$
|
|
1502
|
+
equals$f(existing_contentQualityRepresentation, incoming_contentQualityRepresentation)))) {
|
|
1503
1503
|
return false;
|
|
1504
1504
|
}
|
|
1505
1505
|
}
|
|
@@ -1515,14 +1515,14 @@ function equals$c(existing, incoming) {
|
|
|
1515
1515
|
if (!(existing_safetyScoreRepresentation === incoming_safetyScoreRepresentation
|
|
1516
1516
|
|| (existing_safetyScoreRepresentation != null &&
|
|
1517
1517
|
incoming_safetyScoreRepresentation != null &&
|
|
1518
|
-
equals$
|
|
1518
|
+
equals$e(existing_safetyScoreRepresentation, incoming_safetyScoreRepresentation)))) {
|
|
1519
1519
|
return false;
|
|
1520
1520
|
}
|
|
1521
1521
|
}
|
|
1522
1522
|
return true;
|
|
1523
1523
|
}
|
|
1524
1524
|
|
|
1525
|
-
const VERSION$
|
|
1525
|
+
const VERSION$c = "4656c961c9d093a9e206c1db7d4de0b0";
|
|
1526
1526
|
function validate$f(obj, path = 'WrappedMap') {
|
|
1527
1527
|
const v_error = (() => {
|
|
1528
1528
|
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
@@ -1545,15 +1545,15 @@ function validate$f(obj, path = 'WrappedMap') {
|
|
|
1545
1545
|
})();
|
|
1546
1546
|
return v_error === undefined ? null : v_error;
|
|
1547
1547
|
}
|
|
1548
|
-
const select$
|
|
1548
|
+
const select$h = function WrappedMapSelect() {
|
|
1549
1549
|
return {
|
|
1550
1550
|
kind: 'Fragment',
|
|
1551
|
-
version: VERSION$
|
|
1551
|
+
version: VERSION$c,
|
|
1552
1552
|
private: [],
|
|
1553
1553
|
selections: []
|
|
1554
1554
|
};
|
|
1555
1555
|
};
|
|
1556
|
-
function equals$
|
|
1556
|
+
function equals$c(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) => {
|
|
@@ -1564,8 +1564,8 @@ function equals$b(existing, incoming) {
|
|
|
1564
1564
|
return true;
|
|
1565
1565
|
}
|
|
1566
1566
|
|
|
1567
|
-
const TTL$
|
|
1568
|
-
const VERSION$
|
|
1567
|
+
const TTL$4 = 100;
|
|
1568
|
+
const VERSION$b = "d8abd72a42e842b253da1c38954dafbc";
|
|
1569
1569
|
function validate$e(obj, path = 'EinsteinLlmGenerationsRepresentation') {
|
|
1570
1570
|
const v_error = (() => {
|
|
1571
1571
|
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
@@ -1649,25 +1649,25 @@ function validate$e(obj, path = 'EinsteinLlmGenerationsRepresentation') {
|
|
|
1649
1649
|
})();
|
|
1650
1650
|
return v_error === undefined ? null : v_error;
|
|
1651
1651
|
}
|
|
1652
|
-
const RepresentationType$
|
|
1653
|
-
function keyBuilder$
|
|
1654
|
-
return keyPrefix + '::' + RepresentationType$
|
|
1652
|
+
const RepresentationType$4 = 'EinsteinLlmGenerationsRepresentation';
|
|
1653
|
+
function keyBuilder$7(luvio, config) {
|
|
1654
|
+
return keyPrefix + '::' + RepresentationType$4 + ':' + config.requestId;
|
|
1655
1655
|
}
|
|
1656
1656
|
function keyBuilderFromType$1(luvio, object) {
|
|
1657
1657
|
const keyParams = {
|
|
1658
1658
|
requestId: object.requestId
|
|
1659
1659
|
};
|
|
1660
|
-
return keyBuilder$
|
|
1660
|
+
return keyBuilder$7(luvio, keyParams);
|
|
1661
1661
|
}
|
|
1662
|
-
function normalize$
|
|
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$g = function EinsteinLlmGenerationsRepresentationSelect() {
|
|
1666
|
+
const { selections: EinsteinLlmGenerationItemRepresentation__selections, opaque: EinsteinLlmGenerationItemRepresentation__opaque, } = select$i();
|
|
1667
|
+
const { selections: WrappedMap__selections, opaque: WrappedMap__opaque, } = select$h();
|
|
1668
1668
|
return {
|
|
1669
1669
|
kind: 'Fragment',
|
|
1670
|
-
version: VERSION$
|
|
1670
|
+
version: VERSION$b,
|
|
1671
1671
|
private: [],
|
|
1672
1672
|
selections: [
|
|
1673
1673
|
{
|
|
@@ -1693,7 +1693,7 @@ const select$e = function EinsteinLlmGenerationsRepresentationSelect() {
|
|
|
1693
1693
|
]
|
|
1694
1694
|
};
|
|
1695
1695
|
};
|
|
1696
|
-
function equals$
|
|
1696
|
+
function equals$b(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$a(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$d(existing_generations_item, incoming_generations_item))) {
|
|
1706
1706
|
return false;
|
|
1707
1707
|
}
|
|
1708
1708
|
});
|
|
@@ -1714,7 +1714,7 @@ function equals$a(existing, incoming) {
|
|
|
1714
1714
|
if (!(existing_parameters === incoming_parameters
|
|
1715
1715
|
|| (existing_parameters != null &&
|
|
1716
1716
|
incoming_parameters != null &&
|
|
1717
|
-
equals$
|
|
1717
|
+
equals$c(existing_parameters, incoming_parameters)))) {
|
|
1718
1718
|
return false;
|
|
1719
1719
|
}
|
|
1720
1720
|
const existing_prompt = existing.prompt;
|
|
@@ -1724,7 +1724,7 @@ function equals$a(existing, incoming) {
|
|
|
1724
1724
|
}
|
|
1725
1725
|
return true;
|
|
1726
1726
|
}
|
|
1727
|
-
const ingest$
|
|
1727
|
+
const ingest$4 = function EinsteinLlmGenerationsRepresentationIngest(input, path, luvio, store, timestamp) {
|
|
1728
1728
|
if (process.env.NODE_ENV !== 'production') {
|
|
1729
1729
|
const validateError = validate$e(input);
|
|
1730
1730
|
if (validateError !== null) {
|
|
@@ -1732,33 +1732,33 @@ const ingest$3 = function EinsteinLlmGenerationsRepresentationIngest(input, path
|
|
|
1732
1732
|
}
|
|
1733
1733
|
}
|
|
1734
1734
|
const key = keyBuilderFromType$1(luvio, input);
|
|
1735
|
-
const ttlToUse = TTL$
|
|
1736
|
-
ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize$
|
|
1735
|
+
const ttlToUse = TTL$4;
|
|
1736
|
+
ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize$4, "EinsteinLLM", VERSION$b, RepresentationType$4, equals$b);
|
|
1737
1737
|
return createLink(key);
|
|
1738
1738
|
};
|
|
1739
|
-
function getTypeCacheKeys$
|
|
1739
|
+
function getTypeCacheKeys$4(rootKeySet, luvio, input, fullPathFactory) {
|
|
1740
1740
|
// root cache key (uses fullPathFactory if keyBuilderFromType isn't defined)
|
|
1741
1741
|
const rootKey = keyBuilderFromType$1(luvio, input);
|
|
1742
1742
|
rootKeySet.set(rootKey, {
|
|
1743
1743
|
namespace: keyPrefix,
|
|
1744
|
-
representationName: RepresentationType$
|
|
1744
|
+
representationName: RepresentationType$4,
|
|
1745
1745
|
mergeable: false
|
|
1746
1746
|
});
|
|
1747
1747
|
}
|
|
1748
1748
|
|
|
1749
|
-
function select$
|
|
1750
|
-
return select$
|
|
1749
|
+
function select$f(luvio, params) {
|
|
1750
|
+
return select$g();
|
|
1751
1751
|
}
|
|
1752
|
-
function getResponseCacheKeys$
|
|
1753
|
-
getTypeCacheKeys$
|
|
1752
|
+
function getResponseCacheKeys$4(storeKeyMap, luvio, resourceParams, response) {
|
|
1753
|
+
getTypeCacheKeys$4(storeKeyMap, luvio, response);
|
|
1754
1754
|
}
|
|
1755
|
-
function ingestSuccess$
|
|
1755
|
+
function ingestSuccess$4(luvio, resourceParams, response) {
|
|
1756
1756
|
const { body } = response;
|
|
1757
1757
|
const key = keyBuilderFromType$1(luvio, body);
|
|
1758
|
-
luvio.storeIngest(key, ingest$
|
|
1758
|
+
luvio.storeIngest(key, ingest$4, body);
|
|
1759
1759
|
const snapshot = luvio.storeLookup({
|
|
1760
1760
|
recordId: key,
|
|
1761
|
-
node: select$
|
|
1761
|
+
node: select$f(),
|
|
1762
1762
|
variables: {},
|
|
1763
1763
|
});
|
|
1764
1764
|
if (process.env.NODE_ENV !== 'production') {
|
|
@@ -1769,7 +1769,7 @@ function ingestSuccess$3(luvio, resourceParams, response) {
|
|
|
1769
1769
|
deepFreeze(snapshot.data);
|
|
1770
1770
|
return snapshot;
|
|
1771
1771
|
}
|
|
1772
|
-
function createResourceRequest$
|
|
1772
|
+
function createResourceRequest$4(config) {
|
|
1773
1773
|
const headers = {};
|
|
1774
1774
|
return {
|
|
1775
1775
|
baseUri: '/services/data/v63.0',
|
|
@@ -1783,13 +1783,13 @@ function createResourceRequest$3(config) {
|
|
|
1783
1783
|
};
|
|
1784
1784
|
}
|
|
1785
1785
|
|
|
1786
|
-
const adapterName$
|
|
1786
|
+
const adapterName$4 = 'createGenerations';
|
|
1787
1787
|
const createGenerations_ConfigPropertyMetadata = [
|
|
1788
1788
|
generateParamConfigMetadata('generationsInput', true, 2 /* Body */, 4 /* Unsupported */),
|
|
1789
1789
|
];
|
|
1790
|
-
const createGenerations_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$
|
|
1791
|
-
const createResourceParams$
|
|
1792
|
-
function typeCheckConfig$
|
|
1790
|
+
const createGenerations_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$4, createGenerations_ConfigPropertyMetadata);
|
|
1791
|
+
const createResourceParams$4 = /*#__PURE__*/ createResourceParams$7(createGenerations_ConfigPropertyMetadata);
|
|
1792
|
+
function typeCheckConfig$4(untrustedConfig) {
|
|
1793
1793
|
const config = {};
|
|
1794
1794
|
const untrustedConfig_generationsInput = untrustedConfig.generationsInput;
|
|
1795
1795
|
const referenceEinsteinLlmGenerationsInputRepresentationValidationError = validate$j(untrustedConfig_generationsInput);
|
|
@@ -1798,30 +1798,30 @@ function typeCheckConfig$3(untrustedConfig) {
|
|
|
1798
1798
|
}
|
|
1799
1799
|
return config;
|
|
1800
1800
|
}
|
|
1801
|
-
function validateAdapterConfig$
|
|
1801
|
+
function validateAdapterConfig$4(untrustedConfig, configPropertyNames) {
|
|
1802
1802
|
if (!untrustedIsObject(untrustedConfig)) {
|
|
1803
1803
|
return null;
|
|
1804
1804
|
}
|
|
1805
1805
|
if (process.env.NODE_ENV !== 'production') {
|
|
1806
1806
|
validateConfig(untrustedConfig, configPropertyNames);
|
|
1807
1807
|
}
|
|
1808
|
-
const config = typeCheckConfig$
|
|
1808
|
+
const config = typeCheckConfig$4(untrustedConfig);
|
|
1809
1809
|
if (!areRequiredParametersPresent(config, configPropertyNames)) {
|
|
1810
1810
|
return null;
|
|
1811
1811
|
}
|
|
1812
1812
|
return config;
|
|
1813
1813
|
}
|
|
1814
|
-
function buildNetworkSnapshot$
|
|
1815
|
-
const resourceParams = createResourceParams$
|
|
1816
|
-
const request = createResourceRequest$
|
|
1814
|
+
function buildNetworkSnapshot$4(luvio, config, options) {
|
|
1815
|
+
const resourceParams = createResourceParams$4(config);
|
|
1816
|
+
const request = createResourceRequest$4(resourceParams);
|
|
1817
1817
|
return luvio.dispatchResourceRequest(request, options)
|
|
1818
1818
|
.then((response) => {
|
|
1819
1819
|
return luvio.handleSuccessResponse(() => {
|
|
1820
|
-
const snapshot = ingestSuccess$
|
|
1820
|
+
const snapshot = ingestSuccess$4(luvio, resourceParams, response);
|
|
1821
1821
|
return luvio.storeBroadcast().then(() => snapshot);
|
|
1822
1822
|
}, () => {
|
|
1823
1823
|
const cache = new StoreKeyMap();
|
|
1824
|
-
getResponseCacheKeys$
|
|
1824
|
+
getResponseCacheKeys$4(cache, luvio, resourceParams, response.body);
|
|
1825
1825
|
return cache;
|
|
1826
1826
|
});
|
|
1827
1827
|
}, (response) => {
|
|
@@ -1831,12 +1831,12 @@ function buildNetworkSnapshot$3(luvio, config, options) {
|
|
|
1831
1831
|
}
|
|
1832
1832
|
const createGenerationsAdapterFactory = (luvio) => {
|
|
1833
1833
|
return function createGenerations(untrustedConfig) {
|
|
1834
|
-
const config = validateAdapterConfig$
|
|
1834
|
+
const config = validateAdapterConfig$4(untrustedConfig, createGenerations_ConfigPropertyNames);
|
|
1835
1835
|
// Invalid or incomplete config
|
|
1836
1836
|
if (config === null) {
|
|
1837
1837
|
throw new Error('Invalid config for "createGenerations"');
|
|
1838
1838
|
}
|
|
1839
|
-
return buildNetworkSnapshot$
|
|
1839
|
+
return buildNetworkSnapshot$4(luvio, config);
|
|
1840
1840
|
};
|
|
1841
1841
|
};
|
|
1842
1842
|
|
|
@@ -1909,7 +1909,7 @@ function validate$c(obj, path = 'EinsteinPromptTemplateGenerationsInputRepresent
|
|
|
1909
1909
|
return v_error === undefined ? null : v_error;
|
|
1910
1910
|
}
|
|
1911
1911
|
|
|
1912
|
-
const VERSION$
|
|
1912
|
+
const VERSION$a = "70b3261d05a4bf7da95cd5cabe9bd785";
|
|
1913
1913
|
function validate$b(obj, path = 'EinsteinPromptTemplateAttachmentRepresentation') {
|
|
1914
1914
|
const v_error = (() => {
|
|
1915
1915
|
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
@@ -1938,10 +1938,10 @@ function validate$b(obj, path = 'EinsteinPromptTemplateAttachmentRepresentation'
|
|
|
1938
1938
|
})();
|
|
1939
1939
|
return v_error === undefined ? null : v_error;
|
|
1940
1940
|
}
|
|
1941
|
-
const select$
|
|
1941
|
+
const select$e = function EinsteinPromptTemplateAttachmentRepresentationSelect() {
|
|
1942
1942
|
return {
|
|
1943
1943
|
kind: 'Fragment',
|
|
1944
|
-
version: VERSION$
|
|
1944
|
+
version: VERSION$a,
|
|
1945
1945
|
private: [],
|
|
1946
1946
|
selections: [
|
|
1947
1947
|
{
|
|
@@ -1963,7 +1963,7 @@ const select$c = function EinsteinPromptTemplateAttachmentRepresentationSelect()
|
|
|
1963
1963
|
]
|
|
1964
1964
|
};
|
|
1965
1965
|
};
|
|
1966
|
-
function equals$
|
|
1966
|
+
function equals$a(existing, incoming) {
|
|
1967
1967
|
const existing_fileExtension = existing.fileExtension;
|
|
1968
1968
|
const incoming_fileExtension = incoming.fileExtension;
|
|
1969
1969
|
if (!(existing_fileExtension === incoming_fileExtension)) {
|
|
@@ -1987,7 +1987,7 @@ function equals$9(existing, incoming) {
|
|
|
1987
1987
|
return true;
|
|
1988
1988
|
}
|
|
1989
1989
|
|
|
1990
|
-
const VERSION$
|
|
1990
|
+
const VERSION$9 = "6458d624e5a1691821c764b6de0badb3";
|
|
1991
1991
|
function validate$a(obj, path = 'EinsteinPromptTemplateGenerationsErrorRepresentation') {
|
|
1992
1992
|
const v_error = (() => {
|
|
1993
1993
|
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
@@ -2018,10 +2018,10 @@ function validate$a(obj, path = 'EinsteinPromptTemplateGenerationsErrorRepresent
|
|
|
2018
2018
|
})();
|
|
2019
2019
|
return v_error === undefined ? null : v_error;
|
|
2020
2020
|
}
|
|
2021
|
-
const select$
|
|
2021
|
+
const select$d = function EinsteinPromptTemplateGenerationsErrorRepresentationSelect() {
|
|
2022
2022
|
return {
|
|
2023
2023
|
kind: 'Fragment',
|
|
2024
|
-
version: VERSION$
|
|
2024
|
+
version: VERSION$9,
|
|
2025
2025
|
private: [],
|
|
2026
2026
|
selections: [
|
|
2027
2027
|
{
|
|
@@ -2044,7 +2044,7 @@ const select$b = function EinsteinPromptTemplateGenerationsErrorRepresentationSe
|
|
|
2044
2044
|
]
|
|
2045
2045
|
};
|
|
2046
2046
|
};
|
|
2047
|
-
function equals$
|
|
2047
|
+
function equals$9(existing, incoming) {
|
|
2048
2048
|
const existing_errorMessage = existing.errorMessage;
|
|
2049
2049
|
const incoming_errorMessage = incoming.errorMessage;
|
|
2050
2050
|
if (!(existing_errorMessage === incoming_errorMessage)) {
|
|
@@ -2076,7 +2076,7 @@ function equals$8(existing, incoming) {
|
|
|
2076
2076
|
return true;
|
|
2077
2077
|
}
|
|
2078
2078
|
|
|
2079
|
-
const VERSION$
|
|
2079
|
+
const VERSION$8 = "7c417ce44e4bc05dfcc454e6825590e8";
|
|
2080
2080
|
function validate$9(obj, path = 'EinsteinPromptTemplateMaskSettingsRepresentation') {
|
|
2081
2081
|
const v_error = (() => {
|
|
2082
2082
|
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
@@ -2090,10 +2090,10 @@ function validate$9(obj, path = 'EinsteinPromptTemplateMaskSettingsRepresentatio
|
|
|
2090
2090
|
})();
|
|
2091
2091
|
return v_error === undefined ? null : v_error;
|
|
2092
2092
|
}
|
|
2093
|
-
const select$
|
|
2093
|
+
const select$c = function EinsteinPromptTemplateMaskSettingsRepresentationSelect() {
|
|
2094
2094
|
return {
|
|
2095
2095
|
kind: 'Fragment',
|
|
2096
|
-
version: VERSION$
|
|
2096
|
+
version: VERSION$8,
|
|
2097
2097
|
private: [],
|
|
2098
2098
|
selections: [
|
|
2099
2099
|
{
|
|
@@ -2103,7 +2103,7 @@ const select$a = function EinsteinPromptTemplateMaskSettingsRepresentationSelect
|
|
|
2103
2103
|
]
|
|
2104
2104
|
};
|
|
2105
2105
|
};
|
|
2106
|
-
function equals$
|
|
2106
|
+
function equals$8(existing, incoming) {
|
|
2107
2107
|
const existing_enableModeration = existing.enableModeration;
|
|
2108
2108
|
const incoming_enableModeration = incoming.enableModeration;
|
|
2109
2109
|
if (!(existing_enableModeration === incoming_enableModeration)) {
|
|
@@ -2112,7 +2112,7 @@ function equals$7(existing, incoming) {
|
|
|
2112
2112
|
return true;
|
|
2113
2113
|
}
|
|
2114
2114
|
|
|
2115
|
-
const VERSION$
|
|
2115
|
+
const VERSION$7 = "92ad1abd0e2a60bc36941409cadda7e2";
|
|
2116
2116
|
function validate$8(obj, path = 'EinsteinPromptTemplateMaskContentRepresentation') {
|
|
2117
2117
|
const v_error = (() => {
|
|
2118
2118
|
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
@@ -2164,11 +2164,11 @@ function validate$8(obj, path = 'EinsteinPromptTemplateMaskContentRepresentation
|
|
|
2164
2164
|
})();
|
|
2165
2165
|
return v_error === undefined ? null : v_error;
|
|
2166
2166
|
}
|
|
2167
|
-
const select$
|
|
2168
|
-
const { selections: EinsteinPromptTemplateMaskSettingsRepresentation__selections, opaque: EinsteinPromptTemplateMaskSettingsRepresentation__opaque, } = select$
|
|
2167
|
+
const select$b = function EinsteinPromptTemplateMaskContentRepresentationSelect() {
|
|
2168
|
+
const { selections: EinsteinPromptTemplateMaskSettingsRepresentation__selections, opaque: EinsteinPromptTemplateMaskSettingsRepresentation__opaque, } = select$c();
|
|
2169
2169
|
return {
|
|
2170
2170
|
kind: 'Fragment',
|
|
2171
|
-
version: VERSION$
|
|
2171
|
+
version: VERSION$7,
|
|
2172
2172
|
private: [],
|
|
2173
2173
|
selections: [
|
|
2174
2174
|
{
|
|
@@ -2190,7 +2190,7 @@ const select$9 = function EinsteinPromptTemplateMaskContentRepresentationSelect(
|
|
|
2190
2190
|
]
|
|
2191
2191
|
};
|
|
2192
2192
|
};
|
|
2193
|
-
function equals$
|
|
2193
|
+
function equals$7(existing, incoming) {
|
|
2194
2194
|
const existing_content = existing.content;
|
|
2195
2195
|
const incoming_content = incoming.content;
|
|
2196
2196
|
if (!(existing_content === incoming_content)) {
|
|
@@ -2221,14 +2221,14 @@ function equals$6(existing, incoming) {
|
|
|
2221
2221
|
if (!(existing_moderationSettings === incoming_moderationSettings
|
|
2222
2222
|
|| (existing_moderationSettings != null &&
|
|
2223
2223
|
incoming_moderationSettings != null &&
|
|
2224
|
-
equals$
|
|
2224
|
+
equals$8(existing_moderationSettings, incoming_moderationSettings)))) {
|
|
2225
2225
|
return false;
|
|
2226
2226
|
}
|
|
2227
2227
|
}
|
|
2228
2228
|
return true;
|
|
2229
2229
|
}
|
|
2230
2230
|
|
|
2231
|
-
const VERSION$
|
|
2231
|
+
const VERSION$6 = "507a815605f8d30ae9b52b0ec513d25e";
|
|
2232
2232
|
function validate$7(obj, path = 'EinsteinPromptTemplateMaskDataRepresentation') {
|
|
2233
2233
|
const v_error = (() => {
|
|
2234
2234
|
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
@@ -2259,10 +2259,10 @@ function validate$7(obj, path = 'EinsteinPromptTemplateMaskDataRepresentation')
|
|
|
2259
2259
|
})();
|
|
2260
2260
|
return v_error === undefined ? null : v_error;
|
|
2261
2261
|
}
|
|
2262
|
-
const select$
|
|
2262
|
+
const select$a = function EinsteinPromptTemplateMaskDataRepresentationSelect() {
|
|
2263
2263
|
return {
|
|
2264
2264
|
kind: 'Fragment',
|
|
2265
|
-
version: VERSION$
|
|
2265
|
+
version: VERSION$6,
|
|
2266
2266
|
private: [],
|
|
2267
2267
|
selections: [
|
|
2268
2268
|
{
|
|
@@ -2281,7 +2281,7 @@ const select$8 = function EinsteinPromptTemplateMaskDataRepresentationSelect() {
|
|
|
2281
2281
|
]
|
|
2282
2282
|
};
|
|
2283
2283
|
};
|
|
2284
|
-
function equals$
|
|
2284
|
+
function equals$6(existing, incoming) {
|
|
2285
2285
|
const existing_originalValue = existing.originalValue;
|
|
2286
2286
|
const incoming_originalValue = incoming.originalValue;
|
|
2287
2287
|
if (!(existing_originalValue === incoming_originalValue)) {
|
|
@@ -2305,8 +2305,8 @@ function equals$5(existing, incoming) {
|
|
|
2305
2305
|
return true;
|
|
2306
2306
|
}
|
|
2307
2307
|
|
|
2308
|
-
const TTL$
|
|
2309
|
-
const VERSION$
|
|
2308
|
+
const TTL$3 = 100;
|
|
2309
|
+
const VERSION$5 = "1beba5cc950346499a8f4810c77e2b03";
|
|
2310
2310
|
function validate$6(obj, path = 'EinsteinPromptTemplateGenerationsRepresentation') {
|
|
2311
2311
|
const v_error = (() => {
|
|
2312
2312
|
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
@@ -2480,29 +2480,29 @@ function validate$6(obj, path = 'EinsteinPromptTemplateGenerationsRepresentation
|
|
|
2480
2480
|
})();
|
|
2481
2481
|
return v_error === undefined ? null : v_error;
|
|
2482
2482
|
}
|
|
2483
|
-
const RepresentationType$
|
|
2484
|
-
function keyBuilder$
|
|
2485
|
-
return keyPrefix + '::' + RepresentationType$
|
|
2483
|
+
const RepresentationType$3 = 'EinsteinPromptTemplateGenerationsRepresentation';
|
|
2484
|
+
function keyBuilder$6(luvio, config) {
|
|
2485
|
+
return keyPrefix + '::' + RepresentationType$3 + ':' + config.requestId;
|
|
2486
2486
|
}
|
|
2487
2487
|
function keyBuilderFromType(luvio, object) {
|
|
2488
2488
|
const keyParams = {
|
|
2489
2489
|
requestId: object.requestId
|
|
2490
2490
|
};
|
|
2491
|
-
return keyBuilder$
|
|
2491
|
+
return keyBuilder$6(luvio, keyParams);
|
|
2492
2492
|
}
|
|
2493
|
-
function normalize$
|
|
2493
|
+
function normalize$3(input, existing, path, luvio, store, timestamp) {
|
|
2494
2494
|
return input;
|
|
2495
2495
|
}
|
|
2496
|
-
const select$
|
|
2497
|
-
const { selections: EinsteinPromptTemplateAttachmentRepresentation__selections, opaque: EinsteinPromptTemplateAttachmentRepresentation__opaque, } = select$
|
|
2498
|
-
const { selections: EinsteinPromptTemplateGenerationsErrorRepresentation__selections, opaque: EinsteinPromptTemplateGenerationsErrorRepresentation__opaque, } = select$
|
|
2499
|
-
const { selections: EinsteinLlmGenerationItemRepresentation__selections, opaque: EinsteinLlmGenerationItemRepresentation__opaque, } = select$
|
|
2500
|
-
const { selections: WrappedMap__selections, opaque: WrappedMap__opaque, } = select$
|
|
2501
|
-
const { selections: EinsteinPromptTemplateMaskContentRepresentation__selections, opaque: EinsteinPromptTemplateMaskContentRepresentation__opaque, } = select$
|
|
2502
|
-
const { selections: EinsteinPromptTemplateMaskDataRepresentation__selections, opaque: EinsteinPromptTemplateMaskDataRepresentation__opaque, } = select$
|
|
2496
|
+
const select$9 = function EinsteinPromptTemplateGenerationsRepresentationSelect() {
|
|
2497
|
+
const { selections: EinsteinPromptTemplateAttachmentRepresentation__selections, opaque: EinsteinPromptTemplateAttachmentRepresentation__opaque, } = select$e();
|
|
2498
|
+
const { selections: EinsteinPromptTemplateGenerationsErrorRepresentation__selections, opaque: EinsteinPromptTemplateGenerationsErrorRepresentation__opaque, } = select$d();
|
|
2499
|
+
const { selections: EinsteinLlmGenerationItemRepresentation__selections, opaque: EinsteinLlmGenerationItemRepresentation__opaque, } = select$i();
|
|
2500
|
+
const { selections: WrappedMap__selections, opaque: WrappedMap__opaque, } = select$h();
|
|
2501
|
+
const { selections: EinsteinPromptTemplateMaskContentRepresentation__selections, opaque: EinsteinPromptTemplateMaskContentRepresentation__opaque, } = select$b();
|
|
2502
|
+
const { selections: EinsteinPromptTemplateMaskDataRepresentation__selections, opaque: EinsteinPromptTemplateMaskDataRepresentation__opaque, } = select$a();
|
|
2503
2503
|
return {
|
|
2504
2504
|
kind: 'Fragment',
|
|
2505
|
-
version: VERSION$
|
|
2505
|
+
version: VERSION$5,
|
|
2506
2506
|
private: [],
|
|
2507
2507
|
selections: [
|
|
2508
2508
|
{
|
|
@@ -2567,7 +2567,7 @@ const select$7 = function EinsteinPromptTemplateGenerationsRepresentationSelect(
|
|
|
2567
2567
|
]
|
|
2568
2568
|
};
|
|
2569
2569
|
};
|
|
2570
|
-
function equals$
|
|
2570
|
+
function equals$5(existing, incoming) {
|
|
2571
2571
|
const existing_promptTemplateDevName = existing.promptTemplateDevName;
|
|
2572
2572
|
const incoming_promptTemplateDevName = incoming.promptTemplateDevName;
|
|
2573
2573
|
if (!(existing_promptTemplateDevName === incoming_promptTemplateDevName)) {
|
|
@@ -2588,7 +2588,7 @@ function equals$4(existing, incoming) {
|
|
|
2588
2588
|
return false;
|
|
2589
2589
|
}
|
|
2590
2590
|
const equals_fileData_items = equalsArray(existing_fileData, incoming_fileData, (existing_fileData_item, incoming_fileData_item) => {
|
|
2591
|
-
if (!(equals$
|
|
2591
|
+
if (!(equals$a(existing_fileData_item, incoming_fileData_item))) {
|
|
2592
2592
|
return false;
|
|
2593
2593
|
}
|
|
2594
2594
|
});
|
|
@@ -2606,7 +2606,7 @@ function equals$4(existing, incoming) {
|
|
|
2606
2606
|
return false;
|
|
2607
2607
|
}
|
|
2608
2608
|
const equals_generationErrors_items = equalsArray(existing_generationErrors, incoming_generationErrors, (existing_generationErrors_item, incoming_generationErrors_item) => {
|
|
2609
|
-
if (!(equals$
|
|
2609
|
+
if (!(equals$9(existing_generationErrors_item, incoming_generationErrors_item))) {
|
|
2610
2610
|
return false;
|
|
2611
2611
|
}
|
|
2612
2612
|
});
|
|
@@ -2617,7 +2617,7 @@ function equals$4(existing, incoming) {
|
|
|
2617
2617
|
const existing_generations = existing.generations;
|
|
2618
2618
|
const incoming_generations = incoming.generations;
|
|
2619
2619
|
const equals_generations_items = equalsArray(existing_generations, incoming_generations, (existing_generations_item, incoming_generations_item) => {
|
|
2620
|
-
if (!(equals$
|
|
2620
|
+
if (!(equals$d(existing_generations_item, incoming_generations_item))) {
|
|
2621
2621
|
return false;
|
|
2622
2622
|
}
|
|
2623
2623
|
});
|
|
@@ -2629,7 +2629,7 @@ function equals$4(existing, incoming) {
|
|
|
2629
2629
|
if (!(existing_parameters === incoming_parameters
|
|
2630
2630
|
|| (existing_parameters != null &&
|
|
2631
2631
|
incoming_parameters != null &&
|
|
2632
|
-
equals$
|
|
2632
|
+
equals$c(existing_parameters, incoming_parameters)))) {
|
|
2633
2633
|
return false;
|
|
2634
2634
|
}
|
|
2635
2635
|
const existing_prompt = existing.prompt;
|
|
@@ -2647,7 +2647,7 @@ function equals$4(existing, incoming) {
|
|
|
2647
2647
|
return false;
|
|
2648
2648
|
}
|
|
2649
2649
|
const equals_requestMessages_items = equalsArray(existing_requestMessages, incoming_requestMessages, (existing_requestMessages_item, incoming_requestMessages_item) => {
|
|
2650
|
-
if (!(equals$
|
|
2650
|
+
if (!(equals$7(existing_requestMessages_item, incoming_requestMessages_item))) {
|
|
2651
2651
|
return false;
|
|
2652
2652
|
}
|
|
2653
2653
|
});
|
|
@@ -2665,7 +2665,7 @@ function equals$4(existing, incoming) {
|
|
|
2665
2665
|
return false;
|
|
2666
2666
|
}
|
|
2667
2667
|
const equals_responseMessages_items = equalsArray(existing_responseMessages, incoming_responseMessages, (existing_responseMessages_item, incoming_responseMessages_item) => {
|
|
2668
|
-
if (!(equals$
|
|
2668
|
+
if (!(equals$7(existing_responseMessages_item, incoming_responseMessages_item))) {
|
|
2669
2669
|
return false;
|
|
2670
2670
|
}
|
|
2671
2671
|
});
|
|
@@ -2683,7 +2683,7 @@ function equals$4(existing, incoming) {
|
|
|
2683
2683
|
return false;
|
|
2684
2684
|
}
|
|
2685
2685
|
const equals_slotsMaskingInformation_items = equalsArray(existing_slotsMaskingInformation, incoming_slotsMaskingInformation, (existing_slotsMaskingInformation_item, incoming_slotsMaskingInformation_item) => {
|
|
2686
|
-
if (!(equals$
|
|
2686
|
+
if (!(equals$6(existing_slotsMaskingInformation_item, incoming_slotsMaskingInformation_item))) {
|
|
2687
2687
|
return false;
|
|
2688
2688
|
}
|
|
2689
2689
|
});
|
|
@@ -2693,7 +2693,7 @@ function equals$4(existing, incoming) {
|
|
|
2693
2693
|
}
|
|
2694
2694
|
return true;
|
|
2695
2695
|
}
|
|
2696
|
-
const ingest$
|
|
2696
|
+
const ingest$3 = function EinsteinPromptTemplateGenerationsRepresentationIngest(input, path, luvio, store, timestamp) {
|
|
2697
2697
|
if (process.env.NODE_ENV !== 'production') {
|
|
2698
2698
|
const validateError = validate$6(input);
|
|
2699
2699
|
if (validateError !== null) {
|
|
@@ -2701,33 +2701,33 @@ const ingest$2 = function EinsteinPromptTemplateGenerationsRepresentationIngest(
|
|
|
2701
2701
|
}
|
|
2702
2702
|
}
|
|
2703
2703
|
const key = keyBuilderFromType(luvio, input);
|
|
2704
|
-
const ttlToUse = TTL$
|
|
2705
|
-
ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize$
|
|
2704
|
+
const ttlToUse = TTL$3;
|
|
2705
|
+
ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize$3, "EinsteinLLM", VERSION$5, RepresentationType$3, equals$5);
|
|
2706
2706
|
return createLink(key);
|
|
2707
2707
|
};
|
|
2708
|
-
function getTypeCacheKeys$
|
|
2708
|
+
function getTypeCacheKeys$3(rootKeySet, luvio, input, fullPathFactory) {
|
|
2709
2709
|
// root cache key (uses fullPathFactory if keyBuilderFromType isn't defined)
|
|
2710
2710
|
const rootKey = keyBuilderFromType(luvio, input);
|
|
2711
2711
|
rootKeySet.set(rootKey, {
|
|
2712
2712
|
namespace: keyPrefix,
|
|
2713
|
-
representationName: RepresentationType$
|
|
2713
|
+
representationName: RepresentationType$3,
|
|
2714
2714
|
mergeable: false
|
|
2715
2715
|
});
|
|
2716
2716
|
}
|
|
2717
2717
|
|
|
2718
|
-
function select$
|
|
2719
|
-
return select$
|
|
2718
|
+
function select$8(luvio, params) {
|
|
2719
|
+
return select$9();
|
|
2720
2720
|
}
|
|
2721
|
-
function getResponseCacheKeys$
|
|
2722
|
-
getTypeCacheKeys$
|
|
2721
|
+
function getResponseCacheKeys$3(storeKeyMap, luvio, resourceParams, response) {
|
|
2722
|
+
getTypeCacheKeys$3(storeKeyMap, luvio, response);
|
|
2723
2723
|
}
|
|
2724
|
-
function ingestSuccess$
|
|
2724
|
+
function ingestSuccess$3(luvio, resourceParams, response) {
|
|
2725
2725
|
const { body } = response;
|
|
2726
2726
|
const key = keyBuilderFromType(luvio, body);
|
|
2727
|
-
luvio.storeIngest(key, ingest$
|
|
2727
|
+
luvio.storeIngest(key, ingest$3, body);
|
|
2728
2728
|
const snapshot = luvio.storeLookup({
|
|
2729
2729
|
recordId: key,
|
|
2730
|
-
node: select$
|
|
2730
|
+
node: select$8(),
|
|
2731
2731
|
variables: {},
|
|
2732
2732
|
});
|
|
2733
2733
|
if (process.env.NODE_ENV !== 'production') {
|
|
@@ -2738,7 +2738,7 @@ function ingestSuccess$2(luvio, resourceParams, response) {
|
|
|
2738
2738
|
deepFreeze(snapshot.data);
|
|
2739
2739
|
return snapshot;
|
|
2740
2740
|
}
|
|
2741
|
-
function createResourceRequest$
|
|
2741
|
+
function createResourceRequest$3(config) {
|
|
2742
2742
|
const headers = {};
|
|
2743
2743
|
return {
|
|
2744
2744
|
baseUri: '/services/data/v63.0',
|
|
@@ -2752,17 +2752,17 @@ function createResourceRequest$2(config) {
|
|
|
2752
2752
|
};
|
|
2753
2753
|
}
|
|
2754
2754
|
|
|
2755
|
-
const adapterName$
|
|
2755
|
+
const adapterName$3 = 'createGenerationsForPromptTemplate';
|
|
2756
2756
|
const createGenerationsForPromptTemplate_ConfigPropertyMetadata = [
|
|
2757
2757
|
generateParamConfigMetadata('promptTemplateDevName', true, 0 /* UrlParameter */, 0 /* String */),
|
|
2758
2758
|
generateParamConfigMetadata('versionId', false, 1 /* QueryParameter */, 0 /* String */),
|
|
2759
2759
|
generateParamConfigMetadata('promptTemplateGenerationsInput', true, 2 /* Body */, 4 /* Unsupported */),
|
|
2760
2760
|
];
|
|
2761
|
-
const createGenerationsForPromptTemplate_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$
|
|
2762
|
-
const createResourceParams$
|
|
2763
|
-
function typeCheckConfig$
|
|
2761
|
+
const createGenerationsForPromptTemplate_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$3, createGenerationsForPromptTemplate_ConfigPropertyMetadata);
|
|
2762
|
+
const createResourceParams$3 = /*#__PURE__*/ createResourceParams$7(createGenerationsForPromptTemplate_ConfigPropertyMetadata);
|
|
2763
|
+
function typeCheckConfig$3(untrustedConfig) {
|
|
2764
2764
|
const config = {};
|
|
2765
|
-
typeCheckConfig$
|
|
2765
|
+
typeCheckConfig$7(untrustedConfig, config, createGenerationsForPromptTemplate_ConfigPropertyMetadata);
|
|
2766
2766
|
const untrustedConfig_promptTemplateGenerationsInput = untrustedConfig.promptTemplateGenerationsInput;
|
|
2767
2767
|
const referenceEinsteinPromptTemplateGenerationsInputRepresentationValidationError = validate$c(untrustedConfig_promptTemplateGenerationsInput);
|
|
2768
2768
|
if (referenceEinsteinPromptTemplateGenerationsInputRepresentationValidationError === null) {
|
|
@@ -2770,30 +2770,30 @@ function typeCheckConfig$2(untrustedConfig) {
|
|
|
2770
2770
|
}
|
|
2771
2771
|
return config;
|
|
2772
2772
|
}
|
|
2773
|
-
function validateAdapterConfig$
|
|
2773
|
+
function validateAdapterConfig$3(untrustedConfig, configPropertyNames) {
|
|
2774
2774
|
if (!untrustedIsObject(untrustedConfig)) {
|
|
2775
2775
|
return null;
|
|
2776
2776
|
}
|
|
2777
2777
|
if (process.env.NODE_ENV !== 'production') {
|
|
2778
2778
|
validateConfig(untrustedConfig, configPropertyNames);
|
|
2779
2779
|
}
|
|
2780
|
-
const config = typeCheckConfig$
|
|
2780
|
+
const config = typeCheckConfig$3(untrustedConfig);
|
|
2781
2781
|
if (!areRequiredParametersPresent(config, configPropertyNames)) {
|
|
2782
2782
|
return null;
|
|
2783
2783
|
}
|
|
2784
2784
|
return config;
|
|
2785
2785
|
}
|
|
2786
|
-
function buildNetworkSnapshot$
|
|
2787
|
-
const resourceParams = createResourceParams$
|
|
2788
|
-
const request = createResourceRequest$
|
|
2786
|
+
function buildNetworkSnapshot$3(luvio, config, options) {
|
|
2787
|
+
const resourceParams = createResourceParams$3(config);
|
|
2788
|
+
const request = createResourceRequest$3(resourceParams);
|
|
2789
2789
|
return luvio.dispatchResourceRequest(request, options)
|
|
2790
2790
|
.then((response) => {
|
|
2791
2791
|
return luvio.handleSuccessResponse(() => {
|
|
2792
|
-
const snapshot = ingestSuccess$
|
|
2792
|
+
const snapshot = ingestSuccess$3(luvio, resourceParams, response);
|
|
2793
2793
|
return luvio.storeBroadcast().then(() => snapshot);
|
|
2794
2794
|
}, () => {
|
|
2795
2795
|
const cache = new StoreKeyMap();
|
|
2796
|
-
getResponseCacheKeys$
|
|
2796
|
+
getResponseCacheKeys$3(cache, luvio, resourceParams, response.body);
|
|
2797
2797
|
return cache;
|
|
2798
2798
|
});
|
|
2799
2799
|
}, (response) => {
|
|
@@ -2803,16 +2803,16 @@ function buildNetworkSnapshot$2(luvio, config, options) {
|
|
|
2803
2803
|
}
|
|
2804
2804
|
const createGenerationsForPromptTemplateAdapterFactory = (luvio) => {
|
|
2805
2805
|
return function createGenerationsForPromptTemplate(untrustedConfig) {
|
|
2806
|
-
const config = validateAdapterConfig$
|
|
2806
|
+
const config = validateAdapterConfig$3(untrustedConfig, createGenerationsForPromptTemplate_ConfigPropertyNames);
|
|
2807
2807
|
// Invalid or incomplete config
|
|
2808
2808
|
if (config === null) {
|
|
2809
2809
|
throw new Error('Invalid config for "createGenerationsForPromptTemplate"');
|
|
2810
2810
|
}
|
|
2811
|
-
return buildNetworkSnapshot$
|
|
2811
|
+
return buildNetworkSnapshot$3(luvio, config);
|
|
2812
2812
|
};
|
|
2813
2813
|
};
|
|
2814
2814
|
|
|
2815
|
-
const VERSION$
|
|
2815
|
+
const VERSION$4 = "b513bbac1672327d8eaaf120660e94b5";
|
|
2816
2816
|
function validate$5(obj, path = 'EinsteinPromptTemplateSupportedLanguageErrorRepresentation') {
|
|
2817
2817
|
const v_error = (() => {
|
|
2818
2818
|
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
@@ -2831,10 +2831,10 @@ function validate$5(obj, path = 'EinsteinPromptTemplateSupportedLanguageErrorRep
|
|
|
2831
2831
|
})();
|
|
2832
2832
|
return v_error === undefined ? null : v_error;
|
|
2833
2833
|
}
|
|
2834
|
-
const select$
|
|
2834
|
+
const select$7 = function EinsteinPromptTemplateSupportedLanguageErrorRepresentationSelect() {
|
|
2835
2835
|
return {
|
|
2836
2836
|
kind: 'Fragment',
|
|
2837
|
-
version: VERSION$
|
|
2837
|
+
version: VERSION$4,
|
|
2838
2838
|
private: [],
|
|
2839
2839
|
selections: [
|
|
2840
2840
|
{
|
|
@@ -2848,7 +2848,7 @@ const select$5 = function EinsteinPromptTemplateSupportedLanguageErrorRepresenta
|
|
|
2848
2848
|
]
|
|
2849
2849
|
};
|
|
2850
2850
|
};
|
|
2851
|
-
function equals$
|
|
2851
|
+
function equals$4(existing, incoming) {
|
|
2852
2852
|
const existing_errorMessage = existing.errorMessage;
|
|
2853
2853
|
const incoming_errorMessage = incoming.errorMessage;
|
|
2854
2854
|
if (!(existing_errorMessage === incoming_errorMessage)) {
|
|
@@ -2862,7 +2862,7 @@ function equals$3(existing, incoming) {
|
|
|
2862
2862
|
return true;
|
|
2863
2863
|
}
|
|
2864
2864
|
|
|
2865
|
-
const VERSION$
|
|
2865
|
+
const VERSION$3 = "65a17d345c28eeca91872a73d8ffe9fd";
|
|
2866
2866
|
function validate$4(obj, path = 'EinsteinPromptTemplateSupportedLanguageRepresentation') {
|
|
2867
2867
|
const v_error = (() => {
|
|
2868
2868
|
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
@@ -2881,10 +2881,10 @@ function validate$4(obj, path = 'EinsteinPromptTemplateSupportedLanguageRepresen
|
|
|
2881
2881
|
})();
|
|
2882
2882
|
return v_error === undefined ? null : v_error;
|
|
2883
2883
|
}
|
|
2884
|
-
const select$
|
|
2884
|
+
const select$6 = function EinsteinPromptTemplateSupportedLanguageRepresentationSelect() {
|
|
2885
2885
|
return {
|
|
2886
2886
|
kind: 'Fragment',
|
|
2887
|
-
version: VERSION$
|
|
2887
|
+
version: VERSION$3,
|
|
2888
2888
|
private: [],
|
|
2889
2889
|
selections: [
|
|
2890
2890
|
{
|
|
@@ -2898,7 +2898,7 @@ const select$4 = function EinsteinPromptTemplateSupportedLanguageRepresentationS
|
|
|
2898
2898
|
]
|
|
2899
2899
|
};
|
|
2900
2900
|
};
|
|
2901
|
-
function equals$
|
|
2901
|
+
function equals$3(existing, incoming) {
|
|
2902
2902
|
const existing_languageCode = existing.languageCode;
|
|
2903
2903
|
const incoming_languageCode = incoming.languageCode;
|
|
2904
2904
|
if (!(existing_languageCode === incoming_languageCode)) {
|
|
@@ -2912,8 +2912,8 @@ function equals$2(existing, incoming) {
|
|
|
2912
2912
|
return true;
|
|
2913
2913
|
}
|
|
2914
2914
|
|
|
2915
|
-
const TTL$
|
|
2916
|
-
const VERSION$
|
|
2915
|
+
const TTL$2 = 100;
|
|
2916
|
+
const VERSION$2 = "c635f260bce9a11f7c3bf31d60f42b53";
|
|
2917
2917
|
function validate$3(obj, path = 'EinsteinPromptTemplateVersionOutputLanguagesRepresentation') {
|
|
2918
2918
|
const v_error = (() => {
|
|
2919
2919
|
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
@@ -2967,16 +2967,16 @@ function validate$3(obj, path = 'EinsteinPromptTemplateVersionOutputLanguagesRep
|
|
|
2967
2967
|
})();
|
|
2968
2968
|
return v_error === undefined ? null : v_error;
|
|
2969
2969
|
}
|
|
2970
|
-
const RepresentationType$
|
|
2971
|
-
function normalize$
|
|
2970
|
+
const RepresentationType$2 = 'EinsteinPromptTemplateVersionOutputLanguagesRepresentation';
|
|
2971
|
+
function normalize$2(input, existing, path, luvio, store, timestamp) {
|
|
2972
2972
|
return input;
|
|
2973
2973
|
}
|
|
2974
|
-
const select$
|
|
2975
|
-
const { selections: EinsteinPromptTemplateSupportedLanguageErrorRepresentation__selections, opaque: EinsteinPromptTemplateSupportedLanguageErrorRepresentation__opaque, } = select$
|
|
2976
|
-
const { selections: EinsteinPromptTemplateSupportedLanguageRepresentation__selections, opaque: EinsteinPromptTemplateSupportedLanguageRepresentation__opaque, } = select$
|
|
2974
|
+
const select$5 = function EinsteinPromptTemplateVersionOutputLanguagesRepresentationSelect() {
|
|
2975
|
+
const { selections: EinsteinPromptTemplateSupportedLanguageErrorRepresentation__selections, opaque: EinsteinPromptTemplateSupportedLanguageErrorRepresentation__opaque, } = select$7();
|
|
2976
|
+
const { selections: EinsteinPromptTemplateSupportedLanguageRepresentation__selections, opaque: EinsteinPromptTemplateSupportedLanguageRepresentation__opaque, } = select$6();
|
|
2977
2977
|
return {
|
|
2978
2978
|
kind: 'Fragment',
|
|
2979
|
-
version: VERSION$
|
|
2979
|
+
version: VERSION$2,
|
|
2980
2980
|
private: [],
|
|
2981
2981
|
selections: [
|
|
2982
2982
|
{
|
|
@@ -3006,7 +3006,7 @@ const select$3 = function EinsteinPromptTemplateVersionOutputLanguagesRepresenta
|
|
|
3006
3006
|
]
|
|
3007
3007
|
};
|
|
3008
3008
|
};
|
|
3009
|
-
function equals$
|
|
3009
|
+
function equals$2(existing, incoming) {
|
|
3010
3010
|
const existing_isSuccess = existing.isSuccess;
|
|
3011
3011
|
const incoming_isSuccess = incoming.isSuccess;
|
|
3012
3012
|
if (!(existing_isSuccess === incoming_isSuccess)) {
|
|
@@ -3025,7 +3025,7 @@ function equals$1(existing, incoming) {
|
|
|
3025
3025
|
const existing_errors = existing.errors;
|
|
3026
3026
|
const incoming_errors = incoming.errors;
|
|
3027
3027
|
const equals_errors_items = equalsArray(existing_errors, incoming_errors, (existing_errors_item, incoming_errors_item) => {
|
|
3028
|
-
if (!(equals$
|
|
3028
|
+
if (!(equals$4(existing_errors_item, incoming_errors_item))) {
|
|
3029
3029
|
return false;
|
|
3030
3030
|
}
|
|
3031
3031
|
});
|
|
@@ -3035,7 +3035,7 @@ function equals$1(existing, incoming) {
|
|
|
3035
3035
|
const existing_supportedLanguages = existing.supportedLanguages;
|
|
3036
3036
|
const incoming_supportedLanguages = incoming.supportedLanguages;
|
|
3037
3037
|
const equals_supportedLanguages_items = equalsArray(existing_supportedLanguages, incoming_supportedLanguages, (existing_supportedLanguages_item, incoming_supportedLanguages_item) => {
|
|
3038
|
-
if (!(equals$
|
|
3038
|
+
if (!(equals$3(existing_supportedLanguages_item, incoming_supportedLanguages_item))) {
|
|
3039
3039
|
return false;
|
|
3040
3040
|
}
|
|
3041
3041
|
});
|
|
@@ -3044,7 +3044,7 @@ function equals$1(existing, incoming) {
|
|
|
3044
3044
|
}
|
|
3045
3045
|
return true;
|
|
3046
3046
|
}
|
|
3047
|
-
const ingest$
|
|
3047
|
+
const ingest$2 = function EinsteinPromptTemplateVersionOutputLanguagesRepresentationIngest(input, path, luvio, store, timestamp) {
|
|
3048
3048
|
if (process.env.NODE_ENV !== 'production') {
|
|
3049
3049
|
const validateError = validate$3(input);
|
|
3050
3050
|
if (validateError !== null) {
|
|
@@ -3052,36 +3052,36 @@ const ingest$1 = function EinsteinPromptTemplateVersionOutputLanguagesRepresenta
|
|
|
3052
3052
|
}
|
|
3053
3053
|
}
|
|
3054
3054
|
const key = path.fullPath;
|
|
3055
|
-
const ttlToUse = TTL$
|
|
3056
|
-
ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize$
|
|
3055
|
+
const ttlToUse = TTL$2;
|
|
3056
|
+
ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize$2, "EinsteinLLM", VERSION$2, RepresentationType$2, equals$2);
|
|
3057
3057
|
return createLink(key);
|
|
3058
3058
|
};
|
|
3059
|
-
function getTypeCacheKeys$
|
|
3059
|
+
function getTypeCacheKeys$2(rootKeySet, luvio, input, fullPathFactory) {
|
|
3060
3060
|
// root cache key (uses fullPathFactory if keyBuilderFromType isn't defined)
|
|
3061
3061
|
const rootKey = fullPathFactory();
|
|
3062
3062
|
rootKeySet.set(rootKey, {
|
|
3063
3063
|
namespace: keyPrefix,
|
|
3064
|
-
representationName: RepresentationType$
|
|
3064
|
+
representationName: RepresentationType$2,
|
|
3065
3065
|
mergeable: false
|
|
3066
3066
|
});
|
|
3067
3067
|
}
|
|
3068
3068
|
|
|
3069
|
-
function select$
|
|
3070
|
-
return select$
|
|
3069
|
+
function select$4(luvio, params) {
|
|
3070
|
+
return select$5();
|
|
3071
3071
|
}
|
|
3072
|
-
function keyBuilder$
|
|
3072
|
+
function keyBuilder$5(luvio, params) {
|
|
3073
3073
|
return keyPrefix + '::EinsteinPromptTemplateVersionOutputLanguagesRepresentation:(' + 'useStandardVersion:' + params.queryParams.useStandardVersion + ',' + 'versionId:' + params.queryParams.versionId + ',' + 'promptTemplateDevName:' + params.urlParams.promptTemplateDevName + ')';
|
|
3074
3074
|
}
|
|
3075
|
-
function getResponseCacheKeys$
|
|
3076
|
-
getTypeCacheKeys$
|
|
3075
|
+
function getResponseCacheKeys$2(storeKeyMap, luvio, resourceParams, response) {
|
|
3076
|
+
getTypeCacheKeys$2(storeKeyMap, luvio, response, () => keyBuilder$5(luvio, resourceParams));
|
|
3077
3077
|
}
|
|
3078
|
-
function ingestSuccess$
|
|
3078
|
+
function ingestSuccess$2(luvio, resourceParams, response, snapshotRefresh) {
|
|
3079
3079
|
const { body } = response;
|
|
3080
|
-
const key = keyBuilder$
|
|
3081
|
-
luvio.storeIngest(key, ingest$
|
|
3080
|
+
const key = keyBuilder$5(luvio, resourceParams);
|
|
3081
|
+
luvio.storeIngest(key, ingest$2, body);
|
|
3082
3082
|
const snapshot = luvio.storeLookup({
|
|
3083
3083
|
recordId: key,
|
|
3084
|
-
node: select$
|
|
3084
|
+
node: select$4(),
|
|
3085
3085
|
variables: {},
|
|
3086
3086
|
}, snapshotRefresh);
|
|
3087
3087
|
if (process.env.NODE_ENV !== 'production') {
|
|
@@ -3092,19 +3092,19 @@ function ingestSuccess$1(luvio, resourceParams, response, snapshotRefresh) {
|
|
|
3092
3092
|
deepFreeze(snapshot.data);
|
|
3093
3093
|
return snapshot;
|
|
3094
3094
|
}
|
|
3095
|
-
function ingestError$
|
|
3096
|
-
const key = keyBuilder$
|
|
3095
|
+
function ingestError$2(luvio, params, error, snapshotRefresh) {
|
|
3096
|
+
const key = keyBuilder$5(luvio, params);
|
|
3097
3097
|
const errorSnapshot = luvio.errorSnapshot(error, snapshotRefresh);
|
|
3098
3098
|
const storeMetadataParams = {
|
|
3099
|
-
ttl: TTL$
|
|
3099
|
+
ttl: TTL$2,
|
|
3100
3100
|
namespace: keyPrefix,
|
|
3101
|
-
version: VERSION$
|
|
3102
|
-
representationName: RepresentationType$
|
|
3101
|
+
version: VERSION$2,
|
|
3102
|
+
representationName: RepresentationType$2
|
|
3103
3103
|
};
|
|
3104
3104
|
luvio.storeIngestError(key, errorSnapshot, storeMetadataParams);
|
|
3105
3105
|
return errorSnapshot;
|
|
3106
3106
|
}
|
|
3107
|
-
function createResourceRequest$
|
|
3107
|
+
function createResourceRequest$2(config) {
|
|
3108
3108
|
const headers = {};
|
|
3109
3109
|
return {
|
|
3110
3110
|
baseUri: '/services/data/v63.0',
|
|
@@ -3118,92 +3118,92 @@ function createResourceRequest$1(config) {
|
|
|
3118
3118
|
};
|
|
3119
3119
|
}
|
|
3120
3120
|
|
|
3121
|
-
const adapterName$
|
|
3121
|
+
const adapterName$2 = 'getOutputLanguages';
|
|
3122
3122
|
const getOutputLanguages_ConfigPropertyMetadata = [
|
|
3123
3123
|
generateParamConfigMetadata('promptTemplateDevName', true, 0 /* UrlParameter */, 0 /* String */),
|
|
3124
3124
|
generateParamConfigMetadata('useStandardVersion', false, 1 /* QueryParameter */, 1 /* Boolean */),
|
|
3125
3125
|
generateParamConfigMetadata('versionId', false, 1 /* QueryParameter */, 0 /* String */),
|
|
3126
3126
|
];
|
|
3127
|
-
const getOutputLanguages_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$
|
|
3128
|
-
const createResourceParams$
|
|
3129
|
-
function keyBuilder$
|
|
3130
|
-
const resourceParams = createResourceParams$
|
|
3131
|
-
return keyBuilder$
|
|
3127
|
+
const getOutputLanguages_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$2, getOutputLanguages_ConfigPropertyMetadata);
|
|
3128
|
+
const createResourceParams$2 = /*#__PURE__*/ createResourceParams$7(getOutputLanguages_ConfigPropertyMetadata);
|
|
3129
|
+
function keyBuilder$4(luvio, config) {
|
|
3130
|
+
const resourceParams = createResourceParams$2(config);
|
|
3131
|
+
return keyBuilder$5(luvio, resourceParams);
|
|
3132
3132
|
}
|
|
3133
|
-
function typeCheckConfig$
|
|
3133
|
+
function typeCheckConfig$2(untrustedConfig) {
|
|
3134
3134
|
const config = {};
|
|
3135
|
-
typeCheckConfig$
|
|
3135
|
+
typeCheckConfig$7(untrustedConfig, config, getOutputLanguages_ConfigPropertyMetadata);
|
|
3136
3136
|
return config;
|
|
3137
3137
|
}
|
|
3138
|
-
function validateAdapterConfig$
|
|
3138
|
+
function validateAdapterConfig$2(untrustedConfig, configPropertyNames) {
|
|
3139
3139
|
if (!untrustedIsObject(untrustedConfig)) {
|
|
3140
3140
|
return null;
|
|
3141
3141
|
}
|
|
3142
3142
|
if (process.env.NODE_ENV !== 'production') {
|
|
3143
3143
|
validateConfig(untrustedConfig, configPropertyNames);
|
|
3144
3144
|
}
|
|
3145
|
-
const config = typeCheckConfig$
|
|
3145
|
+
const config = typeCheckConfig$2(untrustedConfig);
|
|
3146
3146
|
if (!areRequiredParametersPresent(config, configPropertyNames)) {
|
|
3147
3147
|
return null;
|
|
3148
3148
|
}
|
|
3149
3149
|
return config;
|
|
3150
3150
|
}
|
|
3151
|
-
function adapterFragment$
|
|
3152
|
-
createResourceParams$
|
|
3153
|
-
return select$
|
|
3151
|
+
function adapterFragment$2(luvio, config) {
|
|
3152
|
+
createResourceParams$2(config);
|
|
3153
|
+
return select$4();
|
|
3154
3154
|
}
|
|
3155
|
-
function onFetchResponseSuccess$
|
|
3156
|
-
const snapshot = ingestSuccess$
|
|
3155
|
+
function onFetchResponseSuccess$2(luvio, config, resourceParams, response) {
|
|
3156
|
+
const snapshot = ingestSuccess$2(luvio, resourceParams, response, {
|
|
3157
3157
|
config,
|
|
3158
|
-
resolve: () => buildNetworkSnapshot$
|
|
3158
|
+
resolve: () => buildNetworkSnapshot$2(luvio, config, snapshotRefreshOptions)
|
|
3159
3159
|
});
|
|
3160
3160
|
return luvio.storeBroadcast().then(() => snapshot);
|
|
3161
3161
|
}
|
|
3162
|
-
function onFetchResponseError$
|
|
3163
|
-
const snapshot = ingestError$
|
|
3162
|
+
function onFetchResponseError$2(luvio, config, resourceParams, response) {
|
|
3163
|
+
const snapshot = ingestError$2(luvio, resourceParams, response, {
|
|
3164
3164
|
config,
|
|
3165
|
-
resolve: () => buildNetworkSnapshot$
|
|
3165
|
+
resolve: () => buildNetworkSnapshot$2(luvio, config, snapshotRefreshOptions)
|
|
3166
3166
|
});
|
|
3167
3167
|
return luvio.storeBroadcast().then(() => snapshot);
|
|
3168
3168
|
}
|
|
3169
|
-
function buildNetworkSnapshot$
|
|
3170
|
-
const resourceParams = createResourceParams$
|
|
3171
|
-
const request = createResourceRequest$
|
|
3169
|
+
function buildNetworkSnapshot$2(luvio, config, options) {
|
|
3170
|
+
const resourceParams = createResourceParams$2(config);
|
|
3171
|
+
const request = createResourceRequest$2(resourceParams);
|
|
3172
3172
|
return luvio.dispatchResourceRequest(request, options)
|
|
3173
3173
|
.then((response) => {
|
|
3174
|
-
return luvio.handleSuccessResponse(() => onFetchResponseSuccess$
|
|
3174
|
+
return luvio.handleSuccessResponse(() => onFetchResponseSuccess$2(luvio, config, resourceParams, response), () => {
|
|
3175
3175
|
const cache = new StoreKeyMap();
|
|
3176
|
-
getResponseCacheKeys$
|
|
3176
|
+
getResponseCacheKeys$2(cache, luvio, resourceParams, response.body);
|
|
3177
3177
|
return cache;
|
|
3178
3178
|
});
|
|
3179
3179
|
}, (response) => {
|
|
3180
|
-
return luvio.handleErrorResponse(() => onFetchResponseError$
|
|
3180
|
+
return luvio.handleErrorResponse(() => onFetchResponseError$2(luvio, config, resourceParams, response));
|
|
3181
3181
|
});
|
|
3182
3182
|
}
|
|
3183
|
-
function buildNetworkSnapshotCachePolicy$
|
|
3184
|
-
return buildNetworkSnapshotCachePolicy$
|
|
3183
|
+
function buildNetworkSnapshotCachePolicy$2(context, coercedAdapterRequestContext) {
|
|
3184
|
+
return buildNetworkSnapshotCachePolicy$4(context, coercedAdapterRequestContext, buildNetworkSnapshot$2, undefined, false);
|
|
3185
3185
|
}
|
|
3186
|
-
function buildCachedSnapshotCachePolicy$
|
|
3186
|
+
function buildCachedSnapshotCachePolicy$2(context, storeLookup) {
|
|
3187
3187
|
const { luvio, config } = context;
|
|
3188
3188
|
const selector = {
|
|
3189
|
-
recordId: keyBuilder$
|
|
3190
|
-
node: adapterFragment$
|
|
3189
|
+
recordId: keyBuilder$4(luvio, config),
|
|
3190
|
+
node: adapterFragment$2(luvio, config),
|
|
3191
3191
|
variables: {},
|
|
3192
3192
|
};
|
|
3193
3193
|
const cacheSnapshot = storeLookup(selector, {
|
|
3194
3194
|
config,
|
|
3195
|
-
resolve: () => buildNetworkSnapshot$
|
|
3195
|
+
resolve: () => buildNetworkSnapshot$2(luvio, config, snapshotRefreshOptions)
|
|
3196
3196
|
});
|
|
3197
3197
|
return cacheSnapshot;
|
|
3198
3198
|
}
|
|
3199
3199
|
const getOutputLanguagesAdapterFactory = (luvio) => function EinsteinLLM__getOutputLanguages(untrustedConfig, requestContext) {
|
|
3200
|
-
const config = validateAdapterConfig$
|
|
3200
|
+
const config = validateAdapterConfig$2(untrustedConfig, getOutputLanguages_ConfigPropertyNames);
|
|
3201
3201
|
// Invalid or incomplete config
|
|
3202
3202
|
if (config === null) {
|
|
3203
3203
|
return null;
|
|
3204
3204
|
}
|
|
3205
3205
|
return luvio.applyCachePolicy((requestContext || {}), { config, luvio }, // BuildSnapshotContext
|
|
3206
|
-
buildCachedSnapshotCachePolicy$
|
|
3206
|
+
buildCachedSnapshotCachePolicy$2, buildNetworkSnapshotCachePolicy$2);
|
|
3207
3207
|
};
|
|
3208
3208
|
|
|
3209
3209
|
function validate$2(obj, path = 'EinsteinPromptRecordFieldRepresentation') {
|
|
@@ -3266,6 +3266,8 @@ function validate$2(obj, path = 'EinsteinPromptRecordFieldRepresentation') {
|
|
|
3266
3266
|
return v_error === undefined ? null : v_error;
|
|
3267
3267
|
}
|
|
3268
3268
|
|
|
3269
|
+
const TTL$1 = 100;
|
|
3270
|
+
const VERSION$1 = "ade243411889bb9f3753d7f300fa3657";
|
|
3269
3271
|
function validate$1(obj, path = 'EinsteinPromptRecordRepresentation') {
|
|
3270
3272
|
const v_error = (() => {
|
|
3271
3273
|
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
@@ -3326,9 +3328,187 @@ function validate$1(obj, path = 'EinsteinPromptRecordRepresentation') {
|
|
|
3326
3328
|
})();
|
|
3327
3329
|
return v_error === undefined ? null : v_error;
|
|
3328
3330
|
}
|
|
3331
|
+
const RepresentationType$1 = 'EinsteinPromptRecordRepresentation';
|
|
3332
|
+
function normalize$1(input, existing, path, luvio, store, timestamp) {
|
|
3333
|
+
return input;
|
|
3334
|
+
}
|
|
3335
|
+
const select$3 = function EinsteinPromptRecordRepresentationSelect() {
|
|
3336
|
+
return {
|
|
3337
|
+
kind: 'Fragment',
|
|
3338
|
+
version: VERSION$1,
|
|
3339
|
+
private: [],
|
|
3340
|
+
opaque: true
|
|
3341
|
+
};
|
|
3342
|
+
};
|
|
3343
|
+
function equals$1(existing, incoming) {
|
|
3344
|
+
if (JSONStringify(incoming) !== JSONStringify(existing)) {
|
|
3345
|
+
return false;
|
|
3346
|
+
}
|
|
3347
|
+
return true;
|
|
3348
|
+
}
|
|
3349
|
+
const ingest$1 = function EinsteinPromptRecordRepresentationIngest(input, path, luvio, store, timestamp) {
|
|
3350
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
3351
|
+
const validateError = validate$1(input);
|
|
3352
|
+
if (validateError !== null) {
|
|
3353
|
+
throw validateError;
|
|
3354
|
+
}
|
|
3355
|
+
}
|
|
3356
|
+
const key = path.fullPath;
|
|
3357
|
+
const ttlToUse = TTL$1;
|
|
3358
|
+
ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize$1, "EinsteinLLM", VERSION$1, RepresentationType$1, equals$1);
|
|
3359
|
+
return createLink(key);
|
|
3360
|
+
};
|
|
3361
|
+
function getTypeCacheKeys$1(rootKeySet, luvio, input, fullPathFactory) {
|
|
3362
|
+
// root cache key (uses fullPathFactory if keyBuilderFromType isn't defined)
|
|
3363
|
+
const rootKey = fullPathFactory();
|
|
3364
|
+
rootKeySet.set(rootKey, {
|
|
3365
|
+
namespace: keyPrefix,
|
|
3366
|
+
representationName: RepresentationType$1,
|
|
3367
|
+
mergeable: false
|
|
3368
|
+
});
|
|
3369
|
+
}
|
|
3370
|
+
|
|
3371
|
+
function select$2(luvio, params) {
|
|
3372
|
+
return select$3();
|
|
3373
|
+
}
|
|
3374
|
+
function keyBuilder$3(luvio, params) {
|
|
3375
|
+
return keyPrefix + '::EinsteinPromptRecordRepresentation:(' + 'versionId:' + params.queryParams.versionId + ',' + 'promptTemplateDevName:' + params.urlParams.promptTemplateDevName + ')';
|
|
3376
|
+
}
|
|
3377
|
+
function getResponseCacheKeys$1(storeKeyMap, luvio, resourceParams, response) {
|
|
3378
|
+
getTypeCacheKeys$1(storeKeyMap, luvio, response, () => keyBuilder$3(luvio, resourceParams));
|
|
3379
|
+
}
|
|
3380
|
+
function ingestSuccess$1(luvio, resourceParams, response, snapshotRefresh) {
|
|
3381
|
+
const { body } = response;
|
|
3382
|
+
const key = keyBuilder$3(luvio, resourceParams);
|
|
3383
|
+
luvio.storeIngest(key, ingest$1, body);
|
|
3384
|
+
const snapshot = luvio.storeLookup({
|
|
3385
|
+
recordId: key,
|
|
3386
|
+
node: select$2(),
|
|
3387
|
+
variables: {},
|
|
3388
|
+
}, snapshotRefresh);
|
|
3389
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
3390
|
+
if (snapshot.state !== 'Fulfilled') {
|
|
3391
|
+
throw new Error('Invalid network response. Expected resource response to result in Fulfilled snapshot');
|
|
3392
|
+
}
|
|
3393
|
+
}
|
|
3394
|
+
deepFreeze(snapshot.data);
|
|
3395
|
+
return snapshot;
|
|
3396
|
+
}
|
|
3397
|
+
function ingestError$1(luvio, params, error, snapshotRefresh) {
|
|
3398
|
+
const key = keyBuilder$3(luvio, params);
|
|
3399
|
+
const errorSnapshot = luvio.errorSnapshot(error, snapshotRefresh);
|
|
3400
|
+
const storeMetadataParams = {
|
|
3401
|
+
ttl: TTL$1,
|
|
3402
|
+
namespace: keyPrefix,
|
|
3403
|
+
version: VERSION$1,
|
|
3404
|
+
representationName: RepresentationType$1
|
|
3405
|
+
};
|
|
3406
|
+
luvio.storeIngestError(key, errorSnapshot, storeMetadataParams);
|
|
3407
|
+
return errorSnapshot;
|
|
3408
|
+
}
|
|
3409
|
+
function createResourceRequest$1(config) {
|
|
3410
|
+
const headers = {};
|
|
3411
|
+
return {
|
|
3412
|
+
baseUri: '/services/data/v63.0',
|
|
3413
|
+
basePath: '/einstein/prompt-templates/' + config.urlParams.promptTemplateDevName + '',
|
|
3414
|
+
method: 'get',
|
|
3415
|
+
body: null,
|
|
3416
|
+
urlParams: config.urlParams,
|
|
3417
|
+
queryParams: config.queryParams,
|
|
3418
|
+
headers,
|
|
3419
|
+
priority: 'normal',
|
|
3420
|
+
};
|
|
3421
|
+
}
|
|
3422
|
+
|
|
3423
|
+
const adapterName$1 = 'getPromptTemplate';
|
|
3424
|
+
const getPromptTemplate_ConfigPropertyMetadata = [
|
|
3425
|
+
generateParamConfigMetadata('promptTemplateDevName', true, 0 /* UrlParameter */, 0 /* String */),
|
|
3426
|
+
generateParamConfigMetadata('versionId', false, 1 /* QueryParameter */, 0 /* String */),
|
|
3427
|
+
];
|
|
3428
|
+
const getPromptTemplate_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$1, getPromptTemplate_ConfigPropertyMetadata);
|
|
3429
|
+
const createResourceParams$1 = /*#__PURE__*/ createResourceParams$7(getPromptTemplate_ConfigPropertyMetadata);
|
|
3430
|
+
function keyBuilder$2(luvio, config) {
|
|
3431
|
+
const resourceParams = createResourceParams$1(config);
|
|
3432
|
+
return keyBuilder$3(luvio, resourceParams);
|
|
3433
|
+
}
|
|
3434
|
+
function typeCheckConfig$1(untrustedConfig) {
|
|
3435
|
+
const config = {};
|
|
3436
|
+
typeCheckConfig$7(untrustedConfig, config, getPromptTemplate_ConfigPropertyMetadata);
|
|
3437
|
+
return config;
|
|
3438
|
+
}
|
|
3439
|
+
function validateAdapterConfig$1(untrustedConfig, configPropertyNames) {
|
|
3440
|
+
if (!untrustedIsObject(untrustedConfig)) {
|
|
3441
|
+
return null;
|
|
3442
|
+
}
|
|
3443
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
3444
|
+
validateConfig(untrustedConfig, configPropertyNames);
|
|
3445
|
+
}
|
|
3446
|
+
const config = typeCheckConfig$1(untrustedConfig);
|
|
3447
|
+
if (!areRequiredParametersPresent(config, configPropertyNames)) {
|
|
3448
|
+
return null;
|
|
3449
|
+
}
|
|
3450
|
+
return config;
|
|
3451
|
+
}
|
|
3452
|
+
function adapterFragment$1(luvio, config) {
|
|
3453
|
+
createResourceParams$1(config);
|
|
3454
|
+
return select$2();
|
|
3455
|
+
}
|
|
3456
|
+
function onFetchResponseSuccess$1(luvio, config, resourceParams, response) {
|
|
3457
|
+
const snapshot = ingestSuccess$1(luvio, resourceParams, response, {
|
|
3458
|
+
config,
|
|
3459
|
+
resolve: () => buildNetworkSnapshot$1(luvio, config, snapshotRefreshOptions)
|
|
3460
|
+
});
|
|
3461
|
+
return luvio.storeBroadcast().then(() => snapshot);
|
|
3462
|
+
}
|
|
3463
|
+
function onFetchResponseError$1(luvio, config, resourceParams, response) {
|
|
3464
|
+
const snapshot = ingestError$1(luvio, resourceParams, response, {
|
|
3465
|
+
config,
|
|
3466
|
+
resolve: () => buildNetworkSnapshot$1(luvio, config, snapshotRefreshOptions)
|
|
3467
|
+
});
|
|
3468
|
+
return luvio.storeBroadcast().then(() => snapshot);
|
|
3469
|
+
}
|
|
3470
|
+
function buildNetworkSnapshot$1(luvio, config, options) {
|
|
3471
|
+
const resourceParams = createResourceParams$1(config);
|
|
3472
|
+
const request = createResourceRequest$1(resourceParams);
|
|
3473
|
+
return luvio.dispatchResourceRequest(request, options)
|
|
3474
|
+
.then((response) => {
|
|
3475
|
+
return luvio.handleSuccessResponse(() => onFetchResponseSuccess$1(luvio, config, resourceParams, response), () => {
|
|
3476
|
+
const cache = new StoreKeyMap();
|
|
3477
|
+
getResponseCacheKeys$1(cache, luvio, resourceParams, response.body);
|
|
3478
|
+
return cache;
|
|
3479
|
+
});
|
|
3480
|
+
}, (response) => {
|
|
3481
|
+
return luvio.handleErrorResponse(() => onFetchResponseError$1(luvio, config, resourceParams, response));
|
|
3482
|
+
});
|
|
3483
|
+
}
|
|
3484
|
+
function buildNetworkSnapshotCachePolicy$1(context, coercedAdapterRequestContext) {
|
|
3485
|
+
return buildNetworkSnapshotCachePolicy$4(context, coercedAdapterRequestContext, buildNetworkSnapshot$1, undefined, false);
|
|
3486
|
+
}
|
|
3487
|
+
function buildCachedSnapshotCachePolicy$1(context, storeLookup) {
|
|
3488
|
+
const { luvio, config } = context;
|
|
3489
|
+
const selector = {
|
|
3490
|
+
recordId: keyBuilder$2(luvio, config),
|
|
3491
|
+
node: adapterFragment$1(luvio, config),
|
|
3492
|
+
variables: {},
|
|
3493
|
+
};
|
|
3494
|
+
const cacheSnapshot = storeLookup(selector, {
|
|
3495
|
+
config,
|
|
3496
|
+
resolve: () => buildNetworkSnapshot$1(luvio, config, snapshotRefreshOptions)
|
|
3497
|
+
});
|
|
3498
|
+
return cacheSnapshot;
|
|
3499
|
+
}
|
|
3500
|
+
const getPromptTemplateAdapterFactory = (luvio) => function EinsteinLLM__getPromptTemplate(untrustedConfig, requestContext) {
|
|
3501
|
+
const config = validateAdapterConfig$1(untrustedConfig, getPromptTemplate_ConfigPropertyNames);
|
|
3502
|
+
// Invalid or incomplete config
|
|
3503
|
+
if (config === null) {
|
|
3504
|
+
return null;
|
|
3505
|
+
}
|
|
3506
|
+
return luvio.applyCachePolicy((requestContext || {}), { config, luvio }, // BuildSnapshotContext
|
|
3507
|
+
buildCachedSnapshotCachePolicy$1, buildNetworkSnapshotCachePolicy$1);
|
|
3508
|
+
};
|
|
3329
3509
|
|
|
3330
3510
|
const TTL = 100;
|
|
3331
|
-
const VERSION = "
|
|
3511
|
+
const VERSION = "5fd7b8a03d155ba601bcb4ee725e0893";
|
|
3332
3512
|
function validate(obj, path = 'EinsteinPromptRecordCollectionOutputRepresentation') {
|
|
3333
3513
|
const v_error = (() => {
|
|
3334
3514
|
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
@@ -3468,14 +3648,14 @@ const getPromptTemplates_ConfigPropertyMetadata = [
|
|
|
3468
3648
|
generateParamConfigMetadata('sortBy', false, 1 /* QueryParameter */, 0 /* String */),
|
|
3469
3649
|
];
|
|
3470
3650
|
const getPromptTemplates_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName, getPromptTemplates_ConfigPropertyMetadata);
|
|
3471
|
-
const createResourceParams = /*#__PURE__*/ createResourceParams$
|
|
3651
|
+
const createResourceParams = /*#__PURE__*/ createResourceParams$7(getPromptTemplates_ConfigPropertyMetadata);
|
|
3472
3652
|
function keyBuilder(luvio, config) {
|
|
3473
3653
|
const resourceParams = createResourceParams(config);
|
|
3474
3654
|
return keyBuilder$1(luvio, resourceParams);
|
|
3475
3655
|
}
|
|
3476
3656
|
function typeCheckConfig(untrustedConfig) {
|
|
3477
3657
|
const config = {};
|
|
3478
|
-
typeCheckConfig$
|
|
3658
|
+
typeCheckConfig$7(untrustedConfig, config, getPromptTemplates_ConfigPropertyMetadata);
|
|
3479
3659
|
return config;
|
|
3480
3660
|
}
|
|
3481
3661
|
function validateAdapterConfig(untrustedConfig, configPropertyNames) {
|
|
@@ -3524,7 +3704,7 @@ function buildNetworkSnapshot(luvio, config, options) {
|
|
|
3524
3704
|
});
|
|
3525
3705
|
}
|
|
3526
3706
|
function buildNetworkSnapshotCachePolicy(context, coercedAdapterRequestContext) {
|
|
3527
|
-
return buildNetworkSnapshotCachePolicy$
|
|
3707
|
+
return buildNetworkSnapshotCachePolicy$4(context, coercedAdapterRequestContext, buildNetworkSnapshot, undefined, false);
|
|
3528
3708
|
}
|
|
3529
3709
|
function buildCachedSnapshotCachePolicy(context, storeLookup) {
|
|
3530
3710
|
const { luvio, config } = context;
|
|
@@ -3554,10 +3734,12 @@ let createFeedback;
|
|
|
3554
3734
|
let createGenerations;
|
|
3555
3735
|
let createGenerationsForPromptTemplate;
|
|
3556
3736
|
let getOutputLanguages;
|
|
3737
|
+
let getPromptTemplate;
|
|
3557
3738
|
let getPromptTemplates;
|
|
3558
3739
|
// Imperative GET Adapters
|
|
3559
3740
|
let createEmbeddings_imperative;
|
|
3560
3741
|
let getOutputLanguages_imperative;
|
|
3742
|
+
let getPromptTemplate_imperative;
|
|
3561
3743
|
let getPromptTemplates_imperative;
|
|
3562
3744
|
// Adapter Metadata
|
|
3563
3745
|
const createEmbeddingsMetadata = { apiFamily: 'EinsteinLLM', name: 'createEmbeddings', ttl: 100 };
|
|
@@ -3566,6 +3748,7 @@ const getOutputLanguagesMetadata = {
|
|
|
3566
3748
|
name: 'getOutputLanguages',
|
|
3567
3749
|
ttl: 100,
|
|
3568
3750
|
};
|
|
3751
|
+
const getPromptTemplateMetadata = { apiFamily: 'EinsteinLLM', name: 'getPromptTemplate', ttl: 100 };
|
|
3569
3752
|
const getPromptTemplatesMetadata = {
|
|
3570
3753
|
apiFamily: 'EinsteinLLM',
|
|
3571
3754
|
name: 'getPromptTemplates',
|
|
@@ -3576,6 +3759,7 @@ function bindExportsTo(luvio) {
|
|
|
3576
3759
|
// LDS Adapters
|
|
3577
3760
|
const createEmbeddings_ldsAdapter = createInstrumentedAdapter(createLDSAdapter(luvio, 'createEmbeddings', createEmbeddingsAdapterFactory), createEmbeddingsMetadata);
|
|
3578
3761
|
const getOutputLanguages_ldsAdapter = createInstrumentedAdapter(createLDSAdapter(luvio, 'getOutputLanguages', getOutputLanguagesAdapterFactory), getOutputLanguagesMetadata);
|
|
3762
|
+
const getPromptTemplate_ldsAdapter = createInstrumentedAdapter(createLDSAdapter(luvio, 'getPromptTemplate', getPromptTemplateAdapterFactory), getPromptTemplateMetadata);
|
|
3579
3763
|
const getPromptTemplates_ldsAdapter = createInstrumentedAdapter(createLDSAdapter(luvio, 'getPromptTemplates', getPromptTemplatesAdapterFactory), getPromptTemplatesMetadata);
|
|
3580
3764
|
function unwrapSnapshotData(factory) {
|
|
3581
3765
|
const adapter = factory(luvio);
|
|
@@ -3587,10 +3771,12 @@ function bindExportsTo(luvio) {
|
|
|
3587
3771
|
createGenerations: unwrapSnapshotData(createGenerationsAdapterFactory),
|
|
3588
3772
|
createGenerationsForPromptTemplate: unwrapSnapshotData(createGenerationsForPromptTemplateAdapterFactory),
|
|
3589
3773
|
getOutputLanguages: createWireAdapterConstructor(luvio, getOutputLanguages_ldsAdapter, getOutputLanguagesMetadata),
|
|
3774
|
+
getPromptTemplate: createWireAdapterConstructor(luvio, getPromptTemplate_ldsAdapter, getPromptTemplateMetadata),
|
|
3590
3775
|
getPromptTemplates: createWireAdapterConstructor(luvio, getPromptTemplates_ldsAdapter, getPromptTemplatesMetadata),
|
|
3591
3776
|
// Imperative GET Adapters
|
|
3592
3777
|
createEmbeddings_imperative: createImperativeAdapter(luvio, createEmbeddings_ldsAdapter, createEmbeddingsMetadata),
|
|
3593
3778
|
getOutputLanguages_imperative: createImperativeAdapter(luvio, getOutputLanguages_ldsAdapter, getOutputLanguagesMetadata),
|
|
3779
|
+
getPromptTemplate_imperative: createImperativeAdapter(luvio, getPromptTemplate_ldsAdapter, getPromptTemplateMetadata),
|
|
3594
3780
|
getPromptTemplates_imperative: createImperativeAdapter(luvio, getPromptTemplates_ldsAdapter, getPromptTemplatesMetadata),
|
|
3595
3781
|
// Notify Update Availables
|
|
3596
3782
|
};
|
|
@@ -3602,12 +3788,14 @@ withDefaultLuvio((luvio) => {
|
|
|
3602
3788
|
createGenerations,
|
|
3603
3789
|
createGenerationsForPromptTemplate,
|
|
3604
3790
|
getOutputLanguages,
|
|
3791
|
+
getPromptTemplate,
|
|
3605
3792
|
getPromptTemplates,
|
|
3606
3793
|
createEmbeddings_imperative,
|
|
3607
3794
|
getOutputLanguages_imperative,
|
|
3795
|
+
getPromptTemplate_imperative,
|
|
3608
3796
|
getPromptTemplates_imperative,
|
|
3609
3797
|
} = bindExportsTo(luvio));
|
|
3610
3798
|
});
|
|
3611
3799
|
|
|
3612
|
-
export { createEmbeddings, createEmbeddings_imperative, createFeedback, createGenerations, createGenerationsForPromptTemplate, getOutputLanguages, getOutputLanguages_imperative, getPromptTemplates, getPromptTemplates_imperative };
|
|
3613
|
-
// version: 1.332.0-
|
|
3800
|
+
export { createEmbeddings, createEmbeddings_imperative, createFeedback, createGenerations, createGenerationsForPromptTemplate, getOutputLanguages, getOutputLanguages_imperative, getPromptTemplate, getPromptTemplate_imperative, getPromptTemplates, getPromptTemplates_imperative };
|
|
3801
|
+
// version: 1.332.0-dev12-919b322e8a
|