@salesforce/lds-adapters-service-einsteinllm 1.380.0-dev16 → 1.380.0-dev18
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 +1334 -884
- package/dist/es/es2018/types/src/generated/adapters/getTemplateType.d.ts +27 -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/getEinsteinPromptTemplateTypesByTemplateTypeName.d.ts +15 -0
- package/dist/es/es2018/types/src/generated/types/EinsteinPromptTypeRecordRepresentation.d.ts +35 -0
- package/dist/es/es2018/types/src/generated/types/EinsteinPromptTypeSchemaInputFieldRepresentation.d.ts +37 -0
- package/dist/es/es2018/types/src/generated/types/EinsteinPromptTypeSchemaRepresentation.d.ts +35 -0
- package/package.json +4 -4
- package/sfdc/index.js +1288 -830
- package/src/raml/api.raml +64 -0
- package/src/raml/luvio.raml +7 -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$b, StoreKeyMap, createResourceParams as createResourceParams$i, typeCheckConfig as typeCheckConfig$i } from 'force/luvioEngine';
|
|
18
18
|
|
|
19
19
|
const { hasOwnProperty: ObjectPrototypeHasOwnProperty } = Object.prototype;
|
|
20
20
|
const { keys: ObjectKeys$1, create: ObjectCreate$1 } = Object;
|
|
@@ -178,7 +178,7 @@ function createLink(ref) {
|
|
|
178
178
|
};
|
|
179
179
|
}
|
|
180
180
|
|
|
181
|
-
function validate$
|
|
181
|
+
function validate$E(obj, path = 'EinsteinLlmEmbeddingsAdditionalConfigInputRepresentation') {
|
|
182
182
|
const v_error = (() => {
|
|
183
183
|
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
184
184
|
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
@@ -222,7 +222,7 @@ function validate$B(obj, path = 'EinsteinLlmEmbeddingsAdditionalConfigInputRepre
|
|
|
222
222
|
return v_error === undefined ? null : v_error;
|
|
223
223
|
}
|
|
224
224
|
|
|
225
|
-
function validate$
|
|
225
|
+
function validate$D(obj, path = 'WrappedListString') {
|
|
226
226
|
const v_error = (() => {
|
|
227
227
|
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
228
228
|
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
@@ -243,14 +243,14 @@ function validate$A(obj, path = 'WrappedListString') {
|
|
|
243
243
|
return v_error === undefined ? null : v_error;
|
|
244
244
|
}
|
|
245
245
|
|
|
246
|
-
function validate$
|
|
246
|
+
function validate$C(obj, path = 'EinsteinLlmEmbeddingsInputRepresentation') {
|
|
247
247
|
const v_error = (() => {
|
|
248
248
|
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
249
249
|
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
250
250
|
}
|
|
251
251
|
const obj_additionalConfig = obj.additionalConfig;
|
|
252
252
|
const path_additionalConfig = path + '.additionalConfig';
|
|
253
|
-
const referencepath_additionalConfigValidationError = validate$
|
|
253
|
+
const referencepath_additionalConfigValidationError = validate$E(obj_additionalConfig, path_additionalConfig);
|
|
254
254
|
if (referencepath_additionalConfigValidationError !== null) {
|
|
255
255
|
let message = 'Object doesn\'t match EinsteinLlmEmbeddingsAdditionalConfigInputRepresentation (at "' + path_additionalConfig + '")\n';
|
|
256
256
|
message += referencepath_additionalConfigValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
@@ -258,7 +258,7 @@ function validate$z(obj, path = 'EinsteinLlmEmbeddingsInputRepresentation') {
|
|
|
258
258
|
}
|
|
259
259
|
const obj_prompts = obj.prompts;
|
|
260
260
|
const path_prompts = path + '.prompts';
|
|
261
|
-
const referencepath_promptsValidationError = validate$
|
|
261
|
+
const referencepath_promptsValidationError = validate$D(obj_prompts, path_prompts);
|
|
262
262
|
if (referencepath_promptsValidationError !== null) {
|
|
263
263
|
let message = 'Object doesn\'t match WrappedListString (at "' + path_prompts + '")\n';
|
|
264
264
|
message += referencepath_promptsValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
@@ -275,8 +275,8 @@ function validate$z(obj, path = 'EinsteinLlmEmbeddingsInputRepresentation') {
|
|
|
275
275
|
return v_error === undefined ? null : v_error;
|
|
276
276
|
}
|
|
277
277
|
|
|
278
|
-
const VERSION$
|
|
279
|
-
function validate$
|
|
278
|
+
const VERSION$s = "5ed5ccc6fa6f15691ec0fc1080e41fe6";
|
|
279
|
+
function validate$B(obj, path = 'EinsteinLlmEmbeddingItemRepresentation') {
|
|
280
280
|
const v_error = (() => {
|
|
281
281
|
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
282
282
|
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
@@ -297,10 +297,10 @@ function validate$y(obj, path = 'EinsteinLlmEmbeddingItemRepresentation') {
|
|
|
297
297
|
})();
|
|
298
298
|
return v_error === undefined ? null : v_error;
|
|
299
299
|
}
|
|
300
|
-
const select$
|
|
300
|
+
const select$K = function EinsteinLlmEmbeddingItemRepresentationSelect() {
|
|
301
301
|
return {
|
|
302
302
|
kind: 'Fragment',
|
|
303
|
-
version: VERSION$
|
|
303
|
+
version: VERSION$s,
|
|
304
304
|
private: [],
|
|
305
305
|
selections: [
|
|
306
306
|
{
|
|
@@ -315,7 +315,7 @@ const select$G = function EinsteinLlmEmbeddingItemRepresentationSelect() {
|
|
|
315
315
|
]
|
|
316
316
|
};
|
|
317
317
|
};
|
|
318
|
-
function equals$
|
|
318
|
+
function equals$s(existing, incoming) {
|
|
319
319
|
const existing_index = existing.index;
|
|
320
320
|
const incoming_index = incoming.index;
|
|
321
321
|
if (!(existing_index === incoming_index)) {
|
|
@@ -334,9 +334,9 @@ function equals$p(existing, incoming) {
|
|
|
334
334
|
return true;
|
|
335
335
|
}
|
|
336
336
|
|
|
337
|
-
const TTL$
|
|
338
|
-
const VERSION$
|
|
339
|
-
function validate$
|
|
337
|
+
const TTL$b = 100;
|
|
338
|
+
const VERSION$r = "d9873651f09d29764ef4d4231eb653d7";
|
|
339
|
+
function validate$A(obj, path = 'EinsteinLlmEmbeddingsRepresentation') {
|
|
340
340
|
const v_error = (() => {
|
|
341
341
|
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
342
342
|
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
@@ -349,7 +349,7 @@ function validate$x(obj, path = 'EinsteinLlmEmbeddingsRepresentation') {
|
|
|
349
349
|
for (let i = 0; i < obj_embeddings.length; i++) {
|
|
350
350
|
const obj_embeddings_item = obj_embeddings[i];
|
|
351
351
|
const path_embeddings_item = path_embeddings + '[' + i + ']';
|
|
352
|
-
const referencepath_embeddings_itemValidationError = validate$
|
|
352
|
+
const referencepath_embeddings_itemValidationError = validate$B(obj_embeddings_item, path_embeddings_item);
|
|
353
353
|
if (referencepath_embeddings_itemValidationError !== null) {
|
|
354
354
|
let message = 'Object doesn\'t match EinsteinLlmEmbeddingItemRepresentation (at "' + path_embeddings_item + '")\n';
|
|
355
355
|
message += referencepath_embeddings_itemValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
@@ -373,15 +373,15 @@ function validate$x(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$b = 'EinsteinLlmEmbeddingsRepresentation';
|
|
377
|
+
function normalize$b(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$J = function EinsteinLlmEmbeddingsRepresentationSelect() {
|
|
381
|
+
const { selections: EinsteinLlmEmbeddingItemRepresentation__selections, opaque: EinsteinLlmEmbeddingItemRepresentation__opaque, } = select$K();
|
|
382
382
|
return {
|
|
383
383
|
kind: 'Fragment',
|
|
384
|
-
version: VERSION$
|
|
384
|
+
version: VERSION$r,
|
|
385
385
|
private: [],
|
|
386
386
|
selections: [
|
|
387
387
|
{
|
|
@@ -398,11 +398,11 @@ const select$F = function EinsteinLlmEmbeddingsRepresentationSelect() {
|
|
|
398
398
|
]
|
|
399
399
|
};
|
|
400
400
|
};
|
|
401
|
-
function equals$
|
|
401
|
+
function equals$r(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$s(existing_embeddings_item, incoming_embeddings_item))) {
|
|
406
406
|
return false;
|
|
407
407
|
}
|
|
408
408
|
});
|
|
@@ -421,44 +421,44 @@ function equals$o(existing, incoming) {
|
|
|
421
421
|
}
|
|
422
422
|
return true;
|
|
423
423
|
}
|
|
424
|
-
const ingest$
|
|
424
|
+
const ingest$b = function EinsteinLlmEmbeddingsRepresentationIngest(input, path, luvio, store, timestamp) {
|
|
425
425
|
if (process.env.NODE_ENV !== 'production') {
|
|
426
|
-
const validateError = validate$
|
|
426
|
+
const validateError = validate$A(input);
|
|
427
427
|
if (validateError !== null) {
|
|
428
428
|
throw validateError;
|
|
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$b;
|
|
433
|
+
ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize$b, "EinsteinLLM", VERSION$r, RepresentationType$b, equals$r);
|
|
434
434
|
return createLink(key);
|
|
435
435
|
};
|
|
436
|
-
function getTypeCacheKeys$
|
|
436
|
+
function getTypeCacheKeys$b(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$b,
|
|
442
442
|
mergeable: false
|
|
443
443
|
});
|
|
444
444
|
}
|
|
445
445
|
|
|
446
|
-
function select$
|
|
447
|
-
return select$
|
|
446
|
+
function select$I(luvio, params) {
|
|
447
|
+
return select$J();
|
|
448
448
|
}
|
|
449
|
-
function keyBuilder$
|
|
449
|
+
function keyBuilder$p(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$h(storeKeyMap, luvio, resourceParams, response) {
|
|
453
|
+
getTypeCacheKeys$b(storeKeyMap, luvio, response, () => keyBuilder$p(luvio, resourceParams));
|
|
454
454
|
}
|
|
455
|
-
function ingestSuccess$
|
|
455
|
+
function ingestSuccess$h(luvio, resourceParams, response, snapshotRefresh) {
|
|
456
456
|
const { body } = response;
|
|
457
|
-
const key = keyBuilder$
|
|
458
|
-
luvio.storeIngest(key, ingest$
|
|
457
|
+
const key = keyBuilder$p(luvio, resourceParams);
|
|
458
|
+
luvio.storeIngest(key, ingest$b, body);
|
|
459
459
|
const snapshot = luvio.storeLookup({
|
|
460
460
|
recordId: key,
|
|
461
|
-
node: select$
|
|
461
|
+
node: select$I(),
|
|
462
462
|
variables: {},
|
|
463
463
|
}, snapshotRefresh);
|
|
464
464
|
if (process.env.NODE_ENV !== 'production') {
|
|
@@ -469,19 +469,19 @@ function ingestSuccess$g(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$a(luvio, params, error, snapshotRefresh) {
|
|
473
|
+
const key = keyBuilder$p(luvio, params);
|
|
474
474
|
const errorSnapshot = luvio.errorSnapshot(error, snapshotRefresh);
|
|
475
475
|
const storeMetadataParams = {
|
|
476
|
-
ttl: TTL$
|
|
476
|
+
ttl: TTL$b,
|
|
477
477
|
namespace: keyPrefix,
|
|
478
|
-
version: VERSION$
|
|
479
|
-
representationName: RepresentationType$
|
|
478
|
+
version: VERSION$r,
|
|
479
|
+
representationName: RepresentationType$b
|
|
480
480
|
};
|
|
481
481
|
luvio.storeIngestError(key, errorSnapshot, storeMetadataParams);
|
|
482
482
|
return errorSnapshot;
|
|
483
483
|
}
|
|
484
|
-
function createResourceRequest$
|
|
484
|
+
function createResourceRequest$h(config) {
|
|
485
485
|
const headers = {};
|
|
486
486
|
return {
|
|
487
487
|
baseUri: '/services/data/v65.0',
|
|
@@ -495,97 +495,97 @@ function createResourceRequest$g(config) {
|
|
|
495
495
|
};
|
|
496
496
|
}
|
|
497
497
|
|
|
498
|
-
const adapterName$
|
|
498
|
+
const adapterName$h = '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$h, createEmbeddings_ConfigPropertyMetadata);
|
|
503
|
+
const createResourceParams$h = /*#__PURE__*/ createResourceParams$i(createEmbeddings_ConfigPropertyMetadata);
|
|
504
|
+
function keyBuilder$o(luvio, config) {
|
|
505
|
+
const resourceParams = createResourceParams$h(config);
|
|
506
|
+
return keyBuilder$p(luvio, resourceParams);
|
|
507
507
|
}
|
|
508
|
-
function typeCheckConfig$
|
|
508
|
+
function typeCheckConfig$h(untrustedConfig) {
|
|
509
509
|
const config = {};
|
|
510
510
|
const untrustedConfig_embeddingsInput = untrustedConfig.embeddingsInput;
|
|
511
|
-
const referenceEinsteinLlmEmbeddingsInputRepresentationValidationError = validate$
|
|
511
|
+
const referenceEinsteinLlmEmbeddingsInputRepresentationValidationError = validate$C(untrustedConfig_embeddingsInput);
|
|
512
512
|
if (referenceEinsteinLlmEmbeddingsInputRepresentationValidationError === null) {
|
|
513
513
|
config.embeddingsInput = untrustedConfig_embeddingsInput;
|
|
514
514
|
}
|
|
515
515
|
return config;
|
|
516
516
|
}
|
|
517
|
-
function validateAdapterConfig$
|
|
517
|
+
function validateAdapterConfig$h(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$h(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$a(luvio, config) {
|
|
531
|
+
createResourceParams$h(config);
|
|
532
|
+
return select$I();
|
|
533
533
|
}
|
|
534
|
-
function onFetchResponseSuccess$
|
|
535
|
-
const snapshot = ingestSuccess$
|
|
534
|
+
function onFetchResponseSuccess$a(luvio, config, resourceParams, response) {
|
|
535
|
+
const snapshot = ingestSuccess$h(luvio, resourceParams, response, {
|
|
536
536
|
config,
|
|
537
|
-
resolve: () => buildNetworkSnapshot$
|
|
537
|
+
resolve: () => buildNetworkSnapshot$h(luvio, config, snapshotRefreshOptions)
|
|
538
538
|
});
|
|
539
539
|
return luvio.storeBroadcast().then(() => snapshot);
|
|
540
540
|
}
|
|
541
|
-
function onFetchResponseError$
|
|
542
|
-
const snapshot = ingestError$
|
|
541
|
+
function onFetchResponseError$a(luvio, config, resourceParams, response) {
|
|
542
|
+
const snapshot = ingestError$a(luvio, resourceParams, response, {
|
|
543
543
|
config,
|
|
544
|
-
resolve: () => buildNetworkSnapshot$
|
|
544
|
+
resolve: () => buildNetworkSnapshot$h(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$h(luvio, config, options) {
|
|
549
|
+
const resourceParams = createResourceParams$h(config);
|
|
550
|
+
const request = createResourceRequest$h(resourceParams);
|
|
551
551
|
return luvio.dispatchResourceRequest(request, options)
|
|
552
552
|
.then((response) => {
|
|
553
|
-
return luvio.handleSuccessResponse(() => onFetchResponseSuccess$
|
|
553
|
+
return luvio.handleSuccessResponse(() => onFetchResponseSuccess$a(luvio, config, resourceParams, response), () => {
|
|
554
554
|
const cache = new StoreKeyMap();
|
|
555
|
-
getResponseCacheKeys$
|
|
555
|
+
getResponseCacheKeys$h(cache, luvio, resourceParams, response.body);
|
|
556
556
|
return cache;
|
|
557
557
|
});
|
|
558
558
|
}, (response) => {
|
|
559
|
-
return luvio.handleErrorResponse(() => onFetchResponseError$
|
|
559
|
+
return luvio.handleErrorResponse(() => onFetchResponseError$a(luvio, config, resourceParams, response));
|
|
560
560
|
});
|
|
561
561
|
}
|
|
562
|
-
function buildNetworkSnapshotCachePolicy$
|
|
563
|
-
return buildNetworkSnapshotCachePolicy$
|
|
562
|
+
function buildNetworkSnapshotCachePolicy$a(context, coercedAdapterRequestContext) {
|
|
563
|
+
return buildNetworkSnapshotCachePolicy$b(context, coercedAdapterRequestContext, buildNetworkSnapshot$h, 'get', false);
|
|
564
564
|
}
|
|
565
|
-
function buildCachedSnapshotCachePolicy$
|
|
565
|
+
function buildCachedSnapshotCachePolicy$a(context, storeLookup) {
|
|
566
566
|
const { luvio, config } = context;
|
|
567
567
|
const selector = {
|
|
568
|
-
recordId: keyBuilder$
|
|
569
|
-
node: adapterFragment$
|
|
568
|
+
recordId: keyBuilder$o(luvio, config),
|
|
569
|
+
node: adapterFragment$a(luvio, config),
|
|
570
570
|
variables: {},
|
|
571
571
|
};
|
|
572
572
|
const cacheSnapshot = storeLookup(selector, {
|
|
573
573
|
config,
|
|
574
|
-
resolve: () => buildNetworkSnapshot$
|
|
574
|
+
resolve: () => buildNetworkSnapshot$h(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$h(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$a, buildNetworkSnapshotCachePolicy$a);
|
|
586
586
|
};
|
|
587
587
|
|
|
588
|
-
function validate$
|
|
588
|
+
function validate$z(obj, path = 'EinsteinLlmFeedbackInputRepresentation') {
|
|
589
589
|
const v_error = (() => {
|
|
590
590
|
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
591
591
|
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
@@ -632,9 +632,9 @@ function validate$w(obj, path = 'EinsteinLlmFeedbackInputRepresentation') {
|
|
|
632
632
|
return v_error === undefined ? null : v_error;
|
|
633
633
|
}
|
|
634
634
|
|
|
635
|
-
const TTL$
|
|
636
|
-
const VERSION$
|
|
637
|
-
function validate$
|
|
635
|
+
const TTL$a = 100;
|
|
636
|
+
const VERSION$q = "4033328f65865dd5d80c68a7573a4522";
|
|
637
|
+
function validate$y(obj, path = 'EinsteinLlmFeedbackRepresentation') {
|
|
638
638
|
const v_error = (() => {
|
|
639
639
|
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
640
640
|
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
@@ -647,23 +647,23 @@ function validate$v(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$a = 'EinsteinLlmFeedbackRepresentation';
|
|
651
|
+
function keyBuilder$n(luvio, config) {
|
|
652
|
+
return keyPrefix + '::' + RepresentationType$a + ':' + config.message;
|
|
653
653
|
}
|
|
654
654
|
function keyBuilderFromType$3(luvio, object) {
|
|
655
655
|
const keyParams = {
|
|
656
656
|
message: object.message
|
|
657
657
|
};
|
|
658
|
-
return keyBuilder$
|
|
658
|
+
return keyBuilder$n(luvio, keyParams);
|
|
659
659
|
}
|
|
660
|
-
function normalize$
|
|
660
|
+
function normalize$a(input, existing, path, luvio, store, timestamp) {
|
|
661
661
|
return input;
|
|
662
662
|
}
|
|
663
|
-
const select$
|
|
663
|
+
const select$H = function EinsteinLlmFeedbackRepresentationSelect() {
|
|
664
664
|
return {
|
|
665
665
|
kind: 'Fragment',
|
|
666
|
-
version: VERSION$
|
|
666
|
+
version: VERSION$q,
|
|
667
667
|
private: [],
|
|
668
668
|
selections: [
|
|
669
669
|
{
|
|
@@ -673,7 +673,7 @@ const select$D = function EinsteinLlmFeedbackRepresentationSelect() {
|
|
|
673
673
|
]
|
|
674
674
|
};
|
|
675
675
|
};
|
|
676
|
-
function equals$
|
|
676
|
+
function equals$q(existing, incoming) {
|
|
677
677
|
const existing_message = existing.message;
|
|
678
678
|
const incoming_message = incoming.message;
|
|
679
679
|
if (!(existing_message === incoming_message)) {
|
|
@@ -681,41 +681,41 @@ function equals$n(existing, incoming) {
|
|
|
681
681
|
}
|
|
682
682
|
return true;
|
|
683
683
|
}
|
|
684
|
-
const ingest$
|
|
684
|
+
const ingest$a = function EinsteinLlmFeedbackRepresentationIngest(input, path, luvio, store, timestamp) {
|
|
685
685
|
if (process.env.NODE_ENV !== 'production') {
|
|
686
|
-
const validateError = validate$
|
|
686
|
+
const validateError = validate$y(input);
|
|
687
687
|
if (validateError !== null) {
|
|
688
688
|
throw validateError;
|
|
689
689
|
}
|
|
690
690
|
}
|
|
691
691
|
const key = keyBuilderFromType$3(luvio, input);
|
|
692
|
-
const ttlToUse = TTL$
|
|
693
|
-
ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize$
|
|
692
|
+
const ttlToUse = TTL$a;
|
|
693
|
+
ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize$a, "EinsteinLLM", VERSION$q, RepresentationType$a, equals$q);
|
|
694
694
|
return createLink(key);
|
|
695
695
|
};
|
|
696
|
-
function getTypeCacheKeys$
|
|
696
|
+
function getTypeCacheKeys$a(rootKeySet, luvio, input, fullPathFactory) {
|
|
697
697
|
// root cache key (uses fullPathFactory if keyBuilderFromType isn't defined)
|
|
698
698
|
const rootKey = keyBuilderFromType$3(luvio, input);
|
|
699
699
|
rootKeySet.set(rootKey, {
|
|
700
700
|
namespace: keyPrefix,
|
|
701
|
-
representationName: RepresentationType$
|
|
701
|
+
representationName: RepresentationType$a,
|
|
702
702
|
mergeable: false
|
|
703
703
|
});
|
|
704
704
|
}
|
|
705
705
|
|
|
706
|
-
function select$
|
|
707
|
-
return select$
|
|
706
|
+
function select$G(luvio, params) {
|
|
707
|
+
return select$H();
|
|
708
708
|
}
|
|
709
|
-
function getResponseCacheKeys$
|
|
710
|
-
getTypeCacheKeys$
|
|
709
|
+
function getResponseCacheKeys$g(storeKeyMap, luvio, resourceParams, response) {
|
|
710
|
+
getTypeCacheKeys$a(storeKeyMap, luvio, response);
|
|
711
711
|
}
|
|
712
|
-
function ingestSuccess$
|
|
712
|
+
function ingestSuccess$g(luvio, resourceParams, response) {
|
|
713
713
|
const { body } = response;
|
|
714
714
|
const key = keyBuilderFromType$3(luvio, body);
|
|
715
|
-
luvio.storeIngest(key, ingest$
|
|
715
|
+
luvio.storeIngest(key, ingest$a, body);
|
|
716
716
|
const snapshot = luvio.storeLookup({
|
|
717
717
|
recordId: key,
|
|
718
|
-
node: select$
|
|
718
|
+
node: select$G(),
|
|
719
719
|
variables: {},
|
|
720
720
|
});
|
|
721
721
|
if (process.env.NODE_ENV !== 'production') {
|
|
@@ -726,7 +726,7 @@ function ingestSuccess$f(luvio, resourceParams, response) {
|
|
|
726
726
|
deepFreeze(snapshot.data);
|
|
727
727
|
return snapshot;
|
|
728
728
|
}
|
|
729
|
-
function createResourceRequest$
|
|
729
|
+
function createResourceRequest$g(config) {
|
|
730
730
|
const headers = {};
|
|
731
731
|
return {
|
|
732
732
|
baseUri: '/services/data/v65.0',
|
|
@@ -740,45 +740,45 @@ function createResourceRequest$f(config) {
|
|
|
740
740
|
};
|
|
741
741
|
}
|
|
742
742
|
|
|
743
|
-
const adapterName$
|
|
743
|
+
const adapterName$g = '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$g, createFeedback_ConfigPropertyMetadata);
|
|
748
|
+
const createResourceParams$g = /*#__PURE__*/ createResourceParams$i(createFeedback_ConfigPropertyMetadata);
|
|
749
|
+
function typeCheckConfig$g(untrustedConfig) {
|
|
750
750
|
const config = {};
|
|
751
751
|
const untrustedConfig_feedbackInput = untrustedConfig.feedbackInput;
|
|
752
|
-
const referenceEinsteinLlmFeedbackInputRepresentationValidationError = validate$
|
|
752
|
+
const referenceEinsteinLlmFeedbackInputRepresentationValidationError = validate$z(untrustedConfig_feedbackInput);
|
|
753
753
|
if (referenceEinsteinLlmFeedbackInputRepresentationValidationError === null) {
|
|
754
754
|
config.feedbackInput = untrustedConfig_feedbackInput;
|
|
755
755
|
}
|
|
756
756
|
return config;
|
|
757
757
|
}
|
|
758
|
-
function validateAdapterConfig$
|
|
758
|
+
function validateAdapterConfig$g(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$g(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$g(luvio, config, options) {
|
|
772
|
+
const resourceParams = createResourceParams$g(config);
|
|
773
|
+
const request = createResourceRequest$g(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$g(luvio, resourceParams, response);
|
|
778
778
|
return luvio.storeBroadcast().then(() => snapshot);
|
|
779
779
|
}, () => {
|
|
780
780
|
const cache = new StoreKeyMap();
|
|
781
|
-
getResponseCacheKeys$
|
|
781
|
+
getResponseCacheKeys$g(cache, luvio, resourceParams, response.body);
|
|
782
782
|
return cache;
|
|
783
783
|
});
|
|
784
784
|
}, (response) => {
|
|
@@ -788,16 +788,16 @@ function buildNetworkSnapshot$f(luvio, config, options) {
|
|
|
788
788
|
}
|
|
789
789
|
const createFeedbackAdapterFactory = (luvio) => {
|
|
790
790
|
return function createFeedback(untrustedConfig) {
|
|
791
|
-
const config = validateAdapterConfig$
|
|
791
|
+
const config = validateAdapterConfig$g(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$g(luvio, config);
|
|
797
797
|
};
|
|
798
798
|
};
|
|
799
799
|
|
|
800
|
-
function validate$
|
|
800
|
+
function validate$x(obj, path = 'EinsteinLlmAdditionalConfigInputRepresentation') {
|
|
801
801
|
const v_error = (() => {
|
|
802
802
|
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
803
803
|
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
@@ -880,7 +880,7 @@ function validate$u(obj, path = 'EinsteinLlmAdditionalConfigInputRepresentation'
|
|
|
880
880
|
return v_error === undefined ? null : v_error;
|
|
881
881
|
}
|
|
882
882
|
|
|
883
|
-
function validate$
|
|
883
|
+
function validate$w(obj, path = 'EinsteinLlmGenerationsInputRepresentation') {
|
|
884
884
|
const v_error = (() => {
|
|
885
885
|
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
886
886
|
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
@@ -888,7 +888,7 @@ function validate$t(obj, path = 'EinsteinLlmGenerationsInputRepresentation') {
|
|
|
888
888
|
if (obj.additionalConfig !== undefined) {
|
|
889
889
|
const obj_additionalConfig = obj.additionalConfig;
|
|
890
890
|
const path_additionalConfig = path + '.additionalConfig';
|
|
891
|
-
const referencepath_additionalConfigValidationError = validate$
|
|
891
|
+
const referencepath_additionalConfigValidationError = validate$x(obj_additionalConfig, path_additionalConfig);
|
|
892
892
|
if (referencepath_additionalConfigValidationError !== null) {
|
|
893
893
|
let message = 'Object doesn\'t match EinsteinLlmAdditionalConfigInputRepresentation (at "' + path_additionalConfig + '")\n';
|
|
894
894
|
message += referencepath_additionalConfigValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
@@ -911,8 +911,8 @@ function validate$t(obj, path = 'EinsteinLlmGenerationsInputRepresentation') {
|
|
|
911
911
|
return v_error === undefined ? null : v_error;
|
|
912
912
|
}
|
|
913
913
|
|
|
914
|
-
const VERSION$
|
|
915
|
-
function validate$
|
|
914
|
+
const VERSION$p = "9ebac74e6f964c363d5fd1913df363af";
|
|
915
|
+
function validate$v(obj, path = 'EinsteinLlmGenerationsContentQualityRepresentation') {
|
|
916
916
|
const v_error = (() => {
|
|
917
917
|
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
918
918
|
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
@@ -948,10 +948,10 @@ function validate$s(obj, path = 'EinsteinLlmGenerationsContentQualityRepresentat
|
|
|
948
948
|
})();
|
|
949
949
|
return v_error === undefined ? null : v_error;
|
|
950
950
|
}
|
|
951
|
-
const select$
|
|
951
|
+
const select$F = function EinsteinLlmGenerationsContentQualityRepresentationSelect() {
|
|
952
952
|
return {
|
|
953
953
|
kind: 'Fragment',
|
|
954
|
-
version: VERSION$
|
|
954
|
+
version: VERSION$p,
|
|
955
955
|
private: [],
|
|
956
956
|
selections: [
|
|
957
957
|
{
|
|
@@ -962,7 +962,7 @@ const select$B = function EinsteinLlmGenerationsContentQualityRepresentationSele
|
|
|
962
962
|
]
|
|
963
963
|
};
|
|
964
964
|
};
|
|
965
|
-
function equals$
|
|
965
|
+
function equals$p(existing, incoming) {
|
|
966
966
|
const existing_isToxicityDetected = existing.isToxicityDetected;
|
|
967
967
|
const incoming_isToxicityDetected = incoming.isToxicityDetected;
|
|
968
968
|
// if at least one of these optionals is defined
|
|
@@ -979,8 +979,8 @@ function equals$m(existing, incoming) {
|
|
|
979
979
|
return true;
|
|
980
980
|
}
|
|
981
981
|
|
|
982
|
-
const VERSION$
|
|
983
|
-
function validate$
|
|
982
|
+
const VERSION$o = "77af44a252cb5b45b4d9a8101368d2aa";
|
|
983
|
+
function validate$u(obj, path = 'EinsteinLlmGenerationsSafetyScoreRepresentation') {
|
|
984
984
|
const v_error = (() => {
|
|
985
985
|
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
986
986
|
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
@@ -1184,10 +1184,10 @@ function validate$r(obj, path = 'EinsteinLlmGenerationsSafetyScoreRepresentation
|
|
|
1184
1184
|
})();
|
|
1185
1185
|
return v_error === undefined ? null : v_error;
|
|
1186
1186
|
}
|
|
1187
|
-
const select$
|
|
1187
|
+
const select$E = function EinsteinLlmGenerationsSafetyScoreRepresentationSelect() {
|
|
1188
1188
|
return {
|
|
1189
1189
|
kind: 'Fragment',
|
|
1190
|
-
version: VERSION$
|
|
1190
|
+
version: VERSION$o,
|
|
1191
1191
|
private: [],
|
|
1192
1192
|
selections: [
|
|
1193
1193
|
{
|
|
@@ -1228,7 +1228,7 @@ const select$A = function EinsteinLlmGenerationsSafetyScoreRepresentationSelect(
|
|
|
1228
1228
|
]
|
|
1229
1229
|
};
|
|
1230
1230
|
};
|
|
1231
|
-
function equals$
|
|
1231
|
+
function equals$o(existing, incoming) {
|
|
1232
1232
|
const existing_hateScore = existing.hateScore;
|
|
1233
1233
|
const incoming_hateScore = incoming.hateScore;
|
|
1234
1234
|
// if at least one of these optionals is defined
|
|
@@ -1323,8 +1323,8 @@ function equals$l(existing, incoming) {
|
|
|
1323
1323
|
return true;
|
|
1324
1324
|
}
|
|
1325
1325
|
|
|
1326
|
-
const VERSION$
|
|
1327
|
-
function validate$
|
|
1326
|
+
const VERSION$n = "4a07778ff6c595d91c575188146647a1";
|
|
1327
|
+
function validate$t(obj, path = 'EinsteinLlmGenerationItemRepresentation') {
|
|
1328
1328
|
const v_error = (() => {
|
|
1329
1329
|
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
1330
1330
|
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
@@ -1334,7 +1334,7 @@ function validate$q(obj, path = 'EinsteinLlmGenerationItemRepresentation') {
|
|
|
1334
1334
|
const path_contentQualityRepresentation = path + '.contentQualityRepresentation';
|
|
1335
1335
|
let obj_contentQualityRepresentation_union0 = null;
|
|
1336
1336
|
const obj_contentQualityRepresentation_union0_error = (() => {
|
|
1337
|
-
const referencepath_contentQualityRepresentationValidationError = validate$
|
|
1337
|
+
const referencepath_contentQualityRepresentationValidationError = validate$v(obj_contentQualityRepresentation, path_contentQualityRepresentation);
|
|
1338
1338
|
if (referencepath_contentQualityRepresentationValidationError !== null) {
|
|
1339
1339
|
let message = 'Object doesn\'t match EinsteinLlmGenerationsContentQualityRepresentation (at "' + path_contentQualityRepresentation + '")\n';
|
|
1340
1340
|
message += referencepath_contentQualityRepresentationValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
@@ -1382,7 +1382,7 @@ function validate$q(obj, path = 'EinsteinLlmGenerationItemRepresentation') {
|
|
|
1382
1382
|
const path_safetyScoreRepresentation = path + '.safetyScoreRepresentation';
|
|
1383
1383
|
let obj_safetyScoreRepresentation_union0 = null;
|
|
1384
1384
|
const obj_safetyScoreRepresentation_union0_error = (() => {
|
|
1385
|
-
const referencepath_safetyScoreRepresentationValidationError = validate$
|
|
1385
|
+
const referencepath_safetyScoreRepresentationValidationError = validate$u(obj_safetyScoreRepresentation, path_safetyScoreRepresentation);
|
|
1386
1386
|
if (referencepath_safetyScoreRepresentationValidationError !== null) {
|
|
1387
1387
|
let message = 'Object doesn\'t match EinsteinLlmGenerationsSafetyScoreRepresentation (at "' + path_safetyScoreRepresentation + '")\n';
|
|
1388
1388
|
message += referencepath_safetyScoreRepresentationValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
@@ -1416,12 +1416,12 @@ function validate$q(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$D = function EinsteinLlmGenerationItemRepresentationSelect() {
|
|
1420
|
+
const { selections: EinsteinLlmGenerationsContentQualityRepresentation__selections, opaque: EinsteinLlmGenerationsContentQualityRepresentation__opaque, } = select$F();
|
|
1421
|
+
const { selections: EinsteinLlmGenerationsSafetyScoreRepresentation__selections, opaque: EinsteinLlmGenerationsSafetyScoreRepresentation__opaque, } = select$E();
|
|
1422
1422
|
return {
|
|
1423
1423
|
kind: 'Fragment',
|
|
1424
|
-
version: VERSION$
|
|
1424
|
+
version: VERSION$n,
|
|
1425
1425
|
private: [],
|
|
1426
1426
|
selections: [
|
|
1427
1427
|
{
|
|
@@ -1458,7 +1458,7 @@ const select$z = function EinsteinLlmGenerationItemRepresentationSelect() {
|
|
|
1458
1458
|
]
|
|
1459
1459
|
};
|
|
1460
1460
|
};
|
|
1461
|
-
function equals$
|
|
1461
|
+
function equals$n(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$k(existing, incoming) {
|
|
|
1499
1499
|
if (!(existing_contentQualityRepresentation === incoming_contentQualityRepresentation
|
|
1500
1500
|
|| (existing_contentQualityRepresentation != null &&
|
|
1501
1501
|
incoming_contentQualityRepresentation != null &&
|
|
1502
|
-
equals$
|
|
1502
|
+
equals$p(existing_contentQualityRepresentation, incoming_contentQualityRepresentation)))) {
|
|
1503
1503
|
return false;
|
|
1504
1504
|
}
|
|
1505
1505
|
}
|
|
@@ -1515,15 +1515,15 @@ function equals$k(existing, incoming) {
|
|
|
1515
1515
|
if (!(existing_safetyScoreRepresentation === incoming_safetyScoreRepresentation
|
|
1516
1516
|
|| (existing_safetyScoreRepresentation != null &&
|
|
1517
1517
|
incoming_safetyScoreRepresentation != null &&
|
|
1518
|
-
equals$
|
|
1518
|
+
equals$o(existing_safetyScoreRepresentation, incoming_safetyScoreRepresentation)))) {
|
|
1519
1519
|
return false;
|
|
1520
1520
|
}
|
|
1521
1521
|
}
|
|
1522
1522
|
return true;
|
|
1523
1523
|
}
|
|
1524
1524
|
|
|
1525
|
-
const VERSION$
|
|
1526
|
-
function validate$
|
|
1525
|
+
const VERSION$m = "379fd960d1a0118f506f458ab2c8dd7e";
|
|
1526
|
+
function validate$s(obj, path = 'WrappedMap') {
|
|
1527
1527
|
const v_error = (() => {
|
|
1528
1528
|
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
1529
1529
|
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
@@ -1545,10 +1545,10 @@ function validate$p(obj, path = 'WrappedMap') {
|
|
|
1545
1545
|
})();
|
|
1546
1546
|
return v_error === undefined ? null : v_error;
|
|
1547
1547
|
}
|
|
1548
|
-
const select$
|
|
1548
|
+
const select$C = function WrappedMapSelect() {
|
|
1549
1549
|
return {
|
|
1550
1550
|
kind: 'Fragment',
|
|
1551
|
-
version: VERSION$
|
|
1551
|
+
version: VERSION$m,
|
|
1552
1552
|
private: [],
|
|
1553
1553
|
selections: [
|
|
1554
1554
|
{
|
|
@@ -1559,7 +1559,7 @@ const select$y = function WrappedMapSelect() {
|
|
|
1559
1559
|
]
|
|
1560
1560
|
};
|
|
1561
1561
|
};
|
|
1562
|
-
function equals$
|
|
1562
|
+
function equals$m(existing, incoming) {
|
|
1563
1563
|
const existing_wrappedMap = existing.wrappedMap;
|
|
1564
1564
|
const incoming_wrappedMap = incoming.wrappedMap;
|
|
1565
1565
|
const equals_wrappedMap_props = equalsObject(existing_wrappedMap, incoming_wrappedMap, (existing_wrappedMap_prop, incoming_wrappedMap_prop) => {
|
|
@@ -1573,9 +1573,9 @@ function equals$j(existing, incoming) {
|
|
|
1573
1573
|
return true;
|
|
1574
1574
|
}
|
|
1575
1575
|
|
|
1576
|
-
const TTL$
|
|
1577
|
-
const VERSION$
|
|
1578
|
-
function validate$
|
|
1576
|
+
const TTL$9 = 100;
|
|
1577
|
+
const VERSION$l = "d8abd72a42e842b253da1c38954dafbc";
|
|
1578
|
+
function validate$r(obj, path = 'EinsteinLlmGenerationsRepresentation') {
|
|
1579
1579
|
const v_error = (() => {
|
|
1580
1580
|
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
1581
1581
|
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
@@ -1588,7 +1588,7 @@ function validate$o(obj, path = 'EinsteinLlmGenerationsRepresentation') {
|
|
|
1588
1588
|
for (let i = 0; i < obj_generations.length; i++) {
|
|
1589
1589
|
const obj_generations_item = obj_generations[i];
|
|
1590
1590
|
const path_generations_item = path_generations + '[' + i + ']';
|
|
1591
|
-
const referencepath_generations_itemValidationError = validate$
|
|
1591
|
+
const referencepath_generations_itemValidationError = validate$t(obj_generations_item, path_generations_item);
|
|
1592
1592
|
if (referencepath_generations_itemValidationError !== null) {
|
|
1593
1593
|
let message = 'Object doesn\'t match EinsteinLlmGenerationItemRepresentation (at "' + path_generations_item + '")\n';
|
|
1594
1594
|
message += referencepath_generations_itemValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
@@ -1599,7 +1599,7 @@ function validate$o(obj, path = 'EinsteinLlmGenerationsRepresentation') {
|
|
|
1599
1599
|
const path_parameters = path + '.parameters';
|
|
1600
1600
|
let obj_parameters_union0 = null;
|
|
1601
1601
|
const obj_parameters_union0_error = (() => {
|
|
1602
|
-
const referencepath_parametersValidationError = validate$
|
|
1602
|
+
const referencepath_parametersValidationError = validate$s(obj_parameters, path_parameters);
|
|
1603
1603
|
if (referencepath_parametersValidationError !== null) {
|
|
1604
1604
|
let message = 'Object doesn\'t match WrappedMap (at "' + path_parameters + '")\n';
|
|
1605
1605
|
message += referencepath_parametersValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
@@ -1658,25 +1658,25 @@ function validate$o(obj, path = 'EinsteinLlmGenerationsRepresentation') {
|
|
|
1658
1658
|
})();
|
|
1659
1659
|
return v_error === undefined ? null : v_error;
|
|
1660
1660
|
}
|
|
1661
|
-
const RepresentationType$
|
|
1662
|
-
function keyBuilder$
|
|
1663
|
-
return keyPrefix + '::' + RepresentationType$
|
|
1661
|
+
const RepresentationType$9 = 'EinsteinLlmGenerationsRepresentation';
|
|
1662
|
+
function keyBuilder$m(luvio, config) {
|
|
1663
|
+
return keyPrefix + '::' + RepresentationType$9 + ':' + config.requestId;
|
|
1664
1664
|
}
|
|
1665
1665
|
function keyBuilderFromType$2(luvio, object) {
|
|
1666
1666
|
const keyParams = {
|
|
1667
1667
|
requestId: object.requestId
|
|
1668
1668
|
};
|
|
1669
|
-
return keyBuilder$
|
|
1669
|
+
return keyBuilder$m(luvio, keyParams);
|
|
1670
1670
|
}
|
|
1671
|
-
function normalize$
|
|
1671
|
+
function normalize$9(input, existing, path, luvio, store, timestamp) {
|
|
1672
1672
|
return input;
|
|
1673
1673
|
}
|
|
1674
|
-
const select$
|
|
1675
|
-
const { selections: EinsteinLlmGenerationItemRepresentation__selections, opaque: EinsteinLlmGenerationItemRepresentation__opaque, } = select$
|
|
1676
|
-
const { selections: WrappedMap__selections, opaque: WrappedMap__opaque, } = select$
|
|
1674
|
+
const select$B = function EinsteinLlmGenerationsRepresentationSelect() {
|
|
1675
|
+
const { selections: EinsteinLlmGenerationItemRepresentation__selections, opaque: EinsteinLlmGenerationItemRepresentation__opaque, } = select$D();
|
|
1676
|
+
const { selections: WrappedMap__selections, opaque: WrappedMap__opaque, } = select$C();
|
|
1677
1677
|
return {
|
|
1678
1678
|
kind: 'Fragment',
|
|
1679
|
-
version: VERSION$
|
|
1679
|
+
version: VERSION$l,
|
|
1680
1680
|
private: [],
|
|
1681
1681
|
selections: [
|
|
1682
1682
|
{
|
|
@@ -1702,7 +1702,7 @@ const select$x = function EinsteinLlmGenerationsRepresentationSelect() {
|
|
|
1702
1702
|
]
|
|
1703
1703
|
};
|
|
1704
1704
|
};
|
|
1705
|
-
function equals$
|
|
1705
|
+
function equals$l(existing, incoming) {
|
|
1706
1706
|
const existing_requestId = existing.requestId;
|
|
1707
1707
|
const incoming_requestId = incoming.requestId;
|
|
1708
1708
|
if (!(existing_requestId === incoming_requestId)) {
|
|
@@ -1711,7 +1711,7 @@ function equals$i(existing, incoming) {
|
|
|
1711
1711
|
const existing_generations = existing.generations;
|
|
1712
1712
|
const incoming_generations = incoming.generations;
|
|
1713
1713
|
const equals_generations_items = equalsArray(existing_generations, incoming_generations, (existing_generations_item, incoming_generations_item) => {
|
|
1714
|
-
if (!(equals$
|
|
1714
|
+
if (!(equals$n(existing_generations_item, incoming_generations_item))) {
|
|
1715
1715
|
return false;
|
|
1716
1716
|
}
|
|
1717
1717
|
});
|
|
@@ -1723,7 +1723,7 @@ function equals$i(existing, incoming) {
|
|
|
1723
1723
|
if (!(existing_parameters === incoming_parameters
|
|
1724
1724
|
|| (existing_parameters != null &&
|
|
1725
1725
|
incoming_parameters != null &&
|
|
1726
|
-
equals$
|
|
1726
|
+
equals$m(existing_parameters, incoming_parameters)))) {
|
|
1727
1727
|
return false;
|
|
1728
1728
|
}
|
|
1729
1729
|
const existing_prompt = existing.prompt;
|
|
@@ -1733,41 +1733,41 @@ function equals$i(existing, incoming) {
|
|
|
1733
1733
|
}
|
|
1734
1734
|
return true;
|
|
1735
1735
|
}
|
|
1736
|
-
const ingest$
|
|
1736
|
+
const ingest$9 = function EinsteinLlmGenerationsRepresentationIngest(input, path, luvio, store, timestamp) {
|
|
1737
1737
|
if (process.env.NODE_ENV !== 'production') {
|
|
1738
|
-
const validateError = validate$
|
|
1738
|
+
const validateError = validate$r(input);
|
|
1739
1739
|
if (validateError !== null) {
|
|
1740
1740
|
throw validateError;
|
|
1741
1741
|
}
|
|
1742
1742
|
}
|
|
1743
1743
|
const key = keyBuilderFromType$2(luvio, input);
|
|
1744
|
-
const ttlToUse = TTL$
|
|
1745
|
-
ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize$
|
|
1744
|
+
const ttlToUse = TTL$9;
|
|
1745
|
+
ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize$9, "EinsteinLLM", VERSION$l, RepresentationType$9, equals$l);
|
|
1746
1746
|
return createLink(key);
|
|
1747
1747
|
};
|
|
1748
|
-
function getTypeCacheKeys$
|
|
1748
|
+
function getTypeCacheKeys$9(rootKeySet, luvio, input, fullPathFactory) {
|
|
1749
1749
|
// root cache key (uses fullPathFactory if keyBuilderFromType isn't defined)
|
|
1750
1750
|
const rootKey = keyBuilderFromType$2(luvio, input);
|
|
1751
1751
|
rootKeySet.set(rootKey, {
|
|
1752
1752
|
namespace: keyPrefix,
|
|
1753
|
-
representationName: RepresentationType$
|
|
1753
|
+
representationName: RepresentationType$9,
|
|
1754
1754
|
mergeable: false
|
|
1755
1755
|
});
|
|
1756
1756
|
}
|
|
1757
1757
|
|
|
1758
|
-
function select$
|
|
1759
|
-
return select$
|
|
1758
|
+
function select$A(luvio, params) {
|
|
1759
|
+
return select$B();
|
|
1760
1760
|
}
|
|
1761
|
-
function getResponseCacheKeys$
|
|
1762
|
-
getTypeCacheKeys$
|
|
1761
|
+
function getResponseCacheKeys$f(storeKeyMap, luvio, resourceParams, response) {
|
|
1762
|
+
getTypeCacheKeys$9(storeKeyMap, luvio, response);
|
|
1763
1763
|
}
|
|
1764
|
-
function ingestSuccess$
|
|
1764
|
+
function ingestSuccess$f(luvio, resourceParams, response) {
|
|
1765
1765
|
const { body } = response;
|
|
1766
1766
|
const key = keyBuilderFromType$2(luvio, body);
|
|
1767
|
-
luvio.storeIngest(key, ingest$
|
|
1767
|
+
luvio.storeIngest(key, ingest$9, body);
|
|
1768
1768
|
const snapshot = luvio.storeLookup({
|
|
1769
1769
|
recordId: key,
|
|
1770
|
-
node: select$
|
|
1770
|
+
node: select$A(),
|
|
1771
1771
|
variables: {},
|
|
1772
1772
|
});
|
|
1773
1773
|
if (process.env.NODE_ENV !== 'production') {
|
|
@@ -1778,7 +1778,7 @@ function ingestSuccess$e(luvio, resourceParams, response) {
|
|
|
1778
1778
|
deepFreeze(snapshot.data);
|
|
1779
1779
|
return snapshot;
|
|
1780
1780
|
}
|
|
1781
|
-
function createResourceRequest$
|
|
1781
|
+
function createResourceRequest$f(config) {
|
|
1782
1782
|
const headers = {};
|
|
1783
1783
|
return {
|
|
1784
1784
|
baseUri: '/services/data/v65.0',
|
|
@@ -1792,45 +1792,45 @@ function createResourceRequest$e(config) {
|
|
|
1792
1792
|
};
|
|
1793
1793
|
}
|
|
1794
1794
|
|
|
1795
|
-
const adapterName$
|
|
1795
|
+
const adapterName$f = 'createGenerations';
|
|
1796
1796
|
const createGenerations_ConfigPropertyMetadata = [
|
|
1797
1797
|
generateParamConfigMetadata('generationsInput', true, 2 /* Body */, 4 /* Unsupported */),
|
|
1798
1798
|
];
|
|
1799
|
-
const createGenerations_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$
|
|
1800
|
-
const createResourceParams$
|
|
1801
|
-
function typeCheckConfig$
|
|
1799
|
+
const createGenerations_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$f, createGenerations_ConfigPropertyMetadata);
|
|
1800
|
+
const createResourceParams$f = /*#__PURE__*/ createResourceParams$i(createGenerations_ConfigPropertyMetadata);
|
|
1801
|
+
function typeCheckConfig$f(untrustedConfig) {
|
|
1802
1802
|
const config = {};
|
|
1803
1803
|
const untrustedConfig_generationsInput = untrustedConfig.generationsInput;
|
|
1804
|
-
const referenceEinsteinLlmGenerationsInputRepresentationValidationError = validate$
|
|
1804
|
+
const referenceEinsteinLlmGenerationsInputRepresentationValidationError = validate$w(untrustedConfig_generationsInput);
|
|
1805
1805
|
if (referenceEinsteinLlmGenerationsInputRepresentationValidationError === null) {
|
|
1806
1806
|
config.generationsInput = untrustedConfig_generationsInput;
|
|
1807
1807
|
}
|
|
1808
1808
|
return config;
|
|
1809
1809
|
}
|
|
1810
|
-
function validateAdapterConfig$
|
|
1810
|
+
function validateAdapterConfig$f(untrustedConfig, configPropertyNames) {
|
|
1811
1811
|
if (!untrustedIsObject(untrustedConfig)) {
|
|
1812
1812
|
return null;
|
|
1813
1813
|
}
|
|
1814
1814
|
if (process.env.NODE_ENV !== 'production') {
|
|
1815
1815
|
validateConfig(untrustedConfig, configPropertyNames);
|
|
1816
1816
|
}
|
|
1817
|
-
const config = typeCheckConfig$
|
|
1817
|
+
const config = typeCheckConfig$f(untrustedConfig);
|
|
1818
1818
|
if (!areRequiredParametersPresent(config, configPropertyNames)) {
|
|
1819
1819
|
return null;
|
|
1820
1820
|
}
|
|
1821
1821
|
return config;
|
|
1822
1822
|
}
|
|
1823
|
-
function buildNetworkSnapshot$
|
|
1824
|
-
const resourceParams = createResourceParams$
|
|
1825
|
-
const request = createResourceRequest$
|
|
1823
|
+
function buildNetworkSnapshot$f(luvio, config, options) {
|
|
1824
|
+
const resourceParams = createResourceParams$f(config);
|
|
1825
|
+
const request = createResourceRequest$f(resourceParams);
|
|
1826
1826
|
return luvio.dispatchResourceRequest(request, options)
|
|
1827
1827
|
.then((response) => {
|
|
1828
1828
|
return luvio.handleSuccessResponse(() => {
|
|
1829
|
-
const snapshot = ingestSuccess$
|
|
1829
|
+
const snapshot = ingestSuccess$f(luvio, resourceParams, response);
|
|
1830
1830
|
return luvio.storeBroadcast().then(() => snapshot);
|
|
1831
1831
|
}, () => {
|
|
1832
1832
|
const cache = new StoreKeyMap();
|
|
1833
|
-
getResponseCacheKeys$
|
|
1833
|
+
getResponseCacheKeys$f(cache, luvio, resourceParams, response.body);
|
|
1834
1834
|
return cache;
|
|
1835
1835
|
});
|
|
1836
1836
|
}, (response) => {
|
|
@@ -1840,16 +1840,16 @@ function buildNetworkSnapshot$e(luvio, config, options) {
|
|
|
1840
1840
|
}
|
|
1841
1841
|
const createGenerationsAdapterFactory = (luvio) => {
|
|
1842
1842
|
return function createGenerations(untrustedConfig) {
|
|
1843
|
-
const config = validateAdapterConfig$
|
|
1843
|
+
const config = validateAdapterConfig$f(untrustedConfig, createGenerations_ConfigPropertyNames);
|
|
1844
1844
|
// Invalid or incomplete config
|
|
1845
1845
|
if (config === null) {
|
|
1846
1846
|
throw new Error('Invalid config for "createGenerations"');
|
|
1847
1847
|
}
|
|
1848
|
-
return buildNetworkSnapshot$
|
|
1848
|
+
return buildNetworkSnapshot$f(luvio, config);
|
|
1849
1849
|
};
|
|
1850
1850
|
};
|
|
1851
1851
|
|
|
1852
|
-
function validate$
|
|
1852
|
+
function validate$q(obj, path = 'WrappedValueMap') {
|
|
1853
1853
|
const v_error = (() => {
|
|
1854
1854
|
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
1855
1855
|
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
@@ -1872,7 +1872,7 @@ function validate$n(obj, path = 'WrappedValueMap') {
|
|
|
1872
1872
|
return v_error === undefined ? null : v_error;
|
|
1873
1873
|
}
|
|
1874
1874
|
|
|
1875
|
-
function validate$
|
|
1875
|
+
function validate$p(obj, path = 'EinsteinPromptTemplateGenerationsInputRepresentation') {
|
|
1876
1876
|
const v_error = (() => {
|
|
1877
1877
|
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
1878
1878
|
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
@@ -1880,7 +1880,7 @@ function validate$m(obj, path = 'EinsteinPromptTemplateGenerationsInputRepresent
|
|
|
1880
1880
|
if (obj.additionalConfig !== undefined) {
|
|
1881
1881
|
const obj_additionalConfig = obj.additionalConfig;
|
|
1882
1882
|
const path_additionalConfig = path + '.additionalConfig';
|
|
1883
|
-
const referencepath_additionalConfigValidationError = validate$
|
|
1883
|
+
const referencepath_additionalConfigValidationError = validate$x(obj_additionalConfig, path_additionalConfig);
|
|
1884
1884
|
if (referencepath_additionalConfigValidationError !== null) {
|
|
1885
1885
|
let message = 'Object doesn\'t match EinsteinLlmAdditionalConfigInputRepresentation (at "' + path_additionalConfig + '")\n';
|
|
1886
1886
|
message += referencepath_additionalConfigValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
@@ -1889,7 +1889,7 @@ function validate$m(obj, path = 'EinsteinPromptTemplateGenerationsInputRepresent
|
|
|
1889
1889
|
}
|
|
1890
1890
|
const obj_inputParams = obj.inputParams;
|
|
1891
1891
|
const path_inputParams = path + '.inputParams';
|
|
1892
|
-
const referencepath_inputParamsValidationError = validate$
|
|
1892
|
+
const referencepath_inputParamsValidationError = validate$q(obj_inputParams, path_inputParams);
|
|
1893
1893
|
if (referencepath_inputParamsValidationError !== null) {
|
|
1894
1894
|
let message = 'Object doesn\'t match WrappedValueMap (at "' + path_inputParams + '")\n';
|
|
1895
1895
|
message += referencepath_inputParamsValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
@@ -1925,8 +1925,8 @@ function validate$m(obj, path = 'EinsteinPromptTemplateGenerationsInputRepresent
|
|
|
1925
1925
|
return v_error === undefined ? null : v_error;
|
|
1926
1926
|
}
|
|
1927
1927
|
|
|
1928
|
-
const VERSION$
|
|
1929
|
-
function validate$
|
|
1928
|
+
const VERSION$k = "63584d83290e21bdff26b1bef3db119c";
|
|
1929
|
+
function validate$o(obj, path = 'EinsteinLlmGenerationGenAiCitedReferenceRepresentation') {
|
|
1930
1930
|
const v_error = (() => {
|
|
1931
1931
|
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
1932
1932
|
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
@@ -1983,10 +1983,10 @@ function validate$l(obj, path = 'EinsteinLlmGenerationGenAiCitedReferenceReprese
|
|
|
1983
1983
|
})();
|
|
1984
1984
|
return v_error === undefined ? null : v_error;
|
|
1985
1985
|
}
|
|
1986
|
-
const select$
|
|
1986
|
+
const select$z = function EinsteinLlmGenerationGenAiCitedReferenceRepresentationSelect() {
|
|
1987
1987
|
return {
|
|
1988
1988
|
kind: 'Fragment',
|
|
1989
|
-
version: VERSION$
|
|
1989
|
+
version: VERSION$k,
|
|
1990
1990
|
private: [],
|
|
1991
1991
|
selections: [
|
|
1992
1992
|
{
|
|
@@ -2019,7 +2019,7 @@ const select$v = function EinsteinLlmGenerationGenAiCitedReferenceRepresentation
|
|
|
2019
2019
|
]
|
|
2020
2020
|
};
|
|
2021
2021
|
};
|
|
2022
|
-
function equals$
|
|
2022
|
+
function equals$k(existing, incoming) {
|
|
2023
2023
|
const existing_link = existing.link;
|
|
2024
2024
|
const incoming_link = incoming.link;
|
|
2025
2025
|
// if at least one of these optionals is defined
|
|
@@ -2098,8 +2098,8 @@ function equals$h(existing, incoming) {
|
|
|
2098
2098
|
return true;
|
|
2099
2099
|
}
|
|
2100
2100
|
|
|
2101
|
-
const VERSION$
|
|
2102
|
-
function validate$
|
|
2101
|
+
const VERSION$j = "bcc0ea08323732f4187dd2b9f70fea6c";
|
|
2102
|
+
function validate$n(obj, path = 'EinsteinLlmGenerationCitationRepresentation') {
|
|
2103
2103
|
const v_error = (() => {
|
|
2104
2104
|
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
2105
2105
|
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
@@ -2113,7 +2113,7 @@ function validate$k(obj, path = 'EinsteinLlmGenerationCitationRepresentation') {
|
|
|
2113
2113
|
for (let i = 0; i < obj_citedReferences.length; i++) {
|
|
2114
2114
|
const obj_citedReferences_item = obj_citedReferences[i];
|
|
2115
2115
|
const path_citedReferences_item = path_citedReferences + '[' + i + ']';
|
|
2116
|
-
const referencepath_citedReferences_itemValidationError = validate$
|
|
2116
|
+
const referencepath_citedReferences_itemValidationError = validate$o(obj_citedReferences_item, path_citedReferences_item);
|
|
2117
2117
|
if (referencepath_citedReferences_itemValidationError !== null) {
|
|
2118
2118
|
let message = 'Object doesn\'t match EinsteinLlmGenerationGenAiCitedReferenceRepresentation (at "' + path_citedReferences_item + '")\n';
|
|
2119
2119
|
message += referencepath_citedReferences_itemValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
@@ -2124,11 +2124,11 @@ function validate$k(obj, path = 'EinsteinLlmGenerationCitationRepresentation') {
|
|
|
2124
2124
|
})();
|
|
2125
2125
|
return v_error === undefined ? null : v_error;
|
|
2126
2126
|
}
|
|
2127
|
-
const select$
|
|
2128
|
-
const { selections: EinsteinLlmGenerationGenAiCitedReferenceRepresentation__selections, opaque: EinsteinLlmGenerationGenAiCitedReferenceRepresentation__opaque, } = select$
|
|
2127
|
+
const select$y = function EinsteinLlmGenerationCitationRepresentationSelect() {
|
|
2128
|
+
const { selections: EinsteinLlmGenerationGenAiCitedReferenceRepresentation__selections, opaque: EinsteinLlmGenerationGenAiCitedReferenceRepresentation__opaque, } = select$z();
|
|
2129
2129
|
return {
|
|
2130
2130
|
kind: 'Fragment',
|
|
2131
|
-
version: VERSION$
|
|
2131
|
+
version: VERSION$j,
|
|
2132
2132
|
private: [],
|
|
2133
2133
|
selections: [
|
|
2134
2134
|
{
|
|
@@ -2141,7 +2141,7 @@ const select$u = function EinsteinLlmGenerationCitationRepresentationSelect() {
|
|
|
2141
2141
|
]
|
|
2142
2142
|
};
|
|
2143
2143
|
};
|
|
2144
|
-
function equals$
|
|
2144
|
+
function equals$j(existing, incoming) {
|
|
2145
2145
|
const existing_citedReferences = existing.citedReferences;
|
|
2146
2146
|
const incoming_citedReferences = incoming.citedReferences;
|
|
2147
2147
|
// if at least one of these optionals is defined
|
|
@@ -2152,7 +2152,7 @@ function equals$g(existing, incoming) {
|
|
|
2152
2152
|
return false;
|
|
2153
2153
|
}
|
|
2154
2154
|
const equals_citedReferences_items = equalsArray(existing_citedReferences, incoming_citedReferences, (existing_citedReferences_item, incoming_citedReferences_item) => {
|
|
2155
|
-
if (!(equals$
|
|
2155
|
+
if (!(equals$k(existing_citedReferences_item, incoming_citedReferences_item))) {
|
|
2156
2156
|
return false;
|
|
2157
2157
|
}
|
|
2158
2158
|
});
|
|
@@ -2163,8 +2163,8 @@ function equals$g(existing, incoming) {
|
|
|
2163
2163
|
return true;
|
|
2164
2164
|
}
|
|
2165
2165
|
|
|
2166
|
-
const VERSION$
|
|
2167
|
-
function validate$
|
|
2166
|
+
const VERSION$i = "f62ac44b024b123f079b57f349e05230";
|
|
2167
|
+
function validate$m(obj, path = 'EinsteinPromptTemplateAttachmentExclusionInfoRepresentation') {
|
|
2168
2168
|
const v_error = (() => {
|
|
2169
2169
|
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
2170
2170
|
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
@@ -2182,10 +2182,10 @@ function validate$j(obj, path = 'EinsteinPromptTemplateAttachmentExclusionInfoRe
|
|
|
2182
2182
|
})();
|
|
2183
2183
|
return v_error === undefined ? null : v_error;
|
|
2184
2184
|
}
|
|
2185
|
-
const select$
|
|
2185
|
+
const select$x = function EinsteinPromptTemplateAttachmentExclusionInfoRepresentationSelect() {
|
|
2186
2186
|
return {
|
|
2187
2187
|
kind: 'Fragment',
|
|
2188
|
-
version: VERSION$
|
|
2188
|
+
version: VERSION$i,
|
|
2189
2189
|
private: [],
|
|
2190
2190
|
selections: [
|
|
2191
2191
|
{
|
|
@@ -2199,7 +2199,7 @@ const select$t = function EinsteinPromptTemplateAttachmentExclusionInfoRepresent
|
|
|
2199
2199
|
]
|
|
2200
2200
|
};
|
|
2201
2201
|
};
|
|
2202
|
-
function equals$
|
|
2202
|
+
function equals$i(existing, incoming) {
|
|
2203
2203
|
const existing_isExcluded = existing.isExcluded;
|
|
2204
2204
|
const incoming_isExcluded = incoming.isExcluded;
|
|
2205
2205
|
if (!(existing_isExcluded === incoming_isExcluded)) {
|
|
@@ -2213,8 +2213,8 @@ function equals$f(existing, incoming) {
|
|
|
2213
2213
|
return true;
|
|
2214
2214
|
}
|
|
2215
2215
|
|
|
2216
|
-
const VERSION$
|
|
2217
|
-
function validate$
|
|
2216
|
+
const VERSION$h = "b85a5621c60125d9f1644af130f67680";
|
|
2217
|
+
function validate$l(obj, path = 'EinsteinPromptTemplateAttachmentRepresentation') {
|
|
2218
2218
|
const v_error = (() => {
|
|
2219
2219
|
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
2220
2220
|
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
@@ -2222,7 +2222,7 @@ function validate$i(obj, path = 'EinsteinPromptTemplateAttachmentRepresentation'
|
|
|
2222
2222
|
if (obj.exclusionInfo !== undefined) {
|
|
2223
2223
|
const obj_exclusionInfo = obj.exclusionInfo;
|
|
2224
2224
|
const path_exclusionInfo = path + '.exclusionInfo';
|
|
2225
|
-
const referencepath_exclusionInfoValidationError = validate$
|
|
2225
|
+
const referencepath_exclusionInfoValidationError = validate$m(obj_exclusionInfo, path_exclusionInfo);
|
|
2226
2226
|
if (referencepath_exclusionInfoValidationError !== null) {
|
|
2227
2227
|
let message = 'Object doesn\'t match EinsteinPromptTemplateAttachmentExclusionInfoRepresentation (at "' + path_exclusionInfo + '")\n';
|
|
2228
2228
|
message += referencepath_exclusionInfoValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
@@ -2259,11 +2259,11 @@ function validate$i(obj, path = 'EinsteinPromptTemplateAttachmentRepresentation'
|
|
|
2259
2259
|
})();
|
|
2260
2260
|
return v_error === undefined ? null : v_error;
|
|
2261
2261
|
}
|
|
2262
|
-
const select$
|
|
2263
|
-
const { selections: EinsteinPromptTemplateAttachmentExclusionInfoRepresentation__selections, opaque: EinsteinPromptTemplateAttachmentExclusionInfoRepresentation__opaque, } = select$
|
|
2262
|
+
const select$w = function EinsteinPromptTemplateAttachmentRepresentationSelect() {
|
|
2263
|
+
const { selections: EinsteinPromptTemplateAttachmentExclusionInfoRepresentation__selections, opaque: EinsteinPromptTemplateAttachmentExclusionInfoRepresentation__opaque, } = select$x();
|
|
2264
2264
|
return {
|
|
2265
2265
|
kind: 'Fragment',
|
|
2266
|
-
version: VERSION$
|
|
2266
|
+
version: VERSION$h,
|
|
2267
2267
|
private: [],
|
|
2268
2268
|
selections: [
|
|
2269
2269
|
{
|
|
@@ -2296,7 +2296,7 @@ const select$s = function EinsteinPromptTemplateAttachmentRepresentationSelect()
|
|
|
2296
2296
|
]
|
|
2297
2297
|
};
|
|
2298
2298
|
};
|
|
2299
|
-
function equals$
|
|
2299
|
+
function equals$h(existing, incoming) {
|
|
2300
2300
|
const existing_fileExtension = existing.fileExtension;
|
|
2301
2301
|
const incoming_fileExtension = incoming.fileExtension;
|
|
2302
2302
|
if (!(existing_fileExtension === incoming_fileExtension)) {
|
|
@@ -2339,15 +2339,15 @@ function equals$e(existing, incoming) {
|
|
|
2339
2339
|
if (existing_exclusionInfo === undefined || incoming_exclusionInfo === undefined) {
|
|
2340
2340
|
return false;
|
|
2341
2341
|
}
|
|
2342
|
-
if (!(equals$
|
|
2342
|
+
if (!(equals$i(existing_exclusionInfo, incoming_exclusionInfo))) {
|
|
2343
2343
|
return false;
|
|
2344
2344
|
}
|
|
2345
2345
|
}
|
|
2346
2346
|
return true;
|
|
2347
2347
|
}
|
|
2348
2348
|
|
|
2349
|
-
const VERSION$
|
|
2350
|
-
function validate$
|
|
2349
|
+
const VERSION$g = "6458d624e5a1691821c764b6de0badb3";
|
|
2350
|
+
function validate$k(obj, path = 'EinsteinPromptTemplateGenerationsErrorRepresentation') {
|
|
2351
2351
|
const v_error = (() => {
|
|
2352
2352
|
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
2353
2353
|
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
@@ -2377,10 +2377,10 @@ function validate$h(obj, path = 'EinsteinPromptTemplateGenerationsErrorRepresent
|
|
|
2377
2377
|
})();
|
|
2378
2378
|
return v_error === undefined ? null : v_error;
|
|
2379
2379
|
}
|
|
2380
|
-
const select$
|
|
2380
|
+
const select$v = function EinsteinPromptTemplateGenerationsErrorRepresentationSelect() {
|
|
2381
2381
|
return {
|
|
2382
2382
|
kind: 'Fragment',
|
|
2383
|
-
version: VERSION$
|
|
2383
|
+
version: VERSION$g,
|
|
2384
2384
|
private: [],
|
|
2385
2385
|
selections: [
|
|
2386
2386
|
{
|
|
@@ -2403,7 +2403,7 @@ const select$r = function EinsteinPromptTemplateGenerationsErrorRepresentationSe
|
|
|
2403
2403
|
]
|
|
2404
2404
|
};
|
|
2405
2405
|
};
|
|
2406
|
-
function equals$
|
|
2406
|
+
function equals$g(existing, incoming) {
|
|
2407
2407
|
const existing_errorMessage = existing.errorMessage;
|
|
2408
2408
|
const incoming_errorMessage = incoming.errorMessage;
|
|
2409
2409
|
if (!(existing_errorMessage === incoming_errorMessage)) {
|
|
@@ -2435,8 +2435,8 @@ function equals$d(existing, incoming) {
|
|
|
2435
2435
|
return true;
|
|
2436
2436
|
}
|
|
2437
2437
|
|
|
2438
|
-
const VERSION$
|
|
2439
|
-
function validate$
|
|
2438
|
+
const VERSION$f = "7c417ce44e4bc05dfcc454e6825590e8";
|
|
2439
|
+
function validate$j(obj, path = 'EinsteinPromptTemplateMaskSettingsRepresentation') {
|
|
2440
2440
|
const v_error = (() => {
|
|
2441
2441
|
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
2442
2442
|
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
@@ -2449,10 +2449,10 @@ function validate$g(obj, path = 'EinsteinPromptTemplateMaskSettingsRepresentatio
|
|
|
2449
2449
|
})();
|
|
2450
2450
|
return v_error === undefined ? null : v_error;
|
|
2451
2451
|
}
|
|
2452
|
-
const select$
|
|
2452
|
+
const select$u = function EinsteinPromptTemplateMaskSettingsRepresentationSelect() {
|
|
2453
2453
|
return {
|
|
2454
2454
|
kind: 'Fragment',
|
|
2455
|
-
version: VERSION$
|
|
2455
|
+
version: VERSION$f,
|
|
2456
2456
|
private: [],
|
|
2457
2457
|
selections: [
|
|
2458
2458
|
{
|
|
@@ -2462,7 +2462,7 @@ const select$q = function EinsteinPromptTemplateMaskSettingsRepresentationSelect
|
|
|
2462
2462
|
]
|
|
2463
2463
|
};
|
|
2464
2464
|
};
|
|
2465
|
-
function equals$
|
|
2465
|
+
function equals$f(existing, incoming) {
|
|
2466
2466
|
const existing_enableModeration = existing.enableModeration;
|
|
2467
2467
|
const incoming_enableModeration = incoming.enableModeration;
|
|
2468
2468
|
if (!(existing_enableModeration === incoming_enableModeration)) {
|
|
@@ -2471,8 +2471,8 @@ function equals$c(existing, incoming) {
|
|
|
2471
2471
|
return true;
|
|
2472
2472
|
}
|
|
2473
2473
|
|
|
2474
|
-
const VERSION$
|
|
2475
|
-
function validate$
|
|
2474
|
+
const VERSION$e = "92ad1abd0e2a60bc36941409cadda7e2";
|
|
2475
|
+
function validate$i(obj, path = 'EinsteinPromptTemplateMaskContentRepresentation') {
|
|
2476
2476
|
const v_error = (() => {
|
|
2477
2477
|
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
2478
2478
|
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
@@ -2487,7 +2487,7 @@ function validate$f(obj, path = 'EinsteinPromptTemplateMaskContentRepresentation
|
|
|
2487
2487
|
const path_moderationSettings = path + '.moderationSettings';
|
|
2488
2488
|
let obj_moderationSettings_union0 = null;
|
|
2489
2489
|
const obj_moderationSettings_union0_error = (() => {
|
|
2490
|
-
const referencepath_moderationSettingsValidationError = validate$
|
|
2490
|
+
const referencepath_moderationSettingsValidationError = validate$j(obj_moderationSettings, path_moderationSettings);
|
|
2491
2491
|
if (referencepath_moderationSettingsValidationError !== null) {
|
|
2492
2492
|
let message = 'Object doesn\'t match EinsteinPromptTemplateMaskSettingsRepresentation (at "' + path_moderationSettings + '")\n';
|
|
2493
2493
|
message += referencepath_moderationSettingsValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
@@ -2523,11 +2523,11 @@ function validate$f(obj, path = 'EinsteinPromptTemplateMaskContentRepresentation
|
|
|
2523
2523
|
})();
|
|
2524
2524
|
return v_error === undefined ? null : v_error;
|
|
2525
2525
|
}
|
|
2526
|
-
const select$
|
|
2527
|
-
const { selections: EinsteinPromptTemplateMaskSettingsRepresentation__selections, opaque: EinsteinPromptTemplateMaskSettingsRepresentation__opaque, } = select$
|
|
2526
|
+
const select$t = function EinsteinPromptTemplateMaskContentRepresentationSelect() {
|
|
2527
|
+
const { selections: EinsteinPromptTemplateMaskSettingsRepresentation__selections, opaque: EinsteinPromptTemplateMaskSettingsRepresentation__opaque, } = select$u();
|
|
2528
2528
|
return {
|
|
2529
2529
|
kind: 'Fragment',
|
|
2530
|
-
version: VERSION$
|
|
2530
|
+
version: VERSION$e,
|
|
2531
2531
|
private: [],
|
|
2532
2532
|
selections: [
|
|
2533
2533
|
{
|
|
@@ -2549,7 +2549,7 @@ const select$p = function EinsteinPromptTemplateMaskContentRepresentationSelect(
|
|
|
2549
2549
|
]
|
|
2550
2550
|
};
|
|
2551
2551
|
};
|
|
2552
|
-
function equals$
|
|
2552
|
+
function equals$e(existing, incoming) {
|
|
2553
2553
|
const existing_content = existing.content;
|
|
2554
2554
|
const incoming_content = incoming.content;
|
|
2555
2555
|
if (!(existing_content === incoming_content)) {
|
|
@@ -2580,15 +2580,15 @@ function equals$b(existing, incoming) {
|
|
|
2580
2580
|
if (!(existing_moderationSettings === incoming_moderationSettings
|
|
2581
2581
|
|| (existing_moderationSettings != null &&
|
|
2582
2582
|
incoming_moderationSettings != null &&
|
|
2583
|
-
equals$
|
|
2583
|
+
equals$f(existing_moderationSettings, incoming_moderationSettings)))) {
|
|
2584
2584
|
return false;
|
|
2585
2585
|
}
|
|
2586
2586
|
}
|
|
2587
2587
|
return true;
|
|
2588
2588
|
}
|
|
2589
2589
|
|
|
2590
|
-
const VERSION$
|
|
2591
|
-
function validate$
|
|
2590
|
+
const VERSION$d = "507a815605f8d30ae9b52b0ec513d25e";
|
|
2591
|
+
function validate$h(obj, path = 'EinsteinPromptTemplateMaskDataRepresentation') {
|
|
2592
2592
|
const v_error = (() => {
|
|
2593
2593
|
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
2594
2594
|
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
@@ -2618,10 +2618,10 @@ function validate$e(obj, path = 'EinsteinPromptTemplateMaskDataRepresentation')
|
|
|
2618
2618
|
})();
|
|
2619
2619
|
return v_error === undefined ? null : v_error;
|
|
2620
2620
|
}
|
|
2621
|
-
const select$
|
|
2621
|
+
const select$s = function EinsteinPromptTemplateMaskDataRepresentationSelect() {
|
|
2622
2622
|
return {
|
|
2623
2623
|
kind: 'Fragment',
|
|
2624
|
-
version: VERSION$
|
|
2624
|
+
version: VERSION$d,
|
|
2625
2625
|
private: [],
|
|
2626
2626
|
selections: [
|
|
2627
2627
|
{
|
|
@@ -2640,7 +2640,7 @@ const select$o = function EinsteinPromptTemplateMaskDataRepresentationSelect() {
|
|
|
2640
2640
|
]
|
|
2641
2641
|
};
|
|
2642
2642
|
};
|
|
2643
|
-
function equals$
|
|
2643
|
+
function equals$d(existing, incoming) {
|
|
2644
2644
|
const existing_originalValue = existing.originalValue;
|
|
2645
2645
|
const incoming_originalValue = incoming.originalValue;
|
|
2646
2646
|
if (!(existing_originalValue === incoming_originalValue)) {
|
|
@@ -2664,9 +2664,9 @@ function equals$a(existing, incoming) {
|
|
|
2664
2664
|
return true;
|
|
2665
2665
|
}
|
|
2666
2666
|
|
|
2667
|
-
const TTL$
|
|
2668
|
-
const VERSION$
|
|
2669
|
-
function validate$
|
|
2667
|
+
const TTL$8 = 100;
|
|
2668
|
+
const VERSION$c = "4f8799314eebcd45e3fca72dcdf7722d";
|
|
2669
|
+
function validate$g(obj, path = 'EinsteinPromptTemplateGenerationsRepresentation') {
|
|
2670
2670
|
const v_error = (() => {
|
|
2671
2671
|
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
2672
2672
|
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
@@ -2674,7 +2674,7 @@ function validate$d(obj, path = 'EinsteinPromptTemplateGenerationsRepresentation
|
|
|
2674
2674
|
if (obj.citations !== undefined) {
|
|
2675
2675
|
const obj_citations = obj.citations;
|
|
2676
2676
|
const path_citations = path + '.citations';
|
|
2677
|
-
const referencepath_citationsValidationError = validate$
|
|
2677
|
+
const referencepath_citationsValidationError = validate$n(obj_citations, path_citations);
|
|
2678
2678
|
if (referencepath_citationsValidationError !== null) {
|
|
2679
2679
|
let message = 'Object doesn\'t match EinsteinLlmGenerationCitationRepresentation (at "' + path_citations + '")\n';
|
|
2680
2680
|
message += referencepath_citationsValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
@@ -2690,7 +2690,7 @@ function validate$d(obj, path = 'EinsteinPromptTemplateGenerationsRepresentation
|
|
|
2690
2690
|
for (let i = 0; i < obj_fileData.length; i++) {
|
|
2691
2691
|
const obj_fileData_item = obj_fileData[i];
|
|
2692
2692
|
const path_fileData_item = path_fileData + '[' + i + ']';
|
|
2693
|
-
const referencepath_fileData_itemValidationError = validate$
|
|
2693
|
+
const referencepath_fileData_itemValidationError = validate$l(obj_fileData_item, path_fileData_item);
|
|
2694
2694
|
if (referencepath_fileData_itemValidationError !== null) {
|
|
2695
2695
|
let message = 'Object doesn\'t match EinsteinPromptTemplateAttachmentRepresentation (at "' + path_fileData_item + '")\n';
|
|
2696
2696
|
message += referencepath_fileData_itemValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
@@ -2707,7 +2707,7 @@ function validate$d(obj, path = 'EinsteinPromptTemplateGenerationsRepresentation
|
|
|
2707
2707
|
for (let i = 0; i < obj_generationErrors.length; i++) {
|
|
2708
2708
|
const obj_generationErrors_item = obj_generationErrors[i];
|
|
2709
2709
|
const path_generationErrors_item = path_generationErrors + '[' + i + ']';
|
|
2710
|
-
const referencepath_generationErrors_itemValidationError = validate$
|
|
2710
|
+
const referencepath_generationErrors_itemValidationError = validate$k(obj_generationErrors_item, path_generationErrors_item);
|
|
2711
2711
|
if (referencepath_generationErrors_itemValidationError !== null) {
|
|
2712
2712
|
let message = 'Object doesn\'t match EinsteinPromptTemplateGenerationsErrorRepresentation (at "' + path_generationErrors_item + '")\n';
|
|
2713
2713
|
message += referencepath_generationErrors_itemValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
@@ -2723,7 +2723,7 @@ function validate$d(obj, path = 'EinsteinPromptTemplateGenerationsRepresentation
|
|
|
2723
2723
|
for (let i = 0; i < obj_generations.length; i++) {
|
|
2724
2724
|
const obj_generations_item = obj_generations[i];
|
|
2725
2725
|
const path_generations_item = path_generations + '[' + i + ']';
|
|
2726
|
-
const referencepath_generations_itemValidationError = validate$
|
|
2726
|
+
const referencepath_generations_itemValidationError = validate$t(obj_generations_item, path_generations_item);
|
|
2727
2727
|
if (referencepath_generations_itemValidationError !== null) {
|
|
2728
2728
|
let message = 'Object doesn\'t match EinsteinLlmGenerationItemRepresentation (at "' + path_generations_item + '")\n';
|
|
2729
2729
|
message += referencepath_generations_itemValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
@@ -2750,7 +2750,7 @@ function validate$d(obj, path = 'EinsteinPromptTemplateGenerationsRepresentation
|
|
|
2750
2750
|
const path_parameters = path + '.parameters';
|
|
2751
2751
|
let obj_parameters_union0 = null;
|
|
2752
2752
|
const obj_parameters_union0_error = (() => {
|
|
2753
|
-
const referencepath_parametersValidationError = validate$
|
|
2753
|
+
const referencepath_parametersValidationError = validate$s(obj_parameters, path_parameters);
|
|
2754
2754
|
if (referencepath_parametersValidationError !== null) {
|
|
2755
2755
|
let message = 'Object doesn\'t match WrappedMap (at "' + path_parameters + '")\n';
|
|
2756
2756
|
message += referencepath_parametersValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
@@ -2846,7 +2846,7 @@ function validate$d(obj, path = 'EinsteinPromptTemplateGenerationsRepresentation
|
|
|
2846
2846
|
for (let i = 0; i < obj_requestMessages.length; i++) {
|
|
2847
2847
|
const obj_requestMessages_item = obj_requestMessages[i];
|
|
2848
2848
|
const path_requestMessages_item = path_requestMessages + '[' + i + ']';
|
|
2849
|
-
const referencepath_requestMessages_itemValidationError = validate$
|
|
2849
|
+
const referencepath_requestMessages_itemValidationError = validate$i(obj_requestMessages_item, path_requestMessages_item);
|
|
2850
2850
|
if (referencepath_requestMessages_itemValidationError !== null) {
|
|
2851
2851
|
let message = 'Object doesn\'t match EinsteinPromptTemplateMaskContentRepresentation (at "' + path_requestMessages_item + '")\n';
|
|
2852
2852
|
message += referencepath_requestMessages_itemValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
@@ -2863,7 +2863,7 @@ function validate$d(obj, path = 'EinsteinPromptTemplateGenerationsRepresentation
|
|
|
2863
2863
|
for (let i = 0; i < obj_responseMessages.length; i++) {
|
|
2864
2864
|
const obj_responseMessages_item = obj_responseMessages[i];
|
|
2865
2865
|
const path_responseMessages_item = path_responseMessages + '[' + i + ']';
|
|
2866
|
-
const referencepath_responseMessages_itemValidationError = validate$
|
|
2866
|
+
const referencepath_responseMessages_itemValidationError = validate$i(obj_responseMessages_item, path_responseMessages_item);
|
|
2867
2867
|
if (referencepath_responseMessages_itemValidationError !== null) {
|
|
2868
2868
|
let message = 'Object doesn\'t match EinsteinPromptTemplateMaskContentRepresentation (at "' + path_responseMessages_item + '")\n';
|
|
2869
2869
|
message += referencepath_responseMessages_itemValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
@@ -2880,7 +2880,7 @@ function validate$d(obj, path = 'EinsteinPromptTemplateGenerationsRepresentation
|
|
|
2880
2880
|
for (let i = 0; i < obj_slotsMaskingInformation.length; i++) {
|
|
2881
2881
|
const obj_slotsMaskingInformation_item = obj_slotsMaskingInformation[i];
|
|
2882
2882
|
const path_slotsMaskingInformation_item = path_slotsMaskingInformation + '[' + i + ']';
|
|
2883
|
-
const referencepath_slotsMaskingInformation_itemValidationError = validate$
|
|
2883
|
+
const referencepath_slotsMaskingInformation_itemValidationError = validate$h(obj_slotsMaskingInformation_item, path_slotsMaskingInformation_item);
|
|
2884
2884
|
if (referencepath_slotsMaskingInformation_itemValidationError !== null) {
|
|
2885
2885
|
let message = 'Object doesn\'t match EinsteinPromptTemplateMaskDataRepresentation (at "' + path_slotsMaskingInformation_item + '")\n';
|
|
2886
2886
|
message += referencepath_slotsMaskingInformation_itemValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
@@ -2891,30 +2891,30 @@ function validate$d(obj, path = 'EinsteinPromptTemplateGenerationsRepresentation
|
|
|
2891
2891
|
})();
|
|
2892
2892
|
return v_error === undefined ? null : v_error;
|
|
2893
2893
|
}
|
|
2894
|
-
const RepresentationType$
|
|
2895
|
-
function keyBuilder$
|
|
2896
|
-
return keyPrefix + '::' + RepresentationType$
|
|
2894
|
+
const RepresentationType$8 = 'EinsteinPromptTemplateGenerationsRepresentation';
|
|
2895
|
+
function keyBuilder$l(luvio, config) {
|
|
2896
|
+
return keyPrefix + '::' + RepresentationType$8 + ':' + config.requestId;
|
|
2897
2897
|
}
|
|
2898
2898
|
function keyBuilderFromType$1(luvio, object) {
|
|
2899
2899
|
const keyParams = {
|
|
2900
2900
|
requestId: object.requestId
|
|
2901
2901
|
};
|
|
2902
|
-
return keyBuilder$
|
|
2902
|
+
return keyBuilder$l(luvio, keyParams);
|
|
2903
2903
|
}
|
|
2904
|
-
function normalize$
|
|
2904
|
+
function normalize$8(input, existing, path, luvio, store, timestamp) {
|
|
2905
2905
|
return input;
|
|
2906
2906
|
}
|
|
2907
|
-
const select$
|
|
2908
|
-
const { selections: EinsteinLlmGenerationCitationRepresentation__selections, opaque: EinsteinLlmGenerationCitationRepresentation__opaque, } = select$
|
|
2909
|
-
const { selections: EinsteinPromptTemplateAttachmentRepresentation__selections, opaque: EinsteinPromptTemplateAttachmentRepresentation__opaque, } = select$
|
|
2910
|
-
const { selections: EinsteinPromptTemplateGenerationsErrorRepresentation__selections, opaque: EinsteinPromptTemplateGenerationsErrorRepresentation__opaque, } = select$
|
|
2911
|
-
const { selections: EinsteinLlmGenerationItemRepresentation__selections, opaque: EinsteinLlmGenerationItemRepresentation__opaque, } = select$
|
|
2912
|
-
const { selections: WrappedMap__selections, opaque: WrappedMap__opaque, } = select$
|
|
2913
|
-
const { selections: EinsteinPromptTemplateMaskContentRepresentation__selections, opaque: EinsteinPromptTemplateMaskContentRepresentation__opaque, } = select$
|
|
2914
|
-
const { selections: EinsteinPromptTemplateMaskDataRepresentation__selections, opaque: EinsteinPromptTemplateMaskDataRepresentation__opaque, } = select$
|
|
2907
|
+
const select$r = function EinsteinPromptTemplateGenerationsRepresentationSelect() {
|
|
2908
|
+
const { selections: EinsteinLlmGenerationCitationRepresentation__selections, opaque: EinsteinLlmGenerationCitationRepresentation__opaque, } = select$y();
|
|
2909
|
+
const { selections: EinsteinPromptTemplateAttachmentRepresentation__selections, opaque: EinsteinPromptTemplateAttachmentRepresentation__opaque, } = select$w();
|
|
2910
|
+
const { selections: EinsteinPromptTemplateGenerationsErrorRepresentation__selections, opaque: EinsteinPromptTemplateGenerationsErrorRepresentation__opaque, } = select$v();
|
|
2911
|
+
const { selections: EinsteinLlmGenerationItemRepresentation__selections, opaque: EinsteinLlmGenerationItemRepresentation__opaque, } = select$D();
|
|
2912
|
+
const { selections: WrappedMap__selections, opaque: WrappedMap__opaque, } = select$C();
|
|
2913
|
+
const { selections: EinsteinPromptTemplateMaskContentRepresentation__selections, opaque: EinsteinPromptTemplateMaskContentRepresentation__opaque, } = select$t();
|
|
2914
|
+
const { selections: EinsteinPromptTemplateMaskDataRepresentation__selections, opaque: EinsteinPromptTemplateMaskDataRepresentation__opaque, } = select$s();
|
|
2915
2915
|
return {
|
|
2916
2916
|
kind: 'Fragment',
|
|
2917
|
-
version: VERSION$
|
|
2917
|
+
version: VERSION$c,
|
|
2918
2918
|
private: [],
|
|
2919
2919
|
selections: [
|
|
2920
2920
|
{
|
|
@@ -2994,7 +2994,7 @@ const select$n = function EinsteinPromptTemplateGenerationsRepresentationSelect(
|
|
|
2994
2994
|
]
|
|
2995
2995
|
};
|
|
2996
2996
|
};
|
|
2997
|
-
function equals$
|
|
2997
|
+
function equals$c(existing, incoming) {
|
|
2998
2998
|
const existing_promptTemplateDevName = existing.promptTemplateDevName;
|
|
2999
2999
|
const incoming_promptTemplateDevName = incoming.promptTemplateDevName;
|
|
3000
3000
|
if (!(existing_promptTemplateDevName === incoming_promptTemplateDevName)) {
|
|
@@ -3014,7 +3014,7 @@ function equals$9(existing, incoming) {
|
|
|
3014
3014
|
if (existing_citations === undefined || incoming_citations === undefined) {
|
|
3015
3015
|
return false;
|
|
3016
3016
|
}
|
|
3017
|
-
if (!(equals$
|
|
3017
|
+
if (!(equals$j(existing_citations, incoming_citations))) {
|
|
3018
3018
|
return false;
|
|
3019
3019
|
}
|
|
3020
3020
|
}
|
|
@@ -3028,7 +3028,7 @@ function equals$9(existing, incoming) {
|
|
|
3028
3028
|
return false;
|
|
3029
3029
|
}
|
|
3030
3030
|
const equals_fileData_items = equalsArray(existing_fileData, incoming_fileData, (existing_fileData_item, incoming_fileData_item) => {
|
|
3031
|
-
if (!(equals$
|
|
3031
|
+
if (!(equals$h(existing_fileData_item, incoming_fileData_item))) {
|
|
3032
3032
|
return false;
|
|
3033
3033
|
}
|
|
3034
3034
|
});
|
|
@@ -3046,7 +3046,7 @@ function equals$9(existing, incoming) {
|
|
|
3046
3046
|
return false;
|
|
3047
3047
|
}
|
|
3048
3048
|
const equals_generationErrors_items = equalsArray(existing_generationErrors, incoming_generationErrors, (existing_generationErrors_item, incoming_generationErrors_item) => {
|
|
3049
|
-
if (!(equals$
|
|
3049
|
+
if (!(equals$g(existing_generationErrors_item, incoming_generationErrors_item))) {
|
|
3050
3050
|
return false;
|
|
3051
3051
|
}
|
|
3052
3052
|
});
|
|
@@ -3057,7 +3057,7 @@ function equals$9(existing, incoming) {
|
|
|
3057
3057
|
const existing_generations = existing.generations;
|
|
3058
3058
|
const incoming_generations = incoming.generations;
|
|
3059
3059
|
const equals_generations_items = equalsArray(existing_generations, incoming_generations, (existing_generations_item, incoming_generations_item) => {
|
|
3060
|
-
if (!(equals$
|
|
3060
|
+
if (!(equals$n(existing_generations_item, incoming_generations_item))) {
|
|
3061
3061
|
return false;
|
|
3062
3062
|
}
|
|
3063
3063
|
});
|
|
@@ -3087,7 +3087,7 @@ function equals$9(existing, incoming) {
|
|
|
3087
3087
|
if (!(existing_parameters === incoming_parameters
|
|
3088
3088
|
|| (existing_parameters != null &&
|
|
3089
3089
|
incoming_parameters != null &&
|
|
3090
|
-
equals$
|
|
3090
|
+
equals$m(existing_parameters, incoming_parameters)))) {
|
|
3091
3091
|
return false;
|
|
3092
3092
|
}
|
|
3093
3093
|
const existing_prompt = existing.prompt;
|
|
@@ -3110,7 +3110,7 @@ function equals$9(existing, incoming) {
|
|
|
3110
3110
|
return false;
|
|
3111
3111
|
}
|
|
3112
3112
|
const equals_requestMessages_items = equalsArray(existing_requestMessages, incoming_requestMessages, (existing_requestMessages_item, incoming_requestMessages_item) => {
|
|
3113
|
-
if (!(equals$
|
|
3113
|
+
if (!(equals$e(existing_requestMessages_item, incoming_requestMessages_item))) {
|
|
3114
3114
|
return false;
|
|
3115
3115
|
}
|
|
3116
3116
|
});
|
|
@@ -3128,7 +3128,7 @@ function equals$9(existing, incoming) {
|
|
|
3128
3128
|
return false;
|
|
3129
3129
|
}
|
|
3130
3130
|
const equals_responseMessages_items = equalsArray(existing_responseMessages, incoming_responseMessages, (existing_responseMessages_item, incoming_responseMessages_item) => {
|
|
3131
|
-
if (!(equals$
|
|
3131
|
+
if (!(equals$e(existing_responseMessages_item, incoming_responseMessages_item))) {
|
|
3132
3132
|
return false;
|
|
3133
3133
|
}
|
|
3134
3134
|
});
|
|
@@ -3146,7 +3146,7 @@ function equals$9(existing, incoming) {
|
|
|
3146
3146
|
return false;
|
|
3147
3147
|
}
|
|
3148
3148
|
const equals_slotsMaskingInformation_items = equalsArray(existing_slotsMaskingInformation, incoming_slotsMaskingInformation, (existing_slotsMaskingInformation_item, incoming_slotsMaskingInformation_item) => {
|
|
3149
|
-
if (!(equals$
|
|
3149
|
+
if (!(equals$d(existing_slotsMaskingInformation_item, incoming_slotsMaskingInformation_item))) {
|
|
3150
3150
|
return false;
|
|
3151
3151
|
}
|
|
3152
3152
|
});
|
|
@@ -3156,41 +3156,41 @@ function equals$9(existing, incoming) {
|
|
|
3156
3156
|
}
|
|
3157
3157
|
return true;
|
|
3158
3158
|
}
|
|
3159
|
-
const ingest$
|
|
3159
|
+
const ingest$8 = function EinsteinPromptTemplateGenerationsRepresentationIngest(input, path, luvio, store, timestamp) {
|
|
3160
3160
|
if (process.env.NODE_ENV !== 'production') {
|
|
3161
|
-
const validateError = validate$
|
|
3161
|
+
const validateError = validate$g(input);
|
|
3162
3162
|
if (validateError !== null) {
|
|
3163
3163
|
throw validateError;
|
|
3164
3164
|
}
|
|
3165
3165
|
}
|
|
3166
3166
|
const key = keyBuilderFromType$1(luvio, input);
|
|
3167
|
-
const ttlToUse = TTL$
|
|
3168
|
-
ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize$
|
|
3167
|
+
const ttlToUse = TTL$8;
|
|
3168
|
+
ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize$8, "EinsteinLLM", VERSION$c, RepresentationType$8, equals$c);
|
|
3169
3169
|
return createLink(key);
|
|
3170
3170
|
};
|
|
3171
|
-
function getTypeCacheKeys$
|
|
3171
|
+
function getTypeCacheKeys$8(rootKeySet, luvio, input, fullPathFactory) {
|
|
3172
3172
|
// root cache key (uses fullPathFactory if keyBuilderFromType isn't defined)
|
|
3173
3173
|
const rootKey = keyBuilderFromType$1(luvio, input);
|
|
3174
3174
|
rootKeySet.set(rootKey, {
|
|
3175
3175
|
namespace: keyPrefix,
|
|
3176
|
-
representationName: RepresentationType$
|
|
3176
|
+
representationName: RepresentationType$8,
|
|
3177
3177
|
mergeable: false
|
|
3178
3178
|
});
|
|
3179
3179
|
}
|
|
3180
3180
|
|
|
3181
|
-
function select$
|
|
3182
|
-
return select$
|
|
3181
|
+
function select$q(luvio, params) {
|
|
3182
|
+
return select$r();
|
|
3183
3183
|
}
|
|
3184
|
-
function getResponseCacheKeys$
|
|
3185
|
-
getTypeCacheKeys$
|
|
3184
|
+
function getResponseCacheKeys$e(storeKeyMap, luvio, resourceParams, response) {
|
|
3185
|
+
getTypeCacheKeys$8(storeKeyMap, luvio, response);
|
|
3186
3186
|
}
|
|
3187
|
-
function ingestSuccess$
|
|
3187
|
+
function ingestSuccess$e(luvio, resourceParams, response) {
|
|
3188
3188
|
const { body } = response;
|
|
3189
3189
|
const key = keyBuilderFromType$1(luvio, body);
|
|
3190
|
-
luvio.storeIngest(key, ingest$
|
|
3190
|
+
luvio.storeIngest(key, ingest$8, body);
|
|
3191
3191
|
const snapshot = luvio.storeLookup({
|
|
3192
3192
|
recordId: key,
|
|
3193
|
-
node: select$
|
|
3193
|
+
node: select$q(),
|
|
3194
3194
|
variables: {},
|
|
3195
3195
|
});
|
|
3196
3196
|
if (process.env.NODE_ENV !== 'production') {
|
|
@@ -3201,7 +3201,7 @@ function ingestSuccess$d(luvio, resourceParams, response) {
|
|
|
3201
3201
|
deepFreeze(snapshot.data);
|
|
3202
3202
|
return snapshot;
|
|
3203
3203
|
}
|
|
3204
|
-
function createResourceRequest$
|
|
3204
|
+
function createResourceRequest$e(config) {
|
|
3205
3205
|
const headers = {};
|
|
3206
3206
|
return {
|
|
3207
3207
|
baseUri: '/services/data/v65.0',
|
|
@@ -3215,48 +3215,48 @@ function createResourceRequest$d(config) {
|
|
|
3215
3215
|
};
|
|
3216
3216
|
}
|
|
3217
3217
|
|
|
3218
|
-
const adapterName$
|
|
3218
|
+
const adapterName$e = 'createGenerationsForPromptTemplate';
|
|
3219
3219
|
const createGenerationsForPromptTemplate_ConfigPropertyMetadata = [
|
|
3220
3220
|
generateParamConfigMetadata('promptTemplateDevName', true, 0 /* UrlParameter */, 0 /* String */),
|
|
3221
3221
|
generateParamConfigMetadata('versionId', false, 1 /* QueryParameter */, 0 /* String */),
|
|
3222
3222
|
generateParamConfigMetadata('promptTemplateGenerationsInput', true, 2 /* Body */, 4 /* Unsupported */),
|
|
3223
3223
|
];
|
|
3224
|
-
const createGenerationsForPromptTemplate_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$
|
|
3225
|
-
const createResourceParams$
|
|
3226
|
-
function typeCheckConfig$
|
|
3224
|
+
const createGenerationsForPromptTemplate_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$e, createGenerationsForPromptTemplate_ConfigPropertyMetadata);
|
|
3225
|
+
const createResourceParams$e = /*#__PURE__*/ createResourceParams$i(createGenerationsForPromptTemplate_ConfigPropertyMetadata);
|
|
3226
|
+
function typeCheckConfig$e(untrustedConfig) {
|
|
3227
3227
|
const config = {};
|
|
3228
|
-
typeCheckConfig$
|
|
3228
|
+
typeCheckConfig$i(untrustedConfig, config, createGenerationsForPromptTemplate_ConfigPropertyMetadata);
|
|
3229
3229
|
const untrustedConfig_promptTemplateGenerationsInput = untrustedConfig.promptTemplateGenerationsInput;
|
|
3230
|
-
const referenceEinsteinPromptTemplateGenerationsInputRepresentationValidationError = validate$
|
|
3230
|
+
const referenceEinsteinPromptTemplateGenerationsInputRepresentationValidationError = validate$p(untrustedConfig_promptTemplateGenerationsInput);
|
|
3231
3231
|
if (referenceEinsteinPromptTemplateGenerationsInputRepresentationValidationError === null) {
|
|
3232
3232
|
config.promptTemplateGenerationsInput = untrustedConfig_promptTemplateGenerationsInput;
|
|
3233
3233
|
}
|
|
3234
3234
|
return config;
|
|
3235
3235
|
}
|
|
3236
|
-
function validateAdapterConfig$
|
|
3236
|
+
function validateAdapterConfig$e(untrustedConfig, configPropertyNames) {
|
|
3237
3237
|
if (!untrustedIsObject(untrustedConfig)) {
|
|
3238
3238
|
return null;
|
|
3239
3239
|
}
|
|
3240
3240
|
if (process.env.NODE_ENV !== 'production') {
|
|
3241
3241
|
validateConfig(untrustedConfig, configPropertyNames);
|
|
3242
3242
|
}
|
|
3243
|
-
const config = typeCheckConfig$
|
|
3243
|
+
const config = typeCheckConfig$e(untrustedConfig);
|
|
3244
3244
|
if (!areRequiredParametersPresent(config, configPropertyNames)) {
|
|
3245
3245
|
return null;
|
|
3246
3246
|
}
|
|
3247
3247
|
return config;
|
|
3248
3248
|
}
|
|
3249
|
-
function buildNetworkSnapshot$
|
|
3250
|
-
const resourceParams = createResourceParams$
|
|
3251
|
-
const request = createResourceRequest$
|
|
3249
|
+
function buildNetworkSnapshot$e(luvio, config, options) {
|
|
3250
|
+
const resourceParams = createResourceParams$e(config);
|
|
3251
|
+
const request = createResourceRequest$e(resourceParams);
|
|
3252
3252
|
return luvio.dispatchResourceRequest(request, options)
|
|
3253
3253
|
.then((response) => {
|
|
3254
3254
|
return luvio.handleSuccessResponse(() => {
|
|
3255
|
-
const snapshot = ingestSuccess$
|
|
3255
|
+
const snapshot = ingestSuccess$e(luvio, resourceParams, response);
|
|
3256
3256
|
return luvio.storeBroadcast().then(() => snapshot);
|
|
3257
3257
|
}, () => {
|
|
3258
3258
|
const cache = new StoreKeyMap();
|
|
3259
|
-
getResponseCacheKeys$
|
|
3259
|
+
getResponseCacheKeys$e(cache, luvio, resourceParams, response.body);
|
|
3260
3260
|
return cache;
|
|
3261
3261
|
});
|
|
3262
3262
|
}, (response) => {
|
|
@@ -3266,18 +3266,18 @@ function buildNetworkSnapshot$d(luvio, config, options) {
|
|
|
3266
3266
|
}
|
|
3267
3267
|
const createGenerationsForPromptTemplateAdapterFactory = (luvio) => {
|
|
3268
3268
|
return function createGenerationsForPromptTemplate(untrustedConfig) {
|
|
3269
|
-
const config = validateAdapterConfig$
|
|
3269
|
+
const config = validateAdapterConfig$e(untrustedConfig, createGenerationsForPromptTemplate_ConfigPropertyNames);
|
|
3270
3270
|
// Invalid or incomplete config
|
|
3271
3271
|
if (config === null) {
|
|
3272
3272
|
throw new Error('Invalid config for "createGenerationsForPromptTemplate"');
|
|
3273
3273
|
}
|
|
3274
|
-
return buildNetworkSnapshot$
|
|
3274
|
+
return buildNetworkSnapshot$e(luvio, config);
|
|
3275
3275
|
};
|
|
3276
3276
|
};
|
|
3277
3277
|
|
|
3278
|
-
const TTL$
|
|
3279
|
-
const VERSION$
|
|
3280
|
-
function validate$
|
|
3278
|
+
const TTL$7 = 100;
|
|
3279
|
+
const VERSION$b = "a90a51578e2fdd7a9741d310bed22b1d";
|
|
3280
|
+
function validate$f(obj, path = 'EinsteinPromptTemplateRepresentation') {
|
|
3281
3281
|
const v_error = (() => {
|
|
3282
3282
|
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
3283
3283
|
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
@@ -3285,7 +3285,7 @@ function validate$c(obj, path = 'EinsteinPromptTemplateRepresentation') {
|
|
|
3285
3285
|
if (obj.additionalData !== undefined) {
|
|
3286
3286
|
const obj_additionalData = obj.additionalData;
|
|
3287
3287
|
const path_additionalData = path + '.additionalData';
|
|
3288
|
-
const referencepath_additionalDataValidationError = validate$
|
|
3288
|
+
const referencepath_additionalDataValidationError = validate$s(obj_additionalData, path_additionalData);
|
|
3289
3289
|
if (referencepath_additionalDataValidationError !== null) {
|
|
3290
3290
|
let message = 'Object doesn\'t match WrappedMap (at "' + path_additionalData + '")\n';
|
|
3291
3291
|
message += referencepath_additionalDataValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
@@ -3353,24 +3353,24 @@ function validate$c(obj, path = 'EinsteinPromptTemplateRepresentation') {
|
|
|
3353
3353
|
})();
|
|
3354
3354
|
return v_error === undefined ? null : v_error;
|
|
3355
3355
|
}
|
|
3356
|
-
const RepresentationType$
|
|
3357
|
-
function keyBuilder$
|
|
3358
|
-
return keyPrefix + '::' + RepresentationType$
|
|
3356
|
+
const RepresentationType$7 = 'EinsteinPromptTemplateRepresentation';
|
|
3357
|
+
function keyBuilder$k(luvio, config) {
|
|
3358
|
+
return keyPrefix + '::' + RepresentationType$7 + ':' + config.versionId;
|
|
3359
3359
|
}
|
|
3360
3360
|
function keyBuilderFromType(luvio, object) {
|
|
3361
3361
|
const keyParams = {
|
|
3362
3362
|
versionId: object.versionId
|
|
3363
3363
|
};
|
|
3364
|
-
return keyBuilder$
|
|
3364
|
+
return keyBuilder$k(luvio, keyParams);
|
|
3365
3365
|
}
|
|
3366
|
-
function normalize$
|
|
3366
|
+
function normalize$7(input, existing, path, luvio, store, timestamp) {
|
|
3367
3367
|
return input;
|
|
3368
3368
|
}
|
|
3369
|
-
const select$
|
|
3370
|
-
const { selections: WrappedMap__selections, opaque: WrappedMap__opaque, } = select$
|
|
3369
|
+
const select$p = function EinsteinPromptTemplateRepresentationSelect() {
|
|
3370
|
+
const { selections: WrappedMap__selections, opaque: WrappedMap__opaque, } = select$C();
|
|
3371
3371
|
return {
|
|
3372
3372
|
kind: 'Fragment',
|
|
3373
|
-
version: VERSION$
|
|
3373
|
+
version: VERSION$b,
|
|
3374
3374
|
private: [],
|
|
3375
3375
|
selections: [
|
|
3376
3376
|
{
|
|
@@ -3418,7 +3418,7 @@ const select$l = function EinsteinPromptTemplateRepresentationSelect() {
|
|
|
3418
3418
|
]
|
|
3419
3419
|
};
|
|
3420
3420
|
};
|
|
3421
|
-
function equals$
|
|
3421
|
+
function equals$b(existing, incoming) {
|
|
3422
3422
|
const existing_hasWarning = existing.hasWarning;
|
|
3423
3423
|
const incoming_hasWarning = incoming.hasWarning;
|
|
3424
3424
|
if (!(existing_hasWarning === incoming_hasWarning)) {
|
|
@@ -3474,7 +3474,7 @@ function equals$8(existing, incoming) {
|
|
|
3474
3474
|
if (existing_additionalData === undefined || incoming_additionalData === undefined) {
|
|
3475
3475
|
return false;
|
|
3476
3476
|
}
|
|
3477
|
-
if (!(equals$
|
|
3477
|
+
if (!(equals$m(existing_additionalData, incoming_additionalData))) {
|
|
3478
3478
|
return false;
|
|
3479
3479
|
}
|
|
3480
3480
|
}
|
|
@@ -3500,41 +3500,41 @@ function equals$8(existing, incoming) {
|
|
|
3500
3500
|
}
|
|
3501
3501
|
return true;
|
|
3502
3502
|
}
|
|
3503
|
-
const ingest$
|
|
3503
|
+
const ingest$7 = function EinsteinPromptTemplateRepresentationIngest(input, path, luvio, store, timestamp) {
|
|
3504
3504
|
if (process.env.NODE_ENV !== 'production') {
|
|
3505
|
-
const validateError = validate$
|
|
3505
|
+
const validateError = validate$f(input);
|
|
3506
3506
|
if (validateError !== null) {
|
|
3507
3507
|
throw validateError;
|
|
3508
3508
|
}
|
|
3509
3509
|
}
|
|
3510
3510
|
const key = keyBuilderFromType(luvio, input);
|
|
3511
|
-
const ttlToUse = TTL$
|
|
3512
|
-
ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize$
|
|
3511
|
+
const ttlToUse = TTL$7;
|
|
3512
|
+
ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize$7, "EinsteinLLM", VERSION$b, RepresentationType$7, equals$b);
|
|
3513
3513
|
return createLink(key);
|
|
3514
3514
|
};
|
|
3515
|
-
function getTypeCacheKeys$
|
|
3515
|
+
function getTypeCacheKeys$7(rootKeySet, luvio, input, fullPathFactory) {
|
|
3516
3516
|
// root cache key (uses fullPathFactory if keyBuilderFromType isn't defined)
|
|
3517
3517
|
const rootKey = keyBuilderFromType(luvio, input);
|
|
3518
3518
|
rootKeySet.set(rootKey, {
|
|
3519
3519
|
namespace: keyPrefix,
|
|
3520
|
-
representationName: RepresentationType$
|
|
3520
|
+
representationName: RepresentationType$7,
|
|
3521
3521
|
mergeable: false
|
|
3522
3522
|
});
|
|
3523
3523
|
}
|
|
3524
3524
|
|
|
3525
|
-
function select$
|
|
3526
|
-
return select$
|
|
3525
|
+
function select$o(luvio, params) {
|
|
3526
|
+
return select$p();
|
|
3527
3527
|
}
|
|
3528
|
-
function getResponseCacheKeys$
|
|
3529
|
-
getTypeCacheKeys$
|
|
3528
|
+
function getResponseCacheKeys$d(storeKeyMap, luvio, resourceParams, response) {
|
|
3529
|
+
getTypeCacheKeys$7(storeKeyMap, luvio, response);
|
|
3530
3530
|
}
|
|
3531
|
-
function ingestSuccess$
|
|
3531
|
+
function ingestSuccess$d(luvio, resourceParams, response) {
|
|
3532
3532
|
const { body } = response;
|
|
3533
3533
|
const key = keyBuilderFromType(luvio, body);
|
|
3534
|
-
luvio.storeIngest(key, ingest$
|
|
3534
|
+
luvio.storeIngest(key, ingest$7, body);
|
|
3535
3535
|
const snapshot = luvio.storeLookup({
|
|
3536
3536
|
recordId: key,
|
|
3537
|
-
node: select$
|
|
3537
|
+
node: select$o(),
|
|
3538
3538
|
variables: {},
|
|
3539
3539
|
});
|
|
3540
3540
|
if (process.env.NODE_ENV !== 'production') {
|
|
@@ -3545,7 +3545,7 @@ function ingestSuccess$c(luvio, resourceParams, response) {
|
|
|
3545
3545
|
deepFreeze(snapshot.data);
|
|
3546
3546
|
return snapshot;
|
|
3547
3547
|
}
|
|
3548
|
-
function createResourceRequest$
|
|
3548
|
+
function createResourceRequest$d(config) {
|
|
3549
3549
|
const headers = {};
|
|
3550
3550
|
return {
|
|
3551
3551
|
baseUri: '/services/data/v65.0',
|
|
@@ -3559,18 +3559,18 @@ function createResourceRequest$c(config) {
|
|
|
3559
3559
|
};
|
|
3560
3560
|
}
|
|
3561
3561
|
|
|
3562
|
-
const adapterName$
|
|
3562
|
+
const adapterName$d = 'createPromptTemplate';
|
|
3563
3563
|
const createPromptTemplate_ConfigPropertyMetadata = [
|
|
3564
3564
|
generateParamConfigMetadata('apiName', true, 2 /* Body */, 0 /* String */),
|
|
3565
3565
|
generateParamConfigMetadata('childRelationships', true, 2 /* Body */, 4 /* Unsupported */),
|
|
3566
3566
|
generateParamConfigMetadata('fields', true, 2 /* Body */, 4 /* Unsupported */),
|
|
3567
3567
|
generateParamConfigMetadata('id', false, 2 /* Body */, 0 /* String */),
|
|
3568
3568
|
];
|
|
3569
|
-
const createPromptTemplate_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$
|
|
3570
|
-
const createResourceParams$
|
|
3571
|
-
function typeCheckConfig$
|
|
3569
|
+
const createPromptTemplate_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$d, createPromptTemplate_ConfigPropertyMetadata);
|
|
3570
|
+
const createResourceParams$d = /*#__PURE__*/ createResourceParams$i(createPromptTemplate_ConfigPropertyMetadata);
|
|
3571
|
+
function typeCheckConfig$d(untrustedConfig) {
|
|
3572
3572
|
const config = {};
|
|
3573
|
-
typeCheckConfig$
|
|
3573
|
+
typeCheckConfig$i(untrustedConfig, config, createPromptTemplate_ConfigPropertyMetadata);
|
|
3574
3574
|
const untrustedConfig_childRelationships = untrustedConfig.childRelationships;
|
|
3575
3575
|
if (untrustedIsObject(untrustedConfig_childRelationships)) {
|
|
3576
3576
|
const untrustedConfig_childRelationships_object = {};
|
|
@@ -3603,30 +3603,30 @@ function typeCheckConfig$c(untrustedConfig) {
|
|
|
3603
3603
|
}
|
|
3604
3604
|
return config;
|
|
3605
3605
|
}
|
|
3606
|
-
function validateAdapterConfig$
|
|
3606
|
+
function validateAdapterConfig$d(untrustedConfig, configPropertyNames) {
|
|
3607
3607
|
if (!untrustedIsObject(untrustedConfig)) {
|
|
3608
3608
|
return null;
|
|
3609
3609
|
}
|
|
3610
3610
|
if (process.env.NODE_ENV !== 'production') {
|
|
3611
3611
|
validateConfig(untrustedConfig, configPropertyNames);
|
|
3612
3612
|
}
|
|
3613
|
-
const config = typeCheckConfig$
|
|
3613
|
+
const config = typeCheckConfig$d(untrustedConfig);
|
|
3614
3614
|
if (!areRequiredParametersPresent(config, configPropertyNames)) {
|
|
3615
3615
|
return null;
|
|
3616
3616
|
}
|
|
3617
3617
|
return config;
|
|
3618
3618
|
}
|
|
3619
|
-
function buildNetworkSnapshot$
|
|
3620
|
-
const resourceParams = createResourceParams$
|
|
3621
|
-
const request = createResourceRequest$
|
|
3619
|
+
function buildNetworkSnapshot$d(luvio, config, options) {
|
|
3620
|
+
const resourceParams = createResourceParams$d(config);
|
|
3621
|
+
const request = createResourceRequest$d(resourceParams);
|
|
3622
3622
|
return luvio.dispatchResourceRequest(request, options)
|
|
3623
3623
|
.then((response) => {
|
|
3624
3624
|
return luvio.handleSuccessResponse(() => {
|
|
3625
|
-
const snapshot = ingestSuccess$
|
|
3625
|
+
const snapshot = ingestSuccess$d(luvio, resourceParams, response);
|
|
3626
3626
|
return luvio.storeBroadcast().then(() => snapshot);
|
|
3627
3627
|
}, () => {
|
|
3628
3628
|
const cache = new StoreKeyMap();
|
|
3629
|
-
getResponseCacheKeys$
|
|
3629
|
+
getResponseCacheKeys$d(cache, luvio, resourceParams, response.body);
|
|
3630
3630
|
return cache;
|
|
3631
3631
|
});
|
|
3632
3632
|
}, (response) => {
|
|
@@ -3636,28 +3636,28 @@ function buildNetworkSnapshot$c(luvio, config, options) {
|
|
|
3636
3636
|
}
|
|
3637
3637
|
const createPromptTemplateAdapterFactory = (luvio) => {
|
|
3638
3638
|
return function createPromptTemplate(untrustedConfig) {
|
|
3639
|
-
const config = validateAdapterConfig$
|
|
3639
|
+
const config = validateAdapterConfig$d(untrustedConfig, createPromptTemplate_ConfigPropertyNames);
|
|
3640
3640
|
// Invalid or incomplete config
|
|
3641
3641
|
if (config === null) {
|
|
3642
3642
|
throw new Error('Invalid config for "createPromptTemplate"');
|
|
3643
3643
|
}
|
|
3644
|
-
return buildNetworkSnapshot$
|
|
3644
|
+
return buildNetworkSnapshot$d(luvio, config);
|
|
3645
3645
|
};
|
|
3646
3646
|
};
|
|
3647
3647
|
|
|
3648
|
-
function select$
|
|
3649
|
-
return select$
|
|
3648
|
+
function select$n(luvio, params) {
|
|
3649
|
+
return select$p();
|
|
3650
3650
|
}
|
|
3651
|
-
function getResponseCacheKeys$
|
|
3652
|
-
getTypeCacheKeys$
|
|
3651
|
+
function getResponseCacheKeys$c(storeKeyMap, luvio, resourceParams, response) {
|
|
3652
|
+
getTypeCacheKeys$7(storeKeyMap, luvio, response);
|
|
3653
3653
|
}
|
|
3654
|
-
function ingestSuccess$
|
|
3654
|
+
function ingestSuccess$c(luvio, resourceParams, response) {
|
|
3655
3655
|
const { body } = response;
|
|
3656
3656
|
const key = keyBuilderFromType(luvio, body);
|
|
3657
|
-
luvio.storeIngest(key, ingest$
|
|
3657
|
+
luvio.storeIngest(key, ingest$7, body);
|
|
3658
3658
|
const snapshot = luvio.storeLookup({
|
|
3659
3659
|
recordId: key,
|
|
3660
|
-
node: select$
|
|
3660
|
+
node: select$n(),
|
|
3661
3661
|
variables: {},
|
|
3662
3662
|
});
|
|
3663
3663
|
if (process.env.NODE_ENV !== 'production') {
|
|
@@ -3668,7 +3668,7 @@ function ingestSuccess$b(luvio, resourceParams, response) {
|
|
|
3668
3668
|
deepFreeze(snapshot.data);
|
|
3669
3669
|
return snapshot;
|
|
3670
3670
|
}
|
|
3671
|
-
function createResourceRequest$
|
|
3671
|
+
function createResourceRequest$c(config) {
|
|
3672
3672
|
const headers = {};
|
|
3673
3673
|
return {
|
|
3674
3674
|
baseUri: '/services/data/v65.0',
|
|
@@ -3682,7 +3682,7 @@ function createResourceRequest$b(config) {
|
|
|
3682
3682
|
};
|
|
3683
3683
|
}
|
|
3684
3684
|
|
|
3685
|
-
const adapterName$
|
|
3685
|
+
const adapterName$c = 'createPromptTemplateVersion';
|
|
3686
3686
|
const createPromptTemplateVersion_ConfigPropertyMetadata = [
|
|
3687
3687
|
generateParamConfigMetadata('promptTemplateDevName', true, 0 /* UrlParameter */, 0 /* String */),
|
|
3688
3688
|
generateParamConfigMetadata('apiName', true, 2 /* Body */, 0 /* String */),
|
|
@@ -3690,11 +3690,11 @@ const createPromptTemplateVersion_ConfigPropertyMetadata = [
|
|
|
3690
3690
|
generateParamConfigMetadata('fields', true, 2 /* Body */, 4 /* Unsupported */),
|
|
3691
3691
|
generateParamConfigMetadata('id', false, 2 /* Body */, 0 /* String */),
|
|
3692
3692
|
];
|
|
3693
|
-
const createPromptTemplateVersion_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$
|
|
3694
|
-
const createResourceParams$
|
|
3695
|
-
function typeCheckConfig$
|
|
3693
|
+
const createPromptTemplateVersion_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$c, createPromptTemplateVersion_ConfigPropertyMetadata);
|
|
3694
|
+
const createResourceParams$c = /*#__PURE__*/ createResourceParams$i(createPromptTemplateVersion_ConfigPropertyMetadata);
|
|
3695
|
+
function typeCheckConfig$c(untrustedConfig) {
|
|
3696
3696
|
const config = {};
|
|
3697
|
-
typeCheckConfig$
|
|
3697
|
+
typeCheckConfig$i(untrustedConfig, config, createPromptTemplateVersion_ConfigPropertyMetadata);
|
|
3698
3698
|
const untrustedConfig_childRelationships = untrustedConfig.childRelationships;
|
|
3699
3699
|
if (untrustedIsObject(untrustedConfig_childRelationships)) {
|
|
3700
3700
|
const untrustedConfig_childRelationships_object = {};
|
|
@@ -3727,30 +3727,30 @@ function typeCheckConfig$b(untrustedConfig) {
|
|
|
3727
3727
|
}
|
|
3728
3728
|
return config;
|
|
3729
3729
|
}
|
|
3730
|
-
function validateAdapterConfig$
|
|
3730
|
+
function validateAdapterConfig$c(untrustedConfig, configPropertyNames) {
|
|
3731
3731
|
if (!untrustedIsObject(untrustedConfig)) {
|
|
3732
3732
|
return null;
|
|
3733
3733
|
}
|
|
3734
3734
|
if (process.env.NODE_ENV !== 'production') {
|
|
3735
3735
|
validateConfig(untrustedConfig, configPropertyNames);
|
|
3736
3736
|
}
|
|
3737
|
-
const config = typeCheckConfig$
|
|
3737
|
+
const config = typeCheckConfig$c(untrustedConfig);
|
|
3738
3738
|
if (!areRequiredParametersPresent(config, configPropertyNames)) {
|
|
3739
3739
|
return null;
|
|
3740
3740
|
}
|
|
3741
3741
|
return config;
|
|
3742
3742
|
}
|
|
3743
|
-
function buildNetworkSnapshot$
|
|
3744
|
-
const resourceParams = createResourceParams$
|
|
3745
|
-
const request = createResourceRequest$
|
|
3743
|
+
function buildNetworkSnapshot$c(luvio, config, options) {
|
|
3744
|
+
const resourceParams = createResourceParams$c(config);
|
|
3745
|
+
const request = createResourceRequest$c(resourceParams);
|
|
3746
3746
|
return luvio.dispatchResourceRequest(request, options)
|
|
3747
3747
|
.then((response) => {
|
|
3748
3748
|
return luvio.handleSuccessResponse(() => {
|
|
3749
|
-
const snapshot = ingestSuccess$
|
|
3749
|
+
const snapshot = ingestSuccess$c(luvio, resourceParams, response);
|
|
3750
3750
|
return luvio.storeBroadcast().then(() => snapshot);
|
|
3751
3751
|
}, () => {
|
|
3752
3752
|
const cache = new StoreKeyMap();
|
|
3753
|
-
getResponseCacheKeys$
|
|
3753
|
+
getResponseCacheKeys$c(cache, luvio, resourceParams, response.body);
|
|
3754
3754
|
return cache;
|
|
3755
3755
|
});
|
|
3756
3756
|
}, (response) => {
|
|
@@ -3760,16 +3760,16 @@ function buildNetworkSnapshot$b(luvio, config, options) {
|
|
|
3760
3760
|
}
|
|
3761
3761
|
const createPromptTemplateVersionAdapterFactory = (luvio) => {
|
|
3762
3762
|
return function createPromptTemplateVersion(untrustedConfig) {
|
|
3763
|
-
const config = validateAdapterConfig$
|
|
3763
|
+
const config = validateAdapterConfig$c(untrustedConfig, createPromptTemplateVersion_ConfigPropertyNames);
|
|
3764
3764
|
// Invalid or incomplete config
|
|
3765
3765
|
if (config === null) {
|
|
3766
3766
|
throw new Error('Invalid config for "createPromptTemplateVersion"');
|
|
3767
3767
|
}
|
|
3768
|
-
return buildNetworkSnapshot$
|
|
3768
|
+
return buildNetworkSnapshot$c(luvio, config);
|
|
3769
3769
|
};
|
|
3770
3770
|
};
|
|
3771
3771
|
|
|
3772
|
-
function validate$
|
|
3772
|
+
function validate$e(obj, path = 'PromptTemplateDataProviderOutputParamRepresentation') {
|
|
3773
3773
|
const v_error = (() => {
|
|
3774
3774
|
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
3775
3775
|
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
@@ -3795,7 +3795,7 @@ function validate$b(obj, path = 'PromptTemplateDataProviderOutputParamRepresenta
|
|
|
3795
3795
|
return v_error === undefined ? null : v_error;
|
|
3796
3796
|
}
|
|
3797
3797
|
|
|
3798
|
-
function validate$
|
|
3798
|
+
function validate$d(obj, path = 'PromptTemplateDataProviderInputParamRepresentation') {
|
|
3799
3799
|
const v_error = (() => {
|
|
3800
3800
|
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
3801
3801
|
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
@@ -3824,9 +3824,9 @@ function validate$a(obj, path = 'PromptTemplateDataProviderInputParamRepresentat
|
|
|
3824
3824
|
return v_error === undefined ? null : v_error;
|
|
3825
3825
|
}
|
|
3826
3826
|
|
|
3827
|
-
const TTL$
|
|
3828
|
-
const VERSION$
|
|
3829
|
-
function validate$
|
|
3827
|
+
const TTL$6 = 300;
|
|
3828
|
+
const VERSION$a = "d4824d8c6e7848df0de89295e6d9d434";
|
|
3829
|
+
function validate$c(obj, path = 'PromptTemplateDataProviderInstanceConfigRepresentation') {
|
|
3830
3830
|
const v_error = (() => {
|
|
3831
3831
|
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
3832
3832
|
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
@@ -3855,7 +3855,7 @@ function validate$9(obj, path = 'PromptTemplateDataProviderInstanceConfigReprese
|
|
|
3855
3855
|
if (obj.defaultOutputParam !== undefined) {
|
|
3856
3856
|
const obj_defaultOutputParam = obj.defaultOutputParam;
|
|
3857
3857
|
const path_defaultOutputParam = path + '.defaultOutputParam';
|
|
3858
|
-
const referencepath_defaultOutputParamValidationError = validate$
|
|
3858
|
+
const referencepath_defaultOutputParamValidationError = validate$e(obj_defaultOutputParam, path_defaultOutputParam);
|
|
3859
3859
|
if (referencepath_defaultOutputParamValidationError !== null) {
|
|
3860
3860
|
let message = 'Object doesn\'t match PromptTemplateDataProviderOutputParamRepresentation (at "' + path_defaultOutputParam + '")\n';
|
|
3861
3861
|
message += referencepath_defaultOutputParamValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
@@ -3909,7 +3909,7 @@ function validate$9(obj, path = 'PromptTemplateDataProviderInstanceConfigReprese
|
|
|
3909
3909
|
for (let i = 0; i < obj_inputParams.length; i++) {
|
|
3910
3910
|
const obj_inputParams_item = obj_inputParams[i];
|
|
3911
3911
|
const path_inputParams_item = path_inputParams + '[' + i + ']';
|
|
3912
|
-
const referencepath_inputParams_itemValidationError = validate$
|
|
3912
|
+
const referencepath_inputParams_itemValidationError = validate$d(obj_inputParams_item, path_inputParams_item);
|
|
3913
3913
|
if (referencepath_inputParams_itemValidationError !== null) {
|
|
3914
3914
|
let message = 'Object doesn\'t match PromptTemplateDataProviderInputParamRepresentation (at "' + path_inputParams_item + '")\n';
|
|
3915
3915
|
message += referencepath_inputParams_itemValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
@@ -3975,7 +3975,7 @@ function validate$9(obj, path = 'PromptTemplateDataProviderInstanceConfigReprese
|
|
|
3975
3975
|
for (let i = 0; i < obj_outputParams.length; i++) {
|
|
3976
3976
|
const obj_outputParams_item = obj_outputParams[i];
|
|
3977
3977
|
const path_outputParams_item = path_outputParams + '[' + i + ']';
|
|
3978
|
-
const referencepath_outputParams_itemValidationError = validate$
|
|
3978
|
+
const referencepath_outputParams_itemValidationError = validate$e(obj_outputParams_item, path_outputParams_item);
|
|
3979
3979
|
if (referencepath_outputParams_itemValidationError !== null) {
|
|
3980
3980
|
let message = 'Object doesn\'t match PromptTemplateDataProviderOutputParamRepresentation (at "' + path_outputParams_item + '")\n';
|
|
3981
3981
|
message += referencepath_outputParams_itemValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
@@ -4047,62 +4047,62 @@ function validate$9(obj, path = 'PromptTemplateDataProviderInstanceConfigReprese
|
|
|
4047
4047
|
})();
|
|
4048
4048
|
return v_error === undefined ? null : v_error;
|
|
4049
4049
|
}
|
|
4050
|
-
const RepresentationType$
|
|
4051
|
-
function normalize$
|
|
4050
|
+
const RepresentationType$6 = 'PromptTemplateDataProviderInstanceConfigRepresentation';
|
|
4051
|
+
function normalize$6(input, existing, path, luvio, store, timestamp) {
|
|
4052
4052
|
return input;
|
|
4053
4053
|
}
|
|
4054
|
-
const select$
|
|
4054
|
+
const select$m = function PromptTemplateDataProviderInstanceConfigRepresentationSelect() {
|
|
4055
4055
|
return {
|
|
4056
4056
|
kind: 'Fragment',
|
|
4057
|
-
version: VERSION$
|
|
4057
|
+
version: VERSION$a,
|
|
4058
4058
|
private: [],
|
|
4059
4059
|
opaque: true
|
|
4060
4060
|
};
|
|
4061
4061
|
};
|
|
4062
|
-
function equals$
|
|
4062
|
+
function equals$a(existing, incoming) {
|
|
4063
4063
|
if (JSONStringify(incoming) !== JSONStringify(existing)) {
|
|
4064
4064
|
return false;
|
|
4065
4065
|
}
|
|
4066
4066
|
return true;
|
|
4067
4067
|
}
|
|
4068
|
-
const ingest$
|
|
4068
|
+
const ingest$6 = function PromptTemplateDataProviderInstanceConfigRepresentationIngest(input, path, luvio, store, timestamp) {
|
|
4069
4069
|
if (process.env.NODE_ENV !== 'production') {
|
|
4070
|
-
const validateError = validate$
|
|
4070
|
+
const validateError = validate$c(input);
|
|
4071
4071
|
if (validateError !== null) {
|
|
4072
4072
|
throw validateError;
|
|
4073
4073
|
}
|
|
4074
4074
|
}
|
|
4075
4075
|
const key = path.fullPath;
|
|
4076
|
-
const ttlToUse = TTL$
|
|
4077
|
-
ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize$
|
|
4076
|
+
const ttlToUse = TTL$6;
|
|
4077
|
+
ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize$6, "EinsteinLLM", VERSION$a, RepresentationType$6, equals$a);
|
|
4078
4078
|
return createLink(key);
|
|
4079
4079
|
};
|
|
4080
|
-
function getTypeCacheKeys$
|
|
4080
|
+
function getTypeCacheKeys$6(rootKeySet, luvio, input, fullPathFactory) {
|
|
4081
4081
|
// root cache key (uses fullPathFactory if keyBuilderFromType isn't defined)
|
|
4082
4082
|
const rootKey = fullPathFactory();
|
|
4083
4083
|
rootKeySet.set(rootKey, {
|
|
4084
4084
|
namespace: keyPrefix,
|
|
4085
|
-
representationName: RepresentationType$
|
|
4085
|
+
representationName: RepresentationType$6,
|
|
4086
4086
|
mergeable: false
|
|
4087
4087
|
});
|
|
4088
4088
|
}
|
|
4089
4089
|
|
|
4090
|
-
function select$
|
|
4091
|
-
return select$
|
|
4090
|
+
function select$l(luvio, params) {
|
|
4091
|
+
return select$m();
|
|
4092
4092
|
}
|
|
4093
|
-
function keyBuilder$
|
|
4093
|
+
function keyBuilder$j(luvio, params) {
|
|
4094
4094
|
return keyPrefix + '::PromptTemplateDataProviderInstanceConfigRepresentation:(' + stableJSONStringify(params.body.additionalParam) + '::' + 'definition:' + params.body.definition + '::' + 'groupName:' + params.body.groupName + ')';
|
|
4095
4095
|
}
|
|
4096
|
-
function getResponseCacheKeys$
|
|
4097
|
-
getTypeCacheKeys$
|
|
4096
|
+
function getResponseCacheKeys$b(storeKeyMap, luvio, resourceParams, response) {
|
|
4097
|
+
getTypeCacheKeys$6(storeKeyMap, luvio, response, () => keyBuilder$j(luvio, resourceParams));
|
|
4098
4098
|
}
|
|
4099
|
-
function ingestSuccess$
|
|
4099
|
+
function ingestSuccess$b(luvio, resourceParams, response, snapshotRefresh) {
|
|
4100
4100
|
const { body } = response;
|
|
4101
|
-
const key = keyBuilder$
|
|
4102
|
-
luvio.storeIngest(key, ingest$
|
|
4101
|
+
const key = keyBuilder$j(luvio, resourceParams);
|
|
4102
|
+
luvio.storeIngest(key, ingest$6, body);
|
|
4103
4103
|
const snapshot = luvio.storeLookup({
|
|
4104
4104
|
recordId: key,
|
|
4105
|
-
node: select$
|
|
4105
|
+
node: select$l(),
|
|
4106
4106
|
variables: {},
|
|
4107
4107
|
}, snapshotRefresh);
|
|
4108
4108
|
if (process.env.NODE_ENV !== 'production') {
|
|
@@ -4113,19 +4113,19 @@ function ingestSuccess$a(luvio, resourceParams, response, snapshotRefresh) {
|
|
|
4113
4113
|
deepFreeze(snapshot.data);
|
|
4114
4114
|
return snapshot;
|
|
4115
4115
|
}
|
|
4116
|
-
function ingestError$
|
|
4117
|
-
const key = keyBuilder$
|
|
4116
|
+
function ingestError$9(luvio, params, error, snapshotRefresh) {
|
|
4117
|
+
const key = keyBuilder$j(luvio, params);
|
|
4118
4118
|
const errorSnapshot = luvio.errorSnapshot(error, snapshotRefresh);
|
|
4119
4119
|
const storeMetadataParams = {
|
|
4120
|
-
ttl: TTL$
|
|
4120
|
+
ttl: TTL$6,
|
|
4121
4121
|
namespace: keyPrefix,
|
|
4122
|
-
version: VERSION$
|
|
4123
|
-
representationName: RepresentationType$
|
|
4122
|
+
version: VERSION$a,
|
|
4123
|
+
representationName: RepresentationType$6
|
|
4124
4124
|
};
|
|
4125
4125
|
luvio.storeIngestError(key, errorSnapshot, storeMetadataParams);
|
|
4126
4126
|
return errorSnapshot;
|
|
4127
4127
|
}
|
|
4128
|
-
function createResourceRequest$
|
|
4128
|
+
function createResourceRequest$b(config) {
|
|
4129
4129
|
const headers = {};
|
|
4130
4130
|
return {
|
|
4131
4131
|
baseUri: '/services/data/v65.0',
|
|
@@ -4139,21 +4139,21 @@ function createResourceRequest$a(config) {
|
|
|
4139
4139
|
};
|
|
4140
4140
|
}
|
|
4141
4141
|
|
|
4142
|
-
const adapterName$
|
|
4142
|
+
const adapterName$b = 'getDataProviderInstanceConfig';
|
|
4143
4143
|
const getDataProviderInstanceConfig_ConfigPropertyMetadata = [
|
|
4144
4144
|
generateParamConfigMetadata('additionalParam', false, 2 /* Body */, 4 /* Unsupported */),
|
|
4145
4145
|
generateParamConfigMetadata('definition', true, 2 /* Body */, 0 /* String */),
|
|
4146
4146
|
generateParamConfigMetadata('groupName', true, 2 /* Body */, 0 /* String */),
|
|
4147
4147
|
];
|
|
4148
|
-
const getDataProviderInstanceConfig_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$
|
|
4149
|
-
const createResourceParams$
|
|
4150
|
-
function keyBuilder$
|
|
4151
|
-
const resourceParams = createResourceParams$
|
|
4152
|
-
return keyBuilder$
|
|
4148
|
+
const getDataProviderInstanceConfig_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$b, getDataProviderInstanceConfig_ConfigPropertyMetadata);
|
|
4149
|
+
const createResourceParams$b = /*#__PURE__*/ createResourceParams$i(getDataProviderInstanceConfig_ConfigPropertyMetadata);
|
|
4150
|
+
function keyBuilder$i(luvio, config) {
|
|
4151
|
+
const resourceParams = createResourceParams$b(config);
|
|
4152
|
+
return keyBuilder$j(luvio, resourceParams);
|
|
4153
4153
|
}
|
|
4154
|
-
function typeCheckConfig$
|
|
4154
|
+
function typeCheckConfig$b(untrustedConfig) {
|
|
4155
4155
|
const config = {};
|
|
4156
|
-
typeCheckConfig$
|
|
4156
|
+
typeCheckConfig$i(untrustedConfig, config, getDataProviderInstanceConfig_ConfigPropertyMetadata);
|
|
4157
4157
|
const untrustedConfig_additionalParam = untrustedConfig.additionalParam;
|
|
4158
4158
|
if (untrustedIsObject(untrustedConfig_additionalParam)) {
|
|
4159
4159
|
const untrustedConfig_additionalParam_object = {};
|
|
@@ -4171,78 +4171,78 @@ function typeCheckConfig$a(untrustedConfig) {
|
|
|
4171
4171
|
}
|
|
4172
4172
|
return config;
|
|
4173
4173
|
}
|
|
4174
|
-
function validateAdapterConfig$
|
|
4174
|
+
function validateAdapterConfig$b(untrustedConfig, configPropertyNames) {
|
|
4175
4175
|
if (!untrustedIsObject(untrustedConfig)) {
|
|
4176
4176
|
return null;
|
|
4177
4177
|
}
|
|
4178
4178
|
if (process.env.NODE_ENV !== 'production') {
|
|
4179
4179
|
validateConfig(untrustedConfig, configPropertyNames);
|
|
4180
4180
|
}
|
|
4181
|
-
const config = typeCheckConfig$
|
|
4181
|
+
const config = typeCheckConfig$b(untrustedConfig);
|
|
4182
4182
|
if (!areRequiredParametersPresent(config, configPropertyNames)) {
|
|
4183
4183
|
return null;
|
|
4184
4184
|
}
|
|
4185
4185
|
return config;
|
|
4186
4186
|
}
|
|
4187
|
-
function adapterFragment$
|
|
4188
|
-
createResourceParams$
|
|
4189
|
-
return select$
|
|
4187
|
+
function adapterFragment$9(luvio, config) {
|
|
4188
|
+
createResourceParams$b(config);
|
|
4189
|
+
return select$l();
|
|
4190
4190
|
}
|
|
4191
|
-
function onFetchResponseSuccess$
|
|
4192
|
-
const snapshot = ingestSuccess$
|
|
4191
|
+
function onFetchResponseSuccess$9(luvio, config, resourceParams, response) {
|
|
4192
|
+
const snapshot = ingestSuccess$b(luvio, resourceParams, response, {
|
|
4193
4193
|
config,
|
|
4194
|
-
resolve: () => buildNetworkSnapshot$
|
|
4194
|
+
resolve: () => buildNetworkSnapshot$b(luvio, config, snapshotRefreshOptions)
|
|
4195
4195
|
});
|
|
4196
4196
|
return luvio.storeBroadcast().then(() => snapshot);
|
|
4197
4197
|
}
|
|
4198
|
-
function onFetchResponseError$
|
|
4199
|
-
const snapshot = ingestError$
|
|
4198
|
+
function onFetchResponseError$9(luvio, config, resourceParams, response) {
|
|
4199
|
+
const snapshot = ingestError$9(luvio, resourceParams, response, {
|
|
4200
4200
|
config,
|
|
4201
|
-
resolve: () => buildNetworkSnapshot$
|
|
4201
|
+
resolve: () => buildNetworkSnapshot$b(luvio, config, snapshotRefreshOptions)
|
|
4202
4202
|
});
|
|
4203
4203
|
return luvio.storeBroadcast().then(() => snapshot);
|
|
4204
4204
|
}
|
|
4205
|
-
function buildNetworkSnapshot$
|
|
4206
|
-
const resourceParams = createResourceParams$
|
|
4207
|
-
const request = createResourceRequest$
|
|
4205
|
+
function buildNetworkSnapshot$b(luvio, config, options) {
|
|
4206
|
+
const resourceParams = createResourceParams$b(config);
|
|
4207
|
+
const request = createResourceRequest$b(resourceParams);
|
|
4208
4208
|
return luvio.dispatchResourceRequest(request, options)
|
|
4209
4209
|
.then((response) => {
|
|
4210
|
-
return luvio.handleSuccessResponse(() => onFetchResponseSuccess$
|
|
4210
|
+
return luvio.handleSuccessResponse(() => onFetchResponseSuccess$9(luvio, config, resourceParams, response), () => {
|
|
4211
4211
|
const cache = new StoreKeyMap();
|
|
4212
|
-
getResponseCacheKeys$
|
|
4212
|
+
getResponseCacheKeys$b(cache, luvio, resourceParams, response.body);
|
|
4213
4213
|
return cache;
|
|
4214
4214
|
});
|
|
4215
4215
|
}, (response) => {
|
|
4216
|
-
return luvio.handleErrorResponse(() => onFetchResponseError$
|
|
4216
|
+
return luvio.handleErrorResponse(() => onFetchResponseError$9(luvio, config, resourceParams, response));
|
|
4217
4217
|
});
|
|
4218
4218
|
}
|
|
4219
|
-
function buildNetworkSnapshotCachePolicy$
|
|
4220
|
-
return buildNetworkSnapshotCachePolicy$
|
|
4219
|
+
function buildNetworkSnapshotCachePolicy$9(context, coercedAdapterRequestContext) {
|
|
4220
|
+
return buildNetworkSnapshotCachePolicy$b(context, coercedAdapterRequestContext, buildNetworkSnapshot$b, 'get', false);
|
|
4221
4221
|
}
|
|
4222
|
-
function buildCachedSnapshotCachePolicy$
|
|
4222
|
+
function buildCachedSnapshotCachePolicy$9(context, storeLookup) {
|
|
4223
4223
|
const { luvio, config } = context;
|
|
4224
4224
|
const selector = {
|
|
4225
|
-
recordId: keyBuilder$
|
|
4226
|
-
node: adapterFragment$
|
|
4225
|
+
recordId: keyBuilder$i(luvio, config),
|
|
4226
|
+
node: adapterFragment$9(luvio, config),
|
|
4227
4227
|
variables: {},
|
|
4228
4228
|
};
|
|
4229
4229
|
const cacheSnapshot = storeLookup(selector, {
|
|
4230
4230
|
config,
|
|
4231
|
-
resolve: () => buildNetworkSnapshot$
|
|
4231
|
+
resolve: () => buildNetworkSnapshot$b(luvio, config, snapshotRefreshOptions)
|
|
4232
4232
|
});
|
|
4233
4233
|
return cacheSnapshot;
|
|
4234
4234
|
}
|
|
4235
4235
|
const getDataProviderInstanceConfigAdapterFactory = (luvio) => function EinsteinLLM__getDataProviderInstanceConfig(untrustedConfig, requestContext) {
|
|
4236
|
-
const config = validateAdapterConfig$
|
|
4236
|
+
const config = validateAdapterConfig$b(untrustedConfig, getDataProviderInstanceConfig_ConfigPropertyNames);
|
|
4237
4237
|
// Invalid or incomplete config
|
|
4238
4238
|
if (config === null) {
|
|
4239
4239
|
return null;
|
|
4240
4240
|
}
|
|
4241
4241
|
return luvio.applyCachePolicy((requestContext || {}), { config, luvio }, // BuildSnapshotContext
|
|
4242
|
-
buildCachedSnapshotCachePolicy$
|
|
4242
|
+
buildCachedSnapshotCachePolicy$9, buildNetworkSnapshotCachePolicy$9);
|
|
4243
4243
|
};
|
|
4244
4244
|
|
|
4245
|
-
function validate$
|
|
4245
|
+
function validate$b(obj, path = 'PromptTemplateDataProviderTypeConfigRepresentation') {
|
|
4246
4246
|
const v_error = (() => {
|
|
4247
4247
|
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
4248
4248
|
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
@@ -4292,9 +4292,9 @@ function validate$8(obj, path = 'PromptTemplateDataProviderTypeConfigRepresentat
|
|
|
4292
4292
|
return v_error === undefined ? null : v_error;
|
|
4293
4293
|
}
|
|
4294
4294
|
|
|
4295
|
-
const TTL$
|
|
4296
|
-
const VERSION$
|
|
4297
|
-
function validate$
|
|
4295
|
+
const TTL$5 = 300;
|
|
4296
|
+
const VERSION$9 = "212332dac1decc071b476742df3440fb";
|
|
4297
|
+
function validate$a(obj, path = 'PromptTemplateDataProviderTypeConfigCollectionRepresentation') {
|
|
4298
4298
|
const v_error = (() => {
|
|
4299
4299
|
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
4300
4300
|
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
@@ -4307,7 +4307,7 @@ function validate$7(obj, path = 'PromptTemplateDataProviderTypeConfigCollectionR
|
|
|
4307
4307
|
for (let i = 0; i < obj_dataProviderTypeConfigs.length; i++) {
|
|
4308
4308
|
const obj_dataProviderTypeConfigs_item = obj_dataProviderTypeConfigs[i];
|
|
4309
4309
|
const path_dataProviderTypeConfigs_item = path_dataProviderTypeConfigs + '[' + i + ']';
|
|
4310
|
-
const referencepath_dataProviderTypeConfigs_itemValidationError = validate$
|
|
4310
|
+
const referencepath_dataProviderTypeConfigs_itemValidationError = validate$b(obj_dataProviderTypeConfigs_item, path_dataProviderTypeConfigs_item);
|
|
4311
4311
|
if (referencepath_dataProviderTypeConfigs_itemValidationError !== null) {
|
|
4312
4312
|
let message = 'Object doesn\'t match PromptTemplateDataProviderTypeConfigRepresentation (at "' + path_dataProviderTypeConfigs_item + '")\n';
|
|
4313
4313
|
message += referencepath_dataProviderTypeConfigs_itemValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
@@ -4317,62 +4317,62 @@ function validate$7(obj, path = 'PromptTemplateDataProviderTypeConfigCollectionR
|
|
|
4317
4317
|
})();
|
|
4318
4318
|
return v_error === undefined ? null : v_error;
|
|
4319
4319
|
}
|
|
4320
|
-
const RepresentationType$
|
|
4321
|
-
function normalize$
|
|
4320
|
+
const RepresentationType$5 = 'PromptTemplateDataProviderTypeConfigCollectionRepresentation';
|
|
4321
|
+
function normalize$5(input, existing, path, luvio, store, timestamp) {
|
|
4322
4322
|
return input;
|
|
4323
4323
|
}
|
|
4324
|
-
const select$
|
|
4324
|
+
const select$k = function PromptTemplateDataProviderTypeConfigCollectionRepresentationSelect() {
|
|
4325
4325
|
return {
|
|
4326
4326
|
kind: 'Fragment',
|
|
4327
|
-
version: VERSION$
|
|
4327
|
+
version: VERSION$9,
|
|
4328
4328
|
private: [],
|
|
4329
4329
|
opaque: true
|
|
4330
4330
|
};
|
|
4331
4331
|
};
|
|
4332
|
-
function equals$
|
|
4332
|
+
function equals$9(existing, incoming) {
|
|
4333
4333
|
if (JSONStringify(incoming) !== JSONStringify(existing)) {
|
|
4334
4334
|
return false;
|
|
4335
4335
|
}
|
|
4336
4336
|
return true;
|
|
4337
4337
|
}
|
|
4338
|
-
const ingest$
|
|
4338
|
+
const ingest$5 = function PromptTemplateDataProviderTypeConfigCollectionRepresentationIngest(input, path, luvio, store, timestamp) {
|
|
4339
4339
|
if (process.env.NODE_ENV !== 'production') {
|
|
4340
|
-
const validateError = validate$
|
|
4340
|
+
const validateError = validate$a(input);
|
|
4341
4341
|
if (validateError !== null) {
|
|
4342
4342
|
throw validateError;
|
|
4343
4343
|
}
|
|
4344
4344
|
}
|
|
4345
4345
|
const key = path.fullPath;
|
|
4346
|
-
const ttlToUse = TTL$
|
|
4347
|
-
ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize$
|
|
4346
|
+
const ttlToUse = TTL$5;
|
|
4347
|
+
ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize$5, "EinsteinLLM", VERSION$9, RepresentationType$5, equals$9);
|
|
4348
4348
|
return createLink(key);
|
|
4349
4349
|
};
|
|
4350
|
-
function getTypeCacheKeys$
|
|
4350
|
+
function getTypeCacheKeys$5(rootKeySet, luvio, input, fullPathFactory) {
|
|
4351
4351
|
// root cache key (uses fullPathFactory if keyBuilderFromType isn't defined)
|
|
4352
4352
|
const rootKey = fullPathFactory();
|
|
4353
4353
|
rootKeySet.set(rootKey, {
|
|
4354
4354
|
namespace: keyPrefix,
|
|
4355
|
-
representationName: RepresentationType$
|
|
4355
|
+
representationName: RepresentationType$5,
|
|
4356
4356
|
mergeable: false
|
|
4357
4357
|
});
|
|
4358
4358
|
}
|
|
4359
4359
|
|
|
4360
|
-
function select$
|
|
4361
|
-
return select$
|
|
4360
|
+
function select$j(luvio, params) {
|
|
4361
|
+
return select$k();
|
|
4362
4362
|
}
|
|
4363
|
-
function keyBuilder$
|
|
4363
|
+
function keyBuilder$h(luvio, params) {
|
|
4364
4364
|
return keyPrefix + '::PromptTemplateDataProviderTypeConfigCollectionRepresentation:(' + 'templateType:' + params.urlParams.templateType + ')';
|
|
4365
4365
|
}
|
|
4366
|
-
function getResponseCacheKeys$
|
|
4367
|
-
getTypeCacheKeys$
|
|
4366
|
+
function getResponseCacheKeys$a(storeKeyMap, luvio, resourceParams, response) {
|
|
4367
|
+
getTypeCacheKeys$5(storeKeyMap, luvio, response, () => keyBuilder$h(luvio, resourceParams));
|
|
4368
4368
|
}
|
|
4369
|
-
function ingestSuccess$
|
|
4369
|
+
function ingestSuccess$a(luvio, resourceParams, response, snapshotRefresh) {
|
|
4370
4370
|
const { body } = response;
|
|
4371
|
-
const key = keyBuilder$
|
|
4372
|
-
luvio.storeIngest(key, ingest$
|
|
4371
|
+
const key = keyBuilder$h(luvio, resourceParams);
|
|
4372
|
+
luvio.storeIngest(key, ingest$5, body);
|
|
4373
4373
|
const snapshot = luvio.storeLookup({
|
|
4374
4374
|
recordId: key,
|
|
4375
|
-
node: select$
|
|
4375
|
+
node: select$j(),
|
|
4376
4376
|
variables: {},
|
|
4377
4377
|
}, snapshotRefresh);
|
|
4378
4378
|
if (process.env.NODE_ENV !== 'production') {
|
|
@@ -4383,19 +4383,19 @@ function ingestSuccess$9(luvio, resourceParams, response, snapshotRefresh) {
|
|
|
4383
4383
|
deepFreeze(snapshot.data);
|
|
4384
4384
|
return snapshot;
|
|
4385
4385
|
}
|
|
4386
|
-
function ingestError$
|
|
4387
|
-
const key = keyBuilder$
|
|
4386
|
+
function ingestError$8(luvio, params, error, snapshotRefresh) {
|
|
4387
|
+
const key = keyBuilder$h(luvio, params);
|
|
4388
4388
|
const errorSnapshot = luvio.errorSnapshot(error, snapshotRefresh);
|
|
4389
4389
|
const storeMetadataParams = {
|
|
4390
|
-
ttl: TTL$
|
|
4390
|
+
ttl: TTL$5,
|
|
4391
4391
|
namespace: keyPrefix,
|
|
4392
|
-
version: VERSION$
|
|
4393
|
-
representationName: RepresentationType$
|
|
4392
|
+
version: VERSION$9,
|
|
4393
|
+
representationName: RepresentationType$5
|
|
4394
4394
|
};
|
|
4395
4395
|
luvio.storeIngestError(key, errorSnapshot, storeMetadataParams);
|
|
4396
4396
|
return errorSnapshot;
|
|
4397
4397
|
}
|
|
4398
|
-
function createResourceRequest$
|
|
4398
|
+
function createResourceRequest$a(config) {
|
|
4399
4399
|
const headers = {};
|
|
4400
4400
|
return {
|
|
4401
4401
|
baseUri: '/services/data/v65.0',
|
|
@@ -4409,95 +4409,95 @@ function createResourceRequest$9(config) {
|
|
|
4409
4409
|
};
|
|
4410
4410
|
}
|
|
4411
4411
|
|
|
4412
|
-
const adapterName$
|
|
4412
|
+
const adapterName$a = 'getDataProviderTypeConfigs';
|
|
4413
4413
|
const getDataProviderTypeConfigs_ConfigPropertyMetadata = [
|
|
4414
4414
|
generateParamConfigMetadata('templateType', true, 0 /* UrlParameter */, 0 /* String */),
|
|
4415
4415
|
];
|
|
4416
|
-
const getDataProviderTypeConfigs_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$
|
|
4417
|
-
const createResourceParams$
|
|
4418
|
-
function keyBuilder$
|
|
4419
|
-
const resourceParams = createResourceParams$
|
|
4420
|
-
return keyBuilder$
|
|
4416
|
+
const getDataProviderTypeConfigs_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$a, getDataProviderTypeConfigs_ConfigPropertyMetadata);
|
|
4417
|
+
const createResourceParams$a = /*#__PURE__*/ createResourceParams$i(getDataProviderTypeConfigs_ConfigPropertyMetadata);
|
|
4418
|
+
function keyBuilder$g(luvio, config) {
|
|
4419
|
+
const resourceParams = createResourceParams$a(config);
|
|
4420
|
+
return keyBuilder$h(luvio, resourceParams);
|
|
4421
4421
|
}
|
|
4422
|
-
function typeCheckConfig$
|
|
4422
|
+
function typeCheckConfig$a(untrustedConfig) {
|
|
4423
4423
|
const config = {};
|
|
4424
|
-
typeCheckConfig$
|
|
4424
|
+
typeCheckConfig$i(untrustedConfig, config, getDataProviderTypeConfigs_ConfigPropertyMetadata);
|
|
4425
4425
|
return config;
|
|
4426
4426
|
}
|
|
4427
|
-
function validateAdapterConfig$
|
|
4427
|
+
function validateAdapterConfig$a(untrustedConfig, configPropertyNames) {
|
|
4428
4428
|
if (!untrustedIsObject(untrustedConfig)) {
|
|
4429
4429
|
return null;
|
|
4430
4430
|
}
|
|
4431
4431
|
if (process.env.NODE_ENV !== 'production') {
|
|
4432
4432
|
validateConfig(untrustedConfig, configPropertyNames);
|
|
4433
4433
|
}
|
|
4434
|
-
const config = typeCheckConfig$
|
|
4434
|
+
const config = typeCheckConfig$a(untrustedConfig);
|
|
4435
4435
|
if (!areRequiredParametersPresent(config, configPropertyNames)) {
|
|
4436
4436
|
return null;
|
|
4437
4437
|
}
|
|
4438
4438
|
return config;
|
|
4439
4439
|
}
|
|
4440
|
-
function adapterFragment$
|
|
4441
|
-
createResourceParams$
|
|
4442
|
-
return select$
|
|
4440
|
+
function adapterFragment$8(luvio, config) {
|
|
4441
|
+
createResourceParams$a(config);
|
|
4442
|
+
return select$j();
|
|
4443
4443
|
}
|
|
4444
|
-
function onFetchResponseSuccess$
|
|
4445
|
-
const snapshot = ingestSuccess$
|
|
4444
|
+
function onFetchResponseSuccess$8(luvio, config, resourceParams, response) {
|
|
4445
|
+
const snapshot = ingestSuccess$a(luvio, resourceParams, response, {
|
|
4446
4446
|
config,
|
|
4447
|
-
resolve: () => buildNetworkSnapshot$
|
|
4447
|
+
resolve: () => buildNetworkSnapshot$a(luvio, config, snapshotRefreshOptions)
|
|
4448
4448
|
});
|
|
4449
4449
|
return luvio.storeBroadcast().then(() => snapshot);
|
|
4450
4450
|
}
|
|
4451
|
-
function onFetchResponseError$
|
|
4452
|
-
const snapshot = ingestError$
|
|
4451
|
+
function onFetchResponseError$8(luvio, config, resourceParams, response) {
|
|
4452
|
+
const snapshot = ingestError$8(luvio, resourceParams, response, {
|
|
4453
4453
|
config,
|
|
4454
|
-
resolve: () => buildNetworkSnapshot$
|
|
4454
|
+
resolve: () => buildNetworkSnapshot$a(luvio, config, snapshotRefreshOptions)
|
|
4455
4455
|
});
|
|
4456
4456
|
return luvio.storeBroadcast().then(() => snapshot);
|
|
4457
4457
|
}
|
|
4458
|
-
function buildNetworkSnapshot$
|
|
4459
|
-
const resourceParams = createResourceParams$
|
|
4460
|
-
const request = createResourceRequest$
|
|
4458
|
+
function buildNetworkSnapshot$a(luvio, config, options) {
|
|
4459
|
+
const resourceParams = createResourceParams$a(config);
|
|
4460
|
+
const request = createResourceRequest$a(resourceParams);
|
|
4461
4461
|
return luvio.dispatchResourceRequest(request, options)
|
|
4462
4462
|
.then((response) => {
|
|
4463
|
-
return luvio.handleSuccessResponse(() => onFetchResponseSuccess$
|
|
4463
|
+
return luvio.handleSuccessResponse(() => onFetchResponseSuccess$8(luvio, config, resourceParams, response), () => {
|
|
4464
4464
|
const cache = new StoreKeyMap();
|
|
4465
|
-
getResponseCacheKeys$
|
|
4465
|
+
getResponseCacheKeys$a(cache, luvio, resourceParams, response.body);
|
|
4466
4466
|
return cache;
|
|
4467
4467
|
});
|
|
4468
4468
|
}, (response) => {
|
|
4469
|
-
return luvio.handleErrorResponse(() => onFetchResponseError$
|
|
4469
|
+
return luvio.handleErrorResponse(() => onFetchResponseError$8(luvio, config, resourceParams, response));
|
|
4470
4470
|
});
|
|
4471
4471
|
}
|
|
4472
|
-
function buildNetworkSnapshotCachePolicy$
|
|
4473
|
-
return buildNetworkSnapshotCachePolicy$
|
|
4472
|
+
function buildNetworkSnapshotCachePolicy$8(context, coercedAdapterRequestContext) {
|
|
4473
|
+
return buildNetworkSnapshotCachePolicy$b(context, coercedAdapterRequestContext, buildNetworkSnapshot$a, undefined, false);
|
|
4474
4474
|
}
|
|
4475
|
-
function buildCachedSnapshotCachePolicy$
|
|
4475
|
+
function buildCachedSnapshotCachePolicy$8(context, storeLookup) {
|
|
4476
4476
|
const { luvio, config } = context;
|
|
4477
4477
|
const selector = {
|
|
4478
|
-
recordId: keyBuilder$
|
|
4479
|
-
node: adapterFragment$
|
|
4478
|
+
recordId: keyBuilder$g(luvio, config),
|
|
4479
|
+
node: adapterFragment$8(luvio, config),
|
|
4480
4480
|
variables: {},
|
|
4481
4481
|
};
|
|
4482
4482
|
const cacheSnapshot = storeLookup(selector, {
|
|
4483
4483
|
config,
|
|
4484
|
-
resolve: () => buildNetworkSnapshot$
|
|
4484
|
+
resolve: () => buildNetworkSnapshot$a(luvio, config, snapshotRefreshOptions)
|
|
4485
4485
|
});
|
|
4486
4486
|
return cacheSnapshot;
|
|
4487
4487
|
}
|
|
4488
4488
|
const getDataProviderTypeConfigsAdapterFactory = (luvio) => function EinsteinLLM__getDataProviderTypeConfigs(untrustedConfig, requestContext) {
|
|
4489
|
-
const config = validateAdapterConfig$
|
|
4489
|
+
const config = validateAdapterConfig$a(untrustedConfig, getDataProviderTypeConfigs_ConfigPropertyNames);
|
|
4490
4490
|
// Invalid or incomplete config
|
|
4491
4491
|
if (config === null) {
|
|
4492
4492
|
return null;
|
|
4493
4493
|
}
|
|
4494
4494
|
return luvio.applyCachePolicy((requestContext || {}), { config, luvio }, // BuildSnapshotContext
|
|
4495
|
-
buildCachedSnapshotCachePolicy$
|
|
4495
|
+
buildCachedSnapshotCachePolicy$8, buildNetworkSnapshotCachePolicy$8);
|
|
4496
4496
|
};
|
|
4497
4497
|
|
|
4498
|
-
const TTL$
|
|
4499
|
-
const VERSION$
|
|
4500
|
-
function validate$
|
|
4498
|
+
const TTL$4 = 300;
|
|
4499
|
+
const VERSION$8 = "3a6ecdfe18eb2af8f8f6aaa1a30b194c";
|
|
4500
|
+
function validate$9(obj, path = 'PromptTemplateDataProviderInstanceConfigCollectionRepresentation') {
|
|
4501
4501
|
const v_error = (() => {
|
|
4502
4502
|
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
4503
4503
|
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
@@ -4510,7 +4510,7 @@ function validate$6(obj, path = 'PromptTemplateDataProviderInstanceConfigCollect
|
|
|
4510
4510
|
for (let i = 0; i < obj_dataProviderInstanceConfigs.length; i++) {
|
|
4511
4511
|
const obj_dataProviderInstanceConfigs_item = obj_dataProviderInstanceConfigs[i];
|
|
4512
4512
|
const path_dataProviderInstanceConfigs_item = path_dataProviderInstanceConfigs + '[' + i + ']';
|
|
4513
|
-
const referencepath_dataProviderInstanceConfigs_itemValidationError = validate$
|
|
4513
|
+
const referencepath_dataProviderInstanceConfigs_itemValidationError = validate$c(obj_dataProviderInstanceConfigs_item, path_dataProviderInstanceConfigs_item);
|
|
4514
4514
|
if (referencepath_dataProviderInstanceConfigs_itemValidationError !== null) {
|
|
4515
4515
|
let message = 'Object doesn\'t match PromptTemplateDataProviderInstanceConfigRepresentation (at "' + path_dataProviderInstanceConfigs_item + '")\n';
|
|
4516
4516
|
message += referencepath_dataProviderInstanceConfigs_itemValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
@@ -4520,62 +4520,62 @@ function validate$6(obj, path = 'PromptTemplateDataProviderInstanceConfigCollect
|
|
|
4520
4520
|
})();
|
|
4521
4521
|
return v_error === undefined ? null : v_error;
|
|
4522
4522
|
}
|
|
4523
|
-
const RepresentationType$
|
|
4524
|
-
function normalize$
|
|
4523
|
+
const RepresentationType$4 = 'PromptTemplateDataProviderInstanceConfigCollectionRepresentation';
|
|
4524
|
+
function normalize$4(input, existing, path, luvio, store, timestamp) {
|
|
4525
4525
|
return input;
|
|
4526
4526
|
}
|
|
4527
|
-
const select$
|
|
4527
|
+
const select$i = function PromptTemplateDataProviderInstanceConfigCollectionRepresentationSelect() {
|
|
4528
4528
|
return {
|
|
4529
4529
|
kind: 'Fragment',
|
|
4530
|
-
version: VERSION$
|
|
4530
|
+
version: VERSION$8,
|
|
4531
4531
|
private: [],
|
|
4532
4532
|
opaque: true
|
|
4533
4533
|
};
|
|
4534
4534
|
};
|
|
4535
|
-
function equals$
|
|
4535
|
+
function equals$8(existing, incoming) {
|
|
4536
4536
|
if (JSONStringify(incoming) !== JSONStringify(existing)) {
|
|
4537
4537
|
return false;
|
|
4538
4538
|
}
|
|
4539
4539
|
return true;
|
|
4540
4540
|
}
|
|
4541
|
-
const ingest$
|
|
4541
|
+
const ingest$4 = function PromptTemplateDataProviderInstanceConfigCollectionRepresentationIngest(input, path, luvio, store, timestamp) {
|
|
4542
4542
|
if (process.env.NODE_ENV !== 'production') {
|
|
4543
|
-
const validateError = validate$
|
|
4543
|
+
const validateError = validate$9(input);
|
|
4544
4544
|
if (validateError !== null) {
|
|
4545
4545
|
throw validateError;
|
|
4546
4546
|
}
|
|
4547
4547
|
}
|
|
4548
4548
|
const key = path.fullPath;
|
|
4549
|
-
const ttlToUse = TTL$
|
|
4550
|
-
ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize$
|
|
4549
|
+
const ttlToUse = TTL$4;
|
|
4550
|
+
ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize$4, "EinsteinLLM", VERSION$8, RepresentationType$4, equals$8);
|
|
4551
4551
|
return createLink(key);
|
|
4552
4552
|
};
|
|
4553
|
-
function getTypeCacheKeys$
|
|
4553
|
+
function getTypeCacheKeys$4(rootKeySet, luvio, input, fullPathFactory) {
|
|
4554
4554
|
// root cache key (uses fullPathFactory if keyBuilderFromType isn't defined)
|
|
4555
4555
|
const rootKey = fullPathFactory();
|
|
4556
4556
|
rootKeySet.set(rootKey, {
|
|
4557
4557
|
namespace: keyPrefix,
|
|
4558
|
-
representationName: RepresentationType$
|
|
4558
|
+
representationName: RepresentationType$4,
|
|
4559
4559
|
mergeable: false
|
|
4560
4560
|
});
|
|
4561
4561
|
}
|
|
4562
4562
|
|
|
4563
|
-
function select$
|
|
4564
|
-
return select$
|
|
4563
|
+
function select$h(luvio, params) {
|
|
4564
|
+
return select$i();
|
|
4565
4565
|
}
|
|
4566
|
-
function keyBuilder$
|
|
4566
|
+
function keyBuilder$f(luvio, params) {
|
|
4567
4567
|
return keyPrefix + '::PromptTemplateDataProviderInstanceConfigCollectionRepresentation:(' + 'groupNames:' + params.queryParams.groupNames + ',' + 'targets:' + params.queryParams.targets + ',' + 'templateType:' + params.urlParams.templateType + ')';
|
|
4568
4568
|
}
|
|
4569
|
-
function getResponseCacheKeys$
|
|
4570
|
-
getTypeCacheKeys$
|
|
4569
|
+
function getResponseCacheKeys$9(storeKeyMap, luvio, resourceParams, response) {
|
|
4570
|
+
getTypeCacheKeys$4(storeKeyMap, luvio, response, () => keyBuilder$f(luvio, resourceParams));
|
|
4571
4571
|
}
|
|
4572
|
-
function ingestSuccess$
|
|
4572
|
+
function ingestSuccess$9(luvio, resourceParams, response, snapshotRefresh) {
|
|
4573
4573
|
const { body } = response;
|
|
4574
|
-
const key = keyBuilder$
|
|
4575
|
-
luvio.storeIngest(key, ingest$
|
|
4574
|
+
const key = keyBuilder$f(luvio, resourceParams);
|
|
4575
|
+
luvio.storeIngest(key, ingest$4, body);
|
|
4576
4576
|
const snapshot = luvio.storeLookup({
|
|
4577
4577
|
recordId: key,
|
|
4578
|
-
node: select$
|
|
4578
|
+
node: select$h(),
|
|
4579
4579
|
variables: {},
|
|
4580
4580
|
}, snapshotRefresh);
|
|
4581
4581
|
if (process.env.NODE_ENV !== 'production') {
|
|
@@ -4586,19 +4586,19 @@ function ingestSuccess$8(luvio, resourceParams, response, snapshotRefresh) {
|
|
|
4586
4586
|
deepFreeze(snapshot.data);
|
|
4587
4587
|
return snapshot;
|
|
4588
4588
|
}
|
|
4589
|
-
function ingestError$
|
|
4590
|
-
const key = keyBuilder$
|
|
4589
|
+
function ingestError$7(luvio, params, error, snapshotRefresh) {
|
|
4590
|
+
const key = keyBuilder$f(luvio, params);
|
|
4591
4591
|
const errorSnapshot = luvio.errorSnapshot(error, snapshotRefresh);
|
|
4592
4592
|
const storeMetadataParams = {
|
|
4593
|
-
ttl: TTL$
|
|
4593
|
+
ttl: TTL$4,
|
|
4594
4594
|
namespace: keyPrefix,
|
|
4595
|
-
version: VERSION$
|
|
4596
|
-
representationName: RepresentationType$
|
|
4595
|
+
version: VERSION$8,
|
|
4596
|
+
representationName: RepresentationType$4
|
|
4597
4597
|
};
|
|
4598
4598
|
luvio.storeIngestError(key, errorSnapshot, storeMetadataParams);
|
|
4599
4599
|
return errorSnapshot;
|
|
4600
4600
|
}
|
|
4601
|
-
function createResourceRequest$
|
|
4601
|
+
function createResourceRequest$9(config) {
|
|
4602
4602
|
const headers = {};
|
|
4603
4603
|
return {
|
|
4604
4604
|
baseUri: '/services/data/v65.0',
|
|
@@ -4612,110 +4612,110 @@ function createResourceRequest$8(config) {
|
|
|
4612
4612
|
};
|
|
4613
4613
|
}
|
|
4614
4614
|
|
|
4615
|
-
const adapterName$
|
|
4615
|
+
const adapterName$9 = 'getDataProviders';
|
|
4616
4616
|
const getDataProviders_ConfigPropertyMetadata = [
|
|
4617
4617
|
generateParamConfigMetadata('templateType', true, 0 /* UrlParameter */, 0 /* String */),
|
|
4618
4618
|
generateParamConfigMetadata('groupNames', false, 1 /* QueryParameter */, 0 /* String */, true),
|
|
4619
4619
|
generateParamConfigMetadata('targets', false, 1 /* QueryParameter */, 0 /* String */, true),
|
|
4620
4620
|
];
|
|
4621
|
-
const getDataProviders_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$
|
|
4622
|
-
const createResourceParams$
|
|
4623
|
-
function keyBuilder$
|
|
4624
|
-
const resourceParams = createResourceParams$
|
|
4625
|
-
return keyBuilder$
|
|
4621
|
+
const getDataProviders_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$9, getDataProviders_ConfigPropertyMetadata);
|
|
4622
|
+
const createResourceParams$9 = /*#__PURE__*/ createResourceParams$i(getDataProviders_ConfigPropertyMetadata);
|
|
4623
|
+
function keyBuilder$e(luvio, config) {
|
|
4624
|
+
const resourceParams = createResourceParams$9(config);
|
|
4625
|
+
return keyBuilder$f(luvio, resourceParams);
|
|
4626
4626
|
}
|
|
4627
|
-
function typeCheckConfig$
|
|
4627
|
+
function typeCheckConfig$9(untrustedConfig) {
|
|
4628
4628
|
const config = {};
|
|
4629
|
-
typeCheckConfig$
|
|
4629
|
+
typeCheckConfig$i(untrustedConfig, config, getDataProviders_ConfigPropertyMetadata);
|
|
4630
4630
|
return config;
|
|
4631
4631
|
}
|
|
4632
|
-
function validateAdapterConfig$
|
|
4632
|
+
function validateAdapterConfig$9(untrustedConfig, configPropertyNames) {
|
|
4633
4633
|
if (!untrustedIsObject(untrustedConfig)) {
|
|
4634
4634
|
return null;
|
|
4635
4635
|
}
|
|
4636
4636
|
if (process.env.NODE_ENV !== 'production') {
|
|
4637
4637
|
validateConfig(untrustedConfig, configPropertyNames);
|
|
4638
4638
|
}
|
|
4639
|
-
const config = typeCheckConfig$
|
|
4639
|
+
const config = typeCheckConfig$9(untrustedConfig);
|
|
4640
4640
|
if (!areRequiredParametersPresent(config, configPropertyNames)) {
|
|
4641
4641
|
return null;
|
|
4642
4642
|
}
|
|
4643
4643
|
return config;
|
|
4644
4644
|
}
|
|
4645
|
-
function adapterFragment$
|
|
4646
|
-
createResourceParams$
|
|
4647
|
-
return select$
|
|
4645
|
+
function adapterFragment$7(luvio, config) {
|
|
4646
|
+
createResourceParams$9(config);
|
|
4647
|
+
return select$h();
|
|
4648
4648
|
}
|
|
4649
|
-
function onFetchResponseSuccess$
|
|
4650
|
-
const snapshot = ingestSuccess$
|
|
4649
|
+
function onFetchResponseSuccess$7(luvio, config, resourceParams, response) {
|
|
4650
|
+
const snapshot = ingestSuccess$9(luvio, resourceParams, response, {
|
|
4651
4651
|
config,
|
|
4652
|
-
resolve: () => buildNetworkSnapshot$
|
|
4652
|
+
resolve: () => buildNetworkSnapshot$9(luvio, config, snapshotRefreshOptions)
|
|
4653
4653
|
});
|
|
4654
4654
|
return luvio.storeBroadcast().then(() => snapshot);
|
|
4655
4655
|
}
|
|
4656
|
-
function onFetchResponseError$
|
|
4657
|
-
const snapshot = ingestError$
|
|
4656
|
+
function onFetchResponseError$7(luvio, config, resourceParams, response) {
|
|
4657
|
+
const snapshot = ingestError$7(luvio, resourceParams, response, {
|
|
4658
4658
|
config,
|
|
4659
|
-
resolve: () => buildNetworkSnapshot$
|
|
4659
|
+
resolve: () => buildNetworkSnapshot$9(luvio, config, snapshotRefreshOptions)
|
|
4660
4660
|
});
|
|
4661
4661
|
return luvio.storeBroadcast().then(() => snapshot);
|
|
4662
4662
|
}
|
|
4663
|
-
function buildNetworkSnapshot$
|
|
4664
|
-
const resourceParams = createResourceParams$
|
|
4665
|
-
const request = createResourceRequest$
|
|
4663
|
+
function buildNetworkSnapshot$9(luvio, config, options) {
|
|
4664
|
+
const resourceParams = createResourceParams$9(config);
|
|
4665
|
+
const request = createResourceRequest$9(resourceParams);
|
|
4666
4666
|
return luvio.dispatchResourceRequest(request, options)
|
|
4667
4667
|
.then((response) => {
|
|
4668
|
-
return luvio.handleSuccessResponse(() => onFetchResponseSuccess$
|
|
4668
|
+
return luvio.handleSuccessResponse(() => onFetchResponseSuccess$7(luvio, config, resourceParams, response), () => {
|
|
4669
4669
|
const cache = new StoreKeyMap();
|
|
4670
|
-
getResponseCacheKeys$
|
|
4670
|
+
getResponseCacheKeys$9(cache, luvio, resourceParams, response.body);
|
|
4671
4671
|
return cache;
|
|
4672
4672
|
});
|
|
4673
4673
|
}, (response) => {
|
|
4674
|
-
return luvio.handleErrorResponse(() => onFetchResponseError$
|
|
4674
|
+
return luvio.handleErrorResponse(() => onFetchResponseError$7(luvio, config, resourceParams, response));
|
|
4675
4675
|
});
|
|
4676
4676
|
}
|
|
4677
|
-
function buildNetworkSnapshotCachePolicy$
|
|
4678
|
-
return buildNetworkSnapshotCachePolicy$
|
|
4677
|
+
function buildNetworkSnapshotCachePolicy$7(context, coercedAdapterRequestContext) {
|
|
4678
|
+
return buildNetworkSnapshotCachePolicy$b(context, coercedAdapterRequestContext, buildNetworkSnapshot$9, undefined, false);
|
|
4679
4679
|
}
|
|
4680
|
-
function buildCachedSnapshotCachePolicy$
|
|
4680
|
+
function buildCachedSnapshotCachePolicy$7(context, storeLookup) {
|
|
4681
4681
|
const { luvio, config } = context;
|
|
4682
4682
|
const selector = {
|
|
4683
|
-
recordId: keyBuilder$
|
|
4684
|
-
node: adapterFragment$
|
|
4683
|
+
recordId: keyBuilder$e(luvio, config),
|
|
4684
|
+
node: adapterFragment$7(luvio, config),
|
|
4685
4685
|
variables: {},
|
|
4686
4686
|
};
|
|
4687
4687
|
const cacheSnapshot = storeLookup(selector, {
|
|
4688
4688
|
config,
|
|
4689
|
-
resolve: () => buildNetworkSnapshot$
|
|
4689
|
+
resolve: () => buildNetworkSnapshot$9(luvio, config, snapshotRefreshOptions)
|
|
4690
4690
|
});
|
|
4691
4691
|
return cacheSnapshot;
|
|
4692
4692
|
}
|
|
4693
4693
|
const getDataProvidersAdapterFactory = (luvio) => function EinsteinLLM__getDataProviders(untrustedConfig, requestContext) {
|
|
4694
|
-
const config = validateAdapterConfig$
|
|
4694
|
+
const config = validateAdapterConfig$9(untrustedConfig, getDataProviders_ConfigPropertyNames);
|
|
4695
4695
|
// Invalid or incomplete config
|
|
4696
4696
|
if (config === null) {
|
|
4697
4697
|
return null;
|
|
4698
4698
|
}
|
|
4699
4699
|
return luvio.applyCachePolicy((requestContext || {}), { config, luvio }, // BuildSnapshotContext
|
|
4700
|
-
buildCachedSnapshotCachePolicy$
|
|
4700
|
+
buildCachedSnapshotCachePolicy$7, buildNetworkSnapshotCachePolicy$7);
|
|
4701
4701
|
};
|
|
4702
4702
|
|
|
4703
|
-
function select$
|
|
4704
|
-
return select$
|
|
4703
|
+
function select$g(luvio, params) {
|
|
4704
|
+
return select$i();
|
|
4705
4705
|
}
|
|
4706
|
-
function keyBuilder$
|
|
4706
|
+
function keyBuilder$d(luvio, params) {
|
|
4707
4707
|
return keyPrefix + '::PromptTemplateDataProviderInstanceConfigCollectionRepresentation:(' + (params.body.groupName === undefined ? 'groupName' : 'groupName:' + params.body.groupName) + '::' + (params.body.target === undefined ? 'target' : 'target:' + params.body.target) + '::' + 'templateInputs:' + params.body.templateInputs + '::' + 'templateTypeName:' + params.body.templateTypeName + ')';
|
|
4708
4708
|
}
|
|
4709
|
-
function getResponseCacheKeys$
|
|
4710
|
-
getTypeCacheKeys$
|
|
4709
|
+
function getResponseCacheKeys$8(storeKeyMap, luvio, resourceParams, response) {
|
|
4710
|
+
getTypeCacheKeys$4(storeKeyMap, luvio, response, () => keyBuilder$d(luvio, resourceParams));
|
|
4711
4711
|
}
|
|
4712
|
-
function ingestSuccess$
|
|
4712
|
+
function ingestSuccess$8(luvio, resourceParams, response, snapshotRefresh) {
|
|
4713
4713
|
const { body } = response;
|
|
4714
|
-
const key = keyBuilder$
|
|
4715
|
-
luvio.storeIngest(key, ingest$
|
|
4714
|
+
const key = keyBuilder$d(luvio, resourceParams);
|
|
4715
|
+
luvio.storeIngest(key, ingest$4, body);
|
|
4716
4716
|
const snapshot = luvio.storeLookup({
|
|
4717
4717
|
recordId: key,
|
|
4718
|
-
node: select$
|
|
4718
|
+
node: select$g(),
|
|
4719
4719
|
variables: {},
|
|
4720
4720
|
}, snapshotRefresh);
|
|
4721
4721
|
if (process.env.NODE_ENV !== 'production') {
|
|
@@ -4726,19 +4726,19 @@ function ingestSuccess$7(luvio, resourceParams, response, snapshotRefresh) {
|
|
|
4726
4726
|
deepFreeze(snapshot.data);
|
|
4727
4727
|
return snapshot;
|
|
4728
4728
|
}
|
|
4729
|
-
function ingestError$
|
|
4730
|
-
const key = keyBuilder$
|
|
4729
|
+
function ingestError$6(luvio, params, error, snapshotRefresh) {
|
|
4730
|
+
const key = keyBuilder$d(luvio, params);
|
|
4731
4731
|
const errorSnapshot = luvio.errorSnapshot(error, snapshotRefresh);
|
|
4732
4732
|
const storeMetadataParams = {
|
|
4733
|
-
ttl: TTL$
|
|
4733
|
+
ttl: TTL$4,
|
|
4734
4734
|
namespace: keyPrefix,
|
|
4735
|
-
version: VERSION$
|
|
4736
|
-
representationName: RepresentationType$
|
|
4735
|
+
version: VERSION$8,
|
|
4736
|
+
representationName: RepresentationType$4
|
|
4737
4737
|
};
|
|
4738
4738
|
luvio.storeIngestError(key, errorSnapshot, storeMetadataParams);
|
|
4739
4739
|
return errorSnapshot;
|
|
4740
4740
|
}
|
|
4741
|
-
function createResourceRequest$
|
|
4741
|
+
function createResourceRequest$8(config) {
|
|
4742
4742
|
const headers = {};
|
|
4743
4743
|
return {
|
|
4744
4744
|
baseUri: '/services/data/v65.0',
|
|
@@ -4752,22 +4752,22 @@ function createResourceRequest$7(config) {
|
|
|
4752
4752
|
};
|
|
4753
4753
|
}
|
|
4754
4754
|
|
|
4755
|
-
const adapterName$
|
|
4755
|
+
const adapterName$8 = 'getInputMappedDataProviders';
|
|
4756
4756
|
const getInputMappedDataProviders_ConfigPropertyMetadata = [
|
|
4757
4757
|
generateParamConfigMetadata('groupName', false, 2 /* Body */, 0 /* String */),
|
|
4758
4758
|
generateParamConfigMetadata('target', false, 2 /* Body */, 0 /* String */),
|
|
4759
4759
|
generateParamConfigMetadata('templateInputs', true, 2 /* Body */, 4 /* Unsupported */, true),
|
|
4760
4760
|
generateParamConfigMetadata('templateTypeName', true, 2 /* Body */, 0 /* String */),
|
|
4761
4761
|
];
|
|
4762
|
-
const getInputMappedDataProviders_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$
|
|
4763
|
-
const createResourceParams$
|
|
4764
|
-
function keyBuilder$
|
|
4765
|
-
const resourceParams = createResourceParams$
|
|
4766
|
-
return keyBuilder$
|
|
4762
|
+
const getInputMappedDataProviders_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$8, getInputMappedDataProviders_ConfigPropertyMetadata);
|
|
4763
|
+
const createResourceParams$8 = /*#__PURE__*/ createResourceParams$i(getInputMappedDataProviders_ConfigPropertyMetadata);
|
|
4764
|
+
function keyBuilder$c(luvio, config) {
|
|
4765
|
+
const resourceParams = createResourceParams$8(config);
|
|
4766
|
+
return keyBuilder$d(luvio, resourceParams);
|
|
4767
4767
|
}
|
|
4768
|
-
function typeCheckConfig$
|
|
4768
|
+
function typeCheckConfig$8(untrustedConfig) {
|
|
4769
4769
|
const config = {};
|
|
4770
|
-
typeCheckConfig$
|
|
4770
|
+
typeCheckConfig$i(untrustedConfig, config, getInputMappedDataProviders_ConfigPropertyMetadata);
|
|
4771
4771
|
const untrustedConfig_templateInputs = untrustedConfig.templateInputs;
|
|
4772
4772
|
if (ArrayIsArray$1(untrustedConfig_templateInputs)) {
|
|
4773
4773
|
const untrustedConfig_templateInputs_array = [];
|
|
@@ -4779,79 +4779,79 @@ function typeCheckConfig$7(untrustedConfig) {
|
|
|
4779
4779
|
}
|
|
4780
4780
|
return config;
|
|
4781
4781
|
}
|
|
4782
|
-
function validateAdapterConfig$
|
|
4782
|
+
function validateAdapterConfig$8(untrustedConfig, configPropertyNames) {
|
|
4783
4783
|
if (!untrustedIsObject(untrustedConfig)) {
|
|
4784
4784
|
return null;
|
|
4785
4785
|
}
|
|
4786
4786
|
if (process.env.NODE_ENV !== 'production') {
|
|
4787
4787
|
validateConfig(untrustedConfig, configPropertyNames);
|
|
4788
4788
|
}
|
|
4789
|
-
const config = typeCheckConfig$
|
|
4789
|
+
const config = typeCheckConfig$8(untrustedConfig);
|
|
4790
4790
|
if (!areRequiredParametersPresent(config, configPropertyNames)) {
|
|
4791
4791
|
return null;
|
|
4792
4792
|
}
|
|
4793
4793
|
return config;
|
|
4794
4794
|
}
|
|
4795
|
-
function adapterFragment$
|
|
4796
|
-
createResourceParams$
|
|
4797
|
-
return select$
|
|
4795
|
+
function adapterFragment$6(luvio, config) {
|
|
4796
|
+
createResourceParams$8(config);
|
|
4797
|
+
return select$g();
|
|
4798
4798
|
}
|
|
4799
|
-
function onFetchResponseSuccess$
|
|
4800
|
-
const snapshot = ingestSuccess$
|
|
4799
|
+
function onFetchResponseSuccess$6(luvio, config, resourceParams, response) {
|
|
4800
|
+
const snapshot = ingestSuccess$8(luvio, resourceParams, response, {
|
|
4801
4801
|
config,
|
|
4802
|
-
resolve: () => buildNetworkSnapshot$
|
|
4802
|
+
resolve: () => buildNetworkSnapshot$8(luvio, config, snapshotRefreshOptions)
|
|
4803
4803
|
});
|
|
4804
4804
|
return luvio.storeBroadcast().then(() => snapshot);
|
|
4805
4805
|
}
|
|
4806
|
-
function onFetchResponseError$
|
|
4807
|
-
const snapshot = ingestError$
|
|
4806
|
+
function onFetchResponseError$6(luvio, config, resourceParams, response) {
|
|
4807
|
+
const snapshot = ingestError$6(luvio, resourceParams, response, {
|
|
4808
4808
|
config,
|
|
4809
|
-
resolve: () => buildNetworkSnapshot$
|
|
4809
|
+
resolve: () => buildNetworkSnapshot$8(luvio, config, snapshotRefreshOptions)
|
|
4810
4810
|
});
|
|
4811
4811
|
return luvio.storeBroadcast().then(() => snapshot);
|
|
4812
4812
|
}
|
|
4813
|
-
function buildNetworkSnapshot$
|
|
4814
|
-
const resourceParams = createResourceParams$
|
|
4815
|
-
const request = createResourceRequest$
|
|
4813
|
+
function buildNetworkSnapshot$8(luvio, config, options) {
|
|
4814
|
+
const resourceParams = createResourceParams$8(config);
|
|
4815
|
+
const request = createResourceRequest$8(resourceParams);
|
|
4816
4816
|
return luvio.dispatchResourceRequest(request, options)
|
|
4817
4817
|
.then((response) => {
|
|
4818
|
-
return luvio.handleSuccessResponse(() => onFetchResponseSuccess$
|
|
4818
|
+
return luvio.handleSuccessResponse(() => onFetchResponseSuccess$6(luvio, config, resourceParams, response), () => {
|
|
4819
4819
|
const cache = new StoreKeyMap();
|
|
4820
|
-
getResponseCacheKeys$
|
|
4820
|
+
getResponseCacheKeys$8(cache, luvio, resourceParams, response.body);
|
|
4821
4821
|
return cache;
|
|
4822
4822
|
});
|
|
4823
4823
|
}, (response) => {
|
|
4824
|
-
return luvio.handleErrorResponse(() => onFetchResponseError$
|
|
4824
|
+
return luvio.handleErrorResponse(() => onFetchResponseError$6(luvio, config, resourceParams, response));
|
|
4825
4825
|
});
|
|
4826
4826
|
}
|
|
4827
|
-
function buildNetworkSnapshotCachePolicy$
|
|
4828
|
-
return buildNetworkSnapshotCachePolicy$
|
|
4827
|
+
function buildNetworkSnapshotCachePolicy$6(context, coercedAdapterRequestContext) {
|
|
4828
|
+
return buildNetworkSnapshotCachePolicy$b(context, coercedAdapterRequestContext, buildNetworkSnapshot$8, 'get', false);
|
|
4829
4829
|
}
|
|
4830
|
-
function buildCachedSnapshotCachePolicy$
|
|
4830
|
+
function buildCachedSnapshotCachePolicy$6(context, storeLookup) {
|
|
4831
4831
|
const { luvio, config } = context;
|
|
4832
4832
|
const selector = {
|
|
4833
|
-
recordId: keyBuilder$
|
|
4834
|
-
node: adapterFragment$
|
|
4833
|
+
recordId: keyBuilder$c(luvio, config),
|
|
4834
|
+
node: adapterFragment$6(luvio, config),
|
|
4835
4835
|
variables: {},
|
|
4836
4836
|
};
|
|
4837
4837
|
const cacheSnapshot = storeLookup(selector, {
|
|
4838
4838
|
config,
|
|
4839
|
-
resolve: () => buildNetworkSnapshot$
|
|
4839
|
+
resolve: () => buildNetworkSnapshot$8(luvio, config, snapshotRefreshOptions)
|
|
4840
4840
|
});
|
|
4841
4841
|
return cacheSnapshot;
|
|
4842
4842
|
}
|
|
4843
4843
|
const getInputMappedDataProvidersAdapterFactory = (luvio) => function EinsteinLLM__getInputMappedDataProviders(untrustedConfig, requestContext) {
|
|
4844
|
-
const config = validateAdapterConfig$
|
|
4844
|
+
const config = validateAdapterConfig$8(untrustedConfig, getInputMappedDataProviders_ConfigPropertyNames);
|
|
4845
4845
|
// Invalid or incomplete config
|
|
4846
4846
|
if (config === null) {
|
|
4847
4847
|
return null;
|
|
4848
4848
|
}
|
|
4849
4849
|
return luvio.applyCachePolicy((requestContext || {}), { config, luvio }, // BuildSnapshotContext
|
|
4850
|
-
buildCachedSnapshotCachePolicy$
|
|
4850
|
+
buildCachedSnapshotCachePolicy$6, buildNetworkSnapshotCachePolicy$6);
|
|
4851
4851
|
};
|
|
4852
4852
|
|
|
4853
|
-
const VERSION$
|
|
4854
|
-
function validate$
|
|
4853
|
+
const VERSION$7 = "b513bbac1672327d8eaaf120660e94b5";
|
|
4854
|
+
function validate$8(obj, path = 'EinsteinPromptTemplateSupportedLanguageErrorRepresentation') {
|
|
4855
4855
|
const v_error = (() => {
|
|
4856
4856
|
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
4857
4857
|
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
@@ -4869,10 +4869,10 @@ function validate$5(obj, path = 'EinsteinPromptTemplateSupportedLanguageErrorRep
|
|
|
4869
4869
|
})();
|
|
4870
4870
|
return v_error === undefined ? null : v_error;
|
|
4871
4871
|
}
|
|
4872
|
-
const select$
|
|
4872
|
+
const select$f = function EinsteinPromptTemplateSupportedLanguageErrorRepresentationSelect() {
|
|
4873
4873
|
return {
|
|
4874
4874
|
kind: 'Fragment',
|
|
4875
|
-
version: VERSION$
|
|
4875
|
+
version: VERSION$7,
|
|
4876
4876
|
private: [],
|
|
4877
4877
|
selections: [
|
|
4878
4878
|
{
|
|
@@ -4886,7 +4886,7 @@ const select$b = function EinsteinPromptTemplateSupportedLanguageErrorRepresenta
|
|
|
4886
4886
|
]
|
|
4887
4887
|
};
|
|
4888
4888
|
};
|
|
4889
|
-
function equals$
|
|
4889
|
+
function equals$7(existing, incoming) {
|
|
4890
4890
|
const existing_errorMessage = existing.errorMessage;
|
|
4891
4891
|
const incoming_errorMessage = incoming.errorMessage;
|
|
4892
4892
|
if (!(existing_errorMessage === incoming_errorMessage)) {
|
|
@@ -4900,8 +4900,8 @@ function equals$4(existing, incoming) {
|
|
|
4900
4900
|
return true;
|
|
4901
4901
|
}
|
|
4902
4902
|
|
|
4903
|
-
const VERSION$
|
|
4904
|
-
function validate$
|
|
4903
|
+
const VERSION$6 = "65a17d345c28eeca91872a73d8ffe9fd";
|
|
4904
|
+
function validate$7(obj, path = 'EinsteinPromptTemplateSupportedLanguageRepresentation') {
|
|
4905
4905
|
const v_error = (() => {
|
|
4906
4906
|
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
4907
4907
|
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
@@ -4919,10 +4919,10 @@ function validate$4(obj, path = 'EinsteinPromptTemplateSupportedLanguageRepresen
|
|
|
4919
4919
|
})();
|
|
4920
4920
|
return v_error === undefined ? null : v_error;
|
|
4921
4921
|
}
|
|
4922
|
-
const select$
|
|
4922
|
+
const select$e = function EinsteinPromptTemplateSupportedLanguageRepresentationSelect() {
|
|
4923
4923
|
return {
|
|
4924
4924
|
kind: 'Fragment',
|
|
4925
|
-
version: VERSION$
|
|
4925
|
+
version: VERSION$6,
|
|
4926
4926
|
private: [],
|
|
4927
4927
|
selections: [
|
|
4928
4928
|
{
|
|
@@ -4936,7 +4936,7 @@ const select$a = function EinsteinPromptTemplateSupportedLanguageRepresentationS
|
|
|
4936
4936
|
]
|
|
4937
4937
|
};
|
|
4938
4938
|
};
|
|
4939
|
-
function equals$
|
|
4939
|
+
function equals$6(existing, incoming) {
|
|
4940
4940
|
const existing_languageCode = existing.languageCode;
|
|
4941
4941
|
const incoming_languageCode = incoming.languageCode;
|
|
4942
4942
|
if (!(existing_languageCode === incoming_languageCode)) {
|
|
@@ -4950,9 +4950,9 @@ function equals$3(existing, incoming) {
|
|
|
4950
4950
|
return true;
|
|
4951
4951
|
}
|
|
4952
4952
|
|
|
4953
|
-
const TTL$
|
|
4954
|
-
const VERSION$
|
|
4955
|
-
function validate$
|
|
4953
|
+
const TTL$3 = 100;
|
|
4954
|
+
const VERSION$5 = "c635f260bce9a11f7c3bf31d60f42b53";
|
|
4955
|
+
function validate$6(obj, path = 'EinsteinPromptTemplateVersionOutputLanguagesRepresentation') {
|
|
4956
4956
|
const v_error = (() => {
|
|
4957
4957
|
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
4958
4958
|
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
@@ -4965,7 +4965,7 @@ function validate$3(obj, path = 'EinsteinPromptTemplateVersionOutputLanguagesRep
|
|
|
4965
4965
|
for (let i = 0; i < obj_errors.length; i++) {
|
|
4966
4966
|
const obj_errors_item = obj_errors[i];
|
|
4967
4967
|
const path_errors_item = path_errors + '[' + i + ']';
|
|
4968
|
-
const referencepath_errors_itemValidationError = validate$
|
|
4968
|
+
const referencepath_errors_itemValidationError = validate$8(obj_errors_item, path_errors_item);
|
|
4969
4969
|
if (referencepath_errors_itemValidationError !== null) {
|
|
4970
4970
|
let message = 'Object doesn\'t match EinsteinPromptTemplateSupportedLanguageErrorRepresentation (at "' + path_errors_item + '")\n';
|
|
4971
4971
|
message += referencepath_errors_itemValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
@@ -4990,7 +4990,7 @@ function validate$3(obj, path = 'EinsteinPromptTemplateVersionOutputLanguagesRep
|
|
|
4990
4990
|
for (let i = 0; i < obj_supportedLanguages.length; i++) {
|
|
4991
4991
|
const obj_supportedLanguages_item = obj_supportedLanguages[i];
|
|
4992
4992
|
const path_supportedLanguages_item = path_supportedLanguages + '[' + i + ']';
|
|
4993
|
-
const referencepath_supportedLanguages_itemValidationError = validate$
|
|
4993
|
+
const referencepath_supportedLanguages_itemValidationError = validate$7(obj_supportedLanguages_item, path_supportedLanguages_item);
|
|
4994
4994
|
if (referencepath_supportedLanguages_itemValidationError !== null) {
|
|
4995
4995
|
let message = 'Object doesn\'t match EinsteinPromptTemplateSupportedLanguageRepresentation (at "' + path_supportedLanguages_item + '")\n';
|
|
4996
4996
|
message += referencepath_supportedLanguages_itemValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
@@ -5005,16 +5005,16 @@ function validate$3(obj, path = 'EinsteinPromptTemplateVersionOutputLanguagesRep
|
|
|
5005
5005
|
})();
|
|
5006
5006
|
return v_error === undefined ? null : v_error;
|
|
5007
5007
|
}
|
|
5008
|
-
const RepresentationType$
|
|
5009
|
-
function normalize$
|
|
5008
|
+
const RepresentationType$3 = 'EinsteinPromptTemplateVersionOutputLanguagesRepresentation';
|
|
5009
|
+
function normalize$3(input, existing, path, luvio, store, timestamp) {
|
|
5010
5010
|
return input;
|
|
5011
5011
|
}
|
|
5012
|
-
const select$
|
|
5013
|
-
const { selections: EinsteinPromptTemplateSupportedLanguageErrorRepresentation__selections, opaque: EinsteinPromptTemplateSupportedLanguageErrorRepresentation__opaque, } = select$
|
|
5014
|
-
const { selections: EinsteinPromptTemplateSupportedLanguageRepresentation__selections, opaque: EinsteinPromptTemplateSupportedLanguageRepresentation__opaque, } = select$
|
|
5012
|
+
const select$d = function EinsteinPromptTemplateVersionOutputLanguagesRepresentationSelect() {
|
|
5013
|
+
const { selections: EinsteinPromptTemplateSupportedLanguageErrorRepresentation__selections, opaque: EinsteinPromptTemplateSupportedLanguageErrorRepresentation__opaque, } = select$f();
|
|
5014
|
+
const { selections: EinsteinPromptTemplateSupportedLanguageRepresentation__selections, opaque: EinsteinPromptTemplateSupportedLanguageRepresentation__opaque, } = select$e();
|
|
5015
5015
|
return {
|
|
5016
5016
|
kind: 'Fragment',
|
|
5017
|
-
version: VERSION$
|
|
5017
|
+
version: VERSION$5,
|
|
5018
5018
|
private: [],
|
|
5019
5019
|
selections: [
|
|
5020
5020
|
{
|
|
@@ -5044,7 +5044,7 @@ const select$9 = function EinsteinPromptTemplateVersionOutputLanguagesRepresenta
|
|
|
5044
5044
|
]
|
|
5045
5045
|
};
|
|
5046
5046
|
};
|
|
5047
|
-
function equals$
|
|
5047
|
+
function equals$5(existing, incoming) {
|
|
5048
5048
|
const existing_isSuccess = existing.isSuccess;
|
|
5049
5049
|
const incoming_isSuccess = incoming.isSuccess;
|
|
5050
5050
|
if (!(existing_isSuccess === incoming_isSuccess)) {
|
|
@@ -5063,7 +5063,7 @@ function equals$2(existing, incoming) {
|
|
|
5063
5063
|
const existing_errors = existing.errors;
|
|
5064
5064
|
const incoming_errors = incoming.errors;
|
|
5065
5065
|
const equals_errors_items = equalsArray(existing_errors, incoming_errors, (existing_errors_item, incoming_errors_item) => {
|
|
5066
|
-
if (!(equals$
|
|
5066
|
+
if (!(equals$7(existing_errors_item, incoming_errors_item))) {
|
|
5067
5067
|
return false;
|
|
5068
5068
|
}
|
|
5069
5069
|
});
|
|
@@ -5073,7 +5073,7 @@ function equals$2(existing, incoming) {
|
|
|
5073
5073
|
const existing_supportedLanguages = existing.supportedLanguages;
|
|
5074
5074
|
const incoming_supportedLanguages = incoming.supportedLanguages;
|
|
5075
5075
|
const equals_supportedLanguages_items = equalsArray(existing_supportedLanguages, incoming_supportedLanguages, (existing_supportedLanguages_item, incoming_supportedLanguages_item) => {
|
|
5076
|
-
if (!(equals$
|
|
5076
|
+
if (!(equals$6(existing_supportedLanguages_item, incoming_supportedLanguages_item))) {
|
|
5077
5077
|
return false;
|
|
5078
5078
|
}
|
|
5079
5079
|
});
|
|
@@ -5082,44 +5082,44 @@ function equals$2(existing, incoming) {
|
|
|
5082
5082
|
}
|
|
5083
5083
|
return true;
|
|
5084
5084
|
}
|
|
5085
|
-
const ingest$
|
|
5085
|
+
const ingest$3 = function EinsteinPromptTemplateVersionOutputLanguagesRepresentationIngest(input, path, luvio, store, timestamp) {
|
|
5086
5086
|
if (process.env.NODE_ENV !== 'production') {
|
|
5087
|
-
const validateError = validate$
|
|
5087
|
+
const validateError = validate$6(input);
|
|
5088
5088
|
if (validateError !== null) {
|
|
5089
5089
|
throw validateError;
|
|
5090
5090
|
}
|
|
5091
5091
|
}
|
|
5092
5092
|
const key = path.fullPath;
|
|
5093
|
-
const ttlToUse = TTL$
|
|
5094
|
-
ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize$
|
|
5093
|
+
const ttlToUse = TTL$3;
|
|
5094
|
+
ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize$3, "EinsteinLLM", VERSION$5, RepresentationType$3, equals$5);
|
|
5095
5095
|
return createLink(key);
|
|
5096
5096
|
};
|
|
5097
|
-
function getTypeCacheKeys$
|
|
5097
|
+
function getTypeCacheKeys$3(rootKeySet, luvio, input, fullPathFactory) {
|
|
5098
5098
|
// root cache key (uses fullPathFactory if keyBuilderFromType isn't defined)
|
|
5099
5099
|
const rootKey = fullPathFactory();
|
|
5100
5100
|
rootKeySet.set(rootKey, {
|
|
5101
5101
|
namespace: keyPrefix,
|
|
5102
|
-
representationName: RepresentationType$
|
|
5102
|
+
representationName: RepresentationType$3,
|
|
5103
5103
|
mergeable: false
|
|
5104
5104
|
});
|
|
5105
5105
|
}
|
|
5106
5106
|
|
|
5107
|
-
function select$
|
|
5108
|
-
return select$
|
|
5107
|
+
function select$c(luvio, params) {
|
|
5108
|
+
return select$d();
|
|
5109
5109
|
}
|
|
5110
|
-
function keyBuilder$
|
|
5110
|
+
function keyBuilder$b(luvio, params) {
|
|
5111
5111
|
return keyPrefix + '::EinsteinPromptTemplateVersionOutputLanguagesRepresentation:(' + 'useStandardVersion:' + params.queryParams.useStandardVersion + ',' + 'versionId:' + params.queryParams.versionId + ',' + 'promptTemplateDevName:' + params.urlParams.promptTemplateDevName + ')';
|
|
5112
5112
|
}
|
|
5113
|
-
function getResponseCacheKeys$
|
|
5114
|
-
getTypeCacheKeys$
|
|
5113
|
+
function getResponseCacheKeys$7(storeKeyMap, luvio, resourceParams, response) {
|
|
5114
|
+
getTypeCacheKeys$3(storeKeyMap, luvio, response, () => keyBuilder$b(luvio, resourceParams));
|
|
5115
5115
|
}
|
|
5116
|
-
function ingestSuccess$
|
|
5116
|
+
function ingestSuccess$7(luvio, resourceParams, response, snapshotRefresh) {
|
|
5117
5117
|
const { body } = response;
|
|
5118
|
-
const key = keyBuilder$
|
|
5119
|
-
luvio.storeIngest(key, ingest$
|
|
5118
|
+
const key = keyBuilder$b(luvio, resourceParams);
|
|
5119
|
+
luvio.storeIngest(key, ingest$3, body);
|
|
5120
5120
|
const snapshot = luvio.storeLookup({
|
|
5121
5121
|
recordId: key,
|
|
5122
|
-
node: select$
|
|
5122
|
+
node: select$c(),
|
|
5123
5123
|
variables: {},
|
|
5124
5124
|
}, snapshotRefresh);
|
|
5125
5125
|
if (process.env.NODE_ENV !== 'production') {
|
|
@@ -5130,19 +5130,19 @@ function ingestSuccess$6(luvio, resourceParams, response, snapshotRefresh) {
|
|
|
5130
5130
|
deepFreeze(snapshot.data);
|
|
5131
5131
|
return snapshot;
|
|
5132
5132
|
}
|
|
5133
|
-
function ingestError$
|
|
5134
|
-
const key = keyBuilder$
|
|
5133
|
+
function ingestError$5(luvio, params, error, snapshotRefresh) {
|
|
5134
|
+
const key = keyBuilder$b(luvio, params);
|
|
5135
5135
|
const errorSnapshot = luvio.errorSnapshot(error, snapshotRefresh);
|
|
5136
5136
|
const storeMetadataParams = {
|
|
5137
|
-
ttl: TTL$
|
|
5137
|
+
ttl: TTL$3,
|
|
5138
5138
|
namespace: keyPrefix,
|
|
5139
|
-
version: VERSION$
|
|
5140
|
-
representationName: RepresentationType$
|
|
5139
|
+
version: VERSION$5,
|
|
5140
|
+
representationName: RepresentationType$3
|
|
5141
5141
|
};
|
|
5142
5142
|
luvio.storeIngestError(key, errorSnapshot, storeMetadataParams);
|
|
5143
5143
|
return errorSnapshot;
|
|
5144
5144
|
}
|
|
5145
|
-
function createResourceRequest$
|
|
5145
|
+
function createResourceRequest$7(config) {
|
|
5146
5146
|
const headers = {};
|
|
5147
5147
|
return {
|
|
5148
5148
|
baseUri: '/services/data/v65.0',
|
|
@@ -5156,95 +5156,95 @@ function createResourceRequest$6(config) {
|
|
|
5156
5156
|
};
|
|
5157
5157
|
}
|
|
5158
5158
|
|
|
5159
|
-
const adapterName$
|
|
5159
|
+
const adapterName$7 = 'getOutputLanguages';
|
|
5160
5160
|
const getOutputLanguages_ConfigPropertyMetadata = [
|
|
5161
5161
|
generateParamConfigMetadata('promptTemplateDevName', true, 0 /* UrlParameter */, 0 /* String */),
|
|
5162
5162
|
generateParamConfigMetadata('useStandardVersion', false, 1 /* QueryParameter */, 1 /* Boolean */),
|
|
5163
5163
|
generateParamConfigMetadata('versionId', false, 1 /* QueryParameter */, 0 /* String */),
|
|
5164
5164
|
];
|
|
5165
|
-
const getOutputLanguages_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$
|
|
5166
|
-
const createResourceParams$
|
|
5167
|
-
function keyBuilder$
|
|
5168
|
-
const resourceParams = createResourceParams$
|
|
5169
|
-
return keyBuilder$
|
|
5165
|
+
const getOutputLanguages_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$7, getOutputLanguages_ConfigPropertyMetadata);
|
|
5166
|
+
const createResourceParams$7 = /*#__PURE__*/ createResourceParams$i(getOutputLanguages_ConfigPropertyMetadata);
|
|
5167
|
+
function keyBuilder$a(luvio, config) {
|
|
5168
|
+
const resourceParams = createResourceParams$7(config);
|
|
5169
|
+
return keyBuilder$b(luvio, resourceParams);
|
|
5170
5170
|
}
|
|
5171
|
-
function typeCheckConfig$
|
|
5171
|
+
function typeCheckConfig$7(untrustedConfig) {
|
|
5172
5172
|
const config = {};
|
|
5173
|
-
typeCheckConfig$
|
|
5173
|
+
typeCheckConfig$i(untrustedConfig, config, getOutputLanguages_ConfigPropertyMetadata);
|
|
5174
5174
|
return config;
|
|
5175
5175
|
}
|
|
5176
|
-
function validateAdapterConfig$
|
|
5176
|
+
function validateAdapterConfig$7(untrustedConfig, configPropertyNames) {
|
|
5177
5177
|
if (!untrustedIsObject(untrustedConfig)) {
|
|
5178
5178
|
return null;
|
|
5179
5179
|
}
|
|
5180
5180
|
if (process.env.NODE_ENV !== 'production') {
|
|
5181
5181
|
validateConfig(untrustedConfig, configPropertyNames);
|
|
5182
5182
|
}
|
|
5183
|
-
const config = typeCheckConfig$
|
|
5183
|
+
const config = typeCheckConfig$7(untrustedConfig);
|
|
5184
5184
|
if (!areRequiredParametersPresent(config, configPropertyNames)) {
|
|
5185
5185
|
return null;
|
|
5186
5186
|
}
|
|
5187
5187
|
return config;
|
|
5188
5188
|
}
|
|
5189
|
-
function adapterFragment$
|
|
5190
|
-
createResourceParams$
|
|
5191
|
-
return select$
|
|
5189
|
+
function adapterFragment$5(luvio, config) {
|
|
5190
|
+
createResourceParams$7(config);
|
|
5191
|
+
return select$c();
|
|
5192
5192
|
}
|
|
5193
|
-
function onFetchResponseSuccess$
|
|
5194
|
-
const snapshot = ingestSuccess$
|
|
5193
|
+
function onFetchResponseSuccess$5(luvio, config, resourceParams, response) {
|
|
5194
|
+
const snapshot = ingestSuccess$7(luvio, resourceParams, response, {
|
|
5195
5195
|
config,
|
|
5196
|
-
resolve: () => buildNetworkSnapshot$
|
|
5196
|
+
resolve: () => buildNetworkSnapshot$7(luvio, config, snapshotRefreshOptions)
|
|
5197
5197
|
});
|
|
5198
5198
|
return luvio.storeBroadcast().then(() => snapshot);
|
|
5199
5199
|
}
|
|
5200
|
-
function onFetchResponseError$
|
|
5201
|
-
const snapshot = ingestError$
|
|
5200
|
+
function onFetchResponseError$5(luvio, config, resourceParams, response) {
|
|
5201
|
+
const snapshot = ingestError$5(luvio, resourceParams, response, {
|
|
5202
5202
|
config,
|
|
5203
|
-
resolve: () => buildNetworkSnapshot$
|
|
5203
|
+
resolve: () => buildNetworkSnapshot$7(luvio, config, snapshotRefreshOptions)
|
|
5204
5204
|
});
|
|
5205
5205
|
return luvio.storeBroadcast().then(() => snapshot);
|
|
5206
5206
|
}
|
|
5207
|
-
function buildNetworkSnapshot$
|
|
5208
|
-
const resourceParams = createResourceParams$
|
|
5209
|
-
const request = createResourceRequest$
|
|
5207
|
+
function buildNetworkSnapshot$7(luvio, config, options) {
|
|
5208
|
+
const resourceParams = createResourceParams$7(config);
|
|
5209
|
+
const request = createResourceRequest$7(resourceParams);
|
|
5210
5210
|
return luvio.dispatchResourceRequest(request, options)
|
|
5211
5211
|
.then((response) => {
|
|
5212
|
-
return luvio.handleSuccessResponse(() => onFetchResponseSuccess$
|
|
5212
|
+
return luvio.handleSuccessResponse(() => onFetchResponseSuccess$5(luvio, config, resourceParams, response), () => {
|
|
5213
5213
|
const cache = new StoreKeyMap();
|
|
5214
|
-
getResponseCacheKeys$
|
|
5214
|
+
getResponseCacheKeys$7(cache, luvio, resourceParams, response.body);
|
|
5215
5215
|
return cache;
|
|
5216
5216
|
});
|
|
5217
5217
|
}, (response) => {
|
|
5218
|
-
return luvio.handleErrorResponse(() => onFetchResponseError$
|
|
5218
|
+
return luvio.handleErrorResponse(() => onFetchResponseError$5(luvio, config, resourceParams, response));
|
|
5219
5219
|
});
|
|
5220
5220
|
}
|
|
5221
|
-
function buildNetworkSnapshotCachePolicy$
|
|
5222
|
-
return buildNetworkSnapshotCachePolicy$
|
|
5221
|
+
function buildNetworkSnapshotCachePolicy$5(context, coercedAdapterRequestContext) {
|
|
5222
|
+
return buildNetworkSnapshotCachePolicy$b(context, coercedAdapterRequestContext, buildNetworkSnapshot$7, undefined, false);
|
|
5223
5223
|
}
|
|
5224
|
-
function buildCachedSnapshotCachePolicy$
|
|
5224
|
+
function buildCachedSnapshotCachePolicy$5(context, storeLookup) {
|
|
5225
5225
|
const { luvio, config } = context;
|
|
5226
5226
|
const selector = {
|
|
5227
|
-
recordId: keyBuilder$
|
|
5228
|
-
node: adapterFragment$
|
|
5227
|
+
recordId: keyBuilder$a(luvio, config),
|
|
5228
|
+
node: adapterFragment$5(luvio, config),
|
|
5229
5229
|
variables: {},
|
|
5230
5230
|
};
|
|
5231
5231
|
const cacheSnapshot = storeLookup(selector, {
|
|
5232
5232
|
config,
|
|
5233
|
-
resolve: () => buildNetworkSnapshot$
|
|
5233
|
+
resolve: () => buildNetworkSnapshot$7(luvio, config, snapshotRefreshOptions)
|
|
5234
5234
|
});
|
|
5235
5235
|
return cacheSnapshot;
|
|
5236
5236
|
}
|
|
5237
5237
|
const getOutputLanguagesAdapterFactory = (luvio) => function EinsteinLLM__getOutputLanguages(untrustedConfig, requestContext) {
|
|
5238
|
-
const config = validateAdapterConfig$
|
|
5238
|
+
const config = validateAdapterConfig$7(untrustedConfig, getOutputLanguages_ConfigPropertyNames);
|
|
5239
5239
|
// Invalid or incomplete config
|
|
5240
5240
|
if (config === null) {
|
|
5241
5241
|
return null;
|
|
5242
5242
|
}
|
|
5243
5243
|
return luvio.applyCachePolicy((requestContext || {}), { config, luvio }, // BuildSnapshotContext
|
|
5244
|
-
buildCachedSnapshotCachePolicy$
|
|
5244
|
+
buildCachedSnapshotCachePolicy$5, buildNetworkSnapshotCachePolicy$5);
|
|
5245
5245
|
};
|
|
5246
5246
|
|
|
5247
|
-
function validate$
|
|
5247
|
+
function validate$5(obj, path = 'EinsteinPromptRecordFieldRepresentation') {
|
|
5248
5248
|
const v_error = (() => {
|
|
5249
5249
|
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
5250
5250
|
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
@@ -5304,9 +5304,9 @@ function validate$2(obj, path = 'EinsteinPromptRecordFieldRepresentation') {
|
|
|
5304
5304
|
return v_error === undefined ? null : v_error;
|
|
5305
5305
|
}
|
|
5306
5306
|
|
|
5307
|
-
const TTL$
|
|
5308
|
-
const VERSION$
|
|
5309
|
-
function validate$
|
|
5307
|
+
const TTL$2 = 100;
|
|
5308
|
+
const VERSION$4 = "2d1628544b54fc1701aa9b4eff05127b";
|
|
5309
|
+
function validate$4(obj, path = 'EinsteinPromptRecordRepresentation') {
|
|
5310
5310
|
const v_error = (() => {
|
|
5311
5311
|
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
5312
5312
|
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
@@ -5335,7 +5335,7 @@ function validate$1(obj, path = 'EinsteinPromptRecordRepresentation') {
|
|
|
5335
5335
|
for (let i = 0; i < obj_childRelationships_prop.length; i++) {
|
|
5336
5336
|
const obj_childRelationships_prop_item = obj_childRelationships_prop[i];
|
|
5337
5337
|
const path_childRelationships_prop_item = path_childRelationships_prop + '[' + i + ']';
|
|
5338
|
-
const referencepath_childRelationships_prop_itemValidationError = validate$
|
|
5338
|
+
const referencepath_childRelationships_prop_itemValidationError = validate$4(obj_childRelationships_prop_item, path_childRelationships_prop_item);
|
|
5339
5339
|
if (referencepath_childRelationships_prop_itemValidationError !== null) {
|
|
5340
5340
|
let message = 'Object doesn\'t match EinsteinPromptRecordRepresentation (at "' + path_childRelationships_prop_item + '")\n';
|
|
5341
5341
|
message += referencepath_childRelationships_prop_itemValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
@@ -5355,7 +5355,7 @@ function validate$1(obj, path = 'EinsteinPromptRecordRepresentation') {
|
|
|
5355
5355
|
const key = obj_fields_keys[i];
|
|
5356
5356
|
const obj_fields_prop = obj_fields[key];
|
|
5357
5357
|
const path_fields_prop = path_fields + '["' + key + '"]';
|
|
5358
|
-
const referencepath_fields_propValidationError = validate$
|
|
5358
|
+
const referencepath_fields_propValidationError = validate$5(obj_fields_prop, path_fields_prop);
|
|
5359
5359
|
if (referencepath_fields_propValidationError !== null) {
|
|
5360
5360
|
let message = 'Object doesn\'t match EinsteinPromptRecordFieldRepresentation (at "' + path_fields_prop + '")\n';
|
|
5361
5361
|
message += referencepath_fields_propValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
@@ -5373,62 +5373,62 @@ function validate$1(obj, path = 'EinsteinPromptRecordRepresentation') {
|
|
|
5373
5373
|
})();
|
|
5374
5374
|
return v_error === undefined ? null : v_error;
|
|
5375
5375
|
}
|
|
5376
|
-
const RepresentationType$
|
|
5377
|
-
function normalize$
|
|
5376
|
+
const RepresentationType$2 = 'EinsteinPromptRecordRepresentation';
|
|
5377
|
+
function normalize$2(input, existing, path, luvio, store, timestamp) {
|
|
5378
5378
|
return input;
|
|
5379
5379
|
}
|
|
5380
|
-
const select$
|
|
5380
|
+
const select$b = function EinsteinPromptRecordRepresentationSelect() {
|
|
5381
5381
|
return {
|
|
5382
5382
|
kind: 'Fragment',
|
|
5383
|
-
version: VERSION$
|
|
5383
|
+
version: VERSION$4,
|
|
5384
5384
|
private: [],
|
|
5385
5385
|
opaque: true
|
|
5386
5386
|
};
|
|
5387
5387
|
};
|
|
5388
|
-
function equals$
|
|
5388
|
+
function equals$4(existing, incoming) {
|
|
5389
5389
|
if (JSONStringify(incoming) !== JSONStringify(existing)) {
|
|
5390
5390
|
return false;
|
|
5391
5391
|
}
|
|
5392
5392
|
return true;
|
|
5393
5393
|
}
|
|
5394
|
-
const ingest$
|
|
5394
|
+
const ingest$2 = function EinsteinPromptRecordRepresentationIngest(input, path, luvio, store, timestamp) {
|
|
5395
5395
|
if (process.env.NODE_ENV !== 'production') {
|
|
5396
|
-
const validateError = validate$
|
|
5396
|
+
const validateError = validate$4(input);
|
|
5397
5397
|
if (validateError !== null) {
|
|
5398
5398
|
throw validateError;
|
|
5399
5399
|
}
|
|
5400
5400
|
}
|
|
5401
5401
|
const key = path.fullPath;
|
|
5402
|
-
const ttlToUse = TTL$
|
|
5403
|
-
ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize$
|
|
5402
|
+
const ttlToUse = TTL$2;
|
|
5403
|
+
ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize$2, "EinsteinLLM", VERSION$4, RepresentationType$2, equals$4);
|
|
5404
5404
|
return createLink(key);
|
|
5405
5405
|
};
|
|
5406
|
-
function getTypeCacheKeys$
|
|
5406
|
+
function getTypeCacheKeys$2(rootKeySet, luvio, input, fullPathFactory) {
|
|
5407
5407
|
// root cache key (uses fullPathFactory if keyBuilderFromType isn't defined)
|
|
5408
5408
|
const rootKey = fullPathFactory();
|
|
5409
5409
|
rootKeySet.set(rootKey, {
|
|
5410
5410
|
namespace: keyPrefix,
|
|
5411
|
-
representationName: RepresentationType$
|
|
5411
|
+
representationName: RepresentationType$2,
|
|
5412
5412
|
mergeable: false
|
|
5413
5413
|
});
|
|
5414
5414
|
}
|
|
5415
5415
|
|
|
5416
|
-
function select$
|
|
5417
|
-
return select$
|
|
5416
|
+
function select$a(luvio, params) {
|
|
5417
|
+
return select$b();
|
|
5418
5418
|
}
|
|
5419
|
-
function keyBuilder$
|
|
5419
|
+
function keyBuilder$9(luvio, params) {
|
|
5420
5420
|
return keyPrefix + '::EinsteinPromptRecordRepresentation:(' + 'versionId:' + params.queryParams.versionId + ',' + 'promptTemplateDevName:' + params.urlParams.promptTemplateDevName + ')';
|
|
5421
5421
|
}
|
|
5422
|
-
function getResponseCacheKeys$
|
|
5423
|
-
getTypeCacheKeys$
|
|
5422
|
+
function getResponseCacheKeys$6(storeKeyMap, luvio, resourceParams, response) {
|
|
5423
|
+
getTypeCacheKeys$2(storeKeyMap, luvio, response, () => keyBuilder$9(luvio, resourceParams));
|
|
5424
5424
|
}
|
|
5425
|
-
function ingestSuccess$
|
|
5425
|
+
function ingestSuccess$6(luvio, resourceParams, response, snapshotRefresh) {
|
|
5426
5426
|
const { body } = response;
|
|
5427
|
-
const key = keyBuilder$
|
|
5428
|
-
luvio.storeIngest(key, ingest$
|
|
5427
|
+
const key = keyBuilder$9(luvio, resourceParams);
|
|
5428
|
+
luvio.storeIngest(key, ingest$2, body);
|
|
5429
5429
|
const snapshot = luvio.storeLookup({
|
|
5430
5430
|
recordId: key,
|
|
5431
|
-
node: select$
|
|
5431
|
+
node: select$a(),
|
|
5432
5432
|
variables: {},
|
|
5433
5433
|
}, snapshotRefresh);
|
|
5434
5434
|
if (process.env.NODE_ENV !== 'production') {
|
|
@@ -5439,19 +5439,19 @@ function ingestSuccess$5(luvio, resourceParams, response, snapshotRefresh) {
|
|
|
5439
5439
|
deepFreeze(snapshot.data);
|
|
5440
5440
|
return snapshot;
|
|
5441
5441
|
}
|
|
5442
|
-
function ingestError$
|
|
5443
|
-
const key = keyBuilder$
|
|
5442
|
+
function ingestError$4(luvio, params, error, snapshotRefresh) {
|
|
5443
|
+
const key = keyBuilder$9(luvio, params);
|
|
5444
5444
|
const errorSnapshot = luvio.errorSnapshot(error, snapshotRefresh);
|
|
5445
5445
|
const storeMetadataParams = {
|
|
5446
|
-
ttl: TTL$
|
|
5446
|
+
ttl: TTL$2,
|
|
5447
5447
|
namespace: keyPrefix,
|
|
5448
|
-
version: VERSION$
|
|
5449
|
-
representationName: RepresentationType$
|
|
5448
|
+
version: VERSION$4,
|
|
5449
|
+
representationName: RepresentationType$2
|
|
5450
5450
|
};
|
|
5451
5451
|
luvio.storeIngestError(key, errorSnapshot, storeMetadataParams);
|
|
5452
5452
|
return errorSnapshot;
|
|
5453
5453
|
}
|
|
5454
|
-
function createResourceRequest$
|
|
5454
|
+
function createResourceRequest$6(config) {
|
|
5455
5455
|
const headers = {};
|
|
5456
5456
|
return {
|
|
5457
5457
|
baseUri: '/services/data/v65.0',
|
|
@@ -5465,20 +5465,161 @@ function createResourceRequest$5(config) {
|
|
|
5465
5465
|
};
|
|
5466
5466
|
}
|
|
5467
5467
|
|
|
5468
|
-
const adapterName$
|
|
5468
|
+
const adapterName$6 = 'getPromptTemplate';
|
|
5469
5469
|
const getPromptTemplate_ConfigPropertyMetadata = [
|
|
5470
5470
|
generateParamConfigMetadata('promptTemplateDevName', true, 0 /* UrlParameter */, 0 /* String */),
|
|
5471
5471
|
generateParamConfigMetadata('versionId', false, 1 /* QueryParameter */, 0 /* String */),
|
|
5472
5472
|
];
|
|
5473
|
-
const getPromptTemplate_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$
|
|
5474
|
-
const createResourceParams$
|
|
5473
|
+
const getPromptTemplate_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$6, getPromptTemplate_ConfigPropertyMetadata);
|
|
5474
|
+
const createResourceParams$6 = /*#__PURE__*/ createResourceParams$i(getPromptTemplate_ConfigPropertyMetadata);
|
|
5475
|
+
function keyBuilder$8(luvio, config) {
|
|
5476
|
+
const resourceParams = createResourceParams$6(config);
|
|
5477
|
+
return keyBuilder$9(luvio, resourceParams);
|
|
5478
|
+
}
|
|
5479
|
+
function typeCheckConfig$6(untrustedConfig) {
|
|
5480
|
+
const config = {};
|
|
5481
|
+
typeCheckConfig$i(untrustedConfig, config, getPromptTemplate_ConfigPropertyMetadata);
|
|
5482
|
+
return config;
|
|
5483
|
+
}
|
|
5484
|
+
function validateAdapterConfig$6(untrustedConfig, configPropertyNames) {
|
|
5485
|
+
if (!untrustedIsObject(untrustedConfig)) {
|
|
5486
|
+
return null;
|
|
5487
|
+
}
|
|
5488
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
5489
|
+
validateConfig(untrustedConfig, configPropertyNames);
|
|
5490
|
+
}
|
|
5491
|
+
const config = typeCheckConfig$6(untrustedConfig);
|
|
5492
|
+
if (!areRequiredParametersPresent(config, configPropertyNames)) {
|
|
5493
|
+
return null;
|
|
5494
|
+
}
|
|
5495
|
+
return config;
|
|
5496
|
+
}
|
|
5497
|
+
function adapterFragment$4(luvio, config) {
|
|
5498
|
+
createResourceParams$6(config);
|
|
5499
|
+
return select$a();
|
|
5500
|
+
}
|
|
5501
|
+
function onFetchResponseSuccess$4(luvio, config, resourceParams, response) {
|
|
5502
|
+
const snapshot = ingestSuccess$6(luvio, resourceParams, response, {
|
|
5503
|
+
config,
|
|
5504
|
+
resolve: () => buildNetworkSnapshot$6(luvio, config, snapshotRefreshOptions)
|
|
5505
|
+
});
|
|
5506
|
+
return luvio.storeBroadcast().then(() => snapshot);
|
|
5507
|
+
}
|
|
5508
|
+
function onFetchResponseError$4(luvio, config, resourceParams, response) {
|
|
5509
|
+
const snapshot = ingestError$4(luvio, resourceParams, response, {
|
|
5510
|
+
config,
|
|
5511
|
+
resolve: () => buildNetworkSnapshot$6(luvio, config, snapshotRefreshOptions)
|
|
5512
|
+
});
|
|
5513
|
+
return luvio.storeBroadcast().then(() => snapshot);
|
|
5514
|
+
}
|
|
5515
|
+
function buildNetworkSnapshot$6(luvio, config, options) {
|
|
5516
|
+
const resourceParams = createResourceParams$6(config);
|
|
5517
|
+
const request = createResourceRequest$6(resourceParams);
|
|
5518
|
+
return luvio.dispatchResourceRequest(request, options)
|
|
5519
|
+
.then((response) => {
|
|
5520
|
+
return luvio.handleSuccessResponse(() => onFetchResponseSuccess$4(luvio, config, resourceParams, response), () => {
|
|
5521
|
+
const cache = new StoreKeyMap();
|
|
5522
|
+
getResponseCacheKeys$6(cache, luvio, resourceParams, response.body);
|
|
5523
|
+
return cache;
|
|
5524
|
+
});
|
|
5525
|
+
}, (response) => {
|
|
5526
|
+
return luvio.handleErrorResponse(() => onFetchResponseError$4(luvio, config, resourceParams, response));
|
|
5527
|
+
});
|
|
5528
|
+
}
|
|
5529
|
+
function buildNetworkSnapshotCachePolicy$4(context, coercedAdapterRequestContext) {
|
|
5530
|
+
return buildNetworkSnapshotCachePolicy$b(context, coercedAdapterRequestContext, buildNetworkSnapshot$6, undefined, false);
|
|
5531
|
+
}
|
|
5532
|
+
function buildCachedSnapshotCachePolicy$4(context, storeLookup) {
|
|
5533
|
+
const { luvio, config } = context;
|
|
5534
|
+
const selector = {
|
|
5535
|
+
recordId: keyBuilder$8(luvio, config),
|
|
5536
|
+
node: adapterFragment$4(luvio, config),
|
|
5537
|
+
variables: {},
|
|
5538
|
+
};
|
|
5539
|
+
const cacheSnapshot = storeLookup(selector, {
|
|
5540
|
+
config,
|
|
5541
|
+
resolve: () => buildNetworkSnapshot$6(luvio, config, snapshotRefreshOptions)
|
|
5542
|
+
});
|
|
5543
|
+
return cacheSnapshot;
|
|
5544
|
+
}
|
|
5545
|
+
const getPromptTemplateAdapterFactory = (luvio) => function EinsteinLLM__getPromptTemplate(untrustedConfig, requestContext) {
|
|
5546
|
+
const config = validateAdapterConfig$6(untrustedConfig, getPromptTemplate_ConfigPropertyNames);
|
|
5547
|
+
// Invalid or incomplete config
|
|
5548
|
+
if (config === null) {
|
|
5549
|
+
return null;
|
|
5550
|
+
}
|
|
5551
|
+
return luvio.applyCachePolicy((requestContext || {}), { config, luvio }, // BuildSnapshotContext
|
|
5552
|
+
buildCachedSnapshotCachePolicy$4, buildNetworkSnapshotCachePolicy$4);
|
|
5553
|
+
};
|
|
5554
|
+
|
|
5555
|
+
function select$9(luvio, params) {
|
|
5556
|
+
return select$b();
|
|
5557
|
+
}
|
|
5558
|
+
function keyBuilder$7(luvio, params) {
|
|
5559
|
+
return keyPrefix + '::EinsteinPromptRecordRepresentation:(' + 'includingContent:' + params.queryParams.includingContent + ',' + 'includingVersionDetail:' + params.queryParams.includingVersionDetail + ',' + 'promptTemplateDevName:' + params.urlParams.promptTemplateDevName + ',' + 'versionId:' + params.urlParams.versionId + ')';
|
|
5560
|
+
}
|
|
5561
|
+
function getResponseCacheKeys$5(storeKeyMap, luvio, resourceParams, response) {
|
|
5562
|
+
getTypeCacheKeys$2(storeKeyMap, luvio, response, () => keyBuilder$7(luvio, resourceParams));
|
|
5563
|
+
}
|
|
5564
|
+
function ingestSuccess$5(luvio, resourceParams, response, snapshotRefresh) {
|
|
5565
|
+
const { body } = response;
|
|
5566
|
+
const key = keyBuilder$7(luvio, resourceParams);
|
|
5567
|
+
luvio.storeIngest(key, ingest$2, body);
|
|
5568
|
+
const snapshot = luvio.storeLookup({
|
|
5569
|
+
recordId: key,
|
|
5570
|
+
node: select$9(),
|
|
5571
|
+
variables: {},
|
|
5572
|
+
}, snapshotRefresh);
|
|
5573
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
5574
|
+
if (snapshot.state !== 'Fulfilled') {
|
|
5575
|
+
throw new Error('Invalid network response. Expected resource response to result in Fulfilled snapshot');
|
|
5576
|
+
}
|
|
5577
|
+
}
|
|
5578
|
+
deepFreeze(snapshot.data);
|
|
5579
|
+
return snapshot;
|
|
5580
|
+
}
|
|
5581
|
+
function ingestError$3(luvio, params, error, snapshotRefresh) {
|
|
5582
|
+
const key = keyBuilder$7(luvio, params);
|
|
5583
|
+
const errorSnapshot = luvio.errorSnapshot(error, snapshotRefresh);
|
|
5584
|
+
const storeMetadataParams = {
|
|
5585
|
+
ttl: TTL$2,
|
|
5586
|
+
namespace: keyPrefix,
|
|
5587
|
+
version: VERSION$4,
|
|
5588
|
+
representationName: RepresentationType$2
|
|
5589
|
+
};
|
|
5590
|
+
luvio.storeIngestError(key, errorSnapshot, storeMetadataParams);
|
|
5591
|
+
return errorSnapshot;
|
|
5592
|
+
}
|
|
5593
|
+
function createResourceRequest$5(config) {
|
|
5594
|
+
const headers = {};
|
|
5595
|
+
return {
|
|
5596
|
+
baseUri: '/services/data/v65.0',
|
|
5597
|
+
basePath: '/einstein/prompt-templates/' + config.urlParams.promptTemplateDevName + '/versions/' + config.urlParams.versionId + '',
|
|
5598
|
+
method: 'get',
|
|
5599
|
+
body: null,
|
|
5600
|
+
urlParams: config.urlParams,
|
|
5601
|
+
queryParams: config.queryParams,
|
|
5602
|
+
headers,
|
|
5603
|
+
priority: 'normal',
|
|
5604
|
+
};
|
|
5605
|
+
}
|
|
5606
|
+
|
|
5607
|
+
const adapterName$5 = 'getPromptTemplateVersion';
|
|
5608
|
+
const getPromptTemplateVersion_ConfigPropertyMetadata = [
|
|
5609
|
+
generateParamConfigMetadata('promptTemplateDevName', true, 0 /* UrlParameter */, 0 /* String */),
|
|
5610
|
+
generateParamConfigMetadata('versionId', true, 0 /* UrlParameter */, 0 /* String */),
|
|
5611
|
+
generateParamConfigMetadata('includingContent', false, 1 /* QueryParameter */, 1 /* Boolean */),
|
|
5612
|
+
generateParamConfigMetadata('includingVersionDetail', false, 1 /* QueryParameter */, 1 /* Boolean */),
|
|
5613
|
+
];
|
|
5614
|
+
const getPromptTemplateVersion_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$5, getPromptTemplateVersion_ConfigPropertyMetadata);
|
|
5615
|
+
const createResourceParams$5 = /*#__PURE__*/ createResourceParams$i(getPromptTemplateVersion_ConfigPropertyMetadata);
|
|
5475
5616
|
function keyBuilder$6(luvio, config) {
|
|
5476
5617
|
const resourceParams = createResourceParams$5(config);
|
|
5477
5618
|
return keyBuilder$7(luvio, resourceParams);
|
|
5478
5619
|
}
|
|
5479
5620
|
function typeCheckConfig$5(untrustedConfig) {
|
|
5480
5621
|
const config = {};
|
|
5481
|
-
typeCheckConfig$
|
|
5622
|
+
typeCheckConfig$i(untrustedConfig, config, getPromptTemplateVersion_ConfigPropertyMetadata);
|
|
5482
5623
|
return config;
|
|
5483
5624
|
}
|
|
5484
5625
|
function validateAdapterConfig$5(untrustedConfig, configPropertyNames) {
|
|
@@ -5496,7 +5637,7 @@ function validateAdapterConfig$5(untrustedConfig, configPropertyNames) {
|
|
|
5496
5637
|
}
|
|
5497
5638
|
function adapterFragment$3(luvio, config) {
|
|
5498
5639
|
createResourceParams$5(config);
|
|
5499
|
-
return select$
|
|
5640
|
+
return select$9();
|
|
5500
5641
|
}
|
|
5501
5642
|
function onFetchResponseSuccess$3(luvio, config, resourceParams, response) {
|
|
5502
5643
|
const snapshot = ingestSuccess$5(luvio, resourceParams, response, {
|
|
@@ -5527,7 +5668,7 @@ function buildNetworkSnapshot$5(luvio, config, options) {
|
|
|
5527
5668
|
});
|
|
5528
5669
|
}
|
|
5529
5670
|
function buildNetworkSnapshotCachePolicy$3(context, coercedAdapterRequestContext) {
|
|
5530
|
-
return buildNetworkSnapshotCachePolicy$
|
|
5671
|
+
return buildNetworkSnapshotCachePolicy$b(context, coercedAdapterRequestContext, buildNetworkSnapshot$5, undefined, false);
|
|
5531
5672
|
}
|
|
5532
5673
|
function buildCachedSnapshotCachePolicy$3(context, storeLookup) {
|
|
5533
5674
|
const { luvio, config } = context;
|
|
@@ -5542,8 +5683,8 @@ function buildCachedSnapshotCachePolicy$3(context, storeLookup) {
|
|
|
5542
5683
|
});
|
|
5543
5684
|
return cacheSnapshot;
|
|
5544
5685
|
}
|
|
5545
|
-
const
|
|
5546
|
-
const config = validateAdapterConfig$5(untrustedConfig,
|
|
5686
|
+
const getPromptTemplateVersionAdapterFactory = (luvio) => function EinsteinLLM__getPromptTemplateVersion(untrustedConfig, requestContext) {
|
|
5687
|
+
const config = validateAdapterConfig$5(untrustedConfig, getPromptTemplateVersion_ConfigPropertyNames);
|
|
5547
5688
|
// Invalid or incomplete config
|
|
5548
5689
|
if (config === null) {
|
|
5549
5690
|
return null;
|
|
@@ -5552,22 +5693,22 @@ const getPromptTemplateAdapterFactory = (luvio) => function EinsteinLLM__getProm
|
|
|
5552
5693
|
buildCachedSnapshotCachePolicy$3, buildNetworkSnapshotCachePolicy$3);
|
|
5553
5694
|
};
|
|
5554
5695
|
|
|
5555
|
-
function select$
|
|
5556
|
-
return select$
|
|
5696
|
+
function select$8(luvio, params) {
|
|
5697
|
+
return select$b();
|
|
5557
5698
|
}
|
|
5558
5699
|
function keyBuilder$5(luvio, params) {
|
|
5559
|
-
return keyPrefix + '::EinsteinPromptRecordRepresentation:(' + 'includingContent:' + params.queryParams.includingContent + ',' + 'includingVersionDetail:' + params.queryParams.includingVersionDetail + ',' + 'promptTemplateDevName:' + params.urlParams.promptTemplateDevName + '
|
|
5700
|
+
return keyPrefix + '::EinsteinPromptRecordRepresentation:(' + 'includingContent:' + params.queryParams.includingContent + ',' + 'includingVersionDetail:' + params.queryParams.includingVersionDetail + ',' + 'promptTemplateDevName:' + params.urlParams.promptTemplateDevName + ')';
|
|
5560
5701
|
}
|
|
5561
5702
|
function getResponseCacheKeys$4(storeKeyMap, luvio, resourceParams, response) {
|
|
5562
|
-
getTypeCacheKeys$
|
|
5703
|
+
getTypeCacheKeys$2(storeKeyMap, luvio, response, () => keyBuilder$5(luvio, resourceParams));
|
|
5563
5704
|
}
|
|
5564
5705
|
function ingestSuccess$4(luvio, resourceParams, response, snapshotRefresh) {
|
|
5565
5706
|
const { body } = response;
|
|
5566
5707
|
const key = keyBuilder$5(luvio, resourceParams);
|
|
5567
|
-
luvio.storeIngest(key, ingest$
|
|
5708
|
+
luvio.storeIngest(key, ingest$2, body);
|
|
5568
5709
|
const snapshot = luvio.storeLookup({
|
|
5569
5710
|
recordId: key,
|
|
5570
|
-
node: select$
|
|
5711
|
+
node: select$8(),
|
|
5571
5712
|
variables: {},
|
|
5572
5713
|
}, snapshotRefresh);
|
|
5573
5714
|
if (process.env.NODE_ENV !== 'production') {
|
|
@@ -5582,10 +5723,10 @@ function ingestError$2(luvio, params, error, snapshotRefresh) {
|
|
|
5582
5723
|
const key = keyBuilder$5(luvio, params);
|
|
5583
5724
|
const errorSnapshot = luvio.errorSnapshot(error, snapshotRefresh);
|
|
5584
5725
|
const storeMetadataParams = {
|
|
5585
|
-
ttl: TTL$
|
|
5726
|
+
ttl: TTL$2,
|
|
5586
5727
|
namespace: keyPrefix,
|
|
5587
|
-
version: VERSION$
|
|
5588
|
-
representationName: RepresentationType$
|
|
5728
|
+
version: VERSION$4,
|
|
5729
|
+
representationName: RepresentationType$2
|
|
5589
5730
|
};
|
|
5590
5731
|
luvio.storeIngestError(key, errorSnapshot, storeMetadataParams);
|
|
5591
5732
|
return errorSnapshot;
|
|
@@ -5594,7 +5735,7 @@ function createResourceRequest$4(config) {
|
|
|
5594
5735
|
const headers = {};
|
|
5595
5736
|
return {
|
|
5596
5737
|
baseUri: '/services/data/v65.0',
|
|
5597
|
-
basePath: '/einstein/prompt-templates/' + config.urlParams.promptTemplateDevName + '/versions
|
|
5738
|
+
basePath: '/einstein/prompt-templates/' + config.urlParams.promptTemplateDevName + '/versions',
|
|
5598
5739
|
method: 'get',
|
|
5599
5740
|
body: null,
|
|
5600
5741
|
urlParams: config.urlParams,
|
|
@@ -5604,22 +5745,21 @@ function createResourceRequest$4(config) {
|
|
|
5604
5745
|
};
|
|
5605
5746
|
}
|
|
5606
5747
|
|
|
5607
|
-
const adapterName$4 = '
|
|
5608
|
-
const
|
|
5748
|
+
const adapterName$4 = 'getPromptTemplateVersions';
|
|
5749
|
+
const getPromptTemplateVersions_ConfigPropertyMetadata = [
|
|
5609
5750
|
generateParamConfigMetadata('promptTemplateDevName', true, 0 /* UrlParameter */, 0 /* String */),
|
|
5610
|
-
generateParamConfigMetadata('versionId', true, 0 /* UrlParameter */, 0 /* String */),
|
|
5611
5751
|
generateParamConfigMetadata('includingContent', false, 1 /* QueryParameter */, 1 /* Boolean */),
|
|
5612
5752
|
generateParamConfigMetadata('includingVersionDetail', false, 1 /* QueryParameter */, 1 /* Boolean */),
|
|
5613
5753
|
];
|
|
5614
|
-
const
|
|
5615
|
-
const createResourceParams$4 = /*#__PURE__*/ createResourceParams$
|
|
5754
|
+
const getPromptTemplateVersions_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$4, getPromptTemplateVersions_ConfigPropertyMetadata);
|
|
5755
|
+
const createResourceParams$4 = /*#__PURE__*/ createResourceParams$i(getPromptTemplateVersions_ConfigPropertyMetadata);
|
|
5616
5756
|
function keyBuilder$4(luvio, config) {
|
|
5617
5757
|
const resourceParams = createResourceParams$4(config);
|
|
5618
5758
|
return keyBuilder$5(luvio, resourceParams);
|
|
5619
5759
|
}
|
|
5620
5760
|
function typeCheckConfig$4(untrustedConfig) {
|
|
5621
5761
|
const config = {};
|
|
5622
|
-
typeCheckConfig$
|
|
5762
|
+
typeCheckConfig$i(untrustedConfig, config, getPromptTemplateVersions_ConfigPropertyMetadata);
|
|
5623
5763
|
return config;
|
|
5624
5764
|
}
|
|
5625
5765
|
function validateAdapterConfig$4(untrustedConfig, configPropertyNames) {
|
|
@@ -5637,7 +5777,7 @@ function validateAdapterConfig$4(untrustedConfig, configPropertyNames) {
|
|
|
5637
5777
|
}
|
|
5638
5778
|
function adapterFragment$2(luvio, config) {
|
|
5639
5779
|
createResourceParams$4(config);
|
|
5640
|
-
return select$
|
|
5780
|
+
return select$8();
|
|
5641
5781
|
}
|
|
5642
5782
|
function onFetchResponseSuccess$2(luvio, config, resourceParams, response) {
|
|
5643
5783
|
const snapshot = ingestSuccess$4(luvio, resourceParams, response, {
|
|
@@ -5668,7 +5808,7 @@ function buildNetworkSnapshot$4(luvio, config, options) {
|
|
|
5668
5808
|
});
|
|
5669
5809
|
}
|
|
5670
5810
|
function buildNetworkSnapshotCachePolicy$2(context, coercedAdapterRequestContext) {
|
|
5671
|
-
return buildNetworkSnapshotCachePolicy$
|
|
5811
|
+
return buildNetworkSnapshotCachePolicy$b(context, coercedAdapterRequestContext, buildNetworkSnapshot$4, undefined, false);
|
|
5672
5812
|
}
|
|
5673
5813
|
function buildCachedSnapshotCachePolicy$2(context, storeLookup) {
|
|
5674
5814
|
const { luvio, config } = context;
|
|
@@ -5683,8 +5823,8 @@ function buildCachedSnapshotCachePolicy$2(context, storeLookup) {
|
|
|
5683
5823
|
});
|
|
5684
5824
|
return cacheSnapshot;
|
|
5685
5825
|
}
|
|
5686
|
-
const
|
|
5687
|
-
const config = validateAdapterConfig$4(untrustedConfig,
|
|
5826
|
+
const getPromptTemplateVersionsAdapterFactory = (luvio) => function EinsteinLLM__getPromptTemplateVersions(untrustedConfig, requestContext) {
|
|
5827
|
+
const config = validateAdapterConfig$4(untrustedConfig, getPromptTemplateVersions_ConfigPropertyNames);
|
|
5688
5828
|
// Invalid or incomplete config
|
|
5689
5829
|
if (config === null) {
|
|
5690
5830
|
return null;
|
|
@@ -5693,11 +5833,88 @@ const getPromptTemplateVersionAdapterFactory = (luvio) => function EinsteinLLM__
|
|
|
5693
5833
|
buildCachedSnapshotCachePolicy$2, buildNetworkSnapshotCachePolicy$2);
|
|
5694
5834
|
};
|
|
5695
5835
|
|
|
5696
|
-
|
|
5836
|
+
const TTL$1 = 100;
|
|
5837
|
+
const VERSION$3 = "5fd7b8a03d155ba601bcb4ee725e0893";
|
|
5838
|
+
function validate$3(obj, path = 'EinsteinPromptRecordCollectionOutputRepresentation') {
|
|
5839
|
+
const v_error = (() => {
|
|
5840
|
+
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
5841
|
+
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
5842
|
+
}
|
|
5843
|
+
const obj_hasMoreRecords = obj.hasMoreRecords;
|
|
5844
|
+
const path_hasMoreRecords = path + '.hasMoreRecords';
|
|
5845
|
+
if (typeof obj_hasMoreRecords !== 'boolean') {
|
|
5846
|
+
return new TypeError('Expected "boolean" but received "' + typeof obj_hasMoreRecords + '" (at "' + path_hasMoreRecords + '")');
|
|
5847
|
+
}
|
|
5848
|
+
if (obj.promptRecords !== undefined) {
|
|
5849
|
+
const obj_promptRecords = obj.promptRecords;
|
|
5850
|
+
const path_promptRecords = path + '.promptRecords';
|
|
5851
|
+
if (!ArrayIsArray(obj_promptRecords)) {
|
|
5852
|
+
return new TypeError('Expected "array" but received "' + typeof obj_promptRecords + '" (at "' + path_promptRecords + '")');
|
|
5853
|
+
}
|
|
5854
|
+
for (let i = 0; i < obj_promptRecords.length; i++) {
|
|
5855
|
+
const obj_promptRecords_item = obj_promptRecords[i];
|
|
5856
|
+
const path_promptRecords_item = path_promptRecords + '[' + i + ']';
|
|
5857
|
+
const referencepath_promptRecords_itemValidationError = validate$4(obj_promptRecords_item, path_promptRecords_item);
|
|
5858
|
+
if (referencepath_promptRecords_itemValidationError !== null) {
|
|
5859
|
+
let message = 'Object doesn\'t match EinsteinPromptRecordRepresentation (at "' + path_promptRecords_item + '")\n';
|
|
5860
|
+
message += referencepath_promptRecords_itemValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
5861
|
+
return new TypeError(message);
|
|
5862
|
+
}
|
|
5863
|
+
}
|
|
5864
|
+
}
|
|
5865
|
+
const obj_totalPromptRecords = obj.totalPromptRecords;
|
|
5866
|
+
const path_totalPromptRecords = path + '.totalPromptRecords';
|
|
5867
|
+
if (typeof obj_totalPromptRecords !== 'number' || (typeof obj_totalPromptRecords === 'number' && Math.floor(obj_totalPromptRecords) !== obj_totalPromptRecords)) {
|
|
5868
|
+
return new TypeError('Expected "integer" but received "' + typeof obj_totalPromptRecords + '" (at "' + path_totalPromptRecords + '")');
|
|
5869
|
+
}
|
|
5870
|
+
})();
|
|
5871
|
+
return v_error === undefined ? null : v_error;
|
|
5872
|
+
}
|
|
5873
|
+
const RepresentationType$1 = 'EinsteinPromptRecordCollectionOutputRepresentation';
|
|
5874
|
+
function normalize$1(input, existing, path, luvio, store, timestamp) {
|
|
5875
|
+
return input;
|
|
5876
|
+
}
|
|
5877
|
+
const select$7 = function EinsteinPromptRecordCollectionOutputRepresentationSelect() {
|
|
5878
|
+
return {
|
|
5879
|
+
kind: 'Fragment',
|
|
5880
|
+
version: VERSION$3,
|
|
5881
|
+
private: [],
|
|
5882
|
+
opaque: true
|
|
5883
|
+
};
|
|
5884
|
+
};
|
|
5885
|
+
function equals$3(existing, incoming) {
|
|
5886
|
+
if (JSONStringify(incoming) !== JSONStringify(existing)) {
|
|
5887
|
+
return false;
|
|
5888
|
+
}
|
|
5889
|
+
return true;
|
|
5890
|
+
}
|
|
5891
|
+
const ingest$1 = function EinsteinPromptRecordCollectionOutputRepresentationIngest(input, path, luvio, store, timestamp) {
|
|
5892
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
5893
|
+
const validateError = validate$3(input);
|
|
5894
|
+
if (validateError !== null) {
|
|
5895
|
+
throw validateError;
|
|
5896
|
+
}
|
|
5897
|
+
}
|
|
5898
|
+
const key = path.fullPath;
|
|
5899
|
+
const ttlToUse = TTL$1;
|
|
5900
|
+
ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize$1, "EinsteinLLM", VERSION$3, RepresentationType$1, equals$3);
|
|
5901
|
+
return createLink(key);
|
|
5902
|
+
};
|
|
5903
|
+
function getTypeCacheKeys$1(rootKeySet, luvio, input, fullPathFactory) {
|
|
5904
|
+
// root cache key (uses fullPathFactory if keyBuilderFromType isn't defined)
|
|
5905
|
+
const rootKey = fullPathFactory();
|
|
5906
|
+
rootKeySet.set(rootKey, {
|
|
5907
|
+
namespace: keyPrefix,
|
|
5908
|
+
representationName: RepresentationType$1,
|
|
5909
|
+
mergeable: false
|
|
5910
|
+
});
|
|
5911
|
+
}
|
|
5912
|
+
|
|
5913
|
+
function select$6(luvio, params) {
|
|
5697
5914
|
return select$7();
|
|
5698
5915
|
}
|
|
5699
5916
|
function keyBuilder$3(luvio, params) {
|
|
5700
|
-
return keyPrefix + '::
|
|
5917
|
+
return keyPrefix + '::EinsteinPromptRecordCollectionOutputRepresentation:(' + 'isActive:' + params.queryParams.isActive + ',' + 'fields:' + params.queryParams.fields + ',' + 'relatedEntity:' + params.queryParams.relatedEntity + ',' + 'offset:' + params.queryParams.offset + ',' + 'pageLimit:' + params.queryParams.pageLimit + ',' + 'type:' + params.queryParams.type + ',' + 'query:' + params.queryParams.query + ',' + 'sortBy:' + params.queryParams.sortBy + ')';
|
|
5701
5918
|
}
|
|
5702
5919
|
function getResponseCacheKeys$3(storeKeyMap, luvio, resourceParams, response) {
|
|
5703
5920
|
getTypeCacheKeys$1(storeKeyMap, luvio, response, () => keyBuilder$3(luvio, resourceParams));
|
|
@@ -5708,7 +5925,7 @@ function ingestSuccess$3(luvio, resourceParams, response, snapshotRefresh) {
|
|
|
5708
5925
|
luvio.storeIngest(key, ingest$1, body);
|
|
5709
5926
|
const snapshot = luvio.storeLookup({
|
|
5710
5927
|
recordId: key,
|
|
5711
|
-
node: select$
|
|
5928
|
+
node: select$6(),
|
|
5712
5929
|
variables: {},
|
|
5713
5930
|
}, snapshotRefresh);
|
|
5714
5931
|
if (process.env.NODE_ENV !== 'production') {
|
|
@@ -5725,7 +5942,7 @@ function ingestError$1(luvio, params, error, snapshotRefresh) {
|
|
|
5725
5942
|
const storeMetadataParams = {
|
|
5726
5943
|
ttl: TTL$1,
|
|
5727
5944
|
namespace: keyPrefix,
|
|
5728
|
-
version: VERSION$
|
|
5945
|
+
version: VERSION$3,
|
|
5729
5946
|
representationName: RepresentationType$1
|
|
5730
5947
|
};
|
|
5731
5948
|
luvio.storeIngestError(key, errorSnapshot, storeMetadataParams);
|
|
@@ -5735,31 +5952,36 @@ function createResourceRequest$3(config) {
|
|
|
5735
5952
|
const headers = {};
|
|
5736
5953
|
return {
|
|
5737
5954
|
baseUri: '/services/data/v65.0',
|
|
5738
|
-
basePath: '/einstein/prompt-templates
|
|
5955
|
+
basePath: '/einstein/prompt-templates',
|
|
5739
5956
|
method: 'get',
|
|
5740
5957
|
body: null,
|
|
5741
|
-
urlParams:
|
|
5958
|
+
urlParams: {},
|
|
5742
5959
|
queryParams: config.queryParams,
|
|
5743
5960
|
headers,
|
|
5744
5961
|
priority: 'normal',
|
|
5745
5962
|
};
|
|
5746
5963
|
}
|
|
5747
5964
|
|
|
5748
|
-
const adapterName$3 = '
|
|
5749
|
-
const
|
|
5750
|
-
generateParamConfigMetadata('
|
|
5751
|
-
generateParamConfigMetadata('
|
|
5752
|
-
generateParamConfigMetadata('
|
|
5965
|
+
const adapterName$3 = 'getPromptTemplates';
|
|
5966
|
+
const getPromptTemplates_ConfigPropertyMetadata = [
|
|
5967
|
+
generateParamConfigMetadata('isActive', false, 1 /* QueryParameter */, 1 /* Boolean */),
|
|
5968
|
+
generateParamConfigMetadata('fields', false, 1 /* QueryParameter */, 0 /* String */, true),
|
|
5969
|
+
generateParamConfigMetadata('relatedEntity', false, 1 /* QueryParameter */, 0 /* String */),
|
|
5970
|
+
generateParamConfigMetadata('offset', false, 1 /* QueryParameter */, 3 /* Integer */),
|
|
5971
|
+
generateParamConfigMetadata('pageLimit', false, 1 /* QueryParameter */, 3 /* Integer */),
|
|
5972
|
+
generateParamConfigMetadata('type', false, 1 /* QueryParameter */, 0 /* String */),
|
|
5973
|
+
generateParamConfigMetadata('query', false, 1 /* QueryParameter */, 0 /* String */),
|
|
5974
|
+
generateParamConfigMetadata('sortBy', false, 1 /* QueryParameter */, 0 /* String */),
|
|
5753
5975
|
];
|
|
5754
|
-
const
|
|
5755
|
-
const createResourceParams$3 = /*#__PURE__*/ createResourceParams$
|
|
5976
|
+
const getPromptTemplates_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$3, getPromptTemplates_ConfigPropertyMetadata);
|
|
5977
|
+
const createResourceParams$3 = /*#__PURE__*/ createResourceParams$i(getPromptTemplates_ConfigPropertyMetadata);
|
|
5756
5978
|
function keyBuilder$2(luvio, config) {
|
|
5757
5979
|
const resourceParams = createResourceParams$3(config);
|
|
5758
5980
|
return keyBuilder$3(luvio, resourceParams);
|
|
5759
5981
|
}
|
|
5760
5982
|
function typeCheckConfig$3(untrustedConfig) {
|
|
5761
5983
|
const config = {};
|
|
5762
|
-
typeCheckConfig$
|
|
5984
|
+
typeCheckConfig$i(untrustedConfig, config, getPromptTemplates_ConfigPropertyMetadata);
|
|
5763
5985
|
return config;
|
|
5764
5986
|
}
|
|
5765
5987
|
function validateAdapterConfig$3(untrustedConfig, configPropertyNames) {
|
|
@@ -5777,7 +5999,7 @@ function validateAdapterConfig$3(untrustedConfig, configPropertyNames) {
|
|
|
5777
5999
|
}
|
|
5778
6000
|
function adapterFragment$1(luvio, config) {
|
|
5779
6001
|
createResourceParams$3(config);
|
|
5780
|
-
return select$
|
|
6002
|
+
return select$6();
|
|
5781
6003
|
}
|
|
5782
6004
|
function onFetchResponseSuccess$1(luvio, config, resourceParams, response) {
|
|
5783
6005
|
const snapshot = ingestSuccess$3(luvio, resourceParams, response, {
|
|
@@ -5808,7 +6030,7 @@ function buildNetworkSnapshot$3(luvio, config, options) {
|
|
|
5808
6030
|
});
|
|
5809
6031
|
}
|
|
5810
6032
|
function buildNetworkSnapshotCachePolicy$1(context, coercedAdapterRequestContext) {
|
|
5811
|
-
return buildNetworkSnapshotCachePolicy$
|
|
6033
|
+
return buildNetworkSnapshotCachePolicy$b(context, coercedAdapterRequestContext, buildNetworkSnapshot$3, undefined, false);
|
|
5812
6034
|
}
|
|
5813
6035
|
function buildCachedSnapshotCachePolicy$1(context, storeLookup) {
|
|
5814
6036
|
const { luvio, config } = context;
|
|
@@ -5823,8 +6045,8 @@ function buildCachedSnapshotCachePolicy$1(context, storeLookup) {
|
|
|
5823
6045
|
});
|
|
5824
6046
|
return cacheSnapshot;
|
|
5825
6047
|
}
|
|
5826
|
-
const
|
|
5827
|
-
const config = validateAdapterConfig$3(untrustedConfig,
|
|
6048
|
+
const getPromptTemplatesAdapterFactory = (luvio) => function EinsteinLLM__getPromptTemplates(untrustedConfig, requestContext) {
|
|
6049
|
+
const config = validateAdapterConfig$3(untrustedConfig, getPromptTemplates_ConfigPropertyNames);
|
|
5828
6050
|
// Invalid or incomplete config
|
|
5829
6051
|
if (config === null) {
|
|
5830
6052
|
return null;
|
|
@@ -5833,62 +6055,297 @@ const getPromptTemplateVersionsAdapterFactory = (luvio) => function EinsteinLLM_
|
|
|
5833
6055
|
buildCachedSnapshotCachePolicy$1, buildNetworkSnapshotCachePolicy$1);
|
|
5834
6056
|
};
|
|
5835
6057
|
|
|
5836
|
-
const
|
|
5837
|
-
|
|
5838
|
-
function validate(obj, path = 'EinsteinPromptRecordCollectionOutputRepresentation') {
|
|
6058
|
+
const VERSION$2 = "f08355bdc491f090c787309a8a476caa";
|
|
6059
|
+
function validate$2(obj, path = 'EinsteinPromptTypeSchemaInputFieldRepresentation') {
|
|
5839
6060
|
const v_error = (() => {
|
|
5840
6061
|
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
5841
6062
|
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
5842
6063
|
}
|
|
5843
|
-
const
|
|
5844
|
-
const
|
|
5845
|
-
if (typeof
|
|
5846
|
-
return new TypeError('Expected "
|
|
6064
|
+
const obj_apiName = obj.apiName;
|
|
6065
|
+
const path_apiName = path + '.apiName';
|
|
6066
|
+
if (typeof obj_apiName !== 'string') {
|
|
6067
|
+
return new TypeError('Expected "string" but received "' + typeof obj_apiName + '" (at "' + path_apiName + '")');
|
|
5847
6068
|
}
|
|
5848
|
-
if (obj.
|
|
5849
|
-
const
|
|
5850
|
-
const
|
|
5851
|
-
if (
|
|
5852
|
-
return new TypeError('Expected "
|
|
6069
|
+
if (obj.label !== undefined) {
|
|
6070
|
+
const obj_label = obj.label;
|
|
6071
|
+
const path_label = path + '.label';
|
|
6072
|
+
if (typeof obj_label !== 'string') {
|
|
6073
|
+
return new TypeError('Expected "string" but received "' + typeof obj_label + '" (at "' + path_label + '")');
|
|
5853
6074
|
}
|
|
5854
|
-
|
|
5855
|
-
|
|
5856
|
-
|
|
5857
|
-
|
|
5858
|
-
|
|
5859
|
-
|
|
5860
|
-
message += referencepath_promptRecords_itemValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
5861
|
-
return new TypeError(message);
|
|
5862
|
-
}
|
|
6075
|
+
}
|
|
6076
|
+
if (obj.referenceName !== undefined) {
|
|
6077
|
+
const obj_referenceName = obj.referenceName;
|
|
6078
|
+
const path_referenceName = path + '.referenceName';
|
|
6079
|
+
if (typeof obj_referenceName !== 'string') {
|
|
6080
|
+
return new TypeError('Expected "string" but received "' + typeof obj_referenceName + '" (at "' + path_referenceName + '")');
|
|
5863
6081
|
}
|
|
5864
6082
|
}
|
|
5865
|
-
|
|
5866
|
-
|
|
5867
|
-
|
|
5868
|
-
|
|
6083
|
+
if (obj.typeDefinition !== undefined) {
|
|
6084
|
+
const obj_typeDefinition = obj.typeDefinition;
|
|
6085
|
+
const path_typeDefinition = path + '.typeDefinition';
|
|
6086
|
+
if (typeof obj_typeDefinition !== 'string') {
|
|
6087
|
+
return new TypeError('Expected "string" but received "' + typeof obj_typeDefinition + '" (at "' + path_typeDefinition + '")');
|
|
6088
|
+
}
|
|
6089
|
+
}
|
|
6090
|
+
})();
|
|
6091
|
+
return v_error === undefined ? null : v_error;
|
|
6092
|
+
}
|
|
6093
|
+
const select$5 = function EinsteinPromptTypeSchemaInputFieldRepresentationSelect() {
|
|
6094
|
+
return {
|
|
6095
|
+
kind: 'Fragment',
|
|
6096
|
+
version: VERSION$2,
|
|
6097
|
+
private: [],
|
|
6098
|
+
selections: [
|
|
6099
|
+
{
|
|
6100
|
+
name: 'apiName',
|
|
6101
|
+
kind: 'Scalar'
|
|
6102
|
+
},
|
|
6103
|
+
{
|
|
6104
|
+
name: 'label',
|
|
6105
|
+
kind: 'Scalar',
|
|
6106
|
+
required: false
|
|
6107
|
+
},
|
|
6108
|
+
{
|
|
6109
|
+
name: 'referenceName',
|
|
6110
|
+
kind: 'Scalar',
|
|
6111
|
+
required: false
|
|
6112
|
+
},
|
|
6113
|
+
{
|
|
6114
|
+
name: 'typeDefinition',
|
|
6115
|
+
kind: 'Scalar',
|
|
6116
|
+
required: false
|
|
6117
|
+
}
|
|
6118
|
+
]
|
|
6119
|
+
};
|
|
6120
|
+
};
|
|
6121
|
+
function equals$2(existing, incoming) {
|
|
6122
|
+
const existing_apiName = existing.apiName;
|
|
6123
|
+
const incoming_apiName = incoming.apiName;
|
|
6124
|
+
if (!(existing_apiName === incoming_apiName)) {
|
|
6125
|
+
return false;
|
|
6126
|
+
}
|
|
6127
|
+
const existing_label = existing.label;
|
|
6128
|
+
const incoming_label = incoming.label;
|
|
6129
|
+
// if at least one of these optionals is defined
|
|
6130
|
+
if (existing_label !== undefined || incoming_label !== undefined) {
|
|
6131
|
+
// if one of these is not defined we know the other is defined and therefore
|
|
6132
|
+
// not equal
|
|
6133
|
+
if (existing_label === undefined || incoming_label === undefined) {
|
|
6134
|
+
return false;
|
|
6135
|
+
}
|
|
6136
|
+
if (!(existing_label === incoming_label)) {
|
|
6137
|
+
return false;
|
|
6138
|
+
}
|
|
6139
|
+
}
|
|
6140
|
+
const existing_referenceName = existing.referenceName;
|
|
6141
|
+
const incoming_referenceName = incoming.referenceName;
|
|
6142
|
+
// if at least one of these optionals is defined
|
|
6143
|
+
if (existing_referenceName !== undefined || incoming_referenceName !== undefined) {
|
|
6144
|
+
// if one of these is not defined we know the other is defined and therefore
|
|
6145
|
+
// not equal
|
|
6146
|
+
if (existing_referenceName === undefined || incoming_referenceName === undefined) {
|
|
6147
|
+
return false;
|
|
6148
|
+
}
|
|
6149
|
+
if (!(existing_referenceName === incoming_referenceName)) {
|
|
6150
|
+
return false;
|
|
6151
|
+
}
|
|
6152
|
+
}
|
|
6153
|
+
const existing_typeDefinition = existing.typeDefinition;
|
|
6154
|
+
const incoming_typeDefinition = incoming.typeDefinition;
|
|
6155
|
+
// if at least one of these optionals is defined
|
|
6156
|
+
if (existing_typeDefinition !== undefined || incoming_typeDefinition !== undefined) {
|
|
6157
|
+
// if one of these is not defined we know the other is defined and therefore
|
|
6158
|
+
// not equal
|
|
6159
|
+
if (existing_typeDefinition === undefined || incoming_typeDefinition === undefined) {
|
|
6160
|
+
return false;
|
|
6161
|
+
}
|
|
6162
|
+
if (!(existing_typeDefinition === incoming_typeDefinition)) {
|
|
6163
|
+
return false;
|
|
6164
|
+
}
|
|
6165
|
+
}
|
|
6166
|
+
return true;
|
|
6167
|
+
}
|
|
6168
|
+
|
|
6169
|
+
const VERSION$1 = "a0cab6d022a5571ceb94328166f1db95";
|
|
6170
|
+
function validate$1(obj, path = 'EinsteinPromptTypeSchemaRepresentation') {
|
|
6171
|
+
const v_error = (() => {
|
|
6172
|
+
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
6173
|
+
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
6174
|
+
}
|
|
6175
|
+
const obj_allowInputExtension = obj.allowInputExtension;
|
|
6176
|
+
const path_allowInputExtension = path + '.allowInputExtension';
|
|
6177
|
+
if (typeof obj_allowInputExtension !== 'boolean') {
|
|
6178
|
+
return new TypeError('Expected "boolean" but received "' + typeof obj_allowInputExtension + '" (at "' + path_allowInputExtension + '")');
|
|
6179
|
+
}
|
|
6180
|
+
const obj_inputs = obj.inputs;
|
|
6181
|
+
const path_inputs = path + '.inputs';
|
|
6182
|
+
if (!ArrayIsArray(obj_inputs)) {
|
|
6183
|
+
return new TypeError('Expected "array" but received "' + typeof obj_inputs + '" (at "' + path_inputs + '")');
|
|
6184
|
+
}
|
|
6185
|
+
for (let i = 0; i < obj_inputs.length; i++) {
|
|
6186
|
+
const obj_inputs_item = obj_inputs[i];
|
|
6187
|
+
const path_inputs_item = path_inputs + '[' + i + ']';
|
|
6188
|
+
const referencepath_inputs_itemValidationError = validate$2(obj_inputs_item, path_inputs_item);
|
|
6189
|
+
if (referencepath_inputs_itemValidationError !== null) {
|
|
6190
|
+
let message = 'Object doesn\'t match EinsteinPromptTypeSchemaInputFieldRepresentation (at "' + path_inputs_item + '")\n';
|
|
6191
|
+
message += referencepath_inputs_itemValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
6192
|
+
return new TypeError(message);
|
|
6193
|
+
}
|
|
6194
|
+
}
|
|
6195
|
+
if (obj.primaryObjectId !== undefined) {
|
|
6196
|
+
const obj_primaryObjectId = obj.primaryObjectId;
|
|
6197
|
+
const path_primaryObjectId = path + '.primaryObjectId';
|
|
6198
|
+
if (typeof obj_primaryObjectId !== 'string') {
|
|
6199
|
+
return new TypeError('Expected "string" but received "' + typeof obj_primaryObjectId + '" (at "' + path_primaryObjectId + '")');
|
|
6200
|
+
}
|
|
5869
6201
|
}
|
|
5870
6202
|
})();
|
|
5871
6203
|
return v_error === undefined ? null : v_error;
|
|
5872
6204
|
}
|
|
5873
|
-
const
|
|
6205
|
+
const select$4 = function EinsteinPromptTypeSchemaRepresentationSelect() {
|
|
6206
|
+
const { selections: EinsteinPromptTypeSchemaInputFieldRepresentation__selections, opaque: EinsteinPromptTypeSchemaInputFieldRepresentation__opaque, } = select$5();
|
|
6207
|
+
return {
|
|
6208
|
+
kind: 'Fragment',
|
|
6209
|
+
version: VERSION$1,
|
|
6210
|
+
private: [],
|
|
6211
|
+
selections: [
|
|
6212
|
+
{
|
|
6213
|
+
name: 'allowInputExtension',
|
|
6214
|
+
kind: 'Scalar'
|
|
6215
|
+
},
|
|
6216
|
+
{
|
|
6217
|
+
name: 'inputs',
|
|
6218
|
+
kind: 'Object',
|
|
6219
|
+
plural: true,
|
|
6220
|
+
selections: EinsteinPromptTypeSchemaInputFieldRepresentation__selections
|
|
6221
|
+
},
|
|
6222
|
+
{
|
|
6223
|
+
name: 'primaryObjectId',
|
|
6224
|
+
kind: 'Scalar',
|
|
6225
|
+
required: false
|
|
6226
|
+
}
|
|
6227
|
+
]
|
|
6228
|
+
};
|
|
6229
|
+
};
|
|
6230
|
+
function equals$1(existing, incoming) {
|
|
6231
|
+
const existing_allowInputExtension = existing.allowInputExtension;
|
|
6232
|
+
const incoming_allowInputExtension = incoming.allowInputExtension;
|
|
6233
|
+
if (!(existing_allowInputExtension === incoming_allowInputExtension)) {
|
|
6234
|
+
return false;
|
|
6235
|
+
}
|
|
6236
|
+
const existing_primaryObjectId = existing.primaryObjectId;
|
|
6237
|
+
const incoming_primaryObjectId = incoming.primaryObjectId;
|
|
6238
|
+
// if at least one of these optionals is defined
|
|
6239
|
+
if (existing_primaryObjectId !== undefined || incoming_primaryObjectId !== undefined) {
|
|
6240
|
+
// if one of these is not defined we know the other is defined and therefore
|
|
6241
|
+
// not equal
|
|
6242
|
+
if (existing_primaryObjectId === undefined || incoming_primaryObjectId === undefined) {
|
|
6243
|
+
return false;
|
|
6244
|
+
}
|
|
6245
|
+
if (!(existing_primaryObjectId === incoming_primaryObjectId)) {
|
|
6246
|
+
return false;
|
|
6247
|
+
}
|
|
6248
|
+
}
|
|
6249
|
+
const existing_inputs = existing.inputs;
|
|
6250
|
+
const incoming_inputs = incoming.inputs;
|
|
6251
|
+
const equals_inputs_items = equalsArray(existing_inputs, incoming_inputs, (existing_inputs_item, incoming_inputs_item) => {
|
|
6252
|
+
if (!(equals$2(existing_inputs_item, incoming_inputs_item))) {
|
|
6253
|
+
return false;
|
|
6254
|
+
}
|
|
6255
|
+
});
|
|
6256
|
+
if (equals_inputs_items === false) {
|
|
6257
|
+
return false;
|
|
6258
|
+
}
|
|
6259
|
+
return true;
|
|
6260
|
+
}
|
|
6261
|
+
|
|
6262
|
+
const TTL = 300;
|
|
6263
|
+
const VERSION = "bb627c12e7041da02926d6b2affc98a1";
|
|
6264
|
+
function validate(obj, path = 'EinsteinPromptTypeRecordRepresentation') {
|
|
6265
|
+
const v_error = (() => {
|
|
6266
|
+
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
6267
|
+
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
6268
|
+
}
|
|
6269
|
+
const obj_excludedGlobalVariables = obj.excludedGlobalVariables;
|
|
6270
|
+
const path_excludedGlobalVariables = path + '.excludedGlobalVariables';
|
|
6271
|
+
if (!ArrayIsArray(obj_excludedGlobalVariables)) {
|
|
6272
|
+
return new TypeError('Expected "array" but received "' + typeof obj_excludedGlobalVariables + '" (at "' + path_excludedGlobalVariables + '")');
|
|
6273
|
+
}
|
|
6274
|
+
for (let i = 0; i < obj_excludedGlobalVariables.length; i++) {
|
|
6275
|
+
const obj_excludedGlobalVariables_item = obj_excludedGlobalVariables[i];
|
|
6276
|
+
const path_excludedGlobalVariables_item = path_excludedGlobalVariables + '[' + i + ']';
|
|
6277
|
+
if (typeof obj_excludedGlobalVariables_item !== 'string') {
|
|
6278
|
+
return new TypeError('Expected "string" but received "' + typeof obj_excludedGlobalVariables_item + '" (at "' + path_excludedGlobalVariables_item + '")');
|
|
6279
|
+
}
|
|
6280
|
+
}
|
|
6281
|
+
const obj_schema = obj.schema;
|
|
6282
|
+
const path_schema = path + '.schema';
|
|
6283
|
+
const referencepath_schemaValidationError = validate$1(obj_schema, path_schema);
|
|
6284
|
+
if (referencepath_schemaValidationError !== null) {
|
|
6285
|
+
let message = 'Object doesn\'t match EinsteinPromptTypeSchemaRepresentation (at "' + path_schema + '")\n';
|
|
6286
|
+
message += referencepath_schemaValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
6287
|
+
return new TypeError(message);
|
|
6288
|
+
}
|
|
6289
|
+
const obj_templateTypeName = obj.templateTypeName;
|
|
6290
|
+
const path_templateTypeName = path + '.templateTypeName';
|
|
6291
|
+
if (typeof obj_templateTypeName !== 'string') {
|
|
6292
|
+
return new TypeError('Expected "string" but received "' + typeof obj_templateTypeName + '" (at "' + path_templateTypeName + '")');
|
|
6293
|
+
}
|
|
6294
|
+
})();
|
|
6295
|
+
return v_error === undefined ? null : v_error;
|
|
6296
|
+
}
|
|
6297
|
+
const RepresentationType = 'EinsteinPromptTypeRecordRepresentation';
|
|
5874
6298
|
function normalize(input, existing, path, luvio, store, timestamp) {
|
|
5875
6299
|
return input;
|
|
5876
6300
|
}
|
|
5877
|
-
const select$3 = function
|
|
6301
|
+
const select$3 = function EinsteinPromptTypeRecordRepresentationSelect() {
|
|
6302
|
+
const { selections: EinsteinPromptTypeSchemaRepresentation__selections, opaque: EinsteinPromptTypeSchemaRepresentation__opaque, } = select$4();
|
|
5878
6303
|
return {
|
|
5879
6304
|
kind: 'Fragment',
|
|
5880
6305
|
version: VERSION,
|
|
5881
6306
|
private: [],
|
|
5882
|
-
|
|
6307
|
+
selections: [
|
|
6308
|
+
{
|
|
6309
|
+
name: 'excludedGlobalVariables',
|
|
6310
|
+
kind: 'Scalar',
|
|
6311
|
+
plural: true
|
|
6312
|
+
},
|
|
6313
|
+
{
|
|
6314
|
+
name: 'schema',
|
|
6315
|
+
kind: 'Object',
|
|
6316
|
+
selections: EinsteinPromptTypeSchemaRepresentation__selections
|
|
6317
|
+
},
|
|
6318
|
+
{
|
|
6319
|
+
name: 'templateTypeName',
|
|
6320
|
+
kind: 'Scalar'
|
|
6321
|
+
}
|
|
6322
|
+
]
|
|
5883
6323
|
};
|
|
5884
6324
|
};
|
|
5885
6325
|
function equals(existing, incoming) {
|
|
5886
|
-
|
|
6326
|
+
const existing_templateTypeName = existing.templateTypeName;
|
|
6327
|
+
const incoming_templateTypeName = incoming.templateTypeName;
|
|
6328
|
+
if (!(existing_templateTypeName === incoming_templateTypeName)) {
|
|
6329
|
+
return false;
|
|
6330
|
+
}
|
|
6331
|
+
const existing_excludedGlobalVariables = existing.excludedGlobalVariables;
|
|
6332
|
+
const incoming_excludedGlobalVariables = incoming.excludedGlobalVariables;
|
|
6333
|
+
const equals_excludedGlobalVariables_items = equalsArray(existing_excludedGlobalVariables, incoming_excludedGlobalVariables, (existing_excludedGlobalVariables_item, incoming_excludedGlobalVariables_item) => {
|
|
6334
|
+
if (!(existing_excludedGlobalVariables_item === incoming_excludedGlobalVariables_item)) {
|
|
6335
|
+
return false;
|
|
6336
|
+
}
|
|
6337
|
+
});
|
|
6338
|
+
if (equals_excludedGlobalVariables_items === false) {
|
|
6339
|
+
return false;
|
|
6340
|
+
}
|
|
6341
|
+
const existing_schema = existing.schema;
|
|
6342
|
+
const incoming_schema = incoming.schema;
|
|
6343
|
+
if (!(equals$1(existing_schema, incoming_schema))) {
|
|
5887
6344
|
return false;
|
|
5888
6345
|
}
|
|
5889
6346
|
return true;
|
|
5890
6347
|
}
|
|
5891
|
-
const ingest = function
|
|
6348
|
+
const ingest = function EinsteinPromptTypeRecordRepresentationIngest(input, path, luvio, store, timestamp) {
|
|
5892
6349
|
if (process.env.NODE_ENV !== 'production') {
|
|
5893
6350
|
const validateError = validate(input);
|
|
5894
6351
|
if (validateError !== null) {
|
|
@@ -5914,7 +6371,7 @@ function select$2(luvio, params) {
|
|
|
5914
6371
|
return select$3();
|
|
5915
6372
|
}
|
|
5916
6373
|
function keyBuilder$1(luvio, params) {
|
|
5917
|
-
return keyPrefix + '::
|
|
6374
|
+
return keyPrefix + '::EinsteinPromptTypeRecordRepresentation:(' + 'templateTypeName:' + params.urlParams.templateTypeName + ')';
|
|
5918
6375
|
}
|
|
5919
6376
|
function getResponseCacheKeys$2(storeKeyMap, luvio, resourceParams, response) {
|
|
5920
6377
|
getTypeCacheKeys(storeKeyMap, luvio, response, () => keyBuilder$1(luvio, resourceParams));
|
|
@@ -5952,36 +6409,29 @@ function createResourceRequest$2(config) {
|
|
|
5952
6409
|
const headers = {};
|
|
5953
6410
|
return {
|
|
5954
6411
|
baseUri: '/services/data/v65.0',
|
|
5955
|
-
basePath: '/einstein/prompt-
|
|
6412
|
+
basePath: '/einstein/prompt-template-types/' + config.urlParams.templateTypeName + '',
|
|
5956
6413
|
method: 'get',
|
|
5957
6414
|
body: null,
|
|
5958
|
-
urlParams:
|
|
5959
|
-
queryParams:
|
|
6415
|
+
urlParams: config.urlParams,
|
|
6416
|
+
queryParams: {},
|
|
5960
6417
|
headers,
|
|
5961
6418
|
priority: 'normal',
|
|
5962
6419
|
};
|
|
5963
6420
|
}
|
|
5964
6421
|
|
|
5965
|
-
const adapterName$2 = '
|
|
5966
|
-
const
|
|
5967
|
-
generateParamConfigMetadata('
|
|
5968
|
-
generateParamConfigMetadata('fields', false, 1 /* QueryParameter */, 0 /* String */, true),
|
|
5969
|
-
generateParamConfigMetadata('relatedEntity', false, 1 /* QueryParameter */, 0 /* String */),
|
|
5970
|
-
generateParamConfigMetadata('offset', false, 1 /* QueryParameter */, 3 /* Integer */),
|
|
5971
|
-
generateParamConfigMetadata('pageLimit', false, 1 /* QueryParameter */, 3 /* Integer */),
|
|
5972
|
-
generateParamConfigMetadata('type', false, 1 /* QueryParameter */, 0 /* String */),
|
|
5973
|
-
generateParamConfigMetadata('query', false, 1 /* QueryParameter */, 0 /* String */),
|
|
5974
|
-
generateParamConfigMetadata('sortBy', false, 1 /* QueryParameter */, 0 /* String */),
|
|
6422
|
+
const adapterName$2 = 'getTemplateType';
|
|
6423
|
+
const getTemplateType_ConfigPropertyMetadata = [
|
|
6424
|
+
generateParamConfigMetadata('templateTypeName', true, 0 /* UrlParameter */, 0 /* String */),
|
|
5975
6425
|
];
|
|
5976
|
-
const
|
|
5977
|
-
const createResourceParams$2 = /*#__PURE__*/ createResourceParams$
|
|
6426
|
+
const getTemplateType_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$2, getTemplateType_ConfigPropertyMetadata);
|
|
6427
|
+
const createResourceParams$2 = /*#__PURE__*/ createResourceParams$i(getTemplateType_ConfigPropertyMetadata);
|
|
5978
6428
|
function keyBuilder(luvio, config) {
|
|
5979
6429
|
const resourceParams = createResourceParams$2(config);
|
|
5980
6430
|
return keyBuilder$1(luvio, resourceParams);
|
|
5981
6431
|
}
|
|
5982
6432
|
function typeCheckConfig$2(untrustedConfig) {
|
|
5983
6433
|
const config = {};
|
|
5984
|
-
typeCheckConfig$
|
|
6434
|
+
typeCheckConfig$i(untrustedConfig, config, getTemplateType_ConfigPropertyMetadata);
|
|
5985
6435
|
return config;
|
|
5986
6436
|
}
|
|
5987
6437
|
function validateAdapterConfig$2(untrustedConfig, configPropertyNames) {
|
|
@@ -6030,7 +6480,7 @@ function buildNetworkSnapshot$2(luvio, config, options) {
|
|
|
6030
6480
|
});
|
|
6031
6481
|
}
|
|
6032
6482
|
function buildNetworkSnapshotCachePolicy(context, coercedAdapterRequestContext) {
|
|
6033
|
-
return buildNetworkSnapshotCachePolicy$
|
|
6483
|
+
return buildNetworkSnapshotCachePolicy$b(context, coercedAdapterRequestContext, buildNetworkSnapshot$2, undefined, false);
|
|
6034
6484
|
}
|
|
6035
6485
|
function buildCachedSnapshotCachePolicy(context, storeLookup) {
|
|
6036
6486
|
const { luvio, config } = context;
|
|
@@ -6045,8 +6495,8 @@ function buildCachedSnapshotCachePolicy(context, storeLookup) {
|
|
|
6045
6495
|
});
|
|
6046
6496
|
return cacheSnapshot;
|
|
6047
6497
|
}
|
|
6048
|
-
const
|
|
6049
|
-
const config = validateAdapterConfig$2(untrustedConfig,
|
|
6498
|
+
const getTemplateTypeAdapterFactory = (luvio) => function EinsteinLLM__getTemplateType(untrustedConfig, requestContext) {
|
|
6499
|
+
const config = validateAdapterConfig$2(untrustedConfig, getTemplateType_ConfigPropertyNames);
|
|
6050
6500
|
// Invalid or incomplete config
|
|
6051
6501
|
if (config === null) {
|
|
6052
6502
|
return null;
|
|
@@ -6056,15 +6506,15 @@ const getPromptTemplatesAdapterFactory = (luvio) => function EinsteinLLM__getPro
|
|
|
6056
6506
|
};
|
|
6057
6507
|
|
|
6058
6508
|
function select$1(luvio, params) {
|
|
6059
|
-
return select$
|
|
6509
|
+
return select$p();
|
|
6060
6510
|
}
|
|
6061
6511
|
function getResponseCacheKeys$1(storeKeyMap, luvio, resourceParams, response) {
|
|
6062
|
-
getTypeCacheKeys$
|
|
6512
|
+
getTypeCacheKeys$7(storeKeyMap, luvio, response);
|
|
6063
6513
|
}
|
|
6064
6514
|
function ingestSuccess$1(luvio, resourceParams, response) {
|
|
6065
6515
|
const { body } = response;
|
|
6066
6516
|
const key = keyBuilderFromType(luvio, body);
|
|
6067
|
-
luvio.storeIngest(key, ingest$
|
|
6517
|
+
luvio.storeIngest(key, ingest$7, body);
|
|
6068
6518
|
const snapshot = luvio.storeLookup({
|
|
6069
6519
|
recordId: key,
|
|
6070
6520
|
node: select$1(),
|
|
@@ -6100,10 +6550,10 @@ const putEinsteinPromptTemplateVersionStatus_ConfigPropertyMetadata = [
|
|
|
6100
6550
|
generateParamConfigMetadata('ignoreWarnings', false, 1 /* QueryParameter */, 1 /* Boolean */),
|
|
6101
6551
|
];
|
|
6102
6552
|
const putEinsteinPromptTemplateVersionStatus_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$1, putEinsteinPromptTemplateVersionStatus_ConfigPropertyMetadata);
|
|
6103
|
-
const createResourceParams$1 = /*#__PURE__*/ createResourceParams$
|
|
6553
|
+
const createResourceParams$1 = /*#__PURE__*/ createResourceParams$i(putEinsteinPromptTemplateVersionStatus_ConfigPropertyMetadata);
|
|
6104
6554
|
function typeCheckConfig$1(untrustedConfig) {
|
|
6105
6555
|
const config = {};
|
|
6106
|
-
typeCheckConfig$
|
|
6556
|
+
typeCheckConfig$i(untrustedConfig, config, putEinsteinPromptTemplateVersionStatus_ConfigPropertyMetadata);
|
|
6107
6557
|
return config;
|
|
6108
6558
|
}
|
|
6109
6559
|
function validateAdapterConfig$1(untrustedConfig, configPropertyNames) {
|
|
@@ -6149,15 +6599,15 @@ const putEinsteinPromptTemplateVersionStatusAdapterFactory = (luvio) => {
|
|
|
6149
6599
|
};
|
|
6150
6600
|
|
|
6151
6601
|
function select(luvio, params) {
|
|
6152
|
-
return select$
|
|
6602
|
+
return select$p();
|
|
6153
6603
|
}
|
|
6154
6604
|
function getResponseCacheKeys(storeKeyMap, luvio, resourceParams, response) {
|
|
6155
|
-
getTypeCacheKeys$
|
|
6605
|
+
getTypeCacheKeys$7(storeKeyMap, luvio, response);
|
|
6156
6606
|
}
|
|
6157
6607
|
function ingestSuccess(luvio, resourceParams, response) {
|
|
6158
6608
|
const { body } = response;
|
|
6159
6609
|
const key = keyBuilderFromType(luvio, body);
|
|
6160
|
-
luvio.storeIngest(key, ingest$
|
|
6610
|
+
luvio.storeIngest(key, ingest$7, body);
|
|
6161
6611
|
const snapshot = luvio.storeLookup({
|
|
6162
6612
|
recordId: key,
|
|
6163
6613
|
node: select(),
|
|
@@ -6195,10 +6645,10 @@ const updatePromptTemplateVersion_ConfigPropertyMetadata = [
|
|
|
6195
6645
|
generateParamConfigMetadata('id', false, 2 /* Body */, 0 /* String */),
|
|
6196
6646
|
];
|
|
6197
6647
|
const updatePromptTemplateVersion_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName, updatePromptTemplateVersion_ConfigPropertyMetadata);
|
|
6198
|
-
const createResourceParams = /*#__PURE__*/ createResourceParams$
|
|
6648
|
+
const createResourceParams = /*#__PURE__*/ createResourceParams$i(updatePromptTemplateVersion_ConfigPropertyMetadata);
|
|
6199
6649
|
function typeCheckConfig(untrustedConfig) {
|
|
6200
6650
|
const config = {};
|
|
6201
|
-
typeCheckConfig$
|
|
6651
|
+
typeCheckConfig$i(untrustedConfig, config, updatePromptTemplateVersion_ConfigPropertyMetadata);
|
|
6202
6652
|
const untrustedConfig_childRelationships = untrustedConfig.childRelationships;
|
|
6203
6653
|
if (untrustedIsObject(untrustedConfig_childRelationships)) {
|
|
6204
6654
|
const untrustedConfig_childRelationships_object = {};
|
|
@@ -6288,6 +6738,7 @@ let getPromptTemplate;
|
|
|
6288
6738
|
let getPromptTemplateVersion;
|
|
6289
6739
|
let getPromptTemplateVersions;
|
|
6290
6740
|
let getPromptTemplates;
|
|
6741
|
+
let getTemplateType;
|
|
6291
6742
|
let putEinsteinPromptTemplateVersionStatus;
|
|
6292
6743
|
let updatePromptTemplateVersion;
|
|
6293
6744
|
// Imperative GET Adapters
|
|
@@ -6301,6 +6752,7 @@ let getPromptTemplate_imperative;
|
|
|
6301
6752
|
let getPromptTemplateVersion_imperative;
|
|
6302
6753
|
let getPromptTemplateVersions_imperative;
|
|
6303
6754
|
let getPromptTemplates_imperative;
|
|
6755
|
+
let getTemplateType_imperative;
|
|
6304
6756
|
// Adapter Metadata
|
|
6305
6757
|
const createEmbeddingsMetadata = { apiFamily: 'EinsteinLLM', name: 'createEmbeddings', ttl: 100 };
|
|
6306
6758
|
const getDataProviderInstanceConfigMetadata = {
|
|
@@ -6340,6 +6792,7 @@ const getPromptTemplatesMetadata = {
|
|
|
6340
6792
|
name: 'getPromptTemplates',
|
|
6341
6793
|
ttl: 100,
|
|
6342
6794
|
};
|
|
6795
|
+
const getTemplateTypeMetadata = { apiFamily: 'EinsteinLLM', name: 'getTemplateType', ttl: 300 };
|
|
6343
6796
|
// Notify Update Available
|
|
6344
6797
|
function bindExportsTo(luvio) {
|
|
6345
6798
|
// LDS Adapters
|
|
@@ -6353,6 +6806,7 @@ function bindExportsTo(luvio) {
|
|
|
6353
6806
|
const getPromptTemplateVersion_ldsAdapter = createInstrumentedAdapter(createLDSAdapter(luvio, 'getPromptTemplateVersion', getPromptTemplateVersionAdapterFactory), getPromptTemplateVersionMetadata);
|
|
6354
6807
|
const getPromptTemplateVersions_ldsAdapter = createInstrumentedAdapter(createLDSAdapter(luvio, 'getPromptTemplateVersions', getPromptTemplateVersionsAdapterFactory), getPromptTemplateVersionsMetadata);
|
|
6355
6808
|
const getPromptTemplates_ldsAdapter = createInstrumentedAdapter(createLDSAdapter(luvio, 'getPromptTemplates', getPromptTemplatesAdapterFactory), getPromptTemplatesMetadata);
|
|
6809
|
+
const getTemplateType_ldsAdapter = createInstrumentedAdapter(createLDSAdapter(luvio, 'getTemplateType', getTemplateTypeAdapterFactory), getTemplateTypeMetadata);
|
|
6356
6810
|
function unwrapSnapshotData(factory) {
|
|
6357
6811
|
const adapter = factory(luvio);
|
|
6358
6812
|
return (config) => adapter(config).then((snapshot) => snapshot.data);
|
|
@@ -6373,6 +6827,7 @@ function bindExportsTo(luvio) {
|
|
|
6373
6827
|
getPromptTemplateVersion: createWireAdapterConstructor(luvio, getPromptTemplateVersion_ldsAdapter, getPromptTemplateVersionMetadata),
|
|
6374
6828
|
getPromptTemplateVersions: createWireAdapterConstructor(luvio, getPromptTemplateVersions_ldsAdapter, getPromptTemplateVersionsMetadata),
|
|
6375
6829
|
getPromptTemplates: createWireAdapterConstructor(luvio, getPromptTemplates_ldsAdapter, getPromptTemplatesMetadata),
|
|
6830
|
+
getTemplateType: createWireAdapterConstructor(luvio, getTemplateType_ldsAdapter, getTemplateTypeMetadata),
|
|
6376
6831
|
putEinsteinPromptTemplateVersionStatus: unwrapSnapshotData(putEinsteinPromptTemplateVersionStatusAdapterFactory),
|
|
6377
6832
|
updatePromptTemplateVersion: unwrapSnapshotData(updatePromptTemplateVersionAdapterFactory),
|
|
6378
6833
|
// Imperative GET Adapters
|
|
@@ -6386,6 +6841,7 @@ function bindExportsTo(luvio) {
|
|
|
6386
6841
|
getPromptTemplateVersion_imperative: createImperativeAdapter(luvio, getPromptTemplateVersion_ldsAdapter, getPromptTemplateVersionMetadata),
|
|
6387
6842
|
getPromptTemplateVersions_imperative: createImperativeAdapter(luvio, getPromptTemplateVersions_ldsAdapter, getPromptTemplateVersionsMetadata),
|
|
6388
6843
|
getPromptTemplates_imperative: createImperativeAdapter(luvio, getPromptTemplates_ldsAdapter, getPromptTemplatesMetadata),
|
|
6844
|
+
getTemplateType_imperative: createImperativeAdapter(luvio, getTemplateType_ldsAdapter, getTemplateTypeMetadata),
|
|
6389
6845
|
// Notify Update Availables
|
|
6390
6846
|
};
|
|
6391
6847
|
}
|
|
@@ -6406,6 +6862,7 @@ withDefaultLuvio((luvio) => {
|
|
|
6406
6862
|
getPromptTemplateVersion,
|
|
6407
6863
|
getPromptTemplateVersions,
|
|
6408
6864
|
getPromptTemplates,
|
|
6865
|
+
getTemplateType,
|
|
6409
6866
|
putEinsteinPromptTemplateVersionStatus,
|
|
6410
6867
|
updatePromptTemplateVersion,
|
|
6411
6868
|
createEmbeddings_imperative,
|
|
@@ -6418,8 +6875,9 @@ withDefaultLuvio((luvio) => {
|
|
|
6418
6875
|
getPromptTemplateVersion_imperative,
|
|
6419
6876
|
getPromptTemplateVersions_imperative,
|
|
6420
6877
|
getPromptTemplates_imperative,
|
|
6878
|
+
getTemplateType_imperative,
|
|
6421
6879
|
} = bindExportsTo(luvio));
|
|
6422
6880
|
});
|
|
6423
6881
|
|
|
6424
|
-
export { createEmbeddings, createEmbeddings_imperative, createFeedback, createGenerations, createGenerationsForPromptTemplate, createPromptTemplate, createPromptTemplateVersion, getDataProviderInstanceConfig, getDataProviderInstanceConfig_imperative, getDataProviderTypeConfigs, getDataProviderTypeConfigs_imperative, getDataProviders, getDataProviders_imperative, getInputMappedDataProviders, getInputMappedDataProviders_imperative, getOutputLanguages, getOutputLanguages_imperative, getPromptTemplate, getPromptTemplateVersion, getPromptTemplateVersion_imperative, getPromptTemplateVersions, getPromptTemplateVersions_imperative, getPromptTemplate_imperative, getPromptTemplates, getPromptTemplates_imperative, putEinsteinPromptTemplateVersionStatus, updatePromptTemplateVersion };
|
|
6425
|
-
// version: 1.380.0-
|
|
6882
|
+
export { createEmbeddings, createEmbeddings_imperative, createFeedback, createGenerations, createGenerationsForPromptTemplate, createPromptTemplate, createPromptTemplateVersion, getDataProviderInstanceConfig, getDataProviderInstanceConfig_imperative, getDataProviderTypeConfigs, getDataProviderTypeConfigs_imperative, getDataProviders, getDataProviders_imperative, getInputMappedDataProviders, getInputMappedDataProviders_imperative, getOutputLanguages, getOutputLanguages_imperative, getPromptTemplate, getPromptTemplateVersion, getPromptTemplateVersion_imperative, getPromptTemplateVersions, getPromptTemplateVersions_imperative, getPromptTemplate_imperative, getPromptTemplates, getPromptTemplates_imperative, getTemplateType, getTemplateType_imperative, putEinsteinPromptTemplateVersionStatus, updatePromptTemplateVersion };
|
|
6883
|
+
// version: 1.380.0-dev18-ccce6b904c
|