@salesforce/lds-adapters-service-einsteinllm 1.399.0 → 1.401.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/es/es2018/service-einsteinllm.js +1770 -1028
- package/dist/es/es2018/types/src/generated/adapters/createPromptTemplate.d.ts +2 -3
- package/dist/es/es2018/types/src/generated/adapters/createPromptTemplateVersion.d.ts +2 -3
- package/dist/es/es2018/types/src/generated/adapters/getPromptTemplateVersion.d.ts +30 -0
- package/dist/es/es2018/types/src/generated/adapters/getPromptTemplateVersions.d.ts +29 -0
- package/dist/es/es2018/types/src/generated/adapters/getTemplateType.d.ts +27 -0
- package/dist/es/es2018/types/src/generated/adapters/updatePromptTemplateVersion.d.ts +2 -3
- package/dist/es/es2018/types/src/generated/artifacts/main.d.ts +3 -0
- package/dist/es/es2018/types/src/generated/artifacts/sfdc.d.ts +7 -1
- package/dist/es/es2018/types/src/generated/resources/getEinsteinPromptTemplateTypesByTemplateTypeName.d.ts +15 -0
- package/dist/es/es2018/types/src/generated/resources/getEinsteinPromptTemplatesVersionsByPromptTemplateDevName.d.ts +19 -0
- package/dist/es/es2018/types/src/generated/resources/getEinsteinPromptTemplatesVersionsByPromptTemplateDevNameAndVersionId.d.ts +20 -0
- package/dist/es/es2018/types/src/generated/resources/postEinsteinPromptTemplates.d.ts +2 -3
- package/dist/es/es2018/types/src/generated/resources/postEinsteinPromptTemplatesVersionsByPromptTemplateDevName.d.ts +2 -3
- package/dist/es/es2018/types/src/generated/resources/putEinsteinPromptTemplatesVersionsByPromptTemplateDevNameAndVersionId.d.ts +2 -3
- package/dist/es/es2018/types/src/generated/types/EinsteinPromptRecordInputRepresentation.d.ts +5 -8
- package/dist/es/es2018/types/src/generated/types/EinsteinPromptTemplateGenerationsRepresentation.d.ts +4 -1
- 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 +1648 -874
- package/src/raml/api.raml +103 -9
- package/src/raml/luvio.raml +13 -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$E = 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$D = 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$e(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/v66.0',
|
|
@@ -495,97 +495,97 @@ function createResourceRequest$e(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$B = 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$d(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/v66.0',
|
|
@@ -740,45 +740,45 @@ function createResourceRequest$d(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$d(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$z = 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$y = 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$x = 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$w = 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$v = 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$c(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/v66.0',
|
|
@@ -1792,45 +1792,45 @@ function createResourceRequest$c(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$c(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$t = 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$s = 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$r = 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$q = 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$p = 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$o = 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$n = 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$m = 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');
|
|
@@ -2806,6 +2806,32 @@ function validate$d(obj, path = 'EinsteinPromptTemplateGenerationsRepresentation
|
|
|
2806
2806
|
if (typeof obj_promptTemplateDevName !== 'string') {
|
|
2807
2807
|
return new TypeError('Expected "string" but received "' + typeof obj_promptTemplateDevName + '" (at "' + path_promptTemplateDevName + '")');
|
|
2808
2808
|
}
|
|
2809
|
+
const obj_rawPrompt = obj.rawPrompt;
|
|
2810
|
+
const path_rawPrompt = path + '.rawPrompt';
|
|
2811
|
+
let obj_rawPrompt_union0 = null;
|
|
2812
|
+
const obj_rawPrompt_union0_error = (() => {
|
|
2813
|
+
if (typeof obj_rawPrompt !== 'string') {
|
|
2814
|
+
return new TypeError('Expected "string" but received "' + typeof obj_rawPrompt + '" (at "' + path_rawPrompt + '")');
|
|
2815
|
+
}
|
|
2816
|
+
})();
|
|
2817
|
+
if (obj_rawPrompt_union0_error != null) {
|
|
2818
|
+
obj_rawPrompt_union0 = obj_rawPrompt_union0_error.message;
|
|
2819
|
+
}
|
|
2820
|
+
let obj_rawPrompt_union1 = null;
|
|
2821
|
+
const obj_rawPrompt_union1_error = (() => {
|
|
2822
|
+
if (obj_rawPrompt !== null) {
|
|
2823
|
+
return new TypeError('Expected "null" but received "' + typeof obj_rawPrompt + '" (at "' + path_rawPrompt + '")');
|
|
2824
|
+
}
|
|
2825
|
+
})();
|
|
2826
|
+
if (obj_rawPrompt_union1_error != null) {
|
|
2827
|
+
obj_rawPrompt_union1 = obj_rawPrompt_union1_error.message;
|
|
2828
|
+
}
|
|
2829
|
+
if (obj_rawPrompt_union0 && obj_rawPrompt_union1) {
|
|
2830
|
+
let message = 'Object doesn\'t match union (at "' + path_rawPrompt + '")';
|
|
2831
|
+
message += '\n' + obj_rawPrompt_union0.split('\n').map((line) => '\t' + line).join('\n');
|
|
2832
|
+
message += '\n' + obj_rawPrompt_union1.split('\n').map((line) => '\t' + line).join('\n');
|
|
2833
|
+
return new TypeError(message);
|
|
2834
|
+
}
|
|
2809
2835
|
const obj_requestId = obj.requestId;
|
|
2810
2836
|
const path_requestId = path + '.requestId';
|
|
2811
2837
|
if (typeof obj_requestId !== 'string') {
|
|
@@ -2820,7 +2846,7 @@ function validate$d(obj, path = 'EinsteinPromptTemplateGenerationsRepresentation
|
|
|
2820
2846
|
for (let i = 0; i < obj_requestMessages.length; i++) {
|
|
2821
2847
|
const obj_requestMessages_item = obj_requestMessages[i];
|
|
2822
2848
|
const path_requestMessages_item = path_requestMessages + '[' + i + ']';
|
|
2823
|
-
const referencepath_requestMessages_itemValidationError = validate$
|
|
2849
|
+
const referencepath_requestMessages_itemValidationError = validate$i(obj_requestMessages_item, path_requestMessages_item);
|
|
2824
2850
|
if (referencepath_requestMessages_itemValidationError !== null) {
|
|
2825
2851
|
let message = 'Object doesn\'t match EinsteinPromptTemplateMaskContentRepresentation (at "' + path_requestMessages_item + '")\n';
|
|
2826
2852
|
message += referencepath_requestMessages_itemValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
@@ -2837,7 +2863,7 @@ function validate$d(obj, path = 'EinsteinPromptTemplateGenerationsRepresentation
|
|
|
2837
2863
|
for (let i = 0; i < obj_responseMessages.length; i++) {
|
|
2838
2864
|
const obj_responseMessages_item = obj_responseMessages[i];
|
|
2839
2865
|
const path_responseMessages_item = path_responseMessages + '[' + i + ']';
|
|
2840
|
-
const referencepath_responseMessages_itemValidationError = validate$
|
|
2866
|
+
const referencepath_responseMessages_itemValidationError = validate$i(obj_responseMessages_item, path_responseMessages_item);
|
|
2841
2867
|
if (referencepath_responseMessages_itemValidationError !== null) {
|
|
2842
2868
|
let message = 'Object doesn\'t match EinsteinPromptTemplateMaskContentRepresentation (at "' + path_responseMessages_item + '")\n';
|
|
2843
2869
|
message += referencepath_responseMessages_itemValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
@@ -2854,7 +2880,7 @@ function validate$d(obj, path = 'EinsteinPromptTemplateGenerationsRepresentation
|
|
|
2854
2880
|
for (let i = 0; i < obj_slotsMaskingInformation.length; i++) {
|
|
2855
2881
|
const obj_slotsMaskingInformation_item = obj_slotsMaskingInformation[i];
|
|
2856
2882
|
const path_slotsMaskingInformation_item = path_slotsMaskingInformation + '[' + i + ']';
|
|
2857
|
-
const referencepath_slotsMaskingInformation_itemValidationError = validate$
|
|
2883
|
+
const referencepath_slotsMaskingInformation_itemValidationError = validate$h(obj_slotsMaskingInformation_item, path_slotsMaskingInformation_item);
|
|
2858
2884
|
if (referencepath_slotsMaskingInformation_itemValidationError !== null) {
|
|
2859
2885
|
let message = 'Object doesn\'t match EinsteinPromptTemplateMaskDataRepresentation (at "' + path_slotsMaskingInformation_item + '")\n';
|
|
2860
2886
|
message += referencepath_slotsMaskingInformation_itemValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
@@ -2865,30 +2891,30 @@ function validate$d(obj, path = 'EinsteinPromptTemplateGenerationsRepresentation
|
|
|
2865
2891
|
})();
|
|
2866
2892
|
return v_error === undefined ? null : v_error;
|
|
2867
2893
|
}
|
|
2868
|
-
const RepresentationType$
|
|
2869
|
-
function keyBuilder$
|
|
2870
|
-
return keyPrefix + '::' + RepresentationType$
|
|
2894
|
+
const RepresentationType$8 = 'EinsteinPromptTemplateGenerationsRepresentation';
|
|
2895
|
+
function keyBuilder$l(luvio, config) {
|
|
2896
|
+
return keyPrefix + '::' + RepresentationType$8 + ':' + config.requestId;
|
|
2871
2897
|
}
|
|
2872
2898
|
function keyBuilderFromType$1(luvio, object) {
|
|
2873
2899
|
const keyParams = {
|
|
2874
2900
|
requestId: object.requestId
|
|
2875
2901
|
};
|
|
2876
|
-
return keyBuilder$
|
|
2902
|
+
return keyBuilder$l(luvio, keyParams);
|
|
2877
2903
|
}
|
|
2878
|
-
function normalize$
|
|
2904
|
+
function normalize$8(input, existing, path, luvio, store, timestamp) {
|
|
2879
2905
|
return input;
|
|
2880
2906
|
}
|
|
2881
|
-
const select$
|
|
2882
|
-
const { selections: EinsteinLlmGenerationCitationRepresentation__selections, opaque: EinsteinLlmGenerationCitationRepresentation__opaque, } = select$
|
|
2883
|
-
const { selections: EinsteinPromptTemplateAttachmentRepresentation__selections, opaque: EinsteinPromptTemplateAttachmentRepresentation__opaque, } = select$
|
|
2884
|
-
const { selections: EinsteinPromptTemplateGenerationsErrorRepresentation__selections, opaque: EinsteinPromptTemplateGenerationsErrorRepresentation__opaque, } = select$
|
|
2885
|
-
const { selections: EinsteinLlmGenerationItemRepresentation__selections, opaque: EinsteinLlmGenerationItemRepresentation__opaque, } = select$
|
|
2886
|
-
const { selections: WrappedMap__selections, opaque: WrappedMap__opaque, } = select$
|
|
2887
|
-
const { selections: EinsteinPromptTemplateMaskContentRepresentation__selections, opaque: EinsteinPromptTemplateMaskContentRepresentation__opaque, } = select$
|
|
2888
|
-
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();
|
|
2889
2915
|
return {
|
|
2890
2916
|
kind: 'Fragment',
|
|
2891
|
-
version: VERSION$
|
|
2917
|
+
version: VERSION$c,
|
|
2892
2918
|
private: [],
|
|
2893
2919
|
selections: [
|
|
2894
2920
|
{
|
|
@@ -2936,6 +2962,10 @@ const select$l = function EinsteinPromptTemplateGenerationsRepresentationSelect(
|
|
|
2936
2962
|
name: 'promptTemplateDevName',
|
|
2937
2963
|
kind: 'Scalar'
|
|
2938
2964
|
},
|
|
2965
|
+
{
|
|
2966
|
+
name: 'rawPrompt',
|
|
2967
|
+
kind: 'Scalar'
|
|
2968
|
+
},
|
|
2939
2969
|
{
|
|
2940
2970
|
name: 'requestId',
|
|
2941
2971
|
kind: 'Scalar'
|
|
@@ -2964,7 +2994,7 @@ const select$l = function EinsteinPromptTemplateGenerationsRepresentationSelect(
|
|
|
2964
2994
|
]
|
|
2965
2995
|
};
|
|
2966
2996
|
};
|
|
2967
|
-
function equals$
|
|
2997
|
+
function equals$c(existing, incoming) {
|
|
2968
2998
|
const existing_promptTemplateDevName = existing.promptTemplateDevName;
|
|
2969
2999
|
const incoming_promptTemplateDevName = incoming.promptTemplateDevName;
|
|
2970
3000
|
if (!(existing_promptTemplateDevName === incoming_promptTemplateDevName)) {
|
|
@@ -2984,7 +3014,7 @@ function equals$9(existing, incoming) {
|
|
|
2984
3014
|
if (existing_citations === undefined || incoming_citations === undefined) {
|
|
2985
3015
|
return false;
|
|
2986
3016
|
}
|
|
2987
|
-
if (!(equals$
|
|
3017
|
+
if (!(equals$j(existing_citations, incoming_citations))) {
|
|
2988
3018
|
return false;
|
|
2989
3019
|
}
|
|
2990
3020
|
}
|
|
@@ -2998,7 +3028,7 @@ function equals$9(existing, incoming) {
|
|
|
2998
3028
|
return false;
|
|
2999
3029
|
}
|
|
3000
3030
|
const equals_fileData_items = equalsArray(existing_fileData, incoming_fileData, (existing_fileData_item, incoming_fileData_item) => {
|
|
3001
|
-
if (!(equals$
|
|
3031
|
+
if (!(equals$h(existing_fileData_item, incoming_fileData_item))) {
|
|
3002
3032
|
return false;
|
|
3003
3033
|
}
|
|
3004
3034
|
});
|
|
@@ -3016,7 +3046,7 @@ function equals$9(existing, incoming) {
|
|
|
3016
3046
|
return false;
|
|
3017
3047
|
}
|
|
3018
3048
|
const equals_generationErrors_items = equalsArray(existing_generationErrors, incoming_generationErrors, (existing_generationErrors_item, incoming_generationErrors_item) => {
|
|
3019
|
-
if (!(equals$
|
|
3049
|
+
if (!(equals$g(existing_generationErrors_item, incoming_generationErrors_item))) {
|
|
3020
3050
|
return false;
|
|
3021
3051
|
}
|
|
3022
3052
|
});
|
|
@@ -3027,7 +3057,7 @@ function equals$9(existing, incoming) {
|
|
|
3027
3057
|
const existing_generations = existing.generations;
|
|
3028
3058
|
const incoming_generations = incoming.generations;
|
|
3029
3059
|
const equals_generations_items = equalsArray(existing_generations, incoming_generations, (existing_generations_item, incoming_generations_item) => {
|
|
3030
|
-
if (!(equals$
|
|
3060
|
+
if (!(equals$n(existing_generations_item, incoming_generations_item))) {
|
|
3031
3061
|
return false;
|
|
3032
3062
|
}
|
|
3033
3063
|
});
|
|
@@ -3057,7 +3087,7 @@ function equals$9(existing, incoming) {
|
|
|
3057
3087
|
if (!(existing_parameters === incoming_parameters
|
|
3058
3088
|
|| (existing_parameters != null &&
|
|
3059
3089
|
incoming_parameters != null &&
|
|
3060
|
-
equals$
|
|
3090
|
+
equals$m(existing_parameters, incoming_parameters)))) {
|
|
3061
3091
|
return false;
|
|
3062
3092
|
}
|
|
3063
3093
|
const existing_prompt = existing.prompt;
|
|
@@ -3065,6 +3095,11 @@ function equals$9(existing, incoming) {
|
|
|
3065
3095
|
if (!(existing_prompt === incoming_prompt)) {
|
|
3066
3096
|
return false;
|
|
3067
3097
|
}
|
|
3098
|
+
const existing_rawPrompt = existing.rawPrompt;
|
|
3099
|
+
const incoming_rawPrompt = incoming.rawPrompt;
|
|
3100
|
+
if (!(existing_rawPrompt === incoming_rawPrompt)) {
|
|
3101
|
+
return false;
|
|
3102
|
+
}
|
|
3068
3103
|
const existing_requestMessages = existing.requestMessages;
|
|
3069
3104
|
const incoming_requestMessages = incoming.requestMessages;
|
|
3070
3105
|
// if at least one of these optionals is defined
|
|
@@ -3075,7 +3110,7 @@ function equals$9(existing, incoming) {
|
|
|
3075
3110
|
return false;
|
|
3076
3111
|
}
|
|
3077
3112
|
const equals_requestMessages_items = equalsArray(existing_requestMessages, incoming_requestMessages, (existing_requestMessages_item, incoming_requestMessages_item) => {
|
|
3078
|
-
if (!(equals$
|
|
3113
|
+
if (!(equals$e(existing_requestMessages_item, incoming_requestMessages_item))) {
|
|
3079
3114
|
return false;
|
|
3080
3115
|
}
|
|
3081
3116
|
});
|
|
@@ -3093,7 +3128,7 @@ function equals$9(existing, incoming) {
|
|
|
3093
3128
|
return false;
|
|
3094
3129
|
}
|
|
3095
3130
|
const equals_responseMessages_items = equalsArray(existing_responseMessages, incoming_responseMessages, (existing_responseMessages_item, incoming_responseMessages_item) => {
|
|
3096
|
-
if (!(equals$
|
|
3131
|
+
if (!(equals$e(existing_responseMessages_item, incoming_responseMessages_item))) {
|
|
3097
3132
|
return false;
|
|
3098
3133
|
}
|
|
3099
3134
|
});
|
|
@@ -3111,7 +3146,7 @@ function equals$9(existing, incoming) {
|
|
|
3111
3146
|
return false;
|
|
3112
3147
|
}
|
|
3113
3148
|
const equals_slotsMaskingInformation_items = equalsArray(existing_slotsMaskingInformation, incoming_slotsMaskingInformation, (existing_slotsMaskingInformation_item, incoming_slotsMaskingInformation_item) => {
|
|
3114
|
-
if (!(equals$
|
|
3149
|
+
if (!(equals$d(existing_slotsMaskingInformation_item, incoming_slotsMaskingInformation_item))) {
|
|
3115
3150
|
return false;
|
|
3116
3151
|
}
|
|
3117
3152
|
});
|
|
@@ -3121,41 +3156,41 @@ function equals$9(existing, incoming) {
|
|
|
3121
3156
|
}
|
|
3122
3157
|
return true;
|
|
3123
3158
|
}
|
|
3124
|
-
const ingest$
|
|
3159
|
+
const ingest$8 = function EinsteinPromptTemplateGenerationsRepresentationIngest(input, path, luvio, store, timestamp) {
|
|
3125
3160
|
if (process.env.NODE_ENV !== 'production') {
|
|
3126
|
-
const validateError = validate$
|
|
3161
|
+
const validateError = validate$g(input);
|
|
3127
3162
|
if (validateError !== null) {
|
|
3128
3163
|
throw validateError;
|
|
3129
3164
|
}
|
|
3130
3165
|
}
|
|
3131
3166
|
const key = keyBuilderFromType$1(luvio, input);
|
|
3132
|
-
const ttlToUse = TTL$
|
|
3133
|
-
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);
|
|
3134
3169
|
return createLink(key);
|
|
3135
3170
|
};
|
|
3136
|
-
function getTypeCacheKeys$
|
|
3171
|
+
function getTypeCacheKeys$8(rootKeySet, luvio, input, fullPathFactory) {
|
|
3137
3172
|
// root cache key (uses fullPathFactory if keyBuilderFromType isn't defined)
|
|
3138
3173
|
const rootKey = keyBuilderFromType$1(luvio, input);
|
|
3139
3174
|
rootKeySet.set(rootKey, {
|
|
3140
3175
|
namespace: keyPrefix,
|
|
3141
|
-
representationName: RepresentationType$
|
|
3176
|
+
representationName: RepresentationType$8,
|
|
3142
3177
|
mergeable: false
|
|
3143
3178
|
});
|
|
3144
3179
|
}
|
|
3145
3180
|
|
|
3146
|
-
function select$
|
|
3147
|
-
return select$
|
|
3181
|
+
function select$q(luvio, params) {
|
|
3182
|
+
return select$r();
|
|
3148
3183
|
}
|
|
3149
|
-
function getResponseCacheKeys$
|
|
3150
|
-
getTypeCacheKeys$
|
|
3184
|
+
function getResponseCacheKeys$e(storeKeyMap, luvio, resourceParams, response) {
|
|
3185
|
+
getTypeCacheKeys$8(storeKeyMap, luvio, response);
|
|
3151
3186
|
}
|
|
3152
|
-
function ingestSuccess$
|
|
3187
|
+
function ingestSuccess$e(luvio, resourceParams, response) {
|
|
3153
3188
|
const { body } = response;
|
|
3154
3189
|
const key = keyBuilderFromType$1(luvio, body);
|
|
3155
|
-
luvio.storeIngest(key, ingest$
|
|
3190
|
+
luvio.storeIngest(key, ingest$8, body);
|
|
3156
3191
|
const snapshot = luvio.storeLookup({
|
|
3157
3192
|
recordId: key,
|
|
3158
|
-
node: select$
|
|
3193
|
+
node: select$q(),
|
|
3159
3194
|
variables: {},
|
|
3160
3195
|
});
|
|
3161
3196
|
if (process.env.NODE_ENV !== 'production') {
|
|
@@ -3166,7 +3201,7 @@ function ingestSuccess$b(luvio, resourceParams, response) {
|
|
|
3166
3201
|
deepFreeze(snapshot.data);
|
|
3167
3202
|
return snapshot;
|
|
3168
3203
|
}
|
|
3169
|
-
function createResourceRequest$
|
|
3204
|
+
function createResourceRequest$e(config) {
|
|
3170
3205
|
const headers = {};
|
|
3171
3206
|
return {
|
|
3172
3207
|
baseUri: '/services/data/v66.0',
|
|
@@ -3180,48 +3215,48 @@ function createResourceRequest$b(config) {
|
|
|
3180
3215
|
};
|
|
3181
3216
|
}
|
|
3182
3217
|
|
|
3183
|
-
const adapterName$
|
|
3218
|
+
const adapterName$e = 'createGenerationsForPromptTemplate';
|
|
3184
3219
|
const createGenerationsForPromptTemplate_ConfigPropertyMetadata = [
|
|
3185
3220
|
generateParamConfigMetadata('promptTemplateDevName', true, 0 /* UrlParameter */, 0 /* String */),
|
|
3186
3221
|
generateParamConfigMetadata('versionId', false, 1 /* QueryParameter */, 0 /* String */),
|
|
3187
3222
|
generateParamConfigMetadata('promptTemplateGenerationsInput', true, 2 /* Body */, 4 /* Unsupported */),
|
|
3188
3223
|
];
|
|
3189
|
-
const createGenerationsForPromptTemplate_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$
|
|
3190
|
-
const createResourceParams$
|
|
3191
|
-
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) {
|
|
3192
3227
|
const config = {};
|
|
3193
|
-
typeCheckConfig$
|
|
3228
|
+
typeCheckConfig$i(untrustedConfig, config, createGenerationsForPromptTemplate_ConfigPropertyMetadata);
|
|
3194
3229
|
const untrustedConfig_promptTemplateGenerationsInput = untrustedConfig.promptTemplateGenerationsInput;
|
|
3195
|
-
const referenceEinsteinPromptTemplateGenerationsInputRepresentationValidationError = validate$
|
|
3230
|
+
const referenceEinsteinPromptTemplateGenerationsInputRepresentationValidationError = validate$p(untrustedConfig_promptTemplateGenerationsInput);
|
|
3196
3231
|
if (referenceEinsteinPromptTemplateGenerationsInputRepresentationValidationError === null) {
|
|
3197
3232
|
config.promptTemplateGenerationsInput = untrustedConfig_promptTemplateGenerationsInput;
|
|
3198
3233
|
}
|
|
3199
3234
|
return config;
|
|
3200
3235
|
}
|
|
3201
|
-
function validateAdapterConfig$
|
|
3236
|
+
function validateAdapterConfig$e(untrustedConfig, configPropertyNames) {
|
|
3202
3237
|
if (!untrustedIsObject(untrustedConfig)) {
|
|
3203
3238
|
return null;
|
|
3204
3239
|
}
|
|
3205
3240
|
if (process.env.NODE_ENV !== 'production') {
|
|
3206
3241
|
validateConfig(untrustedConfig, configPropertyNames);
|
|
3207
3242
|
}
|
|
3208
|
-
const config = typeCheckConfig$
|
|
3243
|
+
const config = typeCheckConfig$e(untrustedConfig);
|
|
3209
3244
|
if (!areRequiredParametersPresent(config, configPropertyNames)) {
|
|
3210
3245
|
return null;
|
|
3211
3246
|
}
|
|
3212
3247
|
return config;
|
|
3213
3248
|
}
|
|
3214
|
-
function buildNetworkSnapshot$
|
|
3215
|
-
const resourceParams = createResourceParams$
|
|
3216
|
-
const request = createResourceRequest$
|
|
3249
|
+
function buildNetworkSnapshot$e(luvio, config, options) {
|
|
3250
|
+
const resourceParams = createResourceParams$e(config);
|
|
3251
|
+
const request = createResourceRequest$e(resourceParams);
|
|
3217
3252
|
return luvio.dispatchResourceRequest(request, options)
|
|
3218
3253
|
.then((response) => {
|
|
3219
3254
|
return luvio.handleSuccessResponse(() => {
|
|
3220
|
-
const snapshot = ingestSuccess$
|
|
3255
|
+
const snapshot = ingestSuccess$e(luvio, resourceParams, response);
|
|
3221
3256
|
return luvio.storeBroadcast().then(() => snapshot);
|
|
3222
3257
|
}, () => {
|
|
3223
3258
|
const cache = new StoreKeyMap();
|
|
3224
|
-
getResponseCacheKeys$
|
|
3259
|
+
getResponseCacheKeys$e(cache, luvio, resourceParams, response.body);
|
|
3225
3260
|
return cache;
|
|
3226
3261
|
});
|
|
3227
3262
|
}, (response) => {
|
|
@@ -3231,18 +3266,18 @@ function buildNetworkSnapshot$b(luvio, config, options) {
|
|
|
3231
3266
|
}
|
|
3232
3267
|
const createGenerationsForPromptTemplateAdapterFactory = (luvio) => {
|
|
3233
3268
|
return function createGenerationsForPromptTemplate(untrustedConfig) {
|
|
3234
|
-
const config = validateAdapterConfig$
|
|
3269
|
+
const config = validateAdapterConfig$e(untrustedConfig, createGenerationsForPromptTemplate_ConfigPropertyNames);
|
|
3235
3270
|
// Invalid or incomplete config
|
|
3236
3271
|
if (config === null) {
|
|
3237
3272
|
throw new Error('Invalid config for "createGenerationsForPromptTemplate"');
|
|
3238
3273
|
}
|
|
3239
|
-
return buildNetworkSnapshot$
|
|
3274
|
+
return buildNetworkSnapshot$e(luvio, config);
|
|
3240
3275
|
};
|
|
3241
3276
|
};
|
|
3242
3277
|
|
|
3243
|
-
const TTL$
|
|
3244
|
-
const VERSION$
|
|
3245
|
-
function validate$
|
|
3278
|
+
const TTL$7 = 100;
|
|
3279
|
+
const VERSION$b = "a90a51578e2fdd7a9741d310bed22b1d";
|
|
3280
|
+
function validate$f(obj, path = 'EinsteinPromptTemplateRepresentation') {
|
|
3246
3281
|
const v_error = (() => {
|
|
3247
3282
|
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
3248
3283
|
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
@@ -3250,7 +3285,7 @@ function validate$c(obj, path = 'EinsteinPromptTemplateRepresentation') {
|
|
|
3250
3285
|
if (obj.additionalData !== undefined) {
|
|
3251
3286
|
const obj_additionalData = obj.additionalData;
|
|
3252
3287
|
const path_additionalData = path + '.additionalData';
|
|
3253
|
-
const referencepath_additionalDataValidationError = validate$
|
|
3288
|
+
const referencepath_additionalDataValidationError = validate$s(obj_additionalData, path_additionalData);
|
|
3254
3289
|
if (referencepath_additionalDataValidationError !== null) {
|
|
3255
3290
|
let message = 'Object doesn\'t match WrappedMap (at "' + path_additionalData + '")\n';
|
|
3256
3291
|
message += referencepath_additionalDataValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
@@ -3318,24 +3353,24 @@ function validate$c(obj, path = 'EinsteinPromptTemplateRepresentation') {
|
|
|
3318
3353
|
})();
|
|
3319
3354
|
return v_error === undefined ? null : v_error;
|
|
3320
3355
|
}
|
|
3321
|
-
const RepresentationType$
|
|
3322
|
-
function keyBuilder$
|
|
3323
|
-
return keyPrefix + '::' + RepresentationType$
|
|
3356
|
+
const RepresentationType$7 = 'EinsteinPromptTemplateRepresentation';
|
|
3357
|
+
function keyBuilder$k(luvio, config) {
|
|
3358
|
+
return keyPrefix + '::' + RepresentationType$7 + ':' + config.versionId;
|
|
3324
3359
|
}
|
|
3325
3360
|
function keyBuilderFromType(luvio, object) {
|
|
3326
3361
|
const keyParams = {
|
|
3327
3362
|
versionId: object.versionId
|
|
3328
3363
|
};
|
|
3329
|
-
return keyBuilder$
|
|
3364
|
+
return keyBuilder$k(luvio, keyParams);
|
|
3330
3365
|
}
|
|
3331
|
-
function normalize$
|
|
3366
|
+
function normalize$7(input, existing, path, luvio, store, timestamp) {
|
|
3332
3367
|
return input;
|
|
3333
3368
|
}
|
|
3334
|
-
const select$
|
|
3335
|
-
const { selections: WrappedMap__selections, opaque: WrappedMap__opaque, } = select$
|
|
3369
|
+
const select$p = function EinsteinPromptTemplateRepresentationSelect() {
|
|
3370
|
+
const { selections: WrappedMap__selections, opaque: WrappedMap__opaque, } = select$C();
|
|
3336
3371
|
return {
|
|
3337
3372
|
kind: 'Fragment',
|
|
3338
|
-
version: VERSION$
|
|
3373
|
+
version: VERSION$b,
|
|
3339
3374
|
private: [],
|
|
3340
3375
|
selections: [
|
|
3341
3376
|
{
|
|
@@ -3383,7 +3418,7 @@ const select$j = function EinsteinPromptTemplateRepresentationSelect() {
|
|
|
3383
3418
|
]
|
|
3384
3419
|
};
|
|
3385
3420
|
};
|
|
3386
|
-
function equals$
|
|
3421
|
+
function equals$b(existing, incoming) {
|
|
3387
3422
|
const existing_hasWarning = existing.hasWarning;
|
|
3388
3423
|
const incoming_hasWarning = incoming.hasWarning;
|
|
3389
3424
|
if (!(existing_hasWarning === incoming_hasWarning)) {
|
|
@@ -3439,7 +3474,7 @@ function equals$8(existing, incoming) {
|
|
|
3439
3474
|
if (existing_additionalData === undefined || incoming_additionalData === undefined) {
|
|
3440
3475
|
return false;
|
|
3441
3476
|
}
|
|
3442
|
-
if (!(equals$
|
|
3477
|
+
if (!(equals$m(existing_additionalData, incoming_additionalData))) {
|
|
3443
3478
|
return false;
|
|
3444
3479
|
}
|
|
3445
3480
|
}
|
|
@@ -3465,41 +3500,41 @@ function equals$8(existing, incoming) {
|
|
|
3465
3500
|
}
|
|
3466
3501
|
return true;
|
|
3467
3502
|
}
|
|
3468
|
-
const ingest$
|
|
3503
|
+
const ingest$7 = function EinsteinPromptTemplateRepresentationIngest(input, path, luvio, store, timestamp) {
|
|
3469
3504
|
if (process.env.NODE_ENV !== 'production') {
|
|
3470
|
-
const validateError = validate$
|
|
3505
|
+
const validateError = validate$f(input);
|
|
3471
3506
|
if (validateError !== null) {
|
|
3472
3507
|
throw validateError;
|
|
3473
3508
|
}
|
|
3474
3509
|
}
|
|
3475
3510
|
const key = keyBuilderFromType(luvio, input);
|
|
3476
|
-
const ttlToUse = TTL$
|
|
3477
|
-
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);
|
|
3478
3513
|
return createLink(key);
|
|
3479
3514
|
};
|
|
3480
|
-
function getTypeCacheKeys$
|
|
3515
|
+
function getTypeCacheKeys$7(rootKeySet, luvio, input, fullPathFactory) {
|
|
3481
3516
|
// root cache key (uses fullPathFactory if keyBuilderFromType isn't defined)
|
|
3482
3517
|
const rootKey = keyBuilderFromType(luvio, input);
|
|
3483
3518
|
rootKeySet.set(rootKey, {
|
|
3484
3519
|
namespace: keyPrefix,
|
|
3485
|
-
representationName: RepresentationType$
|
|
3520
|
+
representationName: RepresentationType$7,
|
|
3486
3521
|
mergeable: false
|
|
3487
3522
|
});
|
|
3488
3523
|
}
|
|
3489
3524
|
|
|
3490
|
-
function select$
|
|
3491
|
-
return select$
|
|
3525
|
+
function select$o(luvio, params) {
|
|
3526
|
+
return select$p();
|
|
3492
3527
|
}
|
|
3493
|
-
function getResponseCacheKeys$
|
|
3494
|
-
getTypeCacheKeys$
|
|
3528
|
+
function getResponseCacheKeys$d(storeKeyMap, luvio, resourceParams, response) {
|
|
3529
|
+
getTypeCacheKeys$7(storeKeyMap, luvio, response);
|
|
3495
3530
|
}
|
|
3496
|
-
function ingestSuccess$
|
|
3531
|
+
function ingestSuccess$d(luvio, resourceParams, response) {
|
|
3497
3532
|
const { body } = response;
|
|
3498
3533
|
const key = keyBuilderFromType(luvio, body);
|
|
3499
|
-
luvio.storeIngest(key, ingest$
|
|
3534
|
+
luvio.storeIngest(key, ingest$7, body);
|
|
3500
3535
|
const snapshot = luvio.storeLookup({
|
|
3501
3536
|
recordId: key,
|
|
3502
|
-
node: select$
|
|
3537
|
+
node: select$o(),
|
|
3503
3538
|
variables: {},
|
|
3504
3539
|
});
|
|
3505
3540
|
if (process.env.NODE_ENV !== 'production') {
|
|
@@ -3510,7 +3545,7 @@ function ingestSuccess$a(luvio, resourceParams, response) {
|
|
|
3510
3545
|
deepFreeze(snapshot.data);
|
|
3511
3546
|
return snapshot;
|
|
3512
3547
|
}
|
|
3513
|
-
function createResourceRequest$
|
|
3548
|
+
function createResourceRequest$d(config) {
|
|
3514
3549
|
const headers = {};
|
|
3515
3550
|
return {
|
|
3516
3551
|
baseUri: '/services/data/v66.0',
|
|
@@ -3524,19 +3559,18 @@ function createResourceRequest$a(config) {
|
|
|
3524
3559
|
};
|
|
3525
3560
|
}
|
|
3526
3561
|
|
|
3527
|
-
const adapterName$
|
|
3562
|
+
const adapterName$d = 'createPromptTemplate';
|
|
3528
3563
|
const createPromptTemplate_ConfigPropertyMetadata = [
|
|
3529
3564
|
generateParamConfigMetadata('apiName', true, 2 /* Body */, 0 /* String */),
|
|
3530
3565
|
generateParamConfigMetadata('childRelationships', true, 2 /* Body */, 4 /* Unsupported */),
|
|
3531
|
-
generateParamConfigMetadata('fields', true, 2 /* Body */, 4 /* Unsupported
|
|
3566
|
+
generateParamConfigMetadata('fields', true, 2 /* Body */, 4 /* Unsupported */),
|
|
3532
3567
|
generateParamConfigMetadata('id', false, 2 /* Body */, 0 /* String */),
|
|
3533
|
-
generateParamConfigMetadata('isStandard', true, 2 /* Body */, 1 /* Boolean */),
|
|
3534
3568
|
];
|
|
3535
|
-
const createPromptTemplate_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$
|
|
3536
|
-
const createResourceParams$
|
|
3537
|
-
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) {
|
|
3538
3572
|
const config = {};
|
|
3539
|
-
typeCheckConfig$
|
|
3573
|
+
typeCheckConfig$i(untrustedConfig, config, createPromptTemplate_ConfigPropertyMetadata);
|
|
3540
3574
|
const untrustedConfig_childRelationships = untrustedConfig.childRelationships;
|
|
3541
3575
|
if (untrustedIsObject(untrustedConfig_childRelationships)) {
|
|
3542
3576
|
const untrustedConfig_childRelationships_object = {};
|
|
@@ -3553,53 +3587,46 @@ function typeCheckConfig$a(untrustedConfig) {
|
|
|
3553
3587
|
}
|
|
3554
3588
|
}
|
|
3555
3589
|
const untrustedConfig_fields = untrustedConfig.fields;
|
|
3556
|
-
if (
|
|
3557
|
-
const
|
|
3558
|
-
|
|
3559
|
-
|
|
3560
|
-
|
|
3561
|
-
|
|
3562
|
-
|
|
3563
|
-
|
|
3564
|
-
const key = untrustedConfig_fields_item_keys[i];
|
|
3565
|
-
const untrustedConfig_fields_item_prop = untrustedConfig_fields_item[key];
|
|
3566
|
-
if (untrustedConfig_fields_item_object !== undefined) {
|
|
3567
|
-
untrustedConfig_fields_item_object[key] = untrustedConfig_fields_item_prop;
|
|
3568
|
-
}
|
|
3569
|
-
}
|
|
3570
|
-
if (untrustedConfig_fields_item_object !== undefined && Object.keys(untrustedConfig_fields_item_object).length >= 0) {
|
|
3571
|
-
untrustedConfig_fields_array.push(untrustedConfig_fields_item_object);
|
|
3572
|
-
}
|
|
3590
|
+
if (untrustedIsObject(untrustedConfig_fields)) {
|
|
3591
|
+
const untrustedConfig_fields_object = {};
|
|
3592
|
+
const untrustedConfig_fields_keys = Object.keys(untrustedConfig_fields);
|
|
3593
|
+
for (let i = 0, arrayLength = untrustedConfig_fields_keys.length; i < arrayLength; i++) {
|
|
3594
|
+
const key = untrustedConfig_fields_keys[i];
|
|
3595
|
+
const untrustedConfig_fields_prop = untrustedConfig_fields[key];
|
|
3596
|
+
if (untrustedConfig_fields_object !== undefined) {
|
|
3597
|
+
untrustedConfig_fields_object[key] = untrustedConfig_fields_prop;
|
|
3573
3598
|
}
|
|
3574
3599
|
}
|
|
3575
|
-
|
|
3600
|
+
if (untrustedConfig_fields_object !== undefined && Object.keys(untrustedConfig_fields_object).length >= 0) {
|
|
3601
|
+
config.fields = untrustedConfig_fields_object;
|
|
3602
|
+
}
|
|
3576
3603
|
}
|
|
3577
3604
|
return config;
|
|
3578
3605
|
}
|
|
3579
|
-
function validateAdapterConfig$
|
|
3606
|
+
function validateAdapterConfig$d(untrustedConfig, configPropertyNames) {
|
|
3580
3607
|
if (!untrustedIsObject(untrustedConfig)) {
|
|
3581
3608
|
return null;
|
|
3582
3609
|
}
|
|
3583
3610
|
if (process.env.NODE_ENV !== 'production') {
|
|
3584
3611
|
validateConfig(untrustedConfig, configPropertyNames);
|
|
3585
3612
|
}
|
|
3586
|
-
const config = typeCheckConfig$
|
|
3613
|
+
const config = typeCheckConfig$d(untrustedConfig);
|
|
3587
3614
|
if (!areRequiredParametersPresent(config, configPropertyNames)) {
|
|
3588
3615
|
return null;
|
|
3589
3616
|
}
|
|
3590
3617
|
return config;
|
|
3591
3618
|
}
|
|
3592
|
-
function buildNetworkSnapshot$
|
|
3593
|
-
const resourceParams = createResourceParams$
|
|
3594
|
-
const request = createResourceRequest$
|
|
3619
|
+
function buildNetworkSnapshot$d(luvio, config, options) {
|
|
3620
|
+
const resourceParams = createResourceParams$d(config);
|
|
3621
|
+
const request = createResourceRequest$d(resourceParams);
|
|
3595
3622
|
return luvio.dispatchResourceRequest(request, options)
|
|
3596
3623
|
.then((response) => {
|
|
3597
3624
|
return luvio.handleSuccessResponse(() => {
|
|
3598
|
-
const snapshot = ingestSuccess$
|
|
3625
|
+
const snapshot = ingestSuccess$d(luvio, resourceParams, response);
|
|
3599
3626
|
return luvio.storeBroadcast().then(() => snapshot);
|
|
3600
3627
|
}, () => {
|
|
3601
3628
|
const cache = new StoreKeyMap();
|
|
3602
|
-
getResponseCacheKeys$
|
|
3629
|
+
getResponseCacheKeys$d(cache, luvio, resourceParams, response.body);
|
|
3603
3630
|
return cache;
|
|
3604
3631
|
});
|
|
3605
3632
|
}, (response) => {
|
|
@@ -3609,28 +3636,28 @@ function buildNetworkSnapshot$a(luvio, config, options) {
|
|
|
3609
3636
|
}
|
|
3610
3637
|
const createPromptTemplateAdapterFactory = (luvio) => {
|
|
3611
3638
|
return function createPromptTemplate(untrustedConfig) {
|
|
3612
|
-
const config = validateAdapterConfig$
|
|
3639
|
+
const config = validateAdapterConfig$d(untrustedConfig, createPromptTemplate_ConfigPropertyNames);
|
|
3613
3640
|
// Invalid or incomplete config
|
|
3614
3641
|
if (config === null) {
|
|
3615
3642
|
throw new Error('Invalid config for "createPromptTemplate"');
|
|
3616
3643
|
}
|
|
3617
|
-
return buildNetworkSnapshot$
|
|
3644
|
+
return buildNetworkSnapshot$d(luvio, config);
|
|
3618
3645
|
};
|
|
3619
3646
|
};
|
|
3620
3647
|
|
|
3621
|
-
function select$
|
|
3622
|
-
return select$
|
|
3648
|
+
function select$n(luvio, params) {
|
|
3649
|
+
return select$p();
|
|
3623
3650
|
}
|
|
3624
|
-
function getResponseCacheKeys$
|
|
3625
|
-
getTypeCacheKeys$
|
|
3651
|
+
function getResponseCacheKeys$c(storeKeyMap, luvio, resourceParams, response) {
|
|
3652
|
+
getTypeCacheKeys$7(storeKeyMap, luvio, response);
|
|
3626
3653
|
}
|
|
3627
|
-
function ingestSuccess$
|
|
3654
|
+
function ingestSuccess$c(luvio, resourceParams, response) {
|
|
3628
3655
|
const { body } = response;
|
|
3629
3656
|
const key = keyBuilderFromType(luvio, body);
|
|
3630
|
-
luvio.storeIngest(key, ingest$
|
|
3657
|
+
luvio.storeIngest(key, ingest$7, body);
|
|
3631
3658
|
const snapshot = luvio.storeLookup({
|
|
3632
3659
|
recordId: key,
|
|
3633
|
-
node: select$
|
|
3660
|
+
node: select$n(),
|
|
3634
3661
|
variables: {},
|
|
3635
3662
|
});
|
|
3636
3663
|
if (process.env.NODE_ENV !== 'production') {
|
|
@@ -3641,7 +3668,7 @@ function ingestSuccess$9(luvio, resourceParams, response) {
|
|
|
3641
3668
|
deepFreeze(snapshot.data);
|
|
3642
3669
|
return snapshot;
|
|
3643
3670
|
}
|
|
3644
|
-
function createResourceRequest$
|
|
3671
|
+
function createResourceRequest$c(config) {
|
|
3645
3672
|
const headers = {};
|
|
3646
3673
|
return {
|
|
3647
3674
|
baseUri: '/services/data/v66.0',
|
|
@@ -3655,20 +3682,19 @@ function createResourceRequest$9(config) {
|
|
|
3655
3682
|
};
|
|
3656
3683
|
}
|
|
3657
3684
|
|
|
3658
|
-
const adapterName$
|
|
3685
|
+
const adapterName$c = 'createPromptTemplateVersion';
|
|
3659
3686
|
const createPromptTemplateVersion_ConfigPropertyMetadata = [
|
|
3660
3687
|
generateParamConfigMetadata('promptTemplateDevName', true, 0 /* UrlParameter */, 0 /* String */),
|
|
3661
3688
|
generateParamConfigMetadata('apiName', true, 2 /* Body */, 0 /* String */),
|
|
3662
3689
|
generateParamConfigMetadata('childRelationships', true, 2 /* Body */, 4 /* Unsupported */),
|
|
3663
|
-
generateParamConfigMetadata('fields', true, 2 /* Body */, 4 /* Unsupported
|
|
3690
|
+
generateParamConfigMetadata('fields', true, 2 /* Body */, 4 /* Unsupported */),
|
|
3664
3691
|
generateParamConfigMetadata('id', false, 2 /* Body */, 0 /* String */),
|
|
3665
|
-
generateParamConfigMetadata('isStandard', true, 2 /* Body */, 1 /* Boolean */),
|
|
3666
3692
|
];
|
|
3667
|
-
const createPromptTemplateVersion_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$
|
|
3668
|
-
const createResourceParams$
|
|
3669
|
-
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) {
|
|
3670
3696
|
const config = {};
|
|
3671
|
-
typeCheckConfig$
|
|
3697
|
+
typeCheckConfig$i(untrustedConfig, config, createPromptTemplateVersion_ConfigPropertyMetadata);
|
|
3672
3698
|
const untrustedConfig_childRelationships = untrustedConfig.childRelationships;
|
|
3673
3699
|
if (untrustedIsObject(untrustedConfig_childRelationships)) {
|
|
3674
3700
|
const untrustedConfig_childRelationships_object = {};
|
|
@@ -3685,53 +3711,46 @@ function typeCheckConfig$9(untrustedConfig) {
|
|
|
3685
3711
|
}
|
|
3686
3712
|
}
|
|
3687
3713
|
const untrustedConfig_fields = untrustedConfig.fields;
|
|
3688
|
-
if (
|
|
3689
|
-
const
|
|
3690
|
-
|
|
3691
|
-
|
|
3692
|
-
|
|
3693
|
-
|
|
3694
|
-
|
|
3695
|
-
|
|
3696
|
-
const key = untrustedConfig_fields_item_keys[i];
|
|
3697
|
-
const untrustedConfig_fields_item_prop = untrustedConfig_fields_item[key];
|
|
3698
|
-
if (untrustedConfig_fields_item_object !== undefined) {
|
|
3699
|
-
untrustedConfig_fields_item_object[key] = untrustedConfig_fields_item_prop;
|
|
3700
|
-
}
|
|
3701
|
-
}
|
|
3702
|
-
if (untrustedConfig_fields_item_object !== undefined && Object.keys(untrustedConfig_fields_item_object).length >= 0) {
|
|
3703
|
-
untrustedConfig_fields_array.push(untrustedConfig_fields_item_object);
|
|
3704
|
-
}
|
|
3714
|
+
if (untrustedIsObject(untrustedConfig_fields)) {
|
|
3715
|
+
const untrustedConfig_fields_object = {};
|
|
3716
|
+
const untrustedConfig_fields_keys = Object.keys(untrustedConfig_fields);
|
|
3717
|
+
for (let i = 0, arrayLength = untrustedConfig_fields_keys.length; i < arrayLength; i++) {
|
|
3718
|
+
const key = untrustedConfig_fields_keys[i];
|
|
3719
|
+
const untrustedConfig_fields_prop = untrustedConfig_fields[key];
|
|
3720
|
+
if (untrustedConfig_fields_object !== undefined) {
|
|
3721
|
+
untrustedConfig_fields_object[key] = untrustedConfig_fields_prop;
|
|
3705
3722
|
}
|
|
3706
3723
|
}
|
|
3707
|
-
|
|
3724
|
+
if (untrustedConfig_fields_object !== undefined && Object.keys(untrustedConfig_fields_object).length >= 0) {
|
|
3725
|
+
config.fields = untrustedConfig_fields_object;
|
|
3726
|
+
}
|
|
3708
3727
|
}
|
|
3709
3728
|
return config;
|
|
3710
3729
|
}
|
|
3711
|
-
function validateAdapterConfig$
|
|
3730
|
+
function validateAdapterConfig$c(untrustedConfig, configPropertyNames) {
|
|
3712
3731
|
if (!untrustedIsObject(untrustedConfig)) {
|
|
3713
3732
|
return null;
|
|
3714
3733
|
}
|
|
3715
3734
|
if (process.env.NODE_ENV !== 'production') {
|
|
3716
3735
|
validateConfig(untrustedConfig, configPropertyNames);
|
|
3717
3736
|
}
|
|
3718
|
-
const config = typeCheckConfig$
|
|
3737
|
+
const config = typeCheckConfig$c(untrustedConfig);
|
|
3719
3738
|
if (!areRequiredParametersPresent(config, configPropertyNames)) {
|
|
3720
3739
|
return null;
|
|
3721
3740
|
}
|
|
3722
3741
|
return config;
|
|
3723
3742
|
}
|
|
3724
|
-
function buildNetworkSnapshot$
|
|
3725
|
-
const resourceParams = createResourceParams$
|
|
3726
|
-
const request = createResourceRequest$
|
|
3743
|
+
function buildNetworkSnapshot$c(luvio, config, options) {
|
|
3744
|
+
const resourceParams = createResourceParams$c(config);
|
|
3745
|
+
const request = createResourceRequest$c(resourceParams);
|
|
3727
3746
|
return luvio.dispatchResourceRequest(request, options)
|
|
3728
3747
|
.then((response) => {
|
|
3729
3748
|
return luvio.handleSuccessResponse(() => {
|
|
3730
|
-
const snapshot = ingestSuccess$
|
|
3749
|
+
const snapshot = ingestSuccess$c(luvio, resourceParams, response);
|
|
3731
3750
|
return luvio.storeBroadcast().then(() => snapshot);
|
|
3732
3751
|
}, () => {
|
|
3733
3752
|
const cache = new StoreKeyMap();
|
|
3734
|
-
getResponseCacheKeys$
|
|
3753
|
+
getResponseCacheKeys$c(cache, luvio, resourceParams, response.body);
|
|
3735
3754
|
return cache;
|
|
3736
3755
|
});
|
|
3737
3756
|
}, (response) => {
|
|
@@ -3741,16 +3760,16 @@ function buildNetworkSnapshot$9(luvio, config, options) {
|
|
|
3741
3760
|
}
|
|
3742
3761
|
const createPromptTemplateVersionAdapterFactory = (luvio) => {
|
|
3743
3762
|
return function createPromptTemplateVersion(untrustedConfig) {
|
|
3744
|
-
const config = validateAdapterConfig$
|
|
3763
|
+
const config = validateAdapterConfig$c(untrustedConfig, createPromptTemplateVersion_ConfigPropertyNames);
|
|
3745
3764
|
// Invalid or incomplete config
|
|
3746
3765
|
if (config === null) {
|
|
3747
3766
|
throw new Error('Invalid config for "createPromptTemplateVersion"');
|
|
3748
3767
|
}
|
|
3749
|
-
return buildNetworkSnapshot$
|
|
3768
|
+
return buildNetworkSnapshot$c(luvio, config);
|
|
3750
3769
|
};
|
|
3751
3770
|
};
|
|
3752
3771
|
|
|
3753
|
-
function validate$
|
|
3772
|
+
function validate$e(obj, path = 'PromptTemplateDataProviderOutputParamRepresentation') {
|
|
3754
3773
|
const v_error = (() => {
|
|
3755
3774
|
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
3756
3775
|
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
@@ -3776,7 +3795,7 @@ function validate$b(obj, path = 'PromptTemplateDataProviderOutputParamRepresenta
|
|
|
3776
3795
|
return v_error === undefined ? null : v_error;
|
|
3777
3796
|
}
|
|
3778
3797
|
|
|
3779
|
-
function validate$
|
|
3798
|
+
function validate$d(obj, path = 'PromptTemplateDataProviderInputParamRepresentation') {
|
|
3780
3799
|
const v_error = (() => {
|
|
3781
3800
|
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
3782
3801
|
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
@@ -3805,9 +3824,9 @@ function validate$a(obj, path = 'PromptTemplateDataProviderInputParamRepresentat
|
|
|
3805
3824
|
return v_error === undefined ? null : v_error;
|
|
3806
3825
|
}
|
|
3807
3826
|
|
|
3808
|
-
const TTL$
|
|
3809
|
-
const VERSION$
|
|
3810
|
-
function validate$
|
|
3827
|
+
const TTL$6 = 300;
|
|
3828
|
+
const VERSION$a = "d4824d8c6e7848df0de89295e6d9d434";
|
|
3829
|
+
function validate$c(obj, path = 'PromptTemplateDataProviderInstanceConfigRepresentation') {
|
|
3811
3830
|
const v_error = (() => {
|
|
3812
3831
|
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
3813
3832
|
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
@@ -3836,7 +3855,7 @@ function validate$9(obj, path = 'PromptTemplateDataProviderInstanceConfigReprese
|
|
|
3836
3855
|
if (obj.defaultOutputParam !== undefined) {
|
|
3837
3856
|
const obj_defaultOutputParam = obj.defaultOutputParam;
|
|
3838
3857
|
const path_defaultOutputParam = path + '.defaultOutputParam';
|
|
3839
|
-
const referencepath_defaultOutputParamValidationError = validate$
|
|
3858
|
+
const referencepath_defaultOutputParamValidationError = validate$e(obj_defaultOutputParam, path_defaultOutputParam);
|
|
3840
3859
|
if (referencepath_defaultOutputParamValidationError !== null) {
|
|
3841
3860
|
let message = 'Object doesn\'t match PromptTemplateDataProviderOutputParamRepresentation (at "' + path_defaultOutputParam + '")\n';
|
|
3842
3861
|
message += referencepath_defaultOutputParamValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
@@ -3890,7 +3909,7 @@ function validate$9(obj, path = 'PromptTemplateDataProviderInstanceConfigReprese
|
|
|
3890
3909
|
for (let i = 0; i < obj_inputParams.length; i++) {
|
|
3891
3910
|
const obj_inputParams_item = obj_inputParams[i];
|
|
3892
3911
|
const path_inputParams_item = path_inputParams + '[' + i + ']';
|
|
3893
|
-
const referencepath_inputParams_itemValidationError = validate$
|
|
3912
|
+
const referencepath_inputParams_itemValidationError = validate$d(obj_inputParams_item, path_inputParams_item);
|
|
3894
3913
|
if (referencepath_inputParams_itemValidationError !== null) {
|
|
3895
3914
|
let message = 'Object doesn\'t match PromptTemplateDataProviderInputParamRepresentation (at "' + path_inputParams_item + '")\n';
|
|
3896
3915
|
message += referencepath_inputParams_itemValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
@@ -3956,7 +3975,7 @@ function validate$9(obj, path = 'PromptTemplateDataProviderInstanceConfigReprese
|
|
|
3956
3975
|
for (let i = 0; i < obj_outputParams.length; i++) {
|
|
3957
3976
|
const obj_outputParams_item = obj_outputParams[i];
|
|
3958
3977
|
const path_outputParams_item = path_outputParams + '[' + i + ']';
|
|
3959
|
-
const referencepath_outputParams_itemValidationError = validate$
|
|
3978
|
+
const referencepath_outputParams_itemValidationError = validate$e(obj_outputParams_item, path_outputParams_item);
|
|
3960
3979
|
if (referencepath_outputParams_itemValidationError !== null) {
|
|
3961
3980
|
let message = 'Object doesn\'t match PromptTemplateDataProviderOutputParamRepresentation (at "' + path_outputParams_item + '")\n';
|
|
3962
3981
|
message += referencepath_outputParams_itemValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
@@ -4028,62 +4047,62 @@ function validate$9(obj, path = 'PromptTemplateDataProviderInstanceConfigReprese
|
|
|
4028
4047
|
})();
|
|
4029
4048
|
return v_error === undefined ? null : v_error;
|
|
4030
4049
|
}
|
|
4031
|
-
const RepresentationType$
|
|
4032
|
-
function normalize$
|
|
4050
|
+
const RepresentationType$6 = 'PromptTemplateDataProviderInstanceConfigRepresentation';
|
|
4051
|
+
function normalize$6(input, existing, path, luvio, store, timestamp) {
|
|
4033
4052
|
return input;
|
|
4034
4053
|
}
|
|
4035
|
-
const select$
|
|
4054
|
+
const select$m = function PromptTemplateDataProviderInstanceConfigRepresentationSelect() {
|
|
4036
4055
|
return {
|
|
4037
4056
|
kind: 'Fragment',
|
|
4038
|
-
version: VERSION$
|
|
4057
|
+
version: VERSION$a,
|
|
4039
4058
|
private: [],
|
|
4040
4059
|
opaque: true
|
|
4041
4060
|
};
|
|
4042
4061
|
};
|
|
4043
|
-
function equals$
|
|
4062
|
+
function equals$a(existing, incoming) {
|
|
4044
4063
|
if (JSONStringify(incoming) !== JSONStringify(existing)) {
|
|
4045
4064
|
return false;
|
|
4046
4065
|
}
|
|
4047
4066
|
return true;
|
|
4048
4067
|
}
|
|
4049
|
-
const ingest$
|
|
4068
|
+
const ingest$6 = function PromptTemplateDataProviderInstanceConfigRepresentationIngest(input, path, luvio, store, timestamp) {
|
|
4050
4069
|
if (process.env.NODE_ENV !== 'production') {
|
|
4051
|
-
const validateError = validate$
|
|
4070
|
+
const validateError = validate$c(input);
|
|
4052
4071
|
if (validateError !== null) {
|
|
4053
4072
|
throw validateError;
|
|
4054
4073
|
}
|
|
4055
4074
|
}
|
|
4056
4075
|
const key = path.fullPath;
|
|
4057
|
-
const ttlToUse = TTL$
|
|
4058
|
-
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);
|
|
4059
4078
|
return createLink(key);
|
|
4060
4079
|
};
|
|
4061
|
-
function getTypeCacheKeys$
|
|
4080
|
+
function getTypeCacheKeys$6(rootKeySet, luvio, input, fullPathFactory) {
|
|
4062
4081
|
// root cache key (uses fullPathFactory if keyBuilderFromType isn't defined)
|
|
4063
4082
|
const rootKey = fullPathFactory();
|
|
4064
4083
|
rootKeySet.set(rootKey, {
|
|
4065
4084
|
namespace: keyPrefix,
|
|
4066
|
-
representationName: RepresentationType$
|
|
4085
|
+
representationName: RepresentationType$6,
|
|
4067
4086
|
mergeable: false
|
|
4068
4087
|
});
|
|
4069
4088
|
}
|
|
4070
4089
|
|
|
4071
|
-
function select$
|
|
4072
|
-
return select$
|
|
4090
|
+
function select$l(luvio, params) {
|
|
4091
|
+
return select$m();
|
|
4073
4092
|
}
|
|
4074
|
-
function keyBuilder$
|
|
4093
|
+
function keyBuilder$j(luvio, params) {
|
|
4075
4094
|
return keyPrefix + '::PromptTemplateDataProviderInstanceConfigRepresentation:(' + stableJSONStringify(params.body.additionalParam) + '::' + 'definition:' + params.body.definition + '::' + 'groupName:' + params.body.groupName + ')';
|
|
4076
4095
|
}
|
|
4077
|
-
function getResponseCacheKeys$
|
|
4078
|
-
getTypeCacheKeys$
|
|
4096
|
+
function getResponseCacheKeys$b(storeKeyMap, luvio, resourceParams, response) {
|
|
4097
|
+
getTypeCacheKeys$6(storeKeyMap, luvio, response, () => keyBuilder$j(luvio, resourceParams));
|
|
4079
4098
|
}
|
|
4080
|
-
function ingestSuccess$
|
|
4099
|
+
function ingestSuccess$b(luvio, resourceParams, response, snapshotRefresh) {
|
|
4081
4100
|
const { body } = response;
|
|
4082
|
-
const key = keyBuilder$
|
|
4083
|
-
luvio.storeIngest(key, ingest$
|
|
4101
|
+
const key = keyBuilder$j(luvio, resourceParams);
|
|
4102
|
+
luvio.storeIngest(key, ingest$6, body);
|
|
4084
4103
|
const snapshot = luvio.storeLookup({
|
|
4085
4104
|
recordId: key,
|
|
4086
|
-
node: select$
|
|
4105
|
+
node: select$l(),
|
|
4087
4106
|
variables: {},
|
|
4088
4107
|
}, snapshotRefresh);
|
|
4089
4108
|
if (process.env.NODE_ENV !== 'production') {
|
|
@@ -4094,19 +4113,19 @@ function ingestSuccess$8(luvio, resourceParams, response, snapshotRefresh) {
|
|
|
4094
4113
|
deepFreeze(snapshot.data);
|
|
4095
4114
|
return snapshot;
|
|
4096
4115
|
}
|
|
4097
|
-
function ingestError$
|
|
4098
|
-
const key = keyBuilder$
|
|
4116
|
+
function ingestError$9(luvio, params, error, snapshotRefresh) {
|
|
4117
|
+
const key = keyBuilder$j(luvio, params);
|
|
4099
4118
|
const errorSnapshot = luvio.errorSnapshot(error, snapshotRefresh);
|
|
4100
4119
|
const storeMetadataParams = {
|
|
4101
|
-
ttl: TTL$
|
|
4120
|
+
ttl: TTL$6,
|
|
4102
4121
|
namespace: keyPrefix,
|
|
4103
|
-
version: VERSION$
|
|
4104
|
-
representationName: RepresentationType$
|
|
4122
|
+
version: VERSION$a,
|
|
4123
|
+
representationName: RepresentationType$6
|
|
4105
4124
|
};
|
|
4106
4125
|
luvio.storeIngestError(key, errorSnapshot, storeMetadataParams);
|
|
4107
4126
|
return errorSnapshot;
|
|
4108
4127
|
}
|
|
4109
|
-
function createResourceRequest$
|
|
4128
|
+
function createResourceRequest$b(config) {
|
|
4110
4129
|
const headers = {};
|
|
4111
4130
|
return {
|
|
4112
4131
|
baseUri: '/services/data/v66.0',
|
|
@@ -4120,21 +4139,21 @@ function createResourceRequest$8(config) {
|
|
|
4120
4139
|
};
|
|
4121
4140
|
}
|
|
4122
4141
|
|
|
4123
|
-
const adapterName$
|
|
4142
|
+
const adapterName$b = 'getDataProviderInstanceConfig';
|
|
4124
4143
|
const getDataProviderInstanceConfig_ConfigPropertyMetadata = [
|
|
4125
4144
|
generateParamConfigMetadata('additionalParam', false, 2 /* Body */, 4 /* Unsupported */),
|
|
4126
4145
|
generateParamConfigMetadata('definition', true, 2 /* Body */, 0 /* String */),
|
|
4127
4146
|
generateParamConfigMetadata('groupName', true, 2 /* Body */, 0 /* String */),
|
|
4128
4147
|
];
|
|
4129
|
-
const getDataProviderInstanceConfig_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$
|
|
4130
|
-
const createResourceParams$
|
|
4131
|
-
function keyBuilder$
|
|
4132
|
-
const resourceParams = createResourceParams$
|
|
4133
|
-
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);
|
|
4134
4153
|
}
|
|
4135
|
-
function typeCheckConfig$
|
|
4154
|
+
function typeCheckConfig$b(untrustedConfig) {
|
|
4136
4155
|
const config = {};
|
|
4137
|
-
typeCheckConfig$
|
|
4156
|
+
typeCheckConfig$i(untrustedConfig, config, getDataProviderInstanceConfig_ConfigPropertyMetadata);
|
|
4138
4157
|
const untrustedConfig_additionalParam = untrustedConfig.additionalParam;
|
|
4139
4158
|
if (untrustedIsObject(untrustedConfig_additionalParam)) {
|
|
4140
4159
|
const untrustedConfig_additionalParam_object = {};
|
|
@@ -4152,78 +4171,78 @@ function typeCheckConfig$8(untrustedConfig) {
|
|
|
4152
4171
|
}
|
|
4153
4172
|
return config;
|
|
4154
4173
|
}
|
|
4155
|
-
function validateAdapterConfig$
|
|
4174
|
+
function validateAdapterConfig$b(untrustedConfig, configPropertyNames) {
|
|
4156
4175
|
if (!untrustedIsObject(untrustedConfig)) {
|
|
4157
4176
|
return null;
|
|
4158
4177
|
}
|
|
4159
4178
|
if (process.env.NODE_ENV !== 'production') {
|
|
4160
4179
|
validateConfig(untrustedConfig, configPropertyNames);
|
|
4161
4180
|
}
|
|
4162
|
-
const config = typeCheckConfig$
|
|
4181
|
+
const config = typeCheckConfig$b(untrustedConfig);
|
|
4163
4182
|
if (!areRequiredParametersPresent(config, configPropertyNames)) {
|
|
4164
4183
|
return null;
|
|
4165
4184
|
}
|
|
4166
4185
|
return config;
|
|
4167
4186
|
}
|
|
4168
|
-
function adapterFragment$
|
|
4169
|
-
createResourceParams$
|
|
4170
|
-
return select$
|
|
4187
|
+
function adapterFragment$9(luvio, config) {
|
|
4188
|
+
createResourceParams$b(config);
|
|
4189
|
+
return select$l();
|
|
4171
4190
|
}
|
|
4172
|
-
function onFetchResponseSuccess$
|
|
4173
|
-
const snapshot = ingestSuccess$
|
|
4191
|
+
function onFetchResponseSuccess$9(luvio, config, resourceParams, response) {
|
|
4192
|
+
const snapshot = ingestSuccess$b(luvio, resourceParams, response, {
|
|
4174
4193
|
config,
|
|
4175
|
-
resolve: () => buildNetworkSnapshot$
|
|
4194
|
+
resolve: () => buildNetworkSnapshot$b(luvio, config, snapshotRefreshOptions)
|
|
4176
4195
|
});
|
|
4177
4196
|
return luvio.storeBroadcast().then(() => snapshot);
|
|
4178
4197
|
}
|
|
4179
|
-
function onFetchResponseError$
|
|
4180
|
-
const snapshot = ingestError$
|
|
4198
|
+
function onFetchResponseError$9(luvio, config, resourceParams, response) {
|
|
4199
|
+
const snapshot = ingestError$9(luvio, resourceParams, response, {
|
|
4181
4200
|
config,
|
|
4182
|
-
resolve: () => buildNetworkSnapshot$
|
|
4201
|
+
resolve: () => buildNetworkSnapshot$b(luvio, config, snapshotRefreshOptions)
|
|
4183
4202
|
});
|
|
4184
4203
|
return luvio.storeBroadcast().then(() => snapshot);
|
|
4185
4204
|
}
|
|
4186
|
-
function buildNetworkSnapshot$
|
|
4187
|
-
const resourceParams = createResourceParams$
|
|
4188
|
-
const request = createResourceRequest$
|
|
4205
|
+
function buildNetworkSnapshot$b(luvio, config, options) {
|
|
4206
|
+
const resourceParams = createResourceParams$b(config);
|
|
4207
|
+
const request = createResourceRequest$b(resourceParams);
|
|
4189
4208
|
return luvio.dispatchResourceRequest(request, options)
|
|
4190
4209
|
.then((response) => {
|
|
4191
|
-
return luvio.handleSuccessResponse(() => onFetchResponseSuccess$
|
|
4210
|
+
return luvio.handleSuccessResponse(() => onFetchResponseSuccess$9(luvio, config, resourceParams, response), () => {
|
|
4192
4211
|
const cache = new StoreKeyMap();
|
|
4193
|
-
getResponseCacheKeys$
|
|
4212
|
+
getResponseCacheKeys$b(cache, luvio, resourceParams, response.body);
|
|
4194
4213
|
return cache;
|
|
4195
4214
|
});
|
|
4196
4215
|
}, (response) => {
|
|
4197
|
-
return luvio.handleErrorResponse(() => onFetchResponseError$
|
|
4216
|
+
return luvio.handleErrorResponse(() => onFetchResponseError$9(luvio, config, resourceParams, response));
|
|
4198
4217
|
});
|
|
4199
4218
|
}
|
|
4200
|
-
function buildNetworkSnapshotCachePolicy$
|
|
4201
|
-
return buildNetworkSnapshotCachePolicy$
|
|
4219
|
+
function buildNetworkSnapshotCachePolicy$9(context, coercedAdapterRequestContext) {
|
|
4220
|
+
return buildNetworkSnapshotCachePolicy$b(context, coercedAdapterRequestContext, buildNetworkSnapshot$b, 'get', false);
|
|
4202
4221
|
}
|
|
4203
|
-
function buildCachedSnapshotCachePolicy$
|
|
4222
|
+
function buildCachedSnapshotCachePolicy$9(context, storeLookup) {
|
|
4204
4223
|
const { luvio, config } = context;
|
|
4205
4224
|
const selector = {
|
|
4206
|
-
recordId: keyBuilder$
|
|
4207
|
-
node: adapterFragment$
|
|
4225
|
+
recordId: keyBuilder$i(luvio, config),
|
|
4226
|
+
node: adapterFragment$9(luvio, config),
|
|
4208
4227
|
variables: {},
|
|
4209
4228
|
};
|
|
4210
4229
|
const cacheSnapshot = storeLookup(selector, {
|
|
4211
4230
|
config,
|
|
4212
|
-
resolve: () => buildNetworkSnapshot$
|
|
4231
|
+
resolve: () => buildNetworkSnapshot$b(luvio, config, snapshotRefreshOptions)
|
|
4213
4232
|
});
|
|
4214
4233
|
return cacheSnapshot;
|
|
4215
4234
|
}
|
|
4216
4235
|
const getDataProviderInstanceConfigAdapterFactory = (luvio) => function EinsteinLLM__getDataProviderInstanceConfig(untrustedConfig, requestContext) {
|
|
4217
|
-
const config = validateAdapterConfig$
|
|
4236
|
+
const config = validateAdapterConfig$b(untrustedConfig, getDataProviderInstanceConfig_ConfigPropertyNames);
|
|
4218
4237
|
// Invalid or incomplete config
|
|
4219
4238
|
if (config === null) {
|
|
4220
4239
|
return null;
|
|
4221
4240
|
}
|
|
4222
4241
|
return luvio.applyCachePolicy((requestContext || {}), { config, luvio }, // BuildSnapshotContext
|
|
4223
|
-
buildCachedSnapshotCachePolicy$
|
|
4242
|
+
buildCachedSnapshotCachePolicy$9, buildNetworkSnapshotCachePolicy$9);
|
|
4224
4243
|
};
|
|
4225
4244
|
|
|
4226
|
-
function validate$
|
|
4245
|
+
function validate$b(obj, path = 'PromptTemplateDataProviderTypeConfigRepresentation') {
|
|
4227
4246
|
const v_error = (() => {
|
|
4228
4247
|
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
4229
4248
|
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
@@ -4273,9 +4292,9 @@ function validate$8(obj, path = 'PromptTemplateDataProviderTypeConfigRepresentat
|
|
|
4273
4292
|
return v_error === undefined ? null : v_error;
|
|
4274
4293
|
}
|
|
4275
4294
|
|
|
4276
|
-
const TTL$
|
|
4277
|
-
const VERSION$
|
|
4278
|
-
function validate$
|
|
4295
|
+
const TTL$5 = 300;
|
|
4296
|
+
const VERSION$9 = "212332dac1decc071b476742df3440fb";
|
|
4297
|
+
function validate$a(obj, path = 'PromptTemplateDataProviderTypeConfigCollectionRepresentation') {
|
|
4279
4298
|
const v_error = (() => {
|
|
4280
4299
|
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
4281
4300
|
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
@@ -4288,7 +4307,7 @@ function validate$7(obj, path = 'PromptTemplateDataProviderTypeConfigCollectionR
|
|
|
4288
4307
|
for (let i = 0; i < obj_dataProviderTypeConfigs.length; i++) {
|
|
4289
4308
|
const obj_dataProviderTypeConfigs_item = obj_dataProviderTypeConfigs[i];
|
|
4290
4309
|
const path_dataProviderTypeConfigs_item = path_dataProviderTypeConfigs + '[' + i + ']';
|
|
4291
|
-
const referencepath_dataProviderTypeConfigs_itemValidationError = validate$
|
|
4310
|
+
const referencepath_dataProviderTypeConfigs_itemValidationError = validate$b(obj_dataProviderTypeConfigs_item, path_dataProviderTypeConfigs_item);
|
|
4292
4311
|
if (referencepath_dataProviderTypeConfigs_itemValidationError !== null) {
|
|
4293
4312
|
let message = 'Object doesn\'t match PromptTemplateDataProviderTypeConfigRepresentation (at "' + path_dataProviderTypeConfigs_item + '")\n';
|
|
4294
4313
|
message += referencepath_dataProviderTypeConfigs_itemValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
@@ -4298,62 +4317,62 @@ function validate$7(obj, path = 'PromptTemplateDataProviderTypeConfigCollectionR
|
|
|
4298
4317
|
})();
|
|
4299
4318
|
return v_error === undefined ? null : v_error;
|
|
4300
4319
|
}
|
|
4301
|
-
const RepresentationType$
|
|
4302
|
-
function normalize$
|
|
4320
|
+
const RepresentationType$5 = 'PromptTemplateDataProviderTypeConfigCollectionRepresentation';
|
|
4321
|
+
function normalize$5(input, existing, path, luvio, store, timestamp) {
|
|
4303
4322
|
return input;
|
|
4304
4323
|
}
|
|
4305
|
-
const select$
|
|
4324
|
+
const select$k = function PromptTemplateDataProviderTypeConfigCollectionRepresentationSelect() {
|
|
4306
4325
|
return {
|
|
4307
4326
|
kind: 'Fragment',
|
|
4308
|
-
version: VERSION$
|
|
4327
|
+
version: VERSION$9,
|
|
4309
4328
|
private: [],
|
|
4310
4329
|
opaque: true
|
|
4311
4330
|
};
|
|
4312
4331
|
};
|
|
4313
|
-
function equals$
|
|
4332
|
+
function equals$9(existing, incoming) {
|
|
4314
4333
|
if (JSONStringify(incoming) !== JSONStringify(existing)) {
|
|
4315
4334
|
return false;
|
|
4316
4335
|
}
|
|
4317
4336
|
return true;
|
|
4318
4337
|
}
|
|
4319
|
-
const ingest$
|
|
4338
|
+
const ingest$5 = function PromptTemplateDataProviderTypeConfigCollectionRepresentationIngest(input, path, luvio, store, timestamp) {
|
|
4320
4339
|
if (process.env.NODE_ENV !== 'production') {
|
|
4321
|
-
const validateError = validate$
|
|
4340
|
+
const validateError = validate$a(input);
|
|
4322
4341
|
if (validateError !== null) {
|
|
4323
4342
|
throw validateError;
|
|
4324
4343
|
}
|
|
4325
4344
|
}
|
|
4326
4345
|
const key = path.fullPath;
|
|
4327
|
-
const ttlToUse = TTL$
|
|
4328
|
-
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);
|
|
4329
4348
|
return createLink(key);
|
|
4330
4349
|
};
|
|
4331
|
-
function getTypeCacheKeys$
|
|
4350
|
+
function getTypeCacheKeys$5(rootKeySet, luvio, input, fullPathFactory) {
|
|
4332
4351
|
// root cache key (uses fullPathFactory if keyBuilderFromType isn't defined)
|
|
4333
4352
|
const rootKey = fullPathFactory();
|
|
4334
4353
|
rootKeySet.set(rootKey, {
|
|
4335
4354
|
namespace: keyPrefix,
|
|
4336
|
-
representationName: RepresentationType$
|
|
4355
|
+
representationName: RepresentationType$5,
|
|
4337
4356
|
mergeable: false
|
|
4338
4357
|
});
|
|
4339
4358
|
}
|
|
4340
4359
|
|
|
4341
|
-
function select$
|
|
4342
|
-
return select$
|
|
4360
|
+
function select$j(luvio, params) {
|
|
4361
|
+
return select$k();
|
|
4343
4362
|
}
|
|
4344
|
-
function keyBuilder$
|
|
4363
|
+
function keyBuilder$h(luvio, params) {
|
|
4345
4364
|
return keyPrefix + '::PromptTemplateDataProviderTypeConfigCollectionRepresentation:(' + 'templateType:' + params.urlParams.templateType + ')';
|
|
4346
4365
|
}
|
|
4347
|
-
function getResponseCacheKeys$
|
|
4348
|
-
getTypeCacheKeys$
|
|
4366
|
+
function getResponseCacheKeys$a(storeKeyMap, luvio, resourceParams, response) {
|
|
4367
|
+
getTypeCacheKeys$5(storeKeyMap, luvio, response, () => keyBuilder$h(luvio, resourceParams));
|
|
4349
4368
|
}
|
|
4350
|
-
function ingestSuccess$
|
|
4369
|
+
function ingestSuccess$a(luvio, resourceParams, response, snapshotRefresh) {
|
|
4351
4370
|
const { body } = response;
|
|
4352
|
-
const key = keyBuilder$
|
|
4353
|
-
luvio.storeIngest(key, ingest$
|
|
4371
|
+
const key = keyBuilder$h(luvio, resourceParams);
|
|
4372
|
+
luvio.storeIngest(key, ingest$5, body);
|
|
4354
4373
|
const snapshot = luvio.storeLookup({
|
|
4355
4374
|
recordId: key,
|
|
4356
|
-
node: select$
|
|
4375
|
+
node: select$j(),
|
|
4357
4376
|
variables: {},
|
|
4358
4377
|
}, snapshotRefresh);
|
|
4359
4378
|
if (process.env.NODE_ENV !== 'production') {
|
|
@@ -4364,19 +4383,19 @@ function ingestSuccess$7(luvio, resourceParams, response, snapshotRefresh) {
|
|
|
4364
4383
|
deepFreeze(snapshot.data);
|
|
4365
4384
|
return snapshot;
|
|
4366
4385
|
}
|
|
4367
|
-
function ingestError$
|
|
4368
|
-
const key = keyBuilder$
|
|
4386
|
+
function ingestError$8(luvio, params, error, snapshotRefresh) {
|
|
4387
|
+
const key = keyBuilder$h(luvio, params);
|
|
4369
4388
|
const errorSnapshot = luvio.errorSnapshot(error, snapshotRefresh);
|
|
4370
4389
|
const storeMetadataParams = {
|
|
4371
|
-
ttl: TTL$
|
|
4390
|
+
ttl: TTL$5,
|
|
4372
4391
|
namespace: keyPrefix,
|
|
4373
|
-
version: VERSION$
|
|
4374
|
-
representationName: RepresentationType$
|
|
4392
|
+
version: VERSION$9,
|
|
4393
|
+
representationName: RepresentationType$5
|
|
4375
4394
|
};
|
|
4376
4395
|
luvio.storeIngestError(key, errorSnapshot, storeMetadataParams);
|
|
4377
4396
|
return errorSnapshot;
|
|
4378
4397
|
}
|
|
4379
|
-
function createResourceRequest$
|
|
4398
|
+
function createResourceRequest$a(config) {
|
|
4380
4399
|
const headers = {};
|
|
4381
4400
|
return {
|
|
4382
4401
|
baseUri: '/services/data/v66.0',
|
|
@@ -4390,95 +4409,95 @@ function createResourceRequest$7(config) {
|
|
|
4390
4409
|
};
|
|
4391
4410
|
}
|
|
4392
4411
|
|
|
4393
|
-
const adapterName$
|
|
4412
|
+
const adapterName$a = 'getDataProviderTypeConfigs';
|
|
4394
4413
|
const getDataProviderTypeConfigs_ConfigPropertyMetadata = [
|
|
4395
4414
|
generateParamConfigMetadata('templateType', true, 0 /* UrlParameter */, 0 /* String */),
|
|
4396
4415
|
];
|
|
4397
|
-
const getDataProviderTypeConfigs_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$
|
|
4398
|
-
const createResourceParams$
|
|
4399
|
-
function keyBuilder$
|
|
4400
|
-
const resourceParams = createResourceParams$
|
|
4401
|
-
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);
|
|
4402
4421
|
}
|
|
4403
|
-
function typeCheckConfig$
|
|
4422
|
+
function typeCheckConfig$a(untrustedConfig) {
|
|
4404
4423
|
const config = {};
|
|
4405
|
-
typeCheckConfig$
|
|
4424
|
+
typeCheckConfig$i(untrustedConfig, config, getDataProviderTypeConfigs_ConfigPropertyMetadata);
|
|
4406
4425
|
return config;
|
|
4407
4426
|
}
|
|
4408
|
-
function validateAdapterConfig$
|
|
4427
|
+
function validateAdapterConfig$a(untrustedConfig, configPropertyNames) {
|
|
4409
4428
|
if (!untrustedIsObject(untrustedConfig)) {
|
|
4410
4429
|
return null;
|
|
4411
4430
|
}
|
|
4412
4431
|
if (process.env.NODE_ENV !== 'production') {
|
|
4413
4432
|
validateConfig(untrustedConfig, configPropertyNames);
|
|
4414
4433
|
}
|
|
4415
|
-
const config = typeCheckConfig$
|
|
4434
|
+
const config = typeCheckConfig$a(untrustedConfig);
|
|
4416
4435
|
if (!areRequiredParametersPresent(config, configPropertyNames)) {
|
|
4417
4436
|
return null;
|
|
4418
4437
|
}
|
|
4419
4438
|
return config;
|
|
4420
4439
|
}
|
|
4421
|
-
function adapterFragment$
|
|
4422
|
-
createResourceParams$
|
|
4423
|
-
return select$
|
|
4440
|
+
function adapterFragment$8(luvio, config) {
|
|
4441
|
+
createResourceParams$a(config);
|
|
4442
|
+
return select$j();
|
|
4424
4443
|
}
|
|
4425
|
-
function onFetchResponseSuccess$
|
|
4426
|
-
const snapshot = ingestSuccess$
|
|
4444
|
+
function onFetchResponseSuccess$8(luvio, config, resourceParams, response) {
|
|
4445
|
+
const snapshot = ingestSuccess$a(luvio, resourceParams, response, {
|
|
4427
4446
|
config,
|
|
4428
|
-
resolve: () => buildNetworkSnapshot$
|
|
4447
|
+
resolve: () => buildNetworkSnapshot$a(luvio, config, snapshotRefreshOptions)
|
|
4429
4448
|
});
|
|
4430
4449
|
return luvio.storeBroadcast().then(() => snapshot);
|
|
4431
4450
|
}
|
|
4432
|
-
function onFetchResponseError$
|
|
4433
|
-
const snapshot = ingestError$
|
|
4451
|
+
function onFetchResponseError$8(luvio, config, resourceParams, response) {
|
|
4452
|
+
const snapshot = ingestError$8(luvio, resourceParams, response, {
|
|
4434
4453
|
config,
|
|
4435
|
-
resolve: () => buildNetworkSnapshot$
|
|
4454
|
+
resolve: () => buildNetworkSnapshot$a(luvio, config, snapshotRefreshOptions)
|
|
4436
4455
|
});
|
|
4437
4456
|
return luvio.storeBroadcast().then(() => snapshot);
|
|
4438
4457
|
}
|
|
4439
|
-
function buildNetworkSnapshot$
|
|
4440
|
-
const resourceParams = createResourceParams$
|
|
4441
|
-
const request = createResourceRequest$
|
|
4458
|
+
function buildNetworkSnapshot$a(luvio, config, options) {
|
|
4459
|
+
const resourceParams = createResourceParams$a(config);
|
|
4460
|
+
const request = createResourceRequest$a(resourceParams);
|
|
4442
4461
|
return luvio.dispatchResourceRequest(request, options)
|
|
4443
4462
|
.then((response) => {
|
|
4444
|
-
return luvio.handleSuccessResponse(() => onFetchResponseSuccess$
|
|
4463
|
+
return luvio.handleSuccessResponse(() => onFetchResponseSuccess$8(luvio, config, resourceParams, response), () => {
|
|
4445
4464
|
const cache = new StoreKeyMap();
|
|
4446
|
-
getResponseCacheKeys$
|
|
4465
|
+
getResponseCacheKeys$a(cache, luvio, resourceParams, response.body);
|
|
4447
4466
|
return cache;
|
|
4448
4467
|
});
|
|
4449
4468
|
}, (response) => {
|
|
4450
|
-
return luvio.handleErrorResponse(() => onFetchResponseError$
|
|
4469
|
+
return luvio.handleErrorResponse(() => onFetchResponseError$8(luvio, config, resourceParams, response));
|
|
4451
4470
|
});
|
|
4452
4471
|
}
|
|
4453
|
-
function buildNetworkSnapshotCachePolicy$
|
|
4454
|
-
return buildNetworkSnapshotCachePolicy$
|
|
4472
|
+
function buildNetworkSnapshotCachePolicy$8(context, coercedAdapterRequestContext) {
|
|
4473
|
+
return buildNetworkSnapshotCachePolicy$b(context, coercedAdapterRequestContext, buildNetworkSnapshot$a, undefined, false);
|
|
4455
4474
|
}
|
|
4456
|
-
function buildCachedSnapshotCachePolicy$
|
|
4475
|
+
function buildCachedSnapshotCachePolicy$8(context, storeLookup) {
|
|
4457
4476
|
const { luvio, config } = context;
|
|
4458
4477
|
const selector = {
|
|
4459
|
-
recordId: keyBuilder$
|
|
4460
|
-
node: adapterFragment$
|
|
4478
|
+
recordId: keyBuilder$g(luvio, config),
|
|
4479
|
+
node: adapterFragment$8(luvio, config),
|
|
4461
4480
|
variables: {},
|
|
4462
4481
|
};
|
|
4463
4482
|
const cacheSnapshot = storeLookup(selector, {
|
|
4464
4483
|
config,
|
|
4465
|
-
resolve: () => buildNetworkSnapshot$
|
|
4484
|
+
resolve: () => buildNetworkSnapshot$a(luvio, config, snapshotRefreshOptions)
|
|
4466
4485
|
});
|
|
4467
4486
|
return cacheSnapshot;
|
|
4468
4487
|
}
|
|
4469
4488
|
const getDataProviderTypeConfigsAdapterFactory = (luvio) => function EinsteinLLM__getDataProviderTypeConfigs(untrustedConfig, requestContext) {
|
|
4470
|
-
const config = validateAdapterConfig$
|
|
4489
|
+
const config = validateAdapterConfig$a(untrustedConfig, getDataProviderTypeConfigs_ConfigPropertyNames);
|
|
4471
4490
|
// Invalid or incomplete config
|
|
4472
4491
|
if (config === null) {
|
|
4473
4492
|
return null;
|
|
4474
4493
|
}
|
|
4475
4494
|
return luvio.applyCachePolicy((requestContext || {}), { config, luvio }, // BuildSnapshotContext
|
|
4476
|
-
buildCachedSnapshotCachePolicy$
|
|
4495
|
+
buildCachedSnapshotCachePolicy$8, buildNetworkSnapshotCachePolicy$8);
|
|
4477
4496
|
};
|
|
4478
4497
|
|
|
4479
|
-
const TTL$
|
|
4480
|
-
const VERSION$
|
|
4481
|
-
function validate$
|
|
4498
|
+
const TTL$4 = 300;
|
|
4499
|
+
const VERSION$8 = "3a6ecdfe18eb2af8f8f6aaa1a30b194c";
|
|
4500
|
+
function validate$9(obj, path = 'PromptTemplateDataProviderInstanceConfigCollectionRepresentation') {
|
|
4482
4501
|
const v_error = (() => {
|
|
4483
4502
|
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
4484
4503
|
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
@@ -4491,7 +4510,7 @@ function validate$6(obj, path = 'PromptTemplateDataProviderInstanceConfigCollect
|
|
|
4491
4510
|
for (let i = 0; i < obj_dataProviderInstanceConfigs.length; i++) {
|
|
4492
4511
|
const obj_dataProviderInstanceConfigs_item = obj_dataProviderInstanceConfigs[i];
|
|
4493
4512
|
const path_dataProviderInstanceConfigs_item = path_dataProviderInstanceConfigs + '[' + i + ']';
|
|
4494
|
-
const referencepath_dataProviderInstanceConfigs_itemValidationError = validate$
|
|
4513
|
+
const referencepath_dataProviderInstanceConfigs_itemValidationError = validate$c(obj_dataProviderInstanceConfigs_item, path_dataProviderInstanceConfigs_item);
|
|
4495
4514
|
if (referencepath_dataProviderInstanceConfigs_itemValidationError !== null) {
|
|
4496
4515
|
let message = 'Object doesn\'t match PromptTemplateDataProviderInstanceConfigRepresentation (at "' + path_dataProviderInstanceConfigs_item + '")\n';
|
|
4497
4516
|
message += referencepath_dataProviderInstanceConfigs_itemValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
@@ -4501,62 +4520,62 @@ function validate$6(obj, path = 'PromptTemplateDataProviderInstanceConfigCollect
|
|
|
4501
4520
|
})();
|
|
4502
4521
|
return v_error === undefined ? null : v_error;
|
|
4503
4522
|
}
|
|
4504
|
-
const RepresentationType$
|
|
4505
|
-
function normalize$
|
|
4523
|
+
const RepresentationType$4 = 'PromptTemplateDataProviderInstanceConfigCollectionRepresentation';
|
|
4524
|
+
function normalize$4(input, existing, path, luvio, store, timestamp) {
|
|
4506
4525
|
return input;
|
|
4507
4526
|
}
|
|
4508
|
-
const select$
|
|
4527
|
+
const select$i = function PromptTemplateDataProviderInstanceConfigCollectionRepresentationSelect() {
|
|
4509
4528
|
return {
|
|
4510
4529
|
kind: 'Fragment',
|
|
4511
|
-
version: VERSION$
|
|
4530
|
+
version: VERSION$8,
|
|
4512
4531
|
private: [],
|
|
4513
4532
|
opaque: true
|
|
4514
4533
|
};
|
|
4515
4534
|
};
|
|
4516
|
-
function equals$
|
|
4535
|
+
function equals$8(existing, incoming) {
|
|
4517
4536
|
if (JSONStringify(incoming) !== JSONStringify(existing)) {
|
|
4518
4537
|
return false;
|
|
4519
4538
|
}
|
|
4520
4539
|
return true;
|
|
4521
4540
|
}
|
|
4522
|
-
const ingest$
|
|
4541
|
+
const ingest$4 = function PromptTemplateDataProviderInstanceConfigCollectionRepresentationIngest(input, path, luvio, store, timestamp) {
|
|
4523
4542
|
if (process.env.NODE_ENV !== 'production') {
|
|
4524
|
-
const validateError = validate$
|
|
4543
|
+
const validateError = validate$9(input);
|
|
4525
4544
|
if (validateError !== null) {
|
|
4526
4545
|
throw validateError;
|
|
4527
4546
|
}
|
|
4528
4547
|
}
|
|
4529
4548
|
const key = path.fullPath;
|
|
4530
|
-
const ttlToUse = TTL$
|
|
4531
|
-
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);
|
|
4532
4551
|
return createLink(key);
|
|
4533
4552
|
};
|
|
4534
|
-
function getTypeCacheKeys$
|
|
4553
|
+
function getTypeCacheKeys$4(rootKeySet, luvio, input, fullPathFactory) {
|
|
4535
4554
|
// root cache key (uses fullPathFactory if keyBuilderFromType isn't defined)
|
|
4536
4555
|
const rootKey = fullPathFactory();
|
|
4537
4556
|
rootKeySet.set(rootKey, {
|
|
4538
4557
|
namespace: keyPrefix,
|
|
4539
|
-
representationName: RepresentationType$
|
|
4558
|
+
representationName: RepresentationType$4,
|
|
4540
4559
|
mergeable: false
|
|
4541
4560
|
});
|
|
4542
4561
|
}
|
|
4543
4562
|
|
|
4544
|
-
function select$
|
|
4545
|
-
return select$
|
|
4563
|
+
function select$h(luvio, params) {
|
|
4564
|
+
return select$i();
|
|
4546
4565
|
}
|
|
4547
|
-
function keyBuilder$
|
|
4566
|
+
function keyBuilder$f(luvio, params) {
|
|
4548
4567
|
return keyPrefix + '::PromptTemplateDataProviderInstanceConfigCollectionRepresentation:(' + 'groupNames:' + params.queryParams.groupNames + ',' + 'targets:' + params.queryParams.targets + ',' + 'templateType:' + params.urlParams.templateType + ')';
|
|
4549
4568
|
}
|
|
4550
|
-
function getResponseCacheKeys$
|
|
4551
|
-
getTypeCacheKeys$
|
|
4569
|
+
function getResponseCacheKeys$9(storeKeyMap, luvio, resourceParams, response) {
|
|
4570
|
+
getTypeCacheKeys$4(storeKeyMap, luvio, response, () => keyBuilder$f(luvio, resourceParams));
|
|
4552
4571
|
}
|
|
4553
|
-
function ingestSuccess$
|
|
4572
|
+
function ingestSuccess$9(luvio, resourceParams, response, snapshotRefresh) {
|
|
4554
4573
|
const { body } = response;
|
|
4555
|
-
const key = keyBuilder$
|
|
4556
|
-
luvio.storeIngest(key, ingest$
|
|
4574
|
+
const key = keyBuilder$f(luvio, resourceParams);
|
|
4575
|
+
luvio.storeIngest(key, ingest$4, body);
|
|
4557
4576
|
const snapshot = luvio.storeLookup({
|
|
4558
4577
|
recordId: key,
|
|
4559
|
-
node: select$
|
|
4578
|
+
node: select$h(),
|
|
4560
4579
|
variables: {},
|
|
4561
4580
|
}, snapshotRefresh);
|
|
4562
4581
|
if (process.env.NODE_ENV !== 'production') {
|
|
@@ -4567,19 +4586,19 @@ function ingestSuccess$6(luvio, resourceParams, response, snapshotRefresh) {
|
|
|
4567
4586
|
deepFreeze(snapshot.data);
|
|
4568
4587
|
return snapshot;
|
|
4569
4588
|
}
|
|
4570
|
-
function ingestError$
|
|
4571
|
-
const key = keyBuilder$
|
|
4589
|
+
function ingestError$7(luvio, params, error, snapshotRefresh) {
|
|
4590
|
+
const key = keyBuilder$f(luvio, params);
|
|
4572
4591
|
const errorSnapshot = luvio.errorSnapshot(error, snapshotRefresh);
|
|
4573
4592
|
const storeMetadataParams = {
|
|
4574
|
-
ttl: TTL$
|
|
4593
|
+
ttl: TTL$4,
|
|
4575
4594
|
namespace: keyPrefix,
|
|
4576
|
-
version: VERSION$
|
|
4577
|
-
representationName: RepresentationType$
|
|
4595
|
+
version: VERSION$8,
|
|
4596
|
+
representationName: RepresentationType$4
|
|
4578
4597
|
};
|
|
4579
4598
|
luvio.storeIngestError(key, errorSnapshot, storeMetadataParams);
|
|
4580
4599
|
return errorSnapshot;
|
|
4581
4600
|
}
|
|
4582
|
-
function createResourceRequest$
|
|
4601
|
+
function createResourceRequest$9(config) {
|
|
4583
4602
|
const headers = {};
|
|
4584
4603
|
return {
|
|
4585
4604
|
baseUri: '/services/data/v66.0',
|
|
@@ -4593,110 +4612,110 @@ function createResourceRequest$6(config) {
|
|
|
4593
4612
|
};
|
|
4594
4613
|
}
|
|
4595
4614
|
|
|
4596
|
-
const adapterName$
|
|
4615
|
+
const adapterName$9 = 'getDataProviders';
|
|
4597
4616
|
const getDataProviders_ConfigPropertyMetadata = [
|
|
4598
4617
|
generateParamConfigMetadata('templateType', true, 0 /* UrlParameter */, 0 /* String */),
|
|
4599
4618
|
generateParamConfigMetadata('groupNames', false, 1 /* QueryParameter */, 0 /* String */, true),
|
|
4600
4619
|
generateParamConfigMetadata('targets', false, 1 /* QueryParameter */, 0 /* String */, true),
|
|
4601
4620
|
];
|
|
4602
|
-
const getDataProviders_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$
|
|
4603
|
-
const createResourceParams$
|
|
4604
|
-
function keyBuilder$
|
|
4605
|
-
const resourceParams = createResourceParams$
|
|
4606
|
-
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);
|
|
4607
4626
|
}
|
|
4608
|
-
function typeCheckConfig$
|
|
4627
|
+
function typeCheckConfig$9(untrustedConfig) {
|
|
4609
4628
|
const config = {};
|
|
4610
|
-
typeCheckConfig$
|
|
4629
|
+
typeCheckConfig$i(untrustedConfig, config, getDataProviders_ConfigPropertyMetadata);
|
|
4611
4630
|
return config;
|
|
4612
4631
|
}
|
|
4613
|
-
function validateAdapterConfig$
|
|
4632
|
+
function validateAdapterConfig$9(untrustedConfig, configPropertyNames) {
|
|
4614
4633
|
if (!untrustedIsObject(untrustedConfig)) {
|
|
4615
4634
|
return null;
|
|
4616
4635
|
}
|
|
4617
4636
|
if (process.env.NODE_ENV !== 'production') {
|
|
4618
4637
|
validateConfig(untrustedConfig, configPropertyNames);
|
|
4619
4638
|
}
|
|
4620
|
-
const config = typeCheckConfig$
|
|
4639
|
+
const config = typeCheckConfig$9(untrustedConfig);
|
|
4621
4640
|
if (!areRequiredParametersPresent(config, configPropertyNames)) {
|
|
4622
4641
|
return null;
|
|
4623
4642
|
}
|
|
4624
4643
|
return config;
|
|
4625
4644
|
}
|
|
4626
|
-
function adapterFragment$
|
|
4627
|
-
createResourceParams$
|
|
4628
|
-
return select$
|
|
4645
|
+
function adapterFragment$7(luvio, config) {
|
|
4646
|
+
createResourceParams$9(config);
|
|
4647
|
+
return select$h();
|
|
4629
4648
|
}
|
|
4630
|
-
function onFetchResponseSuccess$
|
|
4631
|
-
const snapshot = ingestSuccess$
|
|
4649
|
+
function onFetchResponseSuccess$7(luvio, config, resourceParams, response) {
|
|
4650
|
+
const snapshot = ingestSuccess$9(luvio, resourceParams, response, {
|
|
4632
4651
|
config,
|
|
4633
|
-
resolve: () => buildNetworkSnapshot$
|
|
4652
|
+
resolve: () => buildNetworkSnapshot$9(luvio, config, snapshotRefreshOptions)
|
|
4634
4653
|
});
|
|
4635
4654
|
return luvio.storeBroadcast().then(() => snapshot);
|
|
4636
4655
|
}
|
|
4637
|
-
function onFetchResponseError$
|
|
4638
|
-
const snapshot = ingestError$
|
|
4656
|
+
function onFetchResponseError$7(luvio, config, resourceParams, response) {
|
|
4657
|
+
const snapshot = ingestError$7(luvio, resourceParams, response, {
|
|
4639
4658
|
config,
|
|
4640
|
-
resolve: () => buildNetworkSnapshot$
|
|
4659
|
+
resolve: () => buildNetworkSnapshot$9(luvio, config, snapshotRefreshOptions)
|
|
4641
4660
|
});
|
|
4642
4661
|
return luvio.storeBroadcast().then(() => snapshot);
|
|
4643
4662
|
}
|
|
4644
|
-
function buildNetworkSnapshot$
|
|
4645
|
-
const resourceParams = createResourceParams$
|
|
4646
|
-
const request = createResourceRequest$
|
|
4663
|
+
function buildNetworkSnapshot$9(luvio, config, options) {
|
|
4664
|
+
const resourceParams = createResourceParams$9(config);
|
|
4665
|
+
const request = createResourceRequest$9(resourceParams);
|
|
4647
4666
|
return luvio.dispatchResourceRequest(request, options)
|
|
4648
4667
|
.then((response) => {
|
|
4649
|
-
return luvio.handleSuccessResponse(() => onFetchResponseSuccess$
|
|
4668
|
+
return luvio.handleSuccessResponse(() => onFetchResponseSuccess$7(luvio, config, resourceParams, response), () => {
|
|
4650
4669
|
const cache = new StoreKeyMap();
|
|
4651
|
-
getResponseCacheKeys$
|
|
4670
|
+
getResponseCacheKeys$9(cache, luvio, resourceParams, response.body);
|
|
4652
4671
|
return cache;
|
|
4653
4672
|
});
|
|
4654
4673
|
}, (response) => {
|
|
4655
|
-
return luvio.handleErrorResponse(() => onFetchResponseError$
|
|
4674
|
+
return luvio.handleErrorResponse(() => onFetchResponseError$7(luvio, config, resourceParams, response));
|
|
4656
4675
|
});
|
|
4657
4676
|
}
|
|
4658
|
-
function buildNetworkSnapshotCachePolicy$
|
|
4659
|
-
return buildNetworkSnapshotCachePolicy$
|
|
4677
|
+
function buildNetworkSnapshotCachePolicy$7(context, coercedAdapterRequestContext) {
|
|
4678
|
+
return buildNetworkSnapshotCachePolicy$b(context, coercedAdapterRequestContext, buildNetworkSnapshot$9, undefined, false);
|
|
4660
4679
|
}
|
|
4661
|
-
function buildCachedSnapshotCachePolicy$
|
|
4680
|
+
function buildCachedSnapshotCachePolicy$7(context, storeLookup) {
|
|
4662
4681
|
const { luvio, config } = context;
|
|
4663
4682
|
const selector = {
|
|
4664
|
-
recordId: keyBuilder$
|
|
4665
|
-
node: adapterFragment$
|
|
4683
|
+
recordId: keyBuilder$e(luvio, config),
|
|
4684
|
+
node: adapterFragment$7(luvio, config),
|
|
4666
4685
|
variables: {},
|
|
4667
4686
|
};
|
|
4668
4687
|
const cacheSnapshot = storeLookup(selector, {
|
|
4669
4688
|
config,
|
|
4670
|
-
resolve: () => buildNetworkSnapshot$
|
|
4689
|
+
resolve: () => buildNetworkSnapshot$9(luvio, config, snapshotRefreshOptions)
|
|
4671
4690
|
});
|
|
4672
4691
|
return cacheSnapshot;
|
|
4673
4692
|
}
|
|
4674
4693
|
const getDataProvidersAdapterFactory = (luvio) => function EinsteinLLM__getDataProviders(untrustedConfig, requestContext) {
|
|
4675
|
-
const config = validateAdapterConfig$
|
|
4694
|
+
const config = validateAdapterConfig$9(untrustedConfig, getDataProviders_ConfigPropertyNames);
|
|
4676
4695
|
// Invalid or incomplete config
|
|
4677
4696
|
if (config === null) {
|
|
4678
4697
|
return null;
|
|
4679
4698
|
}
|
|
4680
4699
|
return luvio.applyCachePolicy((requestContext || {}), { config, luvio }, // BuildSnapshotContext
|
|
4681
|
-
buildCachedSnapshotCachePolicy$
|
|
4700
|
+
buildCachedSnapshotCachePolicy$7, buildNetworkSnapshotCachePolicy$7);
|
|
4682
4701
|
};
|
|
4683
4702
|
|
|
4684
|
-
function select$
|
|
4685
|
-
return select$
|
|
4703
|
+
function select$g(luvio, params) {
|
|
4704
|
+
return select$i();
|
|
4686
4705
|
}
|
|
4687
|
-
function keyBuilder$
|
|
4706
|
+
function keyBuilder$d(luvio, params) {
|
|
4688
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 + ')';
|
|
4689
4708
|
}
|
|
4690
|
-
function getResponseCacheKeys$
|
|
4691
|
-
getTypeCacheKeys$
|
|
4709
|
+
function getResponseCacheKeys$8(storeKeyMap, luvio, resourceParams, response) {
|
|
4710
|
+
getTypeCacheKeys$4(storeKeyMap, luvio, response, () => keyBuilder$d(luvio, resourceParams));
|
|
4692
4711
|
}
|
|
4693
|
-
function ingestSuccess$
|
|
4712
|
+
function ingestSuccess$8(luvio, resourceParams, response, snapshotRefresh) {
|
|
4694
4713
|
const { body } = response;
|
|
4695
|
-
const key = keyBuilder$
|
|
4696
|
-
luvio.storeIngest(key, ingest$
|
|
4714
|
+
const key = keyBuilder$d(luvio, resourceParams);
|
|
4715
|
+
luvio.storeIngest(key, ingest$4, body);
|
|
4697
4716
|
const snapshot = luvio.storeLookup({
|
|
4698
4717
|
recordId: key,
|
|
4699
|
-
node: select$
|
|
4718
|
+
node: select$g(),
|
|
4700
4719
|
variables: {},
|
|
4701
4720
|
}, snapshotRefresh);
|
|
4702
4721
|
if (process.env.NODE_ENV !== 'production') {
|
|
@@ -4707,19 +4726,19 @@ function ingestSuccess$5(luvio, resourceParams, response, snapshotRefresh) {
|
|
|
4707
4726
|
deepFreeze(snapshot.data);
|
|
4708
4727
|
return snapshot;
|
|
4709
4728
|
}
|
|
4710
|
-
function ingestError$
|
|
4711
|
-
const key = keyBuilder$
|
|
4729
|
+
function ingestError$6(luvio, params, error, snapshotRefresh) {
|
|
4730
|
+
const key = keyBuilder$d(luvio, params);
|
|
4712
4731
|
const errorSnapshot = luvio.errorSnapshot(error, snapshotRefresh);
|
|
4713
4732
|
const storeMetadataParams = {
|
|
4714
|
-
ttl: TTL$
|
|
4733
|
+
ttl: TTL$4,
|
|
4715
4734
|
namespace: keyPrefix,
|
|
4716
|
-
version: VERSION$
|
|
4717
|
-
representationName: RepresentationType$
|
|
4735
|
+
version: VERSION$8,
|
|
4736
|
+
representationName: RepresentationType$4
|
|
4718
4737
|
};
|
|
4719
4738
|
luvio.storeIngestError(key, errorSnapshot, storeMetadataParams);
|
|
4720
4739
|
return errorSnapshot;
|
|
4721
4740
|
}
|
|
4722
|
-
function createResourceRequest$
|
|
4741
|
+
function createResourceRequest$8(config) {
|
|
4723
4742
|
const headers = {};
|
|
4724
4743
|
return {
|
|
4725
4744
|
baseUri: '/services/data/v66.0',
|
|
@@ -4733,22 +4752,22 @@ function createResourceRequest$5(config) {
|
|
|
4733
4752
|
};
|
|
4734
4753
|
}
|
|
4735
4754
|
|
|
4736
|
-
const adapterName$
|
|
4755
|
+
const adapterName$8 = 'getInputMappedDataProviders';
|
|
4737
4756
|
const getInputMappedDataProviders_ConfigPropertyMetadata = [
|
|
4738
4757
|
generateParamConfigMetadata('groupName', false, 2 /* Body */, 0 /* String */),
|
|
4739
4758
|
generateParamConfigMetadata('target', false, 2 /* Body */, 0 /* String */),
|
|
4740
4759
|
generateParamConfigMetadata('templateInputs', true, 2 /* Body */, 4 /* Unsupported */, true),
|
|
4741
4760
|
generateParamConfigMetadata('templateTypeName', true, 2 /* Body */, 0 /* String */),
|
|
4742
4761
|
];
|
|
4743
|
-
const getInputMappedDataProviders_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$
|
|
4744
|
-
const createResourceParams$
|
|
4745
|
-
function keyBuilder$
|
|
4746
|
-
const resourceParams = createResourceParams$
|
|
4747
|
-
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);
|
|
4748
4767
|
}
|
|
4749
|
-
function typeCheckConfig$
|
|
4768
|
+
function typeCheckConfig$8(untrustedConfig) {
|
|
4750
4769
|
const config = {};
|
|
4751
|
-
typeCheckConfig$
|
|
4770
|
+
typeCheckConfig$i(untrustedConfig, config, getInputMappedDataProviders_ConfigPropertyMetadata);
|
|
4752
4771
|
const untrustedConfig_templateInputs = untrustedConfig.templateInputs;
|
|
4753
4772
|
if (ArrayIsArray$1(untrustedConfig_templateInputs)) {
|
|
4754
4773
|
const untrustedConfig_templateInputs_array = [];
|
|
@@ -4760,79 +4779,79 @@ function typeCheckConfig$5(untrustedConfig) {
|
|
|
4760
4779
|
}
|
|
4761
4780
|
return config;
|
|
4762
4781
|
}
|
|
4763
|
-
function validateAdapterConfig$
|
|
4782
|
+
function validateAdapterConfig$8(untrustedConfig, configPropertyNames) {
|
|
4764
4783
|
if (!untrustedIsObject(untrustedConfig)) {
|
|
4765
4784
|
return null;
|
|
4766
4785
|
}
|
|
4767
4786
|
if (process.env.NODE_ENV !== 'production') {
|
|
4768
4787
|
validateConfig(untrustedConfig, configPropertyNames);
|
|
4769
4788
|
}
|
|
4770
|
-
const config = typeCheckConfig$
|
|
4789
|
+
const config = typeCheckConfig$8(untrustedConfig);
|
|
4771
4790
|
if (!areRequiredParametersPresent(config, configPropertyNames)) {
|
|
4772
4791
|
return null;
|
|
4773
4792
|
}
|
|
4774
4793
|
return config;
|
|
4775
4794
|
}
|
|
4776
|
-
function adapterFragment$
|
|
4777
|
-
createResourceParams$
|
|
4778
|
-
return select$
|
|
4795
|
+
function adapterFragment$6(luvio, config) {
|
|
4796
|
+
createResourceParams$8(config);
|
|
4797
|
+
return select$g();
|
|
4779
4798
|
}
|
|
4780
|
-
function onFetchResponseSuccess$
|
|
4781
|
-
const snapshot = ingestSuccess$
|
|
4799
|
+
function onFetchResponseSuccess$6(luvio, config, resourceParams, response) {
|
|
4800
|
+
const snapshot = ingestSuccess$8(luvio, resourceParams, response, {
|
|
4782
4801
|
config,
|
|
4783
|
-
resolve: () => buildNetworkSnapshot$
|
|
4802
|
+
resolve: () => buildNetworkSnapshot$8(luvio, config, snapshotRefreshOptions)
|
|
4784
4803
|
});
|
|
4785
4804
|
return luvio.storeBroadcast().then(() => snapshot);
|
|
4786
4805
|
}
|
|
4787
|
-
function onFetchResponseError$
|
|
4788
|
-
const snapshot = ingestError$
|
|
4806
|
+
function onFetchResponseError$6(luvio, config, resourceParams, response) {
|
|
4807
|
+
const snapshot = ingestError$6(luvio, resourceParams, response, {
|
|
4789
4808
|
config,
|
|
4790
|
-
resolve: () => buildNetworkSnapshot$
|
|
4809
|
+
resolve: () => buildNetworkSnapshot$8(luvio, config, snapshotRefreshOptions)
|
|
4791
4810
|
});
|
|
4792
4811
|
return luvio.storeBroadcast().then(() => snapshot);
|
|
4793
4812
|
}
|
|
4794
|
-
function buildNetworkSnapshot$
|
|
4795
|
-
const resourceParams = createResourceParams$
|
|
4796
|
-
const request = createResourceRequest$
|
|
4813
|
+
function buildNetworkSnapshot$8(luvio, config, options) {
|
|
4814
|
+
const resourceParams = createResourceParams$8(config);
|
|
4815
|
+
const request = createResourceRequest$8(resourceParams);
|
|
4797
4816
|
return luvio.dispatchResourceRequest(request, options)
|
|
4798
4817
|
.then((response) => {
|
|
4799
|
-
return luvio.handleSuccessResponse(() => onFetchResponseSuccess$
|
|
4818
|
+
return luvio.handleSuccessResponse(() => onFetchResponseSuccess$6(luvio, config, resourceParams, response), () => {
|
|
4800
4819
|
const cache = new StoreKeyMap();
|
|
4801
|
-
getResponseCacheKeys$
|
|
4820
|
+
getResponseCacheKeys$8(cache, luvio, resourceParams, response.body);
|
|
4802
4821
|
return cache;
|
|
4803
4822
|
});
|
|
4804
4823
|
}, (response) => {
|
|
4805
|
-
return luvio.handleErrorResponse(() => onFetchResponseError$
|
|
4824
|
+
return luvio.handleErrorResponse(() => onFetchResponseError$6(luvio, config, resourceParams, response));
|
|
4806
4825
|
});
|
|
4807
4826
|
}
|
|
4808
|
-
function buildNetworkSnapshotCachePolicy$
|
|
4809
|
-
return buildNetworkSnapshotCachePolicy$
|
|
4827
|
+
function buildNetworkSnapshotCachePolicy$6(context, coercedAdapterRequestContext) {
|
|
4828
|
+
return buildNetworkSnapshotCachePolicy$b(context, coercedAdapterRequestContext, buildNetworkSnapshot$8, 'get', false);
|
|
4810
4829
|
}
|
|
4811
|
-
function buildCachedSnapshotCachePolicy$
|
|
4830
|
+
function buildCachedSnapshotCachePolicy$6(context, storeLookup) {
|
|
4812
4831
|
const { luvio, config } = context;
|
|
4813
4832
|
const selector = {
|
|
4814
|
-
recordId: keyBuilder$
|
|
4815
|
-
node: adapterFragment$
|
|
4833
|
+
recordId: keyBuilder$c(luvio, config),
|
|
4834
|
+
node: adapterFragment$6(luvio, config),
|
|
4816
4835
|
variables: {},
|
|
4817
4836
|
};
|
|
4818
4837
|
const cacheSnapshot = storeLookup(selector, {
|
|
4819
4838
|
config,
|
|
4820
|
-
resolve: () => buildNetworkSnapshot$
|
|
4839
|
+
resolve: () => buildNetworkSnapshot$8(luvio, config, snapshotRefreshOptions)
|
|
4821
4840
|
});
|
|
4822
4841
|
return cacheSnapshot;
|
|
4823
4842
|
}
|
|
4824
4843
|
const getInputMappedDataProvidersAdapterFactory = (luvio) => function EinsteinLLM__getInputMappedDataProviders(untrustedConfig, requestContext) {
|
|
4825
|
-
const config = validateAdapterConfig$
|
|
4844
|
+
const config = validateAdapterConfig$8(untrustedConfig, getInputMappedDataProviders_ConfigPropertyNames);
|
|
4826
4845
|
// Invalid or incomplete config
|
|
4827
4846
|
if (config === null) {
|
|
4828
4847
|
return null;
|
|
4829
4848
|
}
|
|
4830
4849
|
return luvio.applyCachePolicy((requestContext || {}), { config, luvio }, // BuildSnapshotContext
|
|
4831
|
-
buildCachedSnapshotCachePolicy$
|
|
4850
|
+
buildCachedSnapshotCachePolicy$6, buildNetworkSnapshotCachePolicy$6);
|
|
4832
4851
|
};
|
|
4833
4852
|
|
|
4834
|
-
const VERSION$
|
|
4835
|
-
function validate$
|
|
4853
|
+
const VERSION$7 = "b513bbac1672327d8eaaf120660e94b5";
|
|
4854
|
+
function validate$8(obj, path = 'EinsteinPromptTemplateSupportedLanguageErrorRepresentation') {
|
|
4836
4855
|
const v_error = (() => {
|
|
4837
4856
|
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
4838
4857
|
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
@@ -4850,10 +4869,10 @@ function validate$5(obj, path = 'EinsteinPromptTemplateSupportedLanguageErrorRep
|
|
|
4850
4869
|
})();
|
|
4851
4870
|
return v_error === undefined ? null : v_error;
|
|
4852
4871
|
}
|
|
4853
|
-
const select$
|
|
4872
|
+
const select$f = function EinsteinPromptTemplateSupportedLanguageErrorRepresentationSelect() {
|
|
4854
4873
|
return {
|
|
4855
4874
|
kind: 'Fragment',
|
|
4856
|
-
version: VERSION$
|
|
4875
|
+
version: VERSION$7,
|
|
4857
4876
|
private: [],
|
|
4858
4877
|
selections: [
|
|
4859
4878
|
{
|
|
@@ -4867,7 +4886,7 @@ const select$9 = function EinsteinPromptTemplateSupportedLanguageErrorRepresenta
|
|
|
4867
4886
|
]
|
|
4868
4887
|
};
|
|
4869
4888
|
};
|
|
4870
|
-
function equals$
|
|
4889
|
+
function equals$7(existing, incoming) {
|
|
4871
4890
|
const existing_errorMessage = existing.errorMessage;
|
|
4872
4891
|
const incoming_errorMessage = incoming.errorMessage;
|
|
4873
4892
|
if (!(existing_errorMessage === incoming_errorMessage)) {
|
|
@@ -4881,8 +4900,8 @@ function equals$4(existing, incoming) {
|
|
|
4881
4900
|
return true;
|
|
4882
4901
|
}
|
|
4883
4902
|
|
|
4884
|
-
const VERSION$
|
|
4885
|
-
function validate$
|
|
4903
|
+
const VERSION$6 = "65a17d345c28eeca91872a73d8ffe9fd";
|
|
4904
|
+
function validate$7(obj, path = 'EinsteinPromptTemplateSupportedLanguageRepresentation') {
|
|
4886
4905
|
const v_error = (() => {
|
|
4887
4906
|
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
4888
4907
|
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
@@ -4900,10 +4919,10 @@ function validate$4(obj, path = 'EinsteinPromptTemplateSupportedLanguageRepresen
|
|
|
4900
4919
|
})();
|
|
4901
4920
|
return v_error === undefined ? null : v_error;
|
|
4902
4921
|
}
|
|
4903
|
-
const select$
|
|
4922
|
+
const select$e = function EinsteinPromptTemplateSupportedLanguageRepresentationSelect() {
|
|
4904
4923
|
return {
|
|
4905
4924
|
kind: 'Fragment',
|
|
4906
|
-
version: VERSION$
|
|
4925
|
+
version: VERSION$6,
|
|
4907
4926
|
private: [],
|
|
4908
4927
|
selections: [
|
|
4909
4928
|
{
|
|
@@ -4917,7 +4936,7 @@ const select$8 = function EinsteinPromptTemplateSupportedLanguageRepresentationS
|
|
|
4917
4936
|
]
|
|
4918
4937
|
};
|
|
4919
4938
|
};
|
|
4920
|
-
function equals$
|
|
4939
|
+
function equals$6(existing, incoming) {
|
|
4921
4940
|
const existing_languageCode = existing.languageCode;
|
|
4922
4941
|
const incoming_languageCode = incoming.languageCode;
|
|
4923
4942
|
if (!(existing_languageCode === incoming_languageCode)) {
|
|
@@ -4931,9 +4950,9 @@ function equals$3(existing, incoming) {
|
|
|
4931
4950
|
return true;
|
|
4932
4951
|
}
|
|
4933
4952
|
|
|
4934
|
-
const TTL$
|
|
4935
|
-
const VERSION$
|
|
4936
|
-
function validate$
|
|
4953
|
+
const TTL$3 = 100;
|
|
4954
|
+
const VERSION$5 = "c635f260bce9a11f7c3bf31d60f42b53";
|
|
4955
|
+
function validate$6(obj, path = 'EinsteinPromptTemplateVersionOutputLanguagesRepresentation') {
|
|
4937
4956
|
const v_error = (() => {
|
|
4938
4957
|
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
4939
4958
|
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
@@ -4946,7 +4965,7 @@ function validate$3(obj, path = 'EinsteinPromptTemplateVersionOutputLanguagesRep
|
|
|
4946
4965
|
for (let i = 0; i < obj_errors.length; i++) {
|
|
4947
4966
|
const obj_errors_item = obj_errors[i];
|
|
4948
4967
|
const path_errors_item = path_errors + '[' + i + ']';
|
|
4949
|
-
const referencepath_errors_itemValidationError = validate$
|
|
4968
|
+
const referencepath_errors_itemValidationError = validate$8(obj_errors_item, path_errors_item);
|
|
4950
4969
|
if (referencepath_errors_itemValidationError !== null) {
|
|
4951
4970
|
let message = 'Object doesn\'t match EinsteinPromptTemplateSupportedLanguageErrorRepresentation (at "' + path_errors_item + '")\n';
|
|
4952
4971
|
message += referencepath_errors_itemValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
@@ -4971,7 +4990,7 @@ function validate$3(obj, path = 'EinsteinPromptTemplateVersionOutputLanguagesRep
|
|
|
4971
4990
|
for (let i = 0; i < obj_supportedLanguages.length; i++) {
|
|
4972
4991
|
const obj_supportedLanguages_item = obj_supportedLanguages[i];
|
|
4973
4992
|
const path_supportedLanguages_item = path_supportedLanguages + '[' + i + ']';
|
|
4974
|
-
const referencepath_supportedLanguages_itemValidationError = validate$
|
|
4993
|
+
const referencepath_supportedLanguages_itemValidationError = validate$7(obj_supportedLanguages_item, path_supportedLanguages_item);
|
|
4975
4994
|
if (referencepath_supportedLanguages_itemValidationError !== null) {
|
|
4976
4995
|
let message = 'Object doesn\'t match EinsteinPromptTemplateSupportedLanguageRepresentation (at "' + path_supportedLanguages_item + '")\n';
|
|
4977
4996
|
message += referencepath_supportedLanguages_itemValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
@@ -4986,16 +5005,16 @@ function validate$3(obj, path = 'EinsteinPromptTemplateVersionOutputLanguagesRep
|
|
|
4986
5005
|
})();
|
|
4987
5006
|
return v_error === undefined ? null : v_error;
|
|
4988
5007
|
}
|
|
4989
|
-
const RepresentationType$
|
|
4990
|
-
function normalize$
|
|
5008
|
+
const RepresentationType$3 = 'EinsteinPromptTemplateVersionOutputLanguagesRepresentation';
|
|
5009
|
+
function normalize$3(input, existing, path, luvio, store, timestamp) {
|
|
4991
5010
|
return input;
|
|
4992
5011
|
}
|
|
4993
|
-
const select$
|
|
4994
|
-
const { selections: EinsteinPromptTemplateSupportedLanguageErrorRepresentation__selections, opaque: EinsteinPromptTemplateSupportedLanguageErrorRepresentation__opaque, } = select$
|
|
4995
|
-
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();
|
|
4996
5015
|
return {
|
|
4997
5016
|
kind: 'Fragment',
|
|
4998
|
-
version: VERSION$
|
|
5017
|
+
version: VERSION$5,
|
|
4999
5018
|
private: [],
|
|
5000
5019
|
selections: [
|
|
5001
5020
|
{
|
|
@@ -5025,7 +5044,7 @@ const select$7 = function EinsteinPromptTemplateVersionOutputLanguagesRepresenta
|
|
|
5025
5044
|
]
|
|
5026
5045
|
};
|
|
5027
5046
|
};
|
|
5028
|
-
function equals$
|
|
5047
|
+
function equals$5(existing, incoming) {
|
|
5029
5048
|
const existing_isSuccess = existing.isSuccess;
|
|
5030
5049
|
const incoming_isSuccess = incoming.isSuccess;
|
|
5031
5050
|
if (!(existing_isSuccess === incoming_isSuccess)) {
|
|
@@ -5044,7 +5063,7 @@ function equals$2(existing, incoming) {
|
|
|
5044
5063
|
const existing_errors = existing.errors;
|
|
5045
5064
|
const incoming_errors = incoming.errors;
|
|
5046
5065
|
const equals_errors_items = equalsArray(existing_errors, incoming_errors, (existing_errors_item, incoming_errors_item) => {
|
|
5047
|
-
if (!(equals$
|
|
5066
|
+
if (!(equals$7(existing_errors_item, incoming_errors_item))) {
|
|
5048
5067
|
return false;
|
|
5049
5068
|
}
|
|
5050
5069
|
});
|
|
@@ -5054,7 +5073,7 @@ function equals$2(existing, incoming) {
|
|
|
5054
5073
|
const existing_supportedLanguages = existing.supportedLanguages;
|
|
5055
5074
|
const incoming_supportedLanguages = incoming.supportedLanguages;
|
|
5056
5075
|
const equals_supportedLanguages_items = equalsArray(existing_supportedLanguages, incoming_supportedLanguages, (existing_supportedLanguages_item, incoming_supportedLanguages_item) => {
|
|
5057
|
-
if (!(equals$
|
|
5076
|
+
if (!(equals$6(existing_supportedLanguages_item, incoming_supportedLanguages_item))) {
|
|
5058
5077
|
return false;
|
|
5059
5078
|
}
|
|
5060
5079
|
});
|
|
@@ -5063,44 +5082,44 @@ function equals$2(existing, incoming) {
|
|
|
5063
5082
|
}
|
|
5064
5083
|
return true;
|
|
5065
5084
|
}
|
|
5066
|
-
const ingest$
|
|
5085
|
+
const ingest$3 = function EinsteinPromptTemplateVersionOutputLanguagesRepresentationIngest(input, path, luvio, store, timestamp) {
|
|
5067
5086
|
if (process.env.NODE_ENV !== 'production') {
|
|
5068
|
-
const validateError = validate$
|
|
5087
|
+
const validateError = validate$6(input);
|
|
5069
5088
|
if (validateError !== null) {
|
|
5070
5089
|
throw validateError;
|
|
5071
5090
|
}
|
|
5072
5091
|
}
|
|
5073
5092
|
const key = path.fullPath;
|
|
5074
|
-
const ttlToUse = TTL$
|
|
5075
|
-
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);
|
|
5076
5095
|
return createLink(key);
|
|
5077
5096
|
};
|
|
5078
|
-
function getTypeCacheKeys$
|
|
5097
|
+
function getTypeCacheKeys$3(rootKeySet, luvio, input, fullPathFactory) {
|
|
5079
5098
|
// root cache key (uses fullPathFactory if keyBuilderFromType isn't defined)
|
|
5080
5099
|
const rootKey = fullPathFactory();
|
|
5081
5100
|
rootKeySet.set(rootKey, {
|
|
5082
5101
|
namespace: keyPrefix,
|
|
5083
|
-
representationName: RepresentationType$
|
|
5102
|
+
representationName: RepresentationType$3,
|
|
5084
5103
|
mergeable: false
|
|
5085
5104
|
});
|
|
5086
5105
|
}
|
|
5087
5106
|
|
|
5088
|
-
function select$
|
|
5089
|
-
return select$
|
|
5107
|
+
function select$c(luvio, params) {
|
|
5108
|
+
return select$d();
|
|
5090
5109
|
}
|
|
5091
|
-
function keyBuilder$
|
|
5110
|
+
function keyBuilder$b(luvio, params) {
|
|
5092
5111
|
return keyPrefix + '::EinsteinPromptTemplateVersionOutputLanguagesRepresentation:(' + 'useStandardVersion:' + params.queryParams.useStandardVersion + ',' + 'versionId:' + params.queryParams.versionId + ',' + 'promptTemplateDevName:' + params.urlParams.promptTemplateDevName + ')';
|
|
5093
5112
|
}
|
|
5094
|
-
function getResponseCacheKeys$
|
|
5095
|
-
getTypeCacheKeys$
|
|
5113
|
+
function getResponseCacheKeys$7(storeKeyMap, luvio, resourceParams, response) {
|
|
5114
|
+
getTypeCacheKeys$3(storeKeyMap, luvio, response, () => keyBuilder$b(luvio, resourceParams));
|
|
5096
5115
|
}
|
|
5097
|
-
function ingestSuccess$
|
|
5116
|
+
function ingestSuccess$7(luvio, resourceParams, response, snapshotRefresh) {
|
|
5098
5117
|
const { body } = response;
|
|
5099
|
-
const key = keyBuilder$
|
|
5100
|
-
luvio.storeIngest(key, ingest$
|
|
5118
|
+
const key = keyBuilder$b(luvio, resourceParams);
|
|
5119
|
+
luvio.storeIngest(key, ingest$3, body);
|
|
5101
5120
|
const snapshot = luvio.storeLookup({
|
|
5102
5121
|
recordId: key,
|
|
5103
|
-
node: select$
|
|
5122
|
+
node: select$c(),
|
|
5104
5123
|
variables: {},
|
|
5105
5124
|
}, snapshotRefresh);
|
|
5106
5125
|
if (process.env.NODE_ENV !== 'production') {
|
|
@@ -5111,19 +5130,19 @@ function ingestSuccess$4(luvio, resourceParams, response, snapshotRefresh) {
|
|
|
5111
5130
|
deepFreeze(snapshot.data);
|
|
5112
5131
|
return snapshot;
|
|
5113
5132
|
}
|
|
5114
|
-
function ingestError$
|
|
5115
|
-
const key = keyBuilder$
|
|
5133
|
+
function ingestError$5(luvio, params, error, snapshotRefresh) {
|
|
5134
|
+
const key = keyBuilder$b(luvio, params);
|
|
5116
5135
|
const errorSnapshot = luvio.errorSnapshot(error, snapshotRefresh);
|
|
5117
5136
|
const storeMetadataParams = {
|
|
5118
|
-
ttl: TTL$
|
|
5137
|
+
ttl: TTL$3,
|
|
5119
5138
|
namespace: keyPrefix,
|
|
5120
|
-
version: VERSION$
|
|
5121
|
-
representationName: RepresentationType$
|
|
5139
|
+
version: VERSION$5,
|
|
5140
|
+
representationName: RepresentationType$3
|
|
5122
5141
|
};
|
|
5123
5142
|
luvio.storeIngestError(key, errorSnapshot, storeMetadataParams);
|
|
5124
5143
|
return errorSnapshot;
|
|
5125
5144
|
}
|
|
5126
|
-
function createResourceRequest$
|
|
5145
|
+
function createResourceRequest$7(config) {
|
|
5127
5146
|
const headers = {};
|
|
5128
5147
|
return {
|
|
5129
5148
|
baseUri: '/services/data/v66.0',
|
|
@@ -5137,95 +5156,95 @@ function createResourceRequest$4(config) {
|
|
|
5137
5156
|
};
|
|
5138
5157
|
}
|
|
5139
5158
|
|
|
5140
|
-
const adapterName$
|
|
5159
|
+
const adapterName$7 = 'getOutputLanguages';
|
|
5141
5160
|
const getOutputLanguages_ConfigPropertyMetadata = [
|
|
5142
5161
|
generateParamConfigMetadata('promptTemplateDevName', true, 0 /* UrlParameter */, 0 /* String */),
|
|
5143
5162
|
generateParamConfigMetadata('useStandardVersion', false, 1 /* QueryParameter */, 1 /* Boolean */),
|
|
5144
5163
|
generateParamConfigMetadata('versionId', false, 1 /* QueryParameter */, 0 /* String */),
|
|
5145
5164
|
];
|
|
5146
|
-
const getOutputLanguages_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$
|
|
5147
|
-
const createResourceParams$
|
|
5148
|
-
function keyBuilder$
|
|
5149
|
-
const resourceParams = createResourceParams$
|
|
5150
|
-
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);
|
|
5151
5170
|
}
|
|
5152
|
-
function typeCheckConfig$
|
|
5171
|
+
function typeCheckConfig$7(untrustedConfig) {
|
|
5153
5172
|
const config = {};
|
|
5154
|
-
typeCheckConfig$
|
|
5173
|
+
typeCheckConfig$i(untrustedConfig, config, getOutputLanguages_ConfigPropertyMetadata);
|
|
5155
5174
|
return config;
|
|
5156
5175
|
}
|
|
5157
|
-
function validateAdapterConfig$
|
|
5176
|
+
function validateAdapterConfig$7(untrustedConfig, configPropertyNames) {
|
|
5158
5177
|
if (!untrustedIsObject(untrustedConfig)) {
|
|
5159
5178
|
return null;
|
|
5160
5179
|
}
|
|
5161
5180
|
if (process.env.NODE_ENV !== 'production') {
|
|
5162
5181
|
validateConfig(untrustedConfig, configPropertyNames);
|
|
5163
5182
|
}
|
|
5164
|
-
const config = typeCheckConfig$
|
|
5183
|
+
const config = typeCheckConfig$7(untrustedConfig);
|
|
5165
5184
|
if (!areRequiredParametersPresent(config, configPropertyNames)) {
|
|
5166
5185
|
return null;
|
|
5167
5186
|
}
|
|
5168
5187
|
return config;
|
|
5169
5188
|
}
|
|
5170
|
-
function adapterFragment$
|
|
5171
|
-
createResourceParams$
|
|
5172
|
-
return select$
|
|
5189
|
+
function adapterFragment$5(luvio, config) {
|
|
5190
|
+
createResourceParams$7(config);
|
|
5191
|
+
return select$c();
|
|
5173
5192
|
}
|
|
5174
|
-
function onFetchResponseSuccess$
|
|
5175
|
-
const snapshot = ingestSuccess$
|
|
5193
|
+
function onFetchResponseSuccess$5(luvio, config, resourceParams, response) {
|
|
5194
|
+
const snapshot = ingestSuccess$7(luvio, resourceParams, response, {
|
|
5176
5195
|
config,
|
|
5177
|
-
resolve: () => buildNetworkSnapshot$
|
|
5196
|
+
resolve: () => buildNetworkSnapshot$7(luvio, config, snapshotRefreshOptions)
|
|
5178
5197
|
});
|
|
5179
5198
|
return luvio.storeBroadcast().then(() => snapshot);
|
|
5180
5199
|
}
|
|
5181
|
-
function onFetchResponseError$
|
|
5182
|
-
const snapshot = ingestError$
|
|
5200
|
+
function onFetchResponseError$5(luvio, config, resourceParams, response) {
|
|
5201
|
+
const snapshot = ingestError$5(luvio, resourceParams, response, {
|
|
5183
5202
|
config,
|
|
5184
|
-
resolve: () => buildNetworkSnapshot$
|
|
5203
|
+
resolve: () => buildNetworkSnapshot$7(luvio, config, snapshotRefreshOptions)
|
|
5185
5204
|
});
|
|
5186
5205
|
return luvio.storeBroadcast().then(() => snapshot);
|
|
5187
5206
|
}
|
|
5188
|
-
function buildNetworkSnapshot$
|
|
5189
|
-
const resourceParams = createResourceParams$
|
|
5190
|
-
const request = createResourceRequest$
|
|
5207
|
+
function buildNetworkSnapshot$7(luvio, config, options) {
|
|
5208
|
+
const resourceParams = createResourceParams$7(config);
|
|
5209
|
+
const request = createResourceRequest$7(resourceParams);
|
|
5191
5210
|
return luvio.dispatchResourceRequest(request, options)
|
|
5192
5211
|
.then((response) => {
|
|
5193
|
-
return luvio.handleSuccessResponse(() => onFetchResponseSuccess$
|
|
5212
|
+
return luvio.handleSuccessResponse(() => onFetchResponseSuccess$5(luvio, config, resourceParams, response), () => {
|
|
5194
5213
|
const cache = new StoreKeyMap();
|
|
5195
|
-
getResponseCacheKeys$
|
|
5214
|
+
getResponseCacheKeys$7(cache, luvio, resourceParams, response.body);
|
|
5196
5215
|
return cache;
|
|
5197
5216
|
});
|
|
5198
5217
|
}, (response) => {
|
|
5199
|
-
return luvio.handleErrorResponse(() => onFetchResponseError$
|
|
5218
|
+
return luvio.handleErrorResponse(() => onFetchResponseError$5(luvio, config, resourceParams, response));
|
|
5200
5219
|
});
|
|
5201
5220
|
}
|
|
5202
|
-
function buildNetworkSnapshotCachePolicy$
|
|
5203
|
-
return buildNetworkSnapshotCachePolicy$
|
|
5221
|
+
function buildNetworkSnapshotCachePolicy$5(context, coercedAdapterRequestContext) {
|
|
5222
|
+
return buildNetworkSnapshotCachePolicy$b(context, coercedAdapterRequestContext, buildNetworkSnapshot$7, undefined, false);
|
|
5204
5223
|
}
|
|
5205
|
-
function buildCachedSnapshotCachePolicy$
|
|
5224
|
+
function buildCachedSnapshotCachePolicy$5(context, storeLookup) {
|
|
5206
5225
|
const { luvio, config } = context;
|
|
5207
5226
|
const selector = {
|
|
5208
|
-
recordId: keyBuilder$
|
|
5209
|
-
node: adapterFragment$
|
|
5227
|
+
recordId: keyBuilder$a(luvio, config),
|
|
5228
|
+
node: adapterFragment$5(luvio, config),
|
|
5210
5229
|
variables: {},
|
|
5211
5230
|
};
|
|
5212
5231
|
const cacheSnapshot = storeLookup(selector, {
|
|
5213
5232
|
config,
|
|
5214
|
-
resolve: () => buildNetworkSnapshot$
|
|
5233
|
+
resolve: () => buildNetworkSnapshot$7(luvio, config, snapshotRefreshOptions)
|
|
5215
5234
|
});
|
|
5216
5235
|
return cacheSnapshot;
|
|
5217
5236
|
}
|
|
5218
5237
|
const getOutputLanguagesAdapterFactory = (luvio) => function EinsteinLLM__getOutputLanguages(untrustedConfig, requestContext) {
|
|
5219
|
-
const config = validateAdapterConfig$
|
|
5238
|
+
const config = validateAdapterConfig$7(untrustedConfig, getOutputLanguages_ConfigPropertyNames);
|
|
5220
5239
|
// Invalid or incomplete config
|
|
5221
5240
|
if (config === null) {
|
|
5222
5241
|
return null;
|
|
5223
5242
|
}
|
|
5224
5243
|
return luvio.applyCachePolicy((requestContext || {}), { config, luvio }, // BuildSnapshotContext
|
|
5225
|
-
buildCachedSnapshotCachePolicy$
|
|
5244
|
+
buildCachedSnapshotCachePolicy$5, buildNetworkSnapshotCachePolicy$5);
|
|
5226
5245
|
};
|
|
5227
5246
|
|
|
5228
|
-
function validate$
|
|
5247
|
+
function validate$5(obj, path = 'EinsteinPromptRecordFieldRepresentation') {
|
|
5229
5248
|
const v_error = (() => {
|
|
5230
5249
|
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
5231
5250
|
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
@@ -5285,9 +5304,9 @@ function validate$2(obj, path = 'EinsteinPromptRecordFieldRepresentation') {
|
|
|
5285
5304
|
return v_error === undefined ? null : v_error;
|
|
5286
5305
|
}
|
|
5287
5306
|
|
|
5288
|
-
const TTL$
|
|
5289
|
-
const VERSION$
|
|
5290
|
-
function validate$
|
|
5307
|
+
const TTL$2 = 100;
|
|
5308
|
+
const VERSION$4 = "2d1628544b54fc1701aa9b4eff05127b";
|
|
5309
|
+
function validate$4(obj, path = 'EinsteinPromptRecordRepresentation') {
|
|
5291
5310
|
const v_error = (() => {
|
|
5292
5311
|
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
5293
5312
|
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
@@ -5316,7 +5335,7 @@ function validate$1(obj, path = 'EinsteinPromptRecordRepresentation') {
|
|
|
5316
5335
|
for (let i = 0; i < obj_childRelationships_prop.length; i++) {
|
|
5317
5336
|
const obj_childRelationships_prop_item = obj_childRelationships_prop[i];
|
|
5318
5337
|
const path_childRelationships_prop_item = path_childRelationships_prop + '[' + i + ']';
|
|
5319
|
-
const referencepath_childRelationships_prop_itemValidationError = validate$
|
|
5338
|
+
const referencepath_childRelationships_prop_itemValidationError = validate$4(obj_childRelationships_prop_item, path_childRelationships_prop_item);
|
|
5320
5339
|
if (referencepath_childRelationships_prop_itemValidationError !== null) {
|
|
5321
5340
|
let message = 'Object doesn\'t match EinsteinPromptRecordRepresentation (at "' + path_childRelationships_prop_item + '")\n';
|
|
5322
5341
|
message += referencepath_childRelationships_prop_itemValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
@@ -5336,7 +5355,7 @@ function validate$1(obj, path = 'EinsteinPromptRecordRepresentation') {
|
|
|
5336
5355
|
const key = obj_fields_keys[i];
|
|
5337
5356
|
const obj_fields_prop = obj_fields[key];
|
|
5338
5357
|
const path_fields_prop = path_fields + '["' + key + '"]';
|
|
5339
|
-
const referencepath_fields_propValidationError = validate$
|
|
5358
|
+
const referencepath_fields_propValidationError = validate$5(obj_fields_prop, path_fields_prop);
|
|
5340
5359
|
if (referencepath_fields_propValidationError !== null) {
|
|
5341
5360
|
let message = 'Object doesn\'t match EinsteinPromptRecordFieldRepresentation (at "' + path_fields_prop + '")\n';
|
|
5342
5361
|
message += referencepath_fields_propValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
@@ -5354,62 +5373,62 @@ function validate$1(obj, path = 'EinsteinPromptRecordRepresentation') {
|
|
|
5354
5373
|
})();
|
|
5355
5374
|
return v_error === undefined ? null : v_error;
|
|
5356
5375
|
}
|
|
5357
|
-
const RepresentationType$
|
|
5358
|
-
function normalize$
|
|
5376
|
+
const RepresentationType$2 = 'EinsteinPromptRecordRepresentation';
|
|
5377
|
+
function normalize$2(input, existing, path, luvio, store, timestamp) {
|
|
5359
5378
|
return input;
|
|
5360
5379
|
}
|
|
5361
|
-
const select$
|
|
5380
|
+
const select$b = function EinsteinPromptRecordRepresentationSelect() {
|
|
5362
5381
|
return {
|
|
5363
5382
|
kind: 'Fragment',
|
|
5364
|
-
version: VERSION$
|
|
5383
|
+
version: VERSION$4,
|
|
5365
5384
|
private: [],
|
|
5366
5385
|
opaque: true
|
|
5367
5386
|
};
|
|
5368
5387
|
};
|
|
5369
|
-
function equals$
|
|
5388
|
+
function equals$4(existing, incoming) {
|
|
5370
5389
|
if (JSONStringify(incoming) !== JSONStringify(existing)) {
|
|
5371
5390
|
return false;
|
|
5372
5391
|
}
|
|
5373
5392
|
return true;
|
|
5374
5393
|
}
|
|
5375
|
-
const ingest$
|
|
5394
|
+
const ingest$2 = function EinsteinPromptRecordRepresentationIngest(input, path, luvio, store, timestamp) {
|
|
5376
5395
|
if (process.env.NODE_ENV !== 'production') {
|
|
5377
|
-
const validateError = validate$
|
|
5396
|
+
const validateError = validate$4(input);
|
|
5378
5397
|
if (validateError !== null) {
|
|
5379
5398
|
throw validateError;
|
|
5380
5399
|
}
|
|
5381
5400
|
}
|
|
5382
5401
|
const key = path.fullPath;
|
|
5383
|
-
const ttlToUse = TTL$
|
|
5384
|
-
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);
|
|
5385
5404
|
return createLink(key);
|
|
5386
5405
|
};
|
|
5387
|
-
function getTypeCacheKeys$
|
|
5406
|
+
function getTypeCacheKeys$2(rootKeySet, luvio, input, fullPathFactory) {
|
|
5388
5407
|
// root cache key (uses fullPathFactory if keyBuilderFromType isn't defined)
|
|
5389
5408
|
const rootKey = fullPathFactory();
|
|
5390
5409
|
rootKeySet.set(rootKey, {
|
|
5391
5410
|
namespace: keyPrefix,
|
|
5392
|
-
representationName: RepresentationType$
|
|
5411
|
+
representationName: RepresentationType$2,
|
|
5393
5412
|
mergeable: false
|
|
5394
5413
|
});
|
|
5395
5414
|
}
|
|
5396
5415
|
|
|
5397
|
-
function select$
|
|
5398
|
-
return select$
|
|
5416
|
+
function select$a(luvio, params) {
|
|
5417
|
+
return select$b();
|
|
5399
5418
|
}
|
|
5400
|
-
function keyBuilder$
|
|
5419
|
+
function keyBuilder$9(luvio, params) {
|
|
5401
5420
|
return keyPrefix + '::EinsteinPromptRecordRepresentation:(' + 'versionId:' + params.queryParams.versionId + ',' + 'promptTemplateDevName:' + params.urlParams.promptTemplateDevName + ')';
|
|
5402
5421
|
}
|
|
5403
|
-
function getResponseCacheKeys$
|
|
5404
|
-
getTypeCacheKeys$
|
|
5422
|
+
function getResponseCacheKeys$6(storeKeyMap, luvio, resourceParams, response) {
|
|
5423
|
+
getTypeCacheKeys$2(storeKeyMap, luvio, response, () => keyBuilder$9(luvio, resourceParams));
|
|
5405
5424
|
}
|
|
5406
|
-
function ingestSuccess$
|
|
5425
|
+
function ingestSuccess$6(luvio, resourceParams, response, snapshotRefresh) {
|
|
5407
5426
|
const { body } = response;
|
|
5408
|
-
const key = keyBuilder$
|
|
5409
|
-
luvio.storeIngest(key, ingest$
|
|
5427
|
+
const key = keyBuilder$9(luvio, resourceParams);
|
|
5428
|
+
luvio.storeIngest(key, ingest$2, body);
|
|
5410
5429
|
const snapshot = luvio.storeLookup({
|
|
5411
5430
|
recordId: key,
|
|
5412
|
-
node: select$
|
|
5431
|
+
node: select$a(),
|
|
5413
5432
|
variables: {},
|
|
5414
5433
|
}, snapshotRefresh);
|
|
5415
5434
|
if (process.env.NODE_ENV !== 'production') {
|
|
@@ -5420,19 +5439,19 @@ function ingestSuccess$3(luvio, resourceParams, response, snapshotRefresh) {
|
|
|
5420
5439
|
deepFreeze(snapshot.data);
|
|
5421
5440
|
return snapshot;
|
|
5422
5441
|
}
|
|
5423
|
-
function ingestError$
|
|
5424
|
-
const key = keyBuilder$
|
|
5442
|
+
function ingestError$4(luvio, params, error, snapshotRefresh) {
|
|
5443
|
+
const key = keyBuilder$9(luvio, params);
|
|
5425
5444
|
const errorSnapshot = luvio.errorSnapshot(error, snapshotRefresh);
|
|
5426
5445
|
const storeMetadataParams = {
|
|
5427
|
-
ttl: TTL$
|
|
5446
|
+
ttl: TTL$2,
|
|
5428
5447
|
namespace: keyPrefix,
|
|
5429
|
-
version: VERSION$
|
|
5430
|
-
representationName: RepresentationType$
|
|
5448
|
+
version: VERSION$4,
|
|
5449
|
+
representationName: RepresentationType$2
|
|
5431
5450
|
};
|
|
5432
5451
|
luvio.storeIngestError(key, errorSnapshot, storeMetadataParams);
|
|
5433
5452
|
return errorSnapshot;
|
|
5434
5453
|
}
|
|
5435
|
-
function createResourceRequest$
|
|
5454
|
+
function createResourceRequest$6(config) {
|
|
5436
5455
|
const headers = {};
|
|
5437
5456
|
return {
|
|
5438
5457
|
baseUri: '/services/data/v66.0',
|
|
@@ -5446,71 +5465,574 @@ function createResourceRequest$3(config) {
|
|
|
5446
5465
|
};
|
|
5447
5466
|
}
|
|
5448
5467
|
|
|
5449
|
-
const adapterName$
|
|
5468
|
+
const adapterName$6 = 'getPromptTemplate';
|
|
5450
5469
|
const getPromptTemplate_ConfigPropertyMetadata = [
|
|
5451
5470
|
generateParamConfigMetadata('promptTemplateDevName', true, 0 /* UrlParameter */, 0 /* String */),
|
|
5452
5471
|
generateParamConfigMetadata('versionId', false, 1 /* QueryParameter */, 0 /* String */),
|
|
5453
5472
|
];
|
|
5454
|
-
const getPromptTemplate_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$
|
|
5455
|
-
const createResourceParams$
|
|
5456
|
-
function keyBuilder$
|
|
5457
|
-
const resourceParams = createResourceParams$
|
|
5458
|
-
return keyBuilder$
|
|
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);
|
|
5459
5478
|
}
|
|
5460
|
-
function typeCheckConfig$
|
|
5479
|
+
function typeCheckConfig$6(untrustedConfig) {
|
|
5461
5480
|
const config = {};
|
|
5462
|
-
typeCheckConfig$
|
|
5481
|
+
typeCheckConfig$i(untrustedConfig, config, getPromptTemplate_ConfigPropertyMetadata);
|
|
5463
5482
|
return config;
|
|
5464
5483
|
}
|
|
5465
|
-
function validateAdapterConfig$
|
|
5484
|
+
function validateAdapterConfig$6(untrustedConfig, configPropertyNames) {
|
|
5466
5485
|
if (!untrustedIsObject(untrustedConfig)) {
|
|
5467
5486
|
return null;
|
|
5468
5487
|
}
|
|
5469
5488
|
if (process.env.NODE_ENV !== 'production') {
|
|
5470
5489
|
validateConfig(untrustedConfig, configPropertyNames);
|
|
5471
5490
|
}
|
|
5472
|
-
const config = typeCheckConfig$
|
|
5491
|
+
const config = typeCheckConfig$6(untrustedConfig);
|
|
5473
5492
|
if (!areRequiredParametersPresent(config, configPropertyNames)) {
|
|
5474
5493
|
return null;
|
|
5475
5494
|
}
|
|
5476
5495
|
return config;
|
|
5477
5496
|
}
|
|
5478
|
-
function adapterFragment$
|
|
5479
|
-
createResourceParams$
|
|
5480
|
-
return select$
|
|
5497
|
+
function adapterFragment$4(luvio, config) {
|
|
5498
|
+
createResourceParams$6(config);
|
|
5499
|
+
return select$a();
|
|
5481
5500
|
}
|
|
5482
|
-
function onFetchResponseSuccess$
|
|
5483
|
-
const snapshot = ingestSuccess$
|
|
5501
|
+
function onFetchResponseSuccess$4(luvio, config, resourceParams, response) {
|
|
5502
|
+
const snapshot = ingestSuccess$6(luvio, resourceParams, response, {
|
|
5484
5503
|
config,
|
|
5485
|
-
resolve: () => buildNetworkSnapshot$
|
|
5504
|
+
resolve: () => buildNetworkSnapshot$6(luvio, config, snapshotRefreshOptions)
|
|
5486
5505
|
});
|
|
5487
5506
|
return luvio.storeBroadcast().then(() => snapshot);
|
|
5488
5507
|
}
|
|
5489
|
-
function onFetchResponseError$
|
|
5490
|
-
const snapshot = ingestError$
|
|
5508
|
+
function onFetchResponseError$4(luvio, config, resourceParams, response) {
|
|
5509
|
+
const snapshot = ingestError$4(luvio, resourceParams, response, {
|
|
5491
5510
|
config,
|
|
5492
|
-
resolve: () => buildNetworkSnapshot$
|
|
5511
|
+
resolve: () => buildNetworkSnapshot$6(luvio, config, snapshotRefreshOptions)
|
|
5493
5512
|
});
|
|
5494
5513
|
return luvio.storeBroadcast().then(() => snapshot);
|
|
5495
5514
|
}
|
|
5496
|
-
function buildNetworkSnapshot$
|
|
5497
|
-
const resourceParams = createResourceParams$
|
|
5498
|
-
const request = createResourceRequest$
|
|
5515
|
+
function buildNetworkSnapshot$6(luvio, config, options) {
|
|
5516
|
+
const resourceParams = createResourceParams$6(config);
|
|
5517
|
+
const request = createResourceRequest$6(resourceParams);
|
|
5499
5518
|
return luvio.dispatchResourceRequest(request, options)
|
|
5500
5519
|
.then((response) => {
|
|
5501
|
-
return luvio.handleSuccessResponse(() => onFetchResponseSuccess$
|
|
5520
|
+
return luvio.handleSuccessResponse(() => onFetchResponseSuccess$4(luvio, config, resourceParams, response), () => {
|
|
5502
5521
|
const cache = new StoreKeyMap();
|
|
5503
|
-
getResponseCacheKeys$
|
|
5522
|
+
getResponseCacheKeys$6(cache, luvio, resourceParams, response.body);
|
|
5504
5523
|
return cache;
|
|
5505
5524
|
});
|
|
5506
5525
|
}, (response) => {
|
|
5507
|
-
return luvio.handleErrorResponse(() => onFetchResponseError$
|
|
5526
|
+
return luvio.handleErrorResponse(() => onFetchResponseError$4(luvio, config, resourceParams, response));
|
|
5508
5527
|
});
|
|
5509
5528
|
}
|
|
5510
|
-
function buildNetworkSnapshotCachePolicy$
|
|
5511
|
-
return buildNetworkSnapshotCachePolicy$
|
|
5529
|
+
function buildNetworkSnapshotCachePolicy$4(context, coercedAdapterRequestContext) {
|
|
5530
|
+
return buildNetworkSnapshotCachePolicy$b(context, coercedAdapterRequestContext, buildNetworkSnapshot$6, undefined, false);
|
|
5512
5531
|
}
|
|
5513
|
-
function buildCachedSnapshotCachePolicy$
|
|
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/v66.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);
|
|
5616
|
+
function keyBuilder$6(luvio, config) {
|
|
5617
|
+
const resourceParams = createResourceParams$5(config);
|
|
5618
|
+
return keyBuilder$7(luvio, resourceParams);
|
|
5619
|
+
}
|
|
5620
|
+
function typeCheckConfig$5(untrustedConfig) {
|
|
5621
|
+
const config = {};
|
|
5622
|
+
typeCheckConfig$i(untrustedConfig, config, getPromptTemplateVersion_ConfigPropertyMetadata);
|
|
5623
|
+
return config;
|
|
5624
|
+
}
|
|
5625
|
+
function validateAdapterConfig$5(untrustedConfig, configPropertyNames) {
|
|
5626
|
+
if (!untrustedIsObject(untrustedConfig)) {
|
|
5627
|
+
return null;
|
|
5628
|
+
}
|
|
5629
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
5630
|
+
validateConfig(untrustedConfig, configPropertyNames);
|
|
5631
|
+
}
|
|
5632
|
+
const config = typeCheckConfig$5(untrustedConfig);
|
|
5633
|
+
if (!areRequiredParametersPresent(config, configPropertyNames)) {
|
|
5634
|
+
return null;
|
|
5635
|
+
}
|
|
5636
|
+
return config;
|
|
5637
|
+
}
|
|
5638
|
+
function adapterFragment$3(luvio, config) {
|
|
5639
|
+
createResourceParams$5(config);
|
|
5640
|
+
return select$9();
|
|
5641
|
+
}
|
|
5642
|
+
function onFetchResponseSuccess$3(luvio, config, resourceParams, response) {
|
|
5643
|
+
const snapshot = ingestSuccess$5(luvio, resourceParams, response, {
|
|
5644
|
+
config,
|
|
5645
|
+
resolve: () => buildNetworkSnapshot$5(luvio, config, snapshotRefreshOptions)
|
|
5646
|
+
});
|
|
5647
|
+
return luvio.storeBroadcast().then(() => snapshot);
|
|
5648
|
+
}
|
|
5649
|
+
function onFetchResponseError$3(luvio, config, resourceParams, response) {
|
|
5650
|
+
const snapshot = ingestError$3(luvio, resourceParams, response, {
|
|
5651
|
+
config,
|
|
5652
|
+
resolve: () => buildNetworkSnapshot$5(luvio, config, snapshotRefreshOptions)
|
|
5653
|
+
});
|
|
5654
|
+
return luvio.storeBroadcast().then(() => snapshot);
|
|
5655
|
+
}
|
|
5656
|
+
function buildNetworkSnapshot$5(luvio, config, options) {
|
|
5657
|
+
const resourceParams = createResourceParams$5(config);
|
|
5658
|
+
const request = createResourceRequest$5(resourceParams);
|
|
5659
|
+
return luvio.dispatchResourceRequest(request, options)
|
|
5660
|
+
.then((response) => {
|
|
5661
|
+
return luvio.handleSuccessResponse(() => onFetchResponseSuccess$3(luvio, config, resourceParams, response), () => {
|
|
5662
|
+
const cache = new StoreKeyMap();
|
|
5663
|
+
getResponseCacheKeys$5(cache, luvio, resourceParams, response.body);
|
|
5664
|
+
return cache;
|
|
5665
|
+
});
|
|
5666
|
+
}, (response) => {
|
|
5667
|
+
return luvio.handleErrorResponse(() => onFetchResponseError$3(luvio, config, resourceParams, response));
|
|
5668
|
+
});
|
|
5669
|
+
}
|
|
5670
|
+
function buildNetworkSnapshotCachePolicy$3(context, coercedAdapterRequestContext) {
|
|
5671
|
+
return buildNetworkSnapshotCachePolicy$b(context, coercedAdapterRequestContext, buildNetworkSnapshot$5, undefined, false);
|
|
5672
|
+
}
|
|
5673
|
+
function buildCachedSnapshotCachePolicy$3(context, storeLookup) {
|
|
5674
|
+
const { luvio, config } = context;
|
|
5675
|
+
const selector = {
|
|
5676
|
+
recordId: keyBuilder$6(luvio, config),
|
|
5677
|
+
node: adapterFragment$3(luvio, config),
|
|
5678
|
+
variables: {},
|
|
5679
|
+
};
|
|
5680
|
+
const cacheSnapshot = storeLookup(selector, {
|
|
5681
|
+
config,
|
|
5682
|
+
resolve: () => buildNetworkSnapshot$5(luvio, config, snapshotRefreshOptions)
|
|
5683
|
+
});
|
|
5684
|
+
return cacheSnapshot;
|
|
5685
|
+
}
|
|
5686
|
+
const getPromptTemplateVersionAdapterFactory = (luvio) => function EinsteinLLM__getPromptTemplateVersion(untrustedConfig, requestContext) {
|
|
5687
|
+
const config = validateAdapterConfig$5(untrustedConfig, getPromptTemplateVersion_ConfigPropertyNames);
|
|
5688
|
+
// Invalid or incomplete config
|
|
5689
|
+
if (config === null) {
|
|
5690
|
+
return null;
|
|
5691
|
+
}
|
|
5692
|
+
return luvio.applyCachePolicy((requestContext || {}), { config, luvio }, // BuildSnapshotContext
|
|
5693
|
+
buildCachedSnapshotCachePolicy$3, buildNetworkSnapshotCachePolicy$3);
|
|
5694
|
+
};
|
|
5695
|
+
|
|
5696
|
+
function select$8(luvio, params) {
|
|
5697
|
+
return select$b();
|
|
5698
|
+
}
|
|
5699
|
+
function keyBuilder$5(luvio, params) {
|
|
5700
|
+
return keyPrefix + '::EinsteinPromptRecordRepresentation:(' + 'includingContent:' + params.queryParams.includingContent + ',' + 'includingVersionDetail:' + params.queryParams.includingVersionDetail + ',' + 'promptTemplateDevName:' + params.urlParams.promptTemplateDevName + ')';
|
|
5701
|
+
}
|
|
5702
|
+
function getResponseCacheKeys$4(storeKeyMap, luvio, resourceParams, response) {
|
|
5703
|
+
getTypeCacheKeys$2(storeKeyMap, luvio, response, () => keyBuilder$5(luvio, resourceParams));
|
|
5704
|
+
}
|
|
5705
|
+
function ingestSuccess$4(luvio, resourceParams, response, snapshotRefresh) {
|
|
5706
|
+
const { body } = response;
|
|
5707
|
+
const key = keyBuilder$5(luvio, resourceParams);
|
|
5708
|
+
luvio.storeIngest(key, ingest$2, body);
|
|
5709
|
+
const snapshot = luvio.storeLookup({
|
|
5710
|
+
recordId: key,
|
|
5711
|
+
node: select$8(),
|
|
5712
|
+
variables: {},
|
|
5713
|
+
}, snapshotRefresh);
|
|
5714
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
5715
|
+
if (snapshot.state !== 'Fulfilled') {
|
|
5716
|
+
throw new Error('Invalid network response. Expected resource response to result in Fulfilled snapshot');
|
|
5717
|
+
}
|
|
5718
|
+
}
|
|
5719
|
+
deepFreeze(snapshot.data);
|
|
5720
|
+
return snapshot;
|
|
5721
|
+
}
|
|
5722
|
+
function ingestError$2(luvio, params, error, snapshotRefresh) {
|
|
5723
|
+
const key = keyBuilder$5(luvio, params);
|
|
5724
|
+
const errorSnapshot = luvio.errorSnapshot(error, snapshotRefresh);
|
|
5725
|
+
const storeMetadataParams = {
|
|
5726
|
+
ttl: TTL$2,
|
|
5727
|
+
namespace: keyPrefix,
|
|
5728
|
+
version: VERSION$4,
|
|
5729
|
+
representationName: RepresentationType$2
|
|
5730
|
+
};
|
|
5731
|
+
luvio.storeIngestError(key, errorSnapshot, storeMetadataParams);
|
|
5732
|
+
return errorSnapshot;
|
|
5733
|
+
}
|
|
5734
|
+
function createResourceRequest$4(config) {
|
|
5735
|
+
const headers = {};
|
|
5736
|
+
return {
|
|
5737
|
+
baseUri: '/services/data/v66.0',
|
|
5738
|
+
basePath: '/einstein/prompt-templates/' + config.urlParams.promptTemplateDevName + '/versions',
|
|
5739
|
+
method: 'get',
|
|
5740
|
+
body: null,
|
|
5741
|
+
urlParams: config.urlParams,
|
|
5742
|
+
queryParams: config.queryParams,
|
|
5743
|
+
headers,
|
|
5744
|
+
priority: 'normal',
|
|
5745
|
+
};
|
|
5746
|
+
}
|
|
5747
|
+
|
|
5748
|
+
const adapterName$4 = 'getPromptTemplateVersions';
|
|
5749
|
+
const getPromptTemplateVersions_ConfigPropertyMetadata = [
|
|
5750
|
+
generateParamConfigMetadata('promptTemplateDevName', true, 0 /* UrlParameter */, 0 /* String */),
|
|
5751
|
+
generateParamConfigMetadata('includingContent', false, 1 /* QueryParameter */, 1 /* Boolean */),
|
|
5752
|
+
generateParamConfigMetadata('includingVersionDetail', false, 1 /* QueryParameter */, 1 /* Boolean */),
|
|
5753
|
+
];
|
|
5754
|
+
const getPromptTemplateVersions_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$4, getPromptTemplateVersions_ConfigPropertyMetadata);
|
|
5755
|
+
const createResourceParams$4 = /*#__PURE__*/ createResourceParams$i(getPromptTemplateVersions_ConfigPropertyMetadata);
|
|
5756
|
+
function keyBuilder$4(luvio, config) {
|
|
5757
|
+
const resourceParams = createResourceParams$4(config);
|
|
5758
|
+
return keyBuilder$5(luvio, resourceParams);
|
|
5759
|
+
}
|
|
5760
|
+
function typeCheckConfig$4(untrustedConfig) {
|
|
5761
|
+
const config = {};
|
|
5762
|
+
typeCheckConfig$i(untrustedConfig, config, getPromptTemplateVersions_ConfigPropertyMetadata);
|
|
5763
|
+
return config;
|
|
5764
|
+
}
|
|
5765
|
+
function validateAdapterConfig$4(untrustedConfig, configPropertyNames) {
|
|
5766
|
+
if (!untrustedIsObject(untrustedConfig)) {
|
|
5767
|
+
return null;
|
|
5768
|
+
}
|
|
5769
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
5770
|
+
validateConfig(untrustedConfig, configPropertyNames);
|
|
5771
|
+
}
|
|
5772
|
+
const config = typeCheckConfig$4(untrustedConfig);
|
|
5773
|
+
if (!areRequiredParametersPresent(config, configPropertyNames)) {
|
|
5774
|
+
return null;
|
|
5775
|
+
}
|
|
5776
|
+
return config;
|
|
5777
|
+
}
|
|
5778
|
+
function adapterFragment$2(luvio, config) {
|
|
5779
|
+
createResourceParams$4(config);
|
|
5780
|
+
return select$8();
|
|
5781
|
+
}
|
|
5782
|
+
function onFetchResponseSuccess$2(luvio, config, resourceParams, response) {
|
|
5783
|
+
const snapshot = ingestSuccess$4(luvio, resourceParams, response, {
|
|
5784
|
+
config,
|
|
5785
|
+
resolve: () => buildNetworkSnapshot$4(luvio, config, snapshotRefreshOptions)
|
|
5786
|
+
});
|
|
5787
|
+
return luvio.storeBroadcast().then(() => snapshot);
|
|
5788
|
+
}
|
|
5789
|
+
function onFetchResponseError$2(luvio, config, resourceParams, response) {
|
|
5790
|
+
const snapshot = ingestError$2(luvio, resourceParams, response, {
|
|
5791
|
+
config,
|
|
5792
|
+
resolve: () => buildNetworkSnapshot$4(luvio, config, snapshotRefreshOptions)
|
|
5793
|
+
});
|
|
5794
|
+
return luvio.storeBroadcast().then(() => snapshot);
|
|
5795
|
+
}
|
|
5796
|
+
function buildNetworkSnapshot$4(luvio, config, options) {
|
|
5797
|
+
const resourceParams = createResourceParams$4(config);
|
|
5798
|
+
const request = createResourceRequest$4(resourceParams);
|
|
5799
|
+
return luvio.dispatchResourceRequest(request, options)
|
|
5800
|
+
.then((response) => {
|
|
5801
|
+
return luvio.handleSuccessResponse(() => onFetchResponseSuccess$2(luvio, config, resourceParams, response), () => {
|
|
5802
|
+
const cache = new StoreKeyMap();
|
|
5803
|
+
getResponseCacheKeys$4(cache, luvio, resourceParams, response.body);
|
|
5804
|
+
return cache;
|
|
5805
|
+
});
|
|
5806
|
+
}, (response) => {
|
|
5807
|
+
return luvio.handleErrorResponse(() => onFetchResponseError$2(luvio, config, resourceParams, response));
|
|
5808
|
+
});
|
|
5809
|
+
}
|
|
5810
|
+
function buildNetworkSnapshotCachePolicy$2(context, coercedAdapterRequestContext) {
|
|
5811
|
+
return buildNetworkSnapshotCachePolicy$b(context, coercedAdapterRequestContext, buildNetworkSnapshot$4, undefined, false);
|
|
5812
|
+
}
|
|
5813
|
+
function buildCachedSnapshotCachePolicy$2(context, storeLookup) {
|
|
5814
|
+
const { luvio, config } = context;
|
|
5815
|
+
const selector = {
|
|
5816
|
+
recordId: keyBuilder$4(luvio, config),
|
|
5817
|
+
node: adapterFragment$2(luvio, config),
|
|
5818
|
+
variables: {},
|
|
5819
|
+
};
|
|
5820
|
+
const cacheSnapshot = storeLookup(selector, {
|
|
5821
|
+
config,
|
|
5822
|
+
resolve: () => buildNetworkSnapshot$4(luvio, config, snapshotRefreshOptions)
|
|
5823
|
+
});
|
|
5824
|
+
return cacheSnapshot;
|
|
5825
|
+
}
|
|
5826
|
+
const getPromptTemplateVersionsAdapterFactory = (luvio) => function EinsteinLLM__getPromptTemplateVersions(untrustedConfig, requestContext) {
|
|
5827
|
+
const config = validateAdapterConfig$4(untrustedConfig, getPromptTemplateVersions_ConfigPropertyNames);
|
|
5828
|
+
// Invalid or incomplete config
|
|
5829
|
+
if (config === null) {
|
|
5830
|
+
return null;
|
|
5831
|
+
}
|
|
5832
|
+
return luvio.applyCachePolicy((requestContext || {}), { config, luvio }, // BuildSnapshotContext
|
|
5833
|
+
buildCachedSnapshotCachePolicy$2, buildNetworkSnapshotCachePolicy$2);
|
|
5834
|
+
};
|
|
5835
|
+
|
|
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) {
|
|
5914
|
+
return select$7();
|
|
5915
|
+
}
|
|
5916
|
+
function keyBuilder$3(luvio, params) {
|
|
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 + ')';
|
|
5918
|
+
}
|
|
5919
|
+
function getResponseCacheKeys$3(storeKeyMap, luvio, resourceParams, response) {
|
|
5920
|
+
getTypeCacheKeys$1(storeKeyMap, luvio, response, () => keyBuilder$3(luvio, resourceParams));
|
|
5921
|
+
}
|
|
5922
|
+
function ingestSuccess$3(luvio, resourceParams, response, snapshotRefresh) {
|
|
5923
|
+
const { body } = response;
|
|
5924
|
+
const key = keyBuilder$3(luvio, resourceParams);
|
|
5925
|
+
luvio.storeIngest(key, ingest$1, body);
|
|
5926
|
+
const snapshot = luvio.storeLookup({
|
|
5927
|
+
recordId: key,
|
|
5928
|
+
node: select$6(),
|
|
5929
|
+
variables: {},
|
|
5930
|
+
}, snapshotRefresh);
|
|
5931
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
5932
|
+
if (snapshot.state !== 'Fulfilled') {
|
|
5933
|
+
throw new Error('Invalid network response. Expected resource response to result in Fulfilled snapshot');
|
|
5934
|
+
}
|
|
5935
|
+
}
|
|
5936
|
+
deepFreeze(snapshot.data);
|
|
5937
|
+
return snapshot;
|
|
5938
|
+
}
|
|
5939
|
+
function ingestError$1(luvio, params, error, snapshotRefresh) {
|
|
5940
|
+
const key = keyBuilder$3(luvio, params);
|
|
5941
|
+
const errorSnapshot = luvio.errorSnapshot(error, snapshotRefresh);
|
|
5942
|
+
const storeMetadataParams = {
|
|
5943
|
+
ttl: TTL$1,
|
|
5944
|
+
namespace: keyPrefix,
|
|
5945
|
+
version: VERSION$3,
|
|
5946
|
+
representationName: RepresentationType$1
|
|
5947
|
+
};
|
|
5948
|
+
luvio.storeIngestError(key, errorSnapshot, storeMetadataParams);
|
|
5949
|
+
return errorSnapshot;
|
|
5950
|
+
}
|
|
5951
|
+
function createResourceRequest$3(config) {
|
|
5952
|
+
const headers = {};
|
|
5953
|
+
return {
|
|
5954
|
+
baseUri: '/services/data/v66.0',
|
|
5955
|
+
basePath: '/einstein/prompt-templates',
|
|
5956
|
+
method: 'get',
|
|
5957
|
+
body: null,
|
|
5958
|
+
urlParams: {},
|
|
5959
|
+
queryParams: config.queryParams,
|
|
5960
|
+
headers,
|
|
5961
|
+
priority: 'normal',
|
|
5962
|
+
};
|
|
5963
|
+
}
|
|
5964
|
+
|
|
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 */),
|
|
5975
|
+
];
|
|
5976
|
+
const getPromptTemplates_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$3, getPromptTemplates_ConfigPropertyMetadata);
|
|
5977
|
+
const createResourceParams$3 = /*#__PURE__*/ createResourceParams$i(getPromptTemplates_ConfigPropertyMetadata);
|
|
5978
|
+
function keyBuilder$2(luvio, config) {
|
|
5979
|
+
const resourceParams = createResourceParams$3(config);
|
|
5980
|
+
return keyBuilder$3(luvio, resourceParams);
|
|
5981
|
+
}
|
|
5982
|
+
function typeCheckConfig$3(untrustedConfig) {
|
|
5983
|
+
const config = {};
|
|
5984
|
+
typeCheckConfig$i(untrustedConfig, config, getPromptTemplates_ConfigPropertyMetadata);
|
|
5985
|
+
return config;
|
|
5986
|
+
}
|
|
5987
|
+
function validateAdapterConfig$3(untrustedConfig, configPropertyNames) {
|
|
5988
|
+
if (!untrustedIsObject(untrustedConfig)) {
|
|
5989
|
+
return null;
|
|
5990
|
+
}
|
|
5991
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
5992
|
+
validateConfig(untrustedConfig, configPropertyNames);
|
|
5993
|
+
}
|
|
5994
|
+
const config = typeCheckConfig$3(untrustedConfig);
|
|
5995
|
+
if (!areRequiredParametersPresent(config, configPropertyNames)) {
|
|
5996
|
+
return null;
|
|
5997
|
+
}
|
|
5998
|
+
return config;
|
|
5999
|
+
}
|
|
6000
|
+
function adapterFragment$1(luvio, config) {
|
|
6001
|
+
createResourceParams$3(config);
|
|
6002
|
+
return select$6();
|
|
6003
|
+
}
|
|
6004
|
+
function onFetchResponseSuccess$1(luvio, config, resourceParams, response) {
|
|
6005
|
+
const snapshot = ingestSuccess$3(luvio, resourceParams, response, {
|
|
6006
|
+
config,
|
|
6007
|
+
resolve: () => buildNetworkSnapshot$3(luvio, config, snapshotRefreshOptions)
|
|
6008
|
+
});
|
|
6009
|
+
return luvio.storeBroadcast().then(() => snapshot);
|
|
6010
|
+
}
|
|
6011
|
+
function onFetchResponseError$1(luvio, config, resourceParams, response) {
|
|
6012
|
+
const snapshot = ingestError$1(luvio, resourceParams, response, {
|
|
6013
|
+
config,
|
|
6014
|
+
resolve: () => buildNetworkSnapshot$3(luvio, config, snapshotRefreshOptions)
|
|
6015
|
+
});
|
|
6016
|
+
return luvio.storeBroadcast().then(() => snapshot);
|
|
6017
|
+
}
|
|
6018
|
+
function buildNetworkSnapshot$3(luvio, config, options) {
|
|
6019
|
+
const resourceParams = createResourceParams$3(config);
|
|
6020
|
+
const request = createResourceRequest$3(resourceParams);
|
|
6021
|
+
return luvio.dispatchResourceRequest(request, options)
|
|
6022
|
+
.then((response) => {
|
|
6023
|
+
return luvio.handleSuccessResponse(() => onFetchResponseSuccess$1(luvio, config, resourceParams, response), () => {
|
|
6024
|
+
const cache = new StoreKeyMap();
|
|
6025
|
+
getResponseCacheKeys$3(cache, luvio, resourceParams, response.body);
|
|
6026
|
+
return cache;
|
|
6027
|
+
});
|
|
6028
|
+
}, (response) => {
|
|
6029
|
+
return luvio.handleErrorResponse(() => onFetchResponseError$1(luvio, config, resourceParams, response));
|
|
6030
|
+
});
|
|
6031
|
+
}
|
|
6032
|
+
function buildNetworkSnapshotCachePolicy$1(context, coercedAdapterRequestContext) {
|
|
6033
|
+
return buildNetworkSnapshotCachePolicy$b(context, coercedAdapterRequestContext, buildNetworkSnapshot$3, undefined, false);
|
|
6034
|
+
}
|
|
6035
|
+
function buildCachedSnapshotCachePolicy$1(context, storeLookup) {
|
|
5514
6036
|
const { luvio, config } = context;
|
|
5515
6037
|
const selector = {
|
|
5516
6038
|
recordId: keyBuilder$2(luvio, config),
|
|
@@ -5523,8 +6045,8 @@ function buildCachedSnapshotCachePolicy$1(context, storeLookup) {
|
|
|
5523
6045
|
});
|
|
5524
6046
|
return cacheSnapshot;
|
|
5525
6047
|
}
|
|
5526
|
-
const
|
|
5527
|
-
const config = validateAdapterConfig$3(untrustedConfig,
|
|
6048
|
+
const getPromptTemplatesAdapterFactory = (luvio) => function EinsteinLLM__getPromptTemplates(untrustedConfig, requestContext) {
|
|
6049
|
+
const config = validateAdapterConfig$3(untrustedConfig, getPromptTemplates_ConfigPropertyNames);
|
|
5528
6050
|
// Invalid or incomplete config
|
|
5529
6051
|
if (config === null) {
|
|
5530
6052
|
return null;
|
|
@@ -5533,62 +6055,297 @@ const getPromptTemplateAdapterFactory = (luvio) => function EinsteinLLM__getProm
|
|
|
5533
6055
|
buildCachedSnapshotCachePolicy$1, buildNetworkSnapshotCachePolicy$1);
|
|
5534
6056
|
};
|
|
5535
6057
|
|
|
5536
|
-
const
|
|
5537
|
-
|
|
5538
|
-
function validate(obj, path = 'EinsteinPromptRecordCollectionOutputRepresentation') {
|
|
6058
|
+
const VERSION$2 = "f08355bdc491f090c787309a8a476caa";
|
|
6059
|
+
function validate$2(obj, path = 'EinsteinPromptTypeSchemaInputFieldRepresentation') {
|
|
5539
6060
|
const v_error = (() => {
|
|
5540
6061
|
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
5541
6062
|
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
5542
6063
|
}
|
|
5543
|
-
const
|
|
5544
|
-
const
|
|
5545
|
-
if (typeof
|
|
5546
|
-
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 + '")');
|
|
5547
6068
|
}
|
|
5548
|
-
if (obj.
|
|
5549
|
-
const
|
|
5550
|
-
const
|
|
5551
|
-
if (
|
|
5552
|
-
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 + '")');
|
|
5553
6074
|
}
|
|
5554
|
-
|
|
5555
|
-
|
|
5556
|
-
|
|
5557
|
-
|
|
5558
|
-
|
|
5559
|
-
|
|
5560
|
-
message += referencepath_promptRecords_itemValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
5561
|
-
return new TypeError(message);
|
|
5562
|
-
}
|
|
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 + '")');
|
|
5563
6081
|
}
|
|
5564
6082
|
}
|
|
5565
|
-
|
|
5566
|
-
|
|
5567
|
-
|
|
5568
|
-
|
|
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
|
+
}
|
|
6201
|
+
}
|
|
6202
|
+
})();
|
|
6203
|
+
return v_error === undefined ? null : v_error;
|
|
6204
|
+
}
|
|
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 + '")');
|
|
5569
6293
|
}
|
|
5570
6294
|
})();
|
|
5571
6295
|
return v_error === undefined ? null : v_error;
|
|
5572
6296
|
}
|
|
5573
|
-
const RepresentationType = '
|
|
6297
|
+
const RepresentationType = 'EinsteinPromptTypeRecordRepresentation';
|
|
5574
6298
|
function normalize(input, existing, path, luvio, store, timestamp) {
|
|
5575
6299
|
return input;
|
|
5576
6300
|
}
|
|
5577
|
-
const select$3 = function
|
|
6301
|
+
const select$3 = function EinsteinPromptTypeRecordRepresentationSelect() {
|
|
6302
|
+
const { selections: EinsteinPromptTypeSchemaRepresentation__selections, opaque: EinsteinPromptTypeSchemaRepresentation__opaque, } = select$4();
|
|
5578
6303
|
return {
|
|
5579
6304
|
kind: 'Fragment',
|
|
5580
6305
|
version: VERSION,
|
|
5581
6306
|
private: [],
|
|
5582
|
-
|
|
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
|
+
]
|
|
5583
6323
|
};
|
|
5584
6324
|
};
|
|
5585
6325
|
function equals(existing, incoming) {
|
|
5586
|
-
|
|
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))) {
|
|
5587
6344
|
return false;
|
|
5588
6345
|
}
|
|
5589
6346
|
return true;
|
|
5590
6347
|
}
|
|
5591
|
-
const ingest = function
|
|
6348
|
+
const ingest = function EinsteinPromptTypeRecordRepresentationIngest(input, path, luvio, store, timestamp) {
|
|
5592
6349
|
if (process.env.NODE_ENV !== 'production') {
|
|
5593
6350
|
const validateError = validate(input);
|
|
5594
6351
|
if (validateError !== null) {
|
|
@@ -5614,7 +6371,7 @@ function select$2(luvio, params) {
|
|
|
5614
6371
|
return select$3();
|
|
5615
6372
|
}
|
|
5616
6373
|
function keyBuilder$1(luvio, params) {
|
|
5617
|
-
return keyPrefix + '::
|
|
6374
|
+
return keyPrefix + '::EinsteinPromptTypeRecordRepresentation:(' + 'templateTypeName:' + params.urlParams.templateTypeName + ')';
|
|
5618
6375
|
}
|
|
5619
6376
|
function getResponseCacheKeys$2(storeKeyMap, luvio, resourceParams, response) {
|
|
5620
6377
|
getTypeCacheKeys(storeKeyMap, luvio, response, () => keyBuilder$1(luvio, resourceParams));
|
|
@@ -5652,36 +6409,29 @@ function createResourceRequest$2(config) {
|
|
|
5652
6409
|
const headers = {};
|
|
5653
6410
|
return {
|
|
5654
6411
|
baseUri: '/services/data/v66.0',
|
|
5655
|
-
basePath: '/einstein/prompt-
|
|
6412
|
+
basePath: '/einstein/prompt-template-types/' + config.urlParams.templateTypeName + '',
|
|
5656
6413
|
method: 'get',
|
|
5657
6414
|
body: null,
|
|
5658
|
-
urlParams:
|
|
5659
|
-
queryParams:
|
|
6415
|
+
urlParams: config.urlParams,
|
|
6416
|
+
queryParams: {},
|
|
5660
6417
|
headers,
|
|
5661
6418
|
priority: 'normal',
|
|
5662
6419
|
};
|
|
5663
6420
|
}
|
|
5664
6421
|
|
|
5665
|
-
const adapterName$2 = '
|
|
5666
|
-
const
|
|
5667
|
-
generateParamConfigMetadata('
|
|
5668
|
-
generateParamConfigMetadata('fields', false, 1 /* QueryParameter */, 0 /* String */, true),
|
|
5669
|
-
generateParamConfigMetadata('relatedEntity', false, 1 /* QueryParameter */, 0 /* String */),
|
|
5670
|
-
generateParamConfigMetadata('offset', false, 1 /* QueryParameter */, 3 /* Integer */),
|
|
5671
|
-
generateParamConfigMetadata('pageLimit', false, 1 /* QueryParameter */, 3 /* Integer */),
|
|
5672
|
-
generateParamConfigMetadata('type', false, 1 /* QueryParameter */, 0 /* String */),
|
|
5673
|
-
generateParamConfigMetadata('query', false, 1 /* QueryParameter */, 0 /* String */),
|
|
5674
|
-
generateParamConfigMetadata('sortBy', false, 1 /* QueryParameter */, 0 /* String */),
|
|
6422
|
+
const adapterName$2 = 'getTemplateType';
|
|
6423
|
+
const getTemplateType_ConfigPropertyMetadata = [
|
|
6424
|
+
generateParamConfigMetadata('templateTypeName', true, 0 /* UrlParameter */, 0 /* String */),
|
|
5675
6425
|
];
|
|
5676
|
-
const
|
|
5677
|
-
const createResourceParams$2 = /*#__PURE__*/ createResourceParams$
|
|
6426
|
+
const getTemplateType_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$2, getTemplateType_ConfigPropertyMetadata);
|
|
6427
|
+
const createResourceParams$2 = /*#__PURE__*/ createResourceParams$i(getTemplateType_ConfigPropertyMetadata);
|
|
5678
6428
|
function keyBuilder(luvio, config) {
|
|
5679
6429
|
const resourceParams = createResourceParams$2(config);
|
|
5680
6430
|
return keyBuilder$1(luvio, resourceParams);
|
|
5681
6431
|
}
|
|
5682
6432
|
function typeCheckConfig$2(untrustedConfig) {
|
|
5683
6433
|
const config = {};
|
|
5684
|
-
typeCheckConfig$
|
|
6434
|
+
typeCheckConfig$i(untrustedConfig, config, getTemplateType_ConfigPropertyMetadata);
|
|
5685
6435
|
return config;
|
|
5686
6436
|
}
|
|
5687
6437
|
function validateAdapterConfig$2(untrustedConfig, configPropertyNames) {
|
|
@@ -5730,7 +6480,7 @@ function buildNetworkSnapshot$2(luvio, config, options) {
|
|
|
5730
6480
|
});
|
|
5731
6481
|
}
|
|
5732
6482
|
function buildNetworkSnapshotCachePolicy(context, coercedAdapterRequestContext) {
|
|
5733
|
-
return buildNetworkSnapshotCachePolicy$
|
|
6483
|
+
return buildNetworkSnapshotCachePolicy$b(context, coercedAdapterRequestContext, buildNetworkSnapshot$2, undefined, false);
|
|
5734
6484
|
}
|
|
5735
6485
|
function buildCachedSnapshotCachePolicy(context, storeLookup) {
|
|
5736
6486
|
const { luvio, config } = context;
|
|
@@ -5745,8 +6495,8 @@ function buildCachedSnapshotCachePolicy(context, storeLookup) {
|
|
|
5745
6495
|
});
|
|
5746
6496
|
return cacheSnapshot;
|
|
5747
6497
|
}
|
|
5748
|
-
const
|
|
5749
|
-
const config = validateAdapterConfig$2(untrustedConfig,
|
|
6498
|
+
const getTemplateTypeAdapterFactory = (luvio) => function EinsteinLLM__getTemplateType(untrustedConfig, requestContext) {
|
|
6499
|
+
const config = validateAdapterConfig$2(untrustedConfig, getTemplateType_ConfigPropertyNames);
|
|
5750
6500
|
// Invalid or incomplete config
|
|
5751
6501
|
if (config === null) {
|
|
5752
6502
|
return null;
|
|
@@ -5756,15 +6506,15 @@ const getPromptTemplatesAdapterFactory = (luvio) => function EinsteinLLM__getPro
|
|
|
5756
6506
|
};
|
|
5757
6507
|
|
|
5758
6508
|
function select$1(luvio, params) {
|
|
5759
|
-
return select$
|
|
6509
|
+
return select$p();
|
|
5760
6510
|
}
|
|
5761
6511
|
function getResponseCacheKeys$1(storeKeyMap, luvio, resourceParams, response) {
|
|
5762
|
-
getTypeCacheKeys$
|
|
6512
|
+
getTypeCacheKeys$7(storeKeyMap, luvio, response);
|
|
5763
6513
|
}
|
|
5764
6514
|
function ingestSuccess$1(luvio, resourceParams, response) {
|
|
5765
6515
|
const { body } = response;
|
|
5766
6516
|
const key = keyBuilderFromType(luvio, body);
|
|
5767
|
-
luvio.storeIngest(key, ingest$
|
|
6517
|
+
luvio.storeIngest(key, ingest$7, body);
|
|
5768
6518
|
const snapshot = luvio.storeLookup({
|
|
5769
6519
|
recordId: key,
|
|
5770
6520
|
node: select$1(),
|
|
@@ -5800,10 +6550,10 @@ const putEinsteinPromptTemplateVersionStatus_ConfigPropertyMetadata = [
|
|
|
5800
6550
|
generateParamConfigMetadata('ignoreWarnings', false, 1 /* QueryParameter */, 1 /* Boolean */),
|
|
5801
6551
|
];
|
|
5802
6552
|
const putEinsteinPromptTemplateVersionStatus_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$1, putEinsteinPromptTemplateVersionStatus_ConfigPropertyMetadata);
|
|
5803
|
-
const createResourceParams$1 = /*#__PURE__*/ createResourceParams$
|
|
6553
|
+
const createResourceParams$1 = /*#__PURE__*/ createResourceParams$i(putEinsteinPromptTemplateVersionStatus_ConfigPropertyMetadata);
|
|
5804
6554
|
function typeCheckConfig$1(untrustedConfig) {
|
|
5805
6555
|
const config = {};
|
|
5806
|
-
typeCheckConfig$
|
|
6556
|
+
typeCheckConfig$i(untrustedConfig, config, putEinsteinPromptTemplateVersionStatus_ConfigPropertyMetadata);
|
|
5807
6557
|
return config;
|
|
5808
6558
|
}
|
|
5809
6559
|
function validateAdapterConfig$1(untrustedConfig, configPropertyNames) {
|
|
@@ -5849,15 +6599,15 @@ const putEinsteinPromptTemplateVersionStatusAdapterFactory = (luvio) => {
|
|
|
5849
6599
|
};
|
|
5850
6600
|
|
|
5851
6601
|
function select(luvio, params) {
|
|
5852
|
-
return select$
|
|
6602
|
+
return select$p();
|
|
5853
6603
|
}
|
|
5854
6604
|
function getResponseCacheKeys(storeKeyMap, luvio, resourceParams, response) {
|
|
5855
|
-
getTypeCacheKeys$
|
|
6605
|
+
getTypeCacheKeys$7(storeKeyMap, luvio, response);
|
|
5856
6606
|
}
|
|
5857
6607
|
function ingestSuccess(luvio, resourceParams, response) {
|
|
5858
6608
|
const { body } = response;
|
|
5859
6609
|
const key = keyBuilderFromType(luvio, body);
|
|
5860
|
-
luvio.storeIngest(key, ingest$
|
|
6610
|
+
luvio.storeIngest(key, ingest$7, body);
|
|
5861
6611
|
const snapshot = luvio.storeLookup({
|
|
5862
6612
|
recordId: key,
|
|
5863
6613
|
node: select(),
|
|
@@ -5891,15 +6641,14 @@ const updatePromptTemplateVersion_ConfigPropertyMetadata = [
|
|
|
5891
6641
|
generateParamConfigMetadata('versionId', true, 0 /* UrlParameter */, 0 /* String */),
|
|
5892
6642
|
generateParamConfigMetadata('apiName', true, 2 /* Body */, 0 /* String */),
|
|
5893
6643
|
generateParamConfigMetadata('childRelationships', true, 2 /* Body */, 4 /* Unsupported */),
|
|
5894
|
-
generateParamConfigMetadata('fields', true, 2 /* Body */, 4 /* Unsupported
|
|
6644
|
+
generateParamConfigMetadata('fields', true, 2 /* Body */, 4 /* Unsupported */),
|
|
5895
6645
|
generateParamConfigMetadata('id', false, 2 /* Body */, 0 /* String */),
|
|
5896
|
-
generateParamConfigMetadata('isStandard', true, 2 /* Body */, 1 /* Boolean */),
|
|
5897
6646
|
];
|
|
5898
6647
|
const updatePromptTemplateVersion_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName, updatePromptTemplateVersion_ConfigPropertyMetadata);
|
|
5899
|
-
const createResourceParams = /*#__PURE__*/ createResourceParams$
|
|
6648
|
+
const createResourceParams = /*#__PURE__*/ createResourceParams$i(updatePromptTemplateVersion_ConfigPropertyMetadata);
|
|
5900
6649
|
function typeCheckConfig(untrustedConfig) {
|
|
5901
6650
|
const config = {};
|
|
5902
|
-
typeCheckConfig$
|
|
6651
|
+
typeCheckConfig$i(untrustedConfig, config, updatePromptTemplateVersion_ConfigPropertyMetadata);
|
|
5903
6652
|
const untrustedConfig_childRelationships = untrustedConfig.childRelationships;
|
|
5904
6653
|
if (untrustedIsObject(untrustedConfig_childRelationships)) {
|
|
5905
6654
|
const untrustedConfig_childRelationships_object = {};
|
|
@@ -5916,26 +6665,19 @@ function typeCheckConfig(untrustedConfig) {
|
|
|
5916
6665
|
}
|
|
5917
6666
|
}
|
|
5918
6667
|
const untrustedConfig_fields = untrustedConfig.fields;
|
|
5919
|
-
if (
|
|
5920
|
-
const
|
|
5921
|
-
|
|
5922
|
-
|
|
5923
|
-
|
|
5924
|
-
|
|
5925
|
-
|
|
5926
|
-
|
|
5927
|
-
const key = untrustedConfig_fields_item_keys[i];
|
|
5928
|
-
const untrustedConfig_fields_item_prop = untrustedConfig_fields_item[key];
|
|
5929
|
-
if (untrustedConfig_fields_item_object !== undefined) {
|
|
5930
|
-
untrustedConfig_fields_item_object[key] = untrustedConfig_fields_item_prop;
|
|
5931
|
-
}
|
|
5932
|
-
}
|
|
5933
|
-
if (untrustedConfig_fields_item_object !== undefined && Object.keys(untrustedConfig_fields_item_object).length >= 0) {
|
|
5934
|
-
untrustedConfig_fields_array.push(untrustedConfig_fields_item_object);
|
|
5935
|
-
}
|
|
6668
|
+
if (untrustedIsObject(untrustedConfig_fields)) {
|
|
6669
|
+
const untrustedConfig_fields_object = {};
|
|
6670
|
+
const untrustedConfig_fields_keys = Object.keys(untrustedConfig_fields);
|
|
6671
|
+
for (let i = 0, arrayLength = untrustedConfig_fields_keys.length; i < arrayLength; i++) {
|
|
6672
|
+
const key = untrustedConfig_fields_keys[i];
|
|
6673
|
+
const untrustedConfig_fields_prop = untrustedConfig_fields[key];
|
|
6674
|
+
if (untrustedConfig_fields_object !== undefined) {
|
|
6675
|
+
untrustedConfig_fields_object[key] = untrustedConfig_fields_prop;
|
|
5936
6676
|
}
|
|
5937
6677
|
}
|
|
5938
|
-
|
|
6678
|
+
if (untrustedConfig_fields_object !== undefined && Object.keys(untrustedConfig_fields_object).length >= 0) {
|
|
6679
|
+
config.fields = untrustedConfig_fields_object;
|
|
6680
|
+
}
|
|
5939
6681
|
}
|
|
5940
6682
|
return config;
|
|
5941
6683
|
}
|
|
@@ -5993,7 +6735,10 @@ let getDataProviders;
|
|
|
5993
6735
|
let getInputMappedDataProviders;
|
|
5994
6736
|
let getOutputLanguages;
|
|
5995
6737
|
let getPromptTemplate;
|
|
6738
|
+
let getPromptTemplateVersion;
|
|
6739
|
+
let getPromptTemplateVersions;
|
|
5996
6740
|
let getPromptTemplates;
|
|
6741
|
+
let getTemplateType;
|
|
5997
6742
|
let putEinsteinPromptTemplateVersionStatus;
|
|
5998
6743
|
let updatePromptTemplateVersion;
|
|
5999
6744
|
// Imperative GET Adapters
|
|
@@ -6004,7 +6749,10 @@ let getDataProviders_imperative;
|
|
|
6004
6749
|
let getInputMappedDataProviders_imperative;
|
|
6005
6750
|
let getOutputLanguages_imperative;
|
|
6006
6751
|
let getPromptTemplate_imperative;
|
|
6752
|
+
let getPromptTemplateVersion_imperative;
|
|
6753
|
+
let getPromptTemplateVersions_imperative;
|
|
6007
6754
|
let getPromptTemplates_imperative;
|
|
6755
|
+
let getTemplateType_imperative;
|
|
6008
6756
|
// Adapter Metadata
|
|
6009
6757
|
const createEmbeddingsMetadata = { apiFamily: 'EinsteinLLM', name: 'createEmbeddings', ttl: 100 };
|
|
6010
6758
|
const getDataProviderInstanceConfigMetadata = {
|
|
@@ -6029,11 +6777,22 @@ const getOutputLanguagesMetadata = {
|
|
|
6029
6777
|
ttl: 100,
|
|
6030
6778
|
};
|
|
6031
6779
|
const getPromptTemplateMetadata = { apiFamily: 'EinsteinLLM', name: 'getPromptTemplate', ttl: 100 };
|
|
6780
|
+
const getPromptTemplateVersionMetadata = {
|
|
6781
|
+
apiFamily: 'EinsteinLLM',
|
|
6782
|
+
name: 'getPromptTemplateVersion',
|
|
6783
|
+
ttl: 100,
|
|
6784
|
+
};
|
|
6785
|
+
const getPromptTemplateVersionsMetadata = {
|
|
6786
|
+
apiFamily: 'EinsteinLLM',
|
|
6787
|
+
name: 'getPromptTemplateVersions',
|
|
6788
|
+
ttl: 100,
|
|
6789
|
+
};
|
|
6032
6790
|
const getPromptTemplatesMetadata = {
|
|
6033
6791
|
apiFamily: 'EinsteinLLM',
|
|
6034
6792
|
name: 'getPromptTemplates',
|
|
6035
6793
|
ttl: 100,
|
|
6036
6794
|
};
|
|
6795
|
+
const getTemplateTypeMetadata = { apiFamily: 'EinsteinLLM', name: 'getTemplateType', ttl: 300 };
|
|
6037
6796
|
// Notify Update Available
|
|
6038
6797
|
function bindExportsTo(luvio) {
|
|
6039
6798
|
// LDS Adapters
|
|
@@ -6044,7 +6803,10 @@ function bindExportsTo(luvio) {
|
|
|
6044
6803
|
const getInputMappedDataProviders_ldsAdapter = createInstrumentedAdapter(createLDSAdapter(luvio, 'getInputMappedDataProviders', getInputMappedDataProvidersAdapterFactory), getInputMappedDataProvidersMetadata);
|
|
6045
6804
|
const getOutputLanguages_ldsAdapter = createInstrumentedAdapter(createLDSAdapter(luvio, 'getOutputLanguages', getOutputLanguagesAdapterFactory), getOutputLanguagesMetadata);
|
|
6046
6805
|
const getPromptTemplate_ldsAdapter = createInstrumentedAdapter(createLDSAdapter(luvio, 'getPromptTemplate', getPromptTemplateAdapterFactory), getPromptTemplateMetadata);
|
|
6806
|
+
const getPromptTemplateVersion_ldsAdapter = createInstrumentedAdapter(createLDSAdapter(luvio, 'getPromptTemplateVersion', getPromptTemplateVersionAdapterFactory), getPromptTemplateVersionMetadata);
|
|
6807
|
+
const getPromptTemplateVersions_ldsAdapter = createInstrumentedAdapter(createLDSAdapter(luvio, 'getPromptTemplateVersions', getPromptTemplateVersionsAdapterFactory), getPromptTemplateVersionsMetadata);
|
|
6047
6808
|
const getPromptTemplates_ldsAdapter = createInstrumentedAdapter(createLDSAdapter(luvio, 'getPromptTemplates', getPromptTemplatesAdapterFactory), getPromptTemplatesMetadata);
|
|
6809
|
+
const getTemplateType_ldsAdapter = createInstrumentedAdapter(createLDSAdapter(luvio, 'getTemplateType', getTemplateTypeAdapterFactory), getTemplateTypeMetadata);
|
|
6048
6810
|
function unwrapSnapshotData(factory) {
|
|
6049
6811
|
const adapter = factory(luvio);
|
|
6050
6812
|
return (config) => adapter(config).then((snapshot) => snapshot.data);
|
|
@@ -6062,7 +6824,10 @@ function bindExportsTo(luvio) {
|
|
|
6062
6824
|
getInputMappedDataProviders: createWireAdapterConstructor(luvio, getInputMappedDataProviders_ldsAdapter, getInputMappedDataProvidersMetadata),
|
|
6063
6825
|
getOutputLanguages: createWireAdapterConstructor(luvio, getOutputLanguages_ldsAdapter, getOutputLanguagesMetadata),
|
|
6064
6826
|
getPromptTemplate: createWireAdapterConstructor(luvio, getPromptTemplate_ldsAdapter, getPromptTemplateMetadata),
|
|
6827
|
+
getPromptTemplateVersion: createWireAdapterConstructor(luvio, getPromptTemplateVersion_ldsAdapter, getPromptTemplateVersionMetadata),
|
|
6828
|
+
getPromptTemplateVersions: createWireAdapterConstructor(luvio, getPromptTemplateVersions_ldsAdapter, getPromptTemplateVersionsMetadata),
|
|
6065
6829
|
getPromptTemplates: createWireAdapterConstructor(luvio, getPromptTemplates_ldsAdapter, getPromptTemplatesMetadata),
|
|
6830
|
+
getTemplateType: createWireAdapterConstructor(luvio, getTemplateType_ldsAdapter, getTemplateTypeMetadata),
|
|
6066
6831
|
putEinsteinPromptTemplateVersionStatus: unwrapSnapshotData(putEinsteinPromptTemplateVersionStatusAdapterFactory),
|
|
6067
6832
|
updatePromptTemplateVersion: unwrapSnapshotData(updatePromptTemplateVersionAdapterFactory),
|
|
6068
6833
|
// Imperative GET Adapters
|
|
@@ -6073,7 +6838,10 @@ function bindExportsTo(luvio) {
|
|
|
6073
6838
|
getInputMappedDataProviders_imperative: createImperativeAdapter(luvio, getInputMappedDataProviders_ldsAdapter, getInputMappedDataProvidersMetadata),
|
|
6074
6839
|
getOutputLanguages_imperative: createImperativeAdapter(luvio, getOutputLanguages_ldsAdapter, getOutputLanguagesMetadata),
|
|
6075
6840
|
getPromptTemplate_imperative: createImperativeAdapter(luvio, getPromptTemplate_ldsAdapter, getPromptTemplateMetadata),
|
|
6841
|
+
getPromptTemplateVersion_imperative: createImperativeAdapter(luvio, getPromptTemplateVersion_ldsAdapter, getPromptTemplateVersionMetadata),
|
|
6842
|
+
getPromptTemplateVersions_imperative: createImperativeAdapter(luvio, getPromptTemplateVersions_ldsAdapter, getPromptTemplateVersionsMetadata),
|
|
6076
6843
|
getPromptTemplates_imperative: createImperativeAdapter(luvio, getPromptTemplates_ldsAdapter, getPromptTemplatesMetadata),
|
|
6844
|
+
getTemplateType_imperative: createImperativeAdapter(luvio, getTemplateType_ldsAdapter, getTemplateTypeMetadata),
|
|
6077
6845
|
// Notify Update Availables
|
|
6078
6846
|
};
|
|
6079
6847
|
}
|
|
@@ -6091,7 +6859,10 @@ withDefaultLuvio((luvio) => {
|
|
|
6091
6859
|
getInputMappedDataProviders,
|
|
6092
6860
|
getOutputLanguages,
|
|
6093
6861
|
getPromptTemplate,
|
|
6862
|
+
getPromptTemplateVersion,
|
|
6863
|
+
getPromptTemplateVersions,
|
|
6094
6864
|
getPromptTemplates,
|
|
6865
|
+
getTemplateType,
|
|
6095
6866
|
putEinsteinPromptTemplateVersionStatus,
|
|
6096
6867
|
updatePromptTemplateVersion,
|
|
6097
6868
|
createEmbeddings_imperative,
|
|
@@ -6101,9 +6872,12 @@ withDefaultLuvio((luvio) => {
|
|
|
6101
6872
|
getInputMappedDataProviders_imperative,
|
|
6102
6873
|
getOutputLanguages_imperative,
|
|
6103
6874
|
getPromptTemplate_imperative,
|
|
6875
|
+
getPromptTemplateVersion_imperative,
|
|
6876
|
+
getPromptTemplateVersions_imperative,
|
|
6104
6877
|
getPromptTemplates_imperative,
|
|
6878
|
+
getTemplateType_imperative,
|
|
6105
6879
|
} = bindExportsTo(luvio));
|
|
6106
6880
|
});
|
|
6107
6881
|
|
|
6108
|
-
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, getPromptTemplate_imperative, getPromptTemplates, getPromptTemplates_imperative, putEinsteinPromptTemplateVersionStatus, updatePromptTemplateVersion };
|
|
6109
|
-
// version: 1.
|
|
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.401.0-c620f9ffed
|