@salesforce/lds-adapters-service-einsteinllm 1.412.1 → 1.413.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 +929 -605
- package/dist/es/es2018/types/src/generated/adapters/putEinsteinPromptTemplateStatus.d.ts +16 -0
- package/dist/es/es2018/types/src/generated/artifacts/main.d.ts +1 -0
- package/dist/es/es2018/types/src/generated/artifacts/sfdc.d.ts +2 -1
- package/dist/es/es2018/types/src/generated/resources/putEinsteinPromptTemplatesStatusByPromptTemplateDevName.d.ts +15 -0
- package/dist/es/es2018/types/src/generated/types/EinsteinPromptTemplateStatusRepresentation.d.ts +59 -0
- package/package.json +4 -4
- package/sfdc/index.js +1247 -920
- package/src/raml/api.raml +53 -1
- package/src/raml/luvio.raml +9 -0
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* For full license text, see the LICENSE.txt file
|
|
5
5
|
*/
|
|
6
6
|
|
|
7
|
-
import { serializeStructuredKey, ingestShape, deepFreeze, buildNetworkSnapshotCachePolicy as buildNetworkSnapshotCachePolicy$b, StoreKeyMap, createResourceParams as createResourceParams$
|
|
7
|
+
import { serializeStructuredKey, ingestShape, deepFreeze, buildNetworkSnapshotCachePolicy as buildNetworkSnapshotCachePolicy$b, StoreKeyMap, createResourceParams as createResourceParams$j, typeCheckConfig as typeCheckConfig$j } from '@luvio/engine';
|
|
8
8
|
|
|
9
9
|
const { hasOwnProperty: ObjectPrototypeHasOwnProperty } = Object.prototype;
|
|
10
10
|
const { keys: ObjectKeys$1, create: ObjectCreate$1 } = Object;
|
|
@@ -168,7 +168,7 @@ function createLink(ref) {
|
|
|
168
168
|
};
|
|
169
169
|
}
|
|
170
170
|
|
|
171
|
-
function validate$
|
|
171
|
+
function validate$F(obj, path = 'EinsteinLlmEmbeddingsAdditionalConfigInputRepresentation') {
|
|
172
172
|
const v_error = (() => {
|
|
173
173
|
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
174
174
|
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
@@ -212,7 +212,7 @@ function validate$E(obj, path = 'EinsteinLlmEmbeddingsAdditionalConfigInputRepre
|
|
|
212
212
|
return v_error === undefined ? null : v_error;
|
|
213
213
|
}
|
|
214
214
|
|
|
215
|
-
function validate$
|
|
215
|
+
function validate$E(obj, path = 'WrappedListString') {
|
|
216
216
|
const v_error = (() => {
|
|
217
217
|
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
218
218
|
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
@@ -233,14 +233,14 @@ function validate$D(obj, path = 'WrappedListString') {
|
|
|
233
233
|
return v_error === undefined ? null : v_error;
|
|
234
234
|
}
|
|
235
235
|
|
|
236
|
-
function validate$
|
|
236
|
+
function validate$D(obj, path = 'EinsteinLlmEmbeddingsInputRepresentation') {
|
|
237
237
|
const v_error = (() => {
|
|
238
238
|
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
239
239
|
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
240
240
|
}
|
|
241
241
|
const obj_additionalConfig = obj.additionalConfig;
|
|
242
242
|
const path_additionalConfig = path + '.additionalConfig';
|
|
243
|
-
const referencepath_additionalConfigValidationError = validate$
|
|
243
|
+
const referencepath_additionalConfigValidationError = validate$F(obj_additionalConfig, path_additionalConfig);
|
|
244
244
|
if (referencepath_additionalConfigValidationError !== null) {
|
|
245
245
|
let message = 'Object doesn\'t match EinsteinLlmEmbeddingsAdditionalConfigInputRepresentation (at "' + path_additionalConfig + '")\n';
|
|
246
246
|
message += referencepath_additionalConfigValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
@@ -248,7 +248,7 @@ function validate$C(obj, path = 'EinsteinLlmEmbeddingsInputRepresentation') {
|
|
|
248
248
|
}
|
|
249
249
|
const obj_prompts = obj.prompts;
|
|
250
250
|
const path_prompts = path + '.prompts';
|
|
251
|
-
const referencepath_promptsValidationError = validate$
|
|
251
|
+
const referencepath_promptsValidationError = validate$E(obj_prompts, path_prompts);
|
|
252
252
|
if (referencepath_promptsValidationError !== null) {
|
|
253
253
|
let message = 'Object doesn\'t match WrappedListString (at "' + path_prompts + '")\n';
|
|
254
254
|
message += referencepath_promptsValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
@@ -265,8 +265,8 @@ function validate$C(obj, path = 'EinsteinLlmEmbeddingsInputRepresentation') {
|
|
|
265
265
|
return v_error === undefined ? null : v_error;
|
|
266
266
|
}
|
|
267
267
|
|
|
268
|
-
const VERSION$
|
|
269
|
-
function validate$
|
|
268
|
+
const VERSION$t = "5ed5ccc6fa6f15691ec0fc1080e41fe6";
|
|
269
|
+
function validate$C(obj, path = 'EinsteinLlmEmbeddingItemRepresentation') {
|
|
270
270
|
const v_error = (() => {
|
|
271
271
|
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
272
272
|
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
@@ -287,10 +287,10 @@ function validate$B(obj, path = 'EinsteinLlmEmbeddingItemRepresentation') {
|
|
|
287
287
|
})();
|
|
288
288
|
return v_error === undefined ? null : v_error;
|
|
289
289
|
}
|
|
290
|
-
const select$
|
|
290
|
+
const select$M = function EinsteinLlmEmbeddingItemRepresentationSelect() {
|
|
291
291
|
return {
|
|
292
292
|
kind: 'Fragment',
|
|
293
|
-
version: VERSION$
|
|
293
|
+
version: VERSION$t,
|
|
294
294
|
private: [],
|
|
295
295
|
selections: [
|
|
296
296
|
{
|
|
@@ -305,7 +305,7 @@ const select$K = function EinsteinLlmEmbeddingItemRepresentationSelect() {
|
|
|
305
305
|
]
|
|
306
306
|
};
|
|
307
307
|
};
|
|
308
|
-
function equals$
|
|
308
|
+
function equals$t(existing, incoming) {
|
|
309
309
|
const existing_index = existing.index;
|
|
310
310
|
const incoming_index = incoming.index;
|
|
311
311
|
if (!(existing_index === incoming_index)) {
|
|
@@ -324,9 +324,9 @@ function equals$s(existing, incoming) {
|
|
|
324
324
|
return true;
|
|
325
325
|
}
|
|
326
326
|
|
|
327
|
-
const TTL$
|
|
328
|
-
const VERSION$
|
|
329
|
-
function validate$
|
|
327
|
+
const TTL$c = 100;
|
|
328
|
+
const VERSION$s = "d9873651f09d29764ef4d4231eb653d7";
|
|
329
|
+
function validate$B(obj, path = 'EinsteinLlmEmbeddingsRepresentation') {
|
|
330
330
|
const v_error = (() => {
|
|
331
331
|
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
332
332
|
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
@@ -339,7 +339,7 @@ function validate$A(obj, path = 'EinsteinLlmEmbeddingsRepresentation') {
|
|
|
339
339
|
for (let i = 0; i < obj_embeddings.length; i++) {
|
|
340
340
|
const obj_embeddings_item = obj_embeddings[i];
|
|
341
341
|
const path_embeddings_item = path_embeddings + '[' + i + ']';
|
|
342
|
-
const referencepath_embeddings_itemValidationError = validate$
|
|
342
|
+
const referencepath_embeddings_itemValidationError = validate$C(obj_embeddings_item, path_embeddings_item);
|
|
343
343
|
if (referencepath_embeddings_itemValidationError !== null) {
|
|
344
344
|
let message = 'Object doesn\'t match EinsteinLlmEmbeddingItemRepresentation (at "' + path_embeddings_item + '")\n';
|
|
345
345
|
message += referencepath_embeddings_itemValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
@@ -363,15 +363,15 @@ function validate$A(obj, path = 'EinsteinLlmEmbeddingsRepresentation') {
|
|
|
363
363
|
})();
|
|
364
364
|
return v_error === undefined ? null : v_error;
|
|
365
365
|
}
|
|
366
|
-
const RepresentationType$
|
|
367
|
-
function normalize$
|
|
366
|
+
const RepresentationType$c = 'EinsteinLlmEmbeddingsRepresentation';
|
|
367
|
+
function normalize$c(input, existing, path, luvio, store, timestamp) {
|
|
368
368
|
return input;
|
|
369
369
|
}
|
|
370
|
-
const select$
|
|
371
|
-
const { selections: EinsteinLlmEmbeddingItemRepresentation__selections, opaque: EinsteinLlmEmbeddingItemRepresentation__opaque, } = select$
|
|
370
|
+
const select$L = function EinsteinLlmEmbeddingsRepresentationSelect() {
|
|
371
|
+
const { selections: EinsteinLlmEmbeddingItemRepresentation__selections, opaque: EinsteinLlmEmbeddingItemRepresentation__opaque, } = select$M();
|
|
372
372
|
return {
|
|
373
373
|
kind: 'Fragment',
|
|
374
|
-
version: VERSION$
|
|
374
|
+
version: VERSION$s,
|
|
375
375
|
private: [],
|
|
376
376
|
selections: [
|
|
377
377
|
{
|
|
@@ -388,11 +388,11 @@ const select$J = function EinsteinLlmEmbeddingsRepresentationSelect() {
|
|
|
388
388
|
]
|
|
389
389
|
};
|
|
390
390
|
};
|
|
391
|
-
function equals$
|
|
391
|
+
function equals$s(existing, incoming) {
|
|
392
392
|
const existing_embeddings = existing.embeddings;
|
|
393
393
|
const incoming_embeddings = incoming.embeddings;
|
|
394
394
|
const equals_embeddings_items = equalsArray(existing_embeddings, incoming_embeddings, (existing_embeddings_item, incoming_embeddings_item) => {
|
|
395
|
-
if (!(equals$
|
|
395
|
+
if (!(equals$t(existing_embeddings_item, incoming_embeddings_item))) {
|
|
396
396
|
return false;
|
|
397
397
|
}
|
|
398
398
|
});
|
|
@@ -411,44 +411,44 @@ function equals$r(existing, incoming) {
|
|
|
411
411
|
}
|
|
412
412
|
return true;
|
|
413
413
|
}
|
|
414
|
-
const ingest$
|
|
414
|
+
const ingest$c = function EinsteinLlmEmbeddingsRepresentationIngest(input, path, luvio, store, timestamp) {
|
|
415
415
|
if (process.env.NODE_ENV !== 'production') {
|
|
416
|
-
const validateError = validate$
|
|
416
|
+
const validateError = validate$B(input);
|
|
417
417
|
if (validateError !== null) {
|
|
418
418
|
throw validateError;
|
|
419
419
|
}
|
|
420
420
|
}
|
|
421
421
|
const key = path.fullPath;
|
|
422
|
-
const ttlToUse = TTL$
|
|
423
|
-
ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize$
|
|
422
|
+
const ttlToUse = TTL$c;
|
|
423
|
+
ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize$c, "EinsteinLLM", VERSION$s, RepresentationType$c, equals$s);
|
|
424
424
|
return createLink(key);
|
|
425
425
|
};
|
|
426
|
-
function getTypeCacheKeys$
|
|
426
|
+
function getTypeCacheKeys$c(rootKeySet, luvio, input, fullPathFactory) {
|
|
427
427
|
// root cache key (uses fullPathFactory if keyBuilderFromType isn't defined)
|
|
428
428
|
const rootKey = fullPathFactory();
|
|
429
429
|
rootKeySet.set(rootKey, {
|
|
430
430
|
namespace: keyPrefix,
|
|
431
|
-
representationName: RepresentationType$
|
|
431
|
+
representationName: RepresentationType$c,
|
|
432
432
|
mergeable: false
|
|
433
433
|
});
|
|
434
434
|
}
|
|
435
435
|
|
|
436
|
-
function select$
|
|
437
|
-
return select$
|
|
436
|
+
function select$K(luvio, params) {
|
|
437
|
+
return select$L();
|
|
438
438
|
}
|
|
439
|
-
function keyBuilder$
|
|
439
|
+
function keyBuilder$q(luvio, params) {
|
|
440
440
|
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) + ')';
|
|
441
441
|
}
|
|
442
|
-
function getResponseCacheKeys$
|
|
443
|
-
getTypeCacheKeys$
|
|
442
|
+
function getResponseCacheKeys$i(storeKeyMap, luvio, resourceParams, response) {
|
|
443
|
+
getTypeCacheKeys$c(storeKeyMap, luvio, response, () => keyBuilder$q(luvio, resourceParams));
|
|
444
444
|
}
|
|
445
|
-
function ingestSuccess$
|
|
445
|
+
function ingestSuccess$i(luvio, resourceParams, response, snapshotRefresh) {
|
|
446
446
|
const { body } = response;
|
|
447
|
-
const key = keyBuilder$
|
|
448
|
-
luvio.storeIngest(key, ingest$
|
|
447
|
+
const key = keyBuilder$q(luvio, resourceParams);
|
|
448
|
+
luvio.storeIngest(key, ingest$c, body);
|
|
449
449
|
const snapshot = luvio.storeLookup({
|
|
450
450
|
recordId: key,
|
|
451
|
-
node: select$
|
|
451
|
+
node: select$K(),
|
|
452
452
|
variables: {},
|
|
453
453
|
}, snapshotRefresh);
|
|
454
454
|
if (process.env.NODE_ENV !== 'production') {
|
|
@@ -460,21 +460,21 @@ function ingestSuccess$h(luvio, resourceParams, response, snapshotRefresh) {
|
|
|
460
460
|
return snapshot;
|
|
461
461
|
}
|
|
462
462
|
function ingestError$a(luvio, params, error, snapshotRefresh) {
|
|
463
|
-
const key = keyBuilder$
|
|
463
|
+
const key = keyBuilder$q(luvio, params);
|
|
464
464
|
const errorSnapshot = luvio.errorSnapshot(error, snapshotRefresh);
|
|
465
465
|
const storeMetadataParams = {
|
|
466
|
-
ttl: TTL$
|
|
466
|
+
ttl: TTL$c,
|
|
467
467
|
namespace: keyPrefix,
|
|
468
|
-
version: VERSION$
|
|
469
|
-
representationName: RepresentationType$
|
|
468
|
+
version: VERSION$s,
|
|
469
|
+
representationName: RepresentationType$c
|
|
470
470
|
};
|
|
471
471
|
luvio.storeIngestError(key, errorSnapshot, storeMetadataParams);
|
|
472
472
|
return errorSnapshot;
|
|
473
473
|
}
|
|
474
|
-
function createResourceRequest$
|
|
474
|
+
function createResourceRequest$i(config) {
|
|
475
475
|
const headers = {};
|
|
476
476
|
return {
|
|
477
|
-
baseUri: '/services/data/
|
|
477
|
+
baseUri: '/services/data/v67.0',
|
|
478
478
|
basePath: '/einstein/llm/embeddings',
|
|
479
479
|
method: 'post',
|
|
480
480
|
body: config.body,
|
|
@@ -485,64 +485,64 @@ function createResourceRequest$h(config) {
|
|
|
485
485
|
};
|
|
486
486
|
}
|
|
487
487
|
|
|
488
|
-
const adapterName$
|
|
488
|
+
const adapterName$i = 'createEmbeddings';
|
|
489
489
|
const createEmbeddings_ConfigPropertyMetadata = [
|
|
490
490
|
generateParamConfigMetadata('embeddingsInput', true, 2 /* Body */, 4 /* Unsupported */),
|
|
491
491
|
];
|
|
492
|
-
const createEmbeddings_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$
|
|
493
|
-
const createResourceParams$
|
|
494
|
-
function keyBuilder$
|
|
495
|
-
const resourceParams = createResourceParams$
|
|
496
|
-
return keyBuilder$
|
|
492
|
+
const createEmbeddings_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$i, createEmbeddings_ConfigPropertyMetadata);
|
|
493
|
+
const createResourceParams$i = /*#__PURE__*/ createResourceParams$j(createEmbeddings_ConfigPropertyMetadata);
|
|
494
|
+
function keyBuilder$p(luvio, config) {
|
|
495
|
+
const resourceParams = createResourceParams$i(config);
|
|
496
|
+
return keyBuilder$q(luvio, resourceParams);
|
|
497
497
|
}
|
|
498
|
-
function typeCheckConfig$
|
|
498
|
+
function typeCheckConfig$i(untrustedConfig) {
|
|
499
499
|
const config = {};
|
|
500
500
|
const untrustedConfig_embeddingsInput = untrustedConfig.embeddingsInput;
|
|
501
|
-
const referenceEinsteinLlmEmbeddingsInputRepresentationValidationError = validate$
|
|
501
|
+
const referenceEinsteinLlmEmbeddingsInputRepresentationValidationError = validate$D(untrustedConfig_embeddingsInput);
|
|
502
502
|
if (referenceEinsteinLlmEmbeddingsInputRepresentationValidationError === null) {
|
|
503
503
|
config.embeddingsInput = untrustedConfig_embeddingsInput;
|
|
504
504
|
}
|
|
505
505
|
return config;
|
|
506
506
|
}
|
|
507
|
-
function validateAdapterConfig$
|
|
507
|
+
function validateAdapterConfig$i(untrustedConfig, configPropertyNames) {
|
|
508
508
|
if (!untrustedIsObject(untrustedConfig)) {
|
|
509
509
|
return null;
|
|
510
510
|
}
|
|
511
511
|
if (process.env.NODE_ENV !== 'production') {
|
|
512
512
|
validateConfig(untrustedConfig, configPropertyNames);
|
|
513
513
|
}
|
|
514
|
-
const config = typeCheckConfig$
|
|
514
|
+
const config = typeCheckConfig$i(untrustedConfig);
|
|
515
515
|
if (!areRequiredParametersPresent(config, configPropertyNames)) {
|
|
516
516
|
return null;
|
|
517
517
|
}
|
|
518
518
|
return config;
|
|
519
519
|
}
|
|
520
520
|
function adapterFragment$a(luvio, config) {
|
|
521
|
-
createResourceParams$
|
|
522
|
-
return select$
|
|
521
|
+
createResourceParams$i(config);
|
|
522
|
+
return select$K();
|
|
523
523
|
}
|
|
524
524
|
function onFetchResponseSuccess$a(luvio, config, resourceParams, response) {
|
|
525
|
-
const snapshot = ingestSuccess$
|
|
525
|
+
const snapshot = ingestSuccess$i(luvio, resourceParams, response, {
|
|
526
526
|
config,
|
|
527
|
-
resolve: () => buildNetworkSnapshot$
|
|
527
|
+
resolve: () => buildNetworkSnapshot$i(luvio, config, snapshotRefreshOptions)
|
|
528
528
|
});
|
|
529
529
|
return luvio.storeBroadcast().then(() => snapshot);
|
|
530
530
|
}
|
|
531
531
|
function onFetchResponseError$a(luvio, config, resourceParams, response) {
|
|
532
532
|
const snapshot = ingestError$a(luvio, resourceParams, response, {
|
|
533
533
|
config,
|
|
534
|
-
resolve: () => buildNetworkSnapshot$
|
|
534
|
+
resolve: () => buildNetworkSnapshot$i(luvio, config, snapshotRefreshOptions)
|
|
535
535
|
});
|
|
536
536
|
return luvio.storeBroadcast().then(() => snapshot);
|
|
537
537
|
}
|
|
538
|
-
function buildNetworkSnapshot$
|
|
539
|
-
const resourceParams = createResourceParams$
|
|
540
|
-
const request = createResourceRequest$
|
|
538
|
+
function buildNetworkSnapshot$i(luvio, config, options) {
|
|
539
|
+
const resourceParams = createResourceParams$i(config);
|
|
540
|
+
const request = createResourceRequest$i(resourceParams);
|
|
541
541
|
return luvio.dispatchResourceRequest(request, options)
|
|
542
542
|
.then((response) => {
|
|
543
543
|
return luvio.handleSuccessResponse(() => onFetchResponseSuccess$a(luvio, config, resourceParams, response), () => {
|
|
544
544
|
const cache = new StoreKeyMap();
|
|
545
|
-
getResponseCacheKeys$
|
|
545
|
+
getResponseCacheKeys$i(cache, luvio, resourceParams, response.body);
|
|
546
546
|
return cache;
|
|
547
547
|
});
|
|
548
548
|
}, (response) => {
|
|
@@ -550,23 +550,23 @@ function buildNetworkSnapshot$h(luvio, config, options) {
|
|
|
550
550
|
});
|
|
551
551
|
}
|
|
552
552
|
function buildNetworkSnapshotCachePolicy$a(context, coercedAdapterRequestContext) {
|
|
553
|
-
return buildNetworkSnapshotCachePolicy$b(context, coercedAdapterRequestContext, buildNetworkSnapshot$
|
|
553
|
+
return buildNetworkSnapshotCachePolicy$b(context, coercedAdapterRequestContext, buildNetworkSnapshot$i, 'get', false);
|
|
554
554
|
}
|
|
555
555
|
function buildCachedSnapshotCachePolicy$a(context, storeLookup) {
|
|
556
556
|
const { luvio, config } = context;
|
|
557
557
|
const selector = {
|
|
558
|
-
recordId: keyBuilder$
|
|
558
|
+
recordId: keyBuilder$p(luvio, config),
|
|
559
559
|
node: adapterFragment$a(luvio, config),
|
|
560
560
|
variables: {},
|
|
561
561
|
};
|
|
562
562
|
const cacheSnapshot = storeLookup(selector, {
|
|
563
563
|
config,
|
|
564
|
-
resolve: () => buildNetworkSnapshot$
|
|
564
|
+
resolve: () => buildNetworkSnapshot$i(luvio, config, snapshotRefreshOptions)
|
|
565
565
|
});
|
|
566
566
|
return cacheSnapshot;
|
|
567
567
|
}
|
|
568
568
|
const createEmbeddingsAdapterFactory = (luvio) => function EinsteinLLM__createEmbeddings(untrustedConfig, requestContext) {
|
|
569
|
-
const config = validateAdapterConfig$
|
|
569
|
+
const config = validateAdapterConfig$i(untrustedConfig, createEmbeddings_ConfigPropertyNames);
|
|
570
570
|
// Invalid or incomplete config
|
|
571
571
|
if (config === null) {
|
|
572
572
|
return null;
|
|
@@ -575,7 +575,7 @@ const createEmbeddingsAdapterFactory = (luvio) => function EinsteinLLM__createEm
|
|
|
575
575
|
buildCachedSnapshotCachePolicy$a, buildNetworkSnapshotCachePolicy$a);
|
|
576
576
|
};
|
|
577
577
|
|
|
578
|
-
function validate$
|
|
578
|
+
function validate$A(obj, path = 'EinsteinLlmFeedbackInputRepresentation') {
|
|
579
579
|
const v_error = (() => {
|
|
580
580
|
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
581
581
|
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
@@ -622,9 +622,9 @@ function validate$z(obj, path = 'EinsteinLlmFeedbackInputRepresentation') {
|
|
|
622
622
|
return v_error === undefined ? null : v_error;
|
|
623
623
|
}
|
|
624
624
|
|
|
625
|
-
const TTL$
|
|
626
|
-
const VERSION$
|
|
627
|
-
function validate$
|
|
625
|
+
const TTL$b = 100;
|
|
626
|
+
const VERSION$r = "4033328f65865dd5d80c68a7573a4522";
|
|
627
|
+
function validate$z(obj, path = 'EinsteinLlmFeedbackRepresentation') {
|
|
628
628
|
const v_error = (() => {
|
|
629
629
|
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
630
630
|
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
@@ -637,23 +637,23 @@ function validate$y(obj, path = 'EinsteinLlmFeedbackRepresentation') {
|
|
|
637
637
|
})();
|
|
638
638
|
return v_error === undefined ? null : v_error;
|
|
639
639
|
}
|
|
640
|
-
const RepresentationType$
|
|
641
|
-
function keyBuilder$
|
|
642
|
-
return keyPrefix + '::' + RepresentationType$
|
|
640
|
+
const RepresentationType$b = 'EinsteinLlmFeedbackRepresentation';
|
|
641
|
+
function keyBuilder$o(luvio, config) {
|
|
642
|
+
return keyPrefix + '::' + RepresentationType$b + ':' + config.message;
|
|
643
643
|
}
|
|
644
|
-
function keyBuilderFromType$
|
|
644
|
+
function keyBuilderFromType$4(luvio, object) {
|
|
645
645
|
const keyParams = {
|
|
646
646
|
message: object.message
|
|
647
647
|
};
|
|
648
|
-
return keyBuilder$
|
|
648
|
+
return keyBuilder$o(luvio, keyParams);
|
|
649
649
|
}
|
|
650
|
-
function normalize$
|
|
650
|
+
function normalize$b(input, existing, path, luvio, store, timestamp) {
|
|
651
651
|
return input;
|
|
652
652
|
}
|
|
653
|
-
const select$
|
|
653
|
+
const select$J = function EinsteinLlmFeedbackRepresentationSelect() {
|
|
654
654
|
return {
|
|
655
655
|
kind: 'Fragment',
|
|
656
|
-
version: VERSION$
|
|
656
|
+
version: VERSION$r,
|
|
657
657
|
private: [],
|
|
658
658
|
selections: [
|
|
659
659
|
{
|
|
@@ -663,7 +663,7 @@ const select$H = function EinsteinLlmFeedbackRepresentationSelect() {
|
|
|
663
663
|
]
|
|
664
664
|
};
|
|
665
665
|
};
|
|
666
|
-
function equals$
|
|
666
|
+
function equals$r(existing, incoming) {
|
|
667
667
|
const existing_message = existing.message;
|
|
668
668
|
const incoming_message = incoming.message;
|
|
669
669
|
if (!(existing_message === incoming_message)) {
|
|
@@ -671,41 +671,41 @@ function equals$q(existing, incoming) {
|
|
|
671
671
|
}
|
|
672
672
|
return true;
|
|
673
673
|
}
|
|
674
|
-
const ingest$
|
|
674
|
+
const ingest$b = function EinsteinLlmFeedbackRepresentationIngest(input, path, luvio, store, timestamp) {
|
|
675
675
|
if (process.env.NODE_ENV !== 'production') {
|
|
676
|
-
const validateError = validate$
|
|
676
|
+
const validateError = validate$z(input);
|
|
677
677
|
if (validateError !== null) {
|
|
678
678
|
throw validateError;
|
|
679
679
|
}
|
|
680
680
|
}
|
|
681
|
-
const key = keyBuilderFromType$
|
|
682
|
-
const ttlToUse = TTL$
|
|
683
|
-
ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize$
|
|
681
|
+
const key = keyBuilderFromType$4(luvio, input);
|
|
682
|
+
const ttlToUse = TTL$b;
|
|
683
|
+
ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize$b, "EinsteinLLM", VERSION$r, RepresentationType$b, equals$r);
|
|
684
684
|
return createLink(key);
|
|
685
685
|
};
|
|
686
|
-
function getTypeCacheKeys$
|
|
686
|
+
function getTypeCacheKeys$b(rootKeySet, luvio, input, fullPathFactory) {
|
|
687
687
|
// root cache key (uses fullPathFactory if keyBuilderFromType isn't defined)
|
|
688
|
-
const rootKey = keyBuilderFromType$
|
|
688
|
+
const rootKey = keyBuilderFromType$4(luvio, input);
|
|
689
689
|
rootKeySet.set(rootKey, {
|
|
690
690
|
namespace: keyPrefix,
|
|
691
|
-
representationName: RepresentationType$
|
|
691
|
+
representationName: RepresentationType$b,
|
|
692
692
|
mergeable: false
|
|
693
693
|
});
|
|
694
694
|
}
|
|
695
695
|
|
|
696
|
-
function select$
|
|
697
|
-
return select$
|
|
696
|
+
function select$I(luvio, params) {
|
|
697
|
+
return select$J();
|
|
698
698
|
}
|
|
699
|
-
function getResponseCacheKeys$
|
|
700
|
-
getTypeCacheKeys$
|
|
699
|
+
function getResponseCacheKeys$h(storeKeyMap, luvio, resourceParams, response) {
|
|
700
|
+
getTypeCacheKeys$b(storeKeyMap, luvio, response);
|
|
701
701
|
}
|
|
702
|
-
function ingestSuccess$
|
|
702
|
+
function ingestSuccess$h(luvio, resourceParams, response) {
|
|
703
703
|
const { body } = response;
|
|
704
|
-
const key = keyBuilderFromType$
|
|
705
|
-
luvio.storeIngest(key, ingest$
|
|
704
|
+
const key = keyBuilderFromType$4(luvio, body);
|
|
705
|
+
luvio.storeIngest(key, ingest$b, body);
|
|
706
706
|
const snapshot = luvio.storeLookup({
|
|
707
707
|
recordId: key,
|
|
708
|
-
node: select$
|
|
708
|
+
node: select$I(),
|
|
709
709
|
variables: {},
|
|
710
710
|
});
|
|
711
711
|
if (process.env.NODE_ENV !== 'production') {
|
|
@@ -716,10 +716,10 @@ function ingestSuccess$g(luvio, resourceParams, response) {
|
|
|
716
716
|
deepFreeze(snapshot.data);
|
|
717
717
|
return snapshot;
|
|
718
718
|
}
|
|
719
|
-
function createResourceRequest$
|
|
719
|
+
function createResourceRequest$h(config) {
|
|
720
720
|
const headers = {};
|
|
721
721
|
return {
|
|
722
|
-
baseUri: '/services/data/
|
|
722
|
+
baseUri: '/services/data/v67.0',
|
|
723
723
|
basePath: '/einstein/llm/feedback',
|
|
724
724
|
method: 'post',
|
|
725
725
|
body: config.body,
|
|
@@ -730,45 +730,45 @@ function createResourceRequest$g(config) {
|
|
|
730
730
|
};
|
|
731
731
|
}
|
|
732
732
|
|
|
733
|
-
const adapterName$
|
|
733
|
+
const adapterName$h = 'createFeedback';
|
|
734
734
|
const createFeedback_ConfigPropertyMetadata = [
|
|
735
735
|
generateParamConfigMetadata('feedbackInput', true, 2 /* Body */, 4 /* Unsupported */),
|
|
736
736
|
];
|
|
737
|
-
const createFeedback_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$
|
|
738
|
-
const createResourceParams$
|
|
739
|
-
function typeCheckConfig$
|
|
737
|
+
const createFeedback_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$h, createFeedback_ConfigPropertyMetadata);
|
|
738
|
+
const createResourceParams$h = /*#__PURE__*/ createResourceParams$j(createFeedback_ConfigPropertyMetadata);
|
|
739
|
+
function typeCheckConfig$h(untrustedConfig) {
|
|
740
740
|
const config = {};
|
|
741
741
|
const untrustedConfig_feedbackInput = untrustedConfig.feedbackInput;
|
|
742
|
-
const referenceEinsteinLlmFeedbackInputRepresentationValidationError = validate$
|
|
742
|
+
const referenceEinsteinLlmFeedbackInputRepresentationValidationError = validate$A(untrustedConfig_feedbackInput);
|
|
743
743
|
if (referenceEinsteinLlmFeedbackInputRepresentationValidationError === null) {
|
|
744
744
|
config.feedbackInput = untrustedConfig_feedbackInput;
|
|
745
745
|
}
|
|
746
746
|
return config;
|
|
747
747
|
}
|
|
748
|
-
function validateAdapterConfig$
|
|
748
|
+
function validateAdapterConfig$h(untrustedConfig, configPropertyNames) {
|
|
749
749
|
if (!untrustedIsObject(untrustedConfig)) {
|
|
750
750
|
return null;
|
|
751
751
|
}
|
|
752
752
|
if (process.env.NODE_ENV !== 'production') {
|
|
753
753
|
validateConfig(untrustedConfig, configPropertyNames);
|
|
754
754
|
}
|
|
755
|
-
const config = typeCheckConfig$
|
|
755
|
+
const config = typeCheckConfig$h(untrustedConfig);
|
|
756
756
|
if (!areRequiredParametersPresent(config, configPropertyNames)) {
|
|
757
757
|
return null;
|
|
758
758
|
}
|
|
759
759
|
return config;
|
|
760
760
|
}
|
|
761
|
-
function buildNetworkSnapshot$
|
|
762
|
-
const resourceParams = createResourceParams$
|
|
763
|
-
const request = createResourceRequest$
|
|
761
|
+
function buildNetworkSnapshot$h(luvio, config, options) {
|
|
762
|
+
const resourceParams = createResourceParams$h(config);
|
|
763
|
+
const request = createResourceRequest$h(resourceParams);
|
|
764
764
|
return luvio.dispatchResourceRequest(request, options)
|
|
765
765
|
.then((response) => {
|
|
766
766
|
return luvio.handleSuccessResponse(() => {
|
|
767
|
-
const snapshot = ingestSuccess$
|
|
767
|
+
const snapshot = ingestSuccess$h(luvio, resourceParams, response);
|
|
768
768
|
return luvio.storeBroadcast().then(() => snapshot);
|
|
769
769
|
}, () => {
|
|
770
770
|
const cache = new StoreKeyMap();
|
|
771
|
-
getResponseCacheKeys$
|
|
771
|
+
getResponseCacheKeys$h(cache, luvio, resourceParams, response.body);
|
|
772
772
|
return cache;
|
|
773
773
|
});
|
|
774
774
|
}, (response) => {
|
|
@@ -778,16 +778,16 @@ function buildNetworkSnapshot$g(luvio, config, options) {
|
|
|
778
778
|
}
|
|
779
779
|
const createFeedbackAdapterFactory = (luvio) => {
|
|
780
780
|
return function createFeedback(untrustedConfig) {
|
|
781
|
-
const config = validateAdapterConfig$
|
|
781
|
+
const config = validateAdapterConfig$h(untrustedConfig, createFeedback_ConfigPropertyNames);
|
|
782
782
|
// Invalid or incomplete config
|
|
783
783
|
if (config === null) {
|
|
784
784
|
throw new Error('Invalid config for "createFeedback"');
|
|
785
785
|
}
|
|
786
|
-
return buildNetworkSnapshot$
|
|
786
|
+
return buildNetworkSnapshot$h(luvio, config);
|
|
787
787
|
};
|
|
788
788
|
};
|
|
789
789
|
|
|
790
|
-
function validate$
|
|
790
|
+
function validate$y(obj, path = 'EinsteinLlmAdditionalConfigInputRepresentation') {
|
|
791
791
|
const v_error = (() => {
|
|
792
792
|
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
793
793
|
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
@@ -870,7 +870,7 @@ function validate$x(obj, path = 'EinsteinLlmAdditionalConfigInputRepresentation'
|
|
|
870
870
|
return v_error === undefined ? null : v_error;
|
|
871
871
|
}
|
|
872
872
|
|
|
873
|
-
function validate$
|
|
873
|
+
function validate$x(obj, path = 'EinsteinLlmGenerationsInputRepresentation') {
|
|
874
874
|
const v_error = (() => {
|
|
875
875
|
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
876
876
|
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
@@ -878,7 +878,7 @@ function validate$w(obj, path = 'EinsteinLlmGenerationsInputRepresentation') {
|
|
|
878
878
|
if (obj.additionalConfig !== undefined) {
|
|
879
879
|
const obj_additionalConfig = obj.additionalConfig;
|
|
880
880
|
const path_additionalConfig = path + '.additionalConfig';
|
|
881
|
-
const referencepath_additionalConfigValidationError = validate$
|
|
881
|
+
const referencepath_additionalConfigValidationError = validate$y(obj_additionalConfig, path_additionalConfig);
|
|
882
882
|
if (referencepath_additionalConfigValidationError !== null) {
|
|
883
883
|
let message = 'Object doesn\'t match EinsteinLlmAdditionalConfigInputRepresentation (at "' + path_additionalConfig + '")\n';
|
|
884
884
|
message += referencepath_additionalConfigValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
@@ -901,8 +901,8 @@ function validate$w(obj, path = 'EinsteinLlmGenerationsInputRepresentation') {
|
|
|
901
901
|
return v_error === undefined ? null : v_error;
|
|
902
902
|
}
|
|
903
903
|
|
|
904
|
-
const VERSION$
|
|
905
|
-
function validate$
|
|
904
|
+
const VERSION$q = "9ebac74e6f964c363d5fd1913df363af";
|
|
905
|
+
function validate$w(obj, path = 'EinsteinLlmGenerationsContentQualityRepresentation') {
|
|
906
906
|
const v_error = (() => {
|
|
907
907
|
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
908
908
|
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
@@ -938,10 +938,10 @@ function validate$v(obj, path = 'EinsteinLlmGenerationsContentQualityRepresentat
|
|
|
938
938
|
})();
|
|
939
939
|
return v_error === undefined ? null : v_error;
|
|
940
940
|
}
|
|
941
|
-
const select$
|
|
941
|
+
const select$H = function EinsteinLlmGenerationsContentQualityRepresentationSelect() {
|
|
942
942
|
return {
|
|
943
943
|
kind: 'Fragment',
|
|
944
|
-
version: VERSION$
|
|
944
|
+
version: VERSION$q,
|
|
945
945
|
private: [],
|
|
946
946
|
selections: [
|
|
947
947
|
{
|
|
@@ -952,7 +952,7 @@ const select$F = function EinsteinLlmGenerationsContentQualityRepresentationSele
|
|
|
952
952
|
]
|
|
953
953
|
};
|
|
954
954
|
};
|
|
955
|
-
function equals$
|
|
955
|
+
function equals$q(existing, incoming) {
|
|
956
956
|
const existing_isToxicityDetected = existing.isToxicityDetected;
|
|
957
957
|
const incoming_isToxicityDetected = incoming.isToxicityDetected;
|
|
958
958
|
// if at least one of these optionals is defined
|
|
@@ -969,8 +969,8 @@ function equals$p(existing, incoming) {
|
|
|
969
969
|
return true;
|
|
970
970
|
}
|
|
971
971
|
|
|
972
|
-
const VERSION$
|
|
973
|
-
function validate$
|
|
972
|
+
const VERSION$p = "77af44a252cb5b45b4d9a8101368d2aa";
|
|
973
|
+
function validate$v(obj, path = 'EinsteinLlmGenerationsSafetyScoreRepresentation') {
|
|
974
974
|
const v_error = (() => {
|
|
975
975
|
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
976
976
|
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
@@ -1174,10 +1174,10 @@ function validate$u(obj, path = 'EinsteinLlmGenerationsSafetyScoreRepresentation
|
|
|
1174
1174
|
})();
|
|
1175
1175
|
return v_error === undefined ? null : v_error;
|
|
1176
1176
|
}
|
|
1177
|
-
const select$
|
|
1177
|
+
const select$G = function EinsteinLlmGenerationsSafetyScoreRepresentationSelect() {
|
|
1178
1178
|
return {
|
|
1179
1179
|
kind: 'Fragment',
|
|
1180
|
-
version: VERSION$
|
|
1180
|
+
version: VERSION$p,
|
|
1181
1181
|
private: [],
|
|
1182
1182
|
selections: [
|
|
1183
1183
|
{
|
|
@@ -1218,7 +1218,7 @@ const select$E = function EinsteinLlmGenerationsSafetyScoreRepresentationSelect(
|
|
|
1218
1218
|
]
|
|
1219
1219
|
};
|
|
1220
1220
|
};
|
|
1221
|
-
function equals$
|
|
1221
|
+
function equals$p(existing, incoming) {
|
|
1222
1222
|
const existing_hateScore = existing.hateScore;
|
|
1223
1223
|
const incoming_hateScore = incoming.hateScore;
|
|
1224
1224
|
// if at least one of these optionals is defined
|
|
@@ -1313,8 +1313,8 @@ function equals$o(existing, incoming) {
|
|
|
1313
1313
|
return true;
|
|
1314
1314
|
}
|
|
1315
1315
|
|
|
1316
|
-
const VERSION$
|
|
1317
|
-
function validate$
|
|
1316
|
+
const VERSION$o = "4a07778ff6c595d91c575188146647a1";
|
|
1317
|
+
function validate$u(obj, path = 'EinsteinLlmGenerationItemRepresentation') {
|
|
1318
1318
|
const v_error = (() => {
|
|
1319
1319
|
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
1320
1320
|
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
@@ -1324,7 +1324,7 @@ function validate$t(obj, path = 'EinsteinLlmGenerationItemRepresentation') {
|
|
|
1324
1324
|
const path_contentQualityRepresentation = path + '.contentQualityRepresentation';
|
|
1325
1325
|
let obj_contentQualityRepresentation_union0 = null;
|
|
1326
1326
|
const obj_contentQualityRepresentation_union0_error = (() => {
|
|
1327
|
-
const referencepath_contentQualityRepresentationValidationError = validate$
|
|
1327
|
+
const referencepath_contentQualityRepresentationValidationError = validate$w(obj_contentQualityRepresentation, path_contentQualityRepresentation);
|
|
1328
1328
|
if (referencepath_contentQualityRepresentationValidationError !== null) {
|
|
1329
1329
|
let message = 'Object doesn\'t match EinsteinLlmGenerationsContentQualityRepresentation (at "' + path_contentQualityRepresentation + '")\n';
|
|
1330
1330
|
message += referencepath_contentQualityRepresentationValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
@@ -1372,7 +1372,7 @@ function validate$t(obj, path = 'EinsteinLlmGenerationItemRepresentation') {
|
|
|
1372
1372
|
const path_safetyScoreRepresentation = path + '.safetyScoreRepresentation';
|
|
1373
1373
|
let obj_safetyScoreRepresentation_union0 = null;
|
|
1374
1374
|
const obj_safetyScoreRepresentation_union0_error = (() => {
|
|
1375
|
-
const referencepath_safetyScoreRepresentationValidationError = validate$
|
|
1375
|
+
const referencepath_safetyScoreRepresentationValidationError = validate$v(obj_safetyScoreRepresentation, path_safetyScoreRepresentation);
|
|
1376
1376
|
if (referencepath_safetyScoreRepresentationValidationError !== null) {
|
|
1377
1377
|
let message = 'Object doesn\'t match EinsteinLlmGenerationsSafetyScoreRepresentation (at "' + path_safetyScoreRepresentation + '")\n';
|
|
1378
1378
|
message += referencepath_safetyScoreRepresentationValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
@@ -1406,12 +1406,12 @@ function validate$t(obj, path = 'EinsteinLlmGenerationItemRepresentation') {
|
|
|
1406
1406
|
})();
|
|
1407
1407
|
return v_error === undefined ? null : v_error;
|
|
1408
1408
|
}
|
|
1409
|
-
const select$
|
|
1410
|
-
const { selections: EinsteinLlmGenerationsContentQualityRepresentation__selections, opaque: EinsteinLlmGenerationsContentQualityRepresentation__opaque, } = select$
|
|
1411
|
-
const { selections: EinsteinLlmGenerationsSafetyScoreRepresentation__selections, opaque: EinsteinLlmGenerationsSafetyScoreRepresentation__opaque, } = select$
|
|
1409
|
+
const select$F = function EinsteinLlmGenerationItemRepresentationSelect() {
|
|
1410
|
+
const { selections: EinsteinLlmGenerationsContentQualityRepresentation__selections, opaque: EinsteinLlmGenerationsContentQualityRepresentation__opaque, } = select$H();
|
|
1411
|
+
const { selections: EinsteinLlmGenerationsSafetyScoreRepresentation__selections, opaque: EinsteinLlmGenerationsSafetyScoreRepresentation__opaque, } = select$G();
|
|
1412
1412
|
return {
|
|
1413
1413
|
kind: 'Fragment',
|
|
1414
|
-
version: VERSION$
|
|
1414
|
+
version: VERSION$o,
|
|
1415
1415
|
private: [],
|
|
1416
1416
|
selections: [
|
|
1417
1417
|
{
|
|
@@ -1448,7 +1448,7 @@ const select$D = function EinsteinLlmGenerationItemRepresentationSelect() {
|
|
|
1448
1448
|
]
|
|
1449
1449
|
};
|
|
1450
1450
|
};
|
|
1451
|
-
function equals$
|
|
1451
|
+
function equals$o(existing, incoming) {
|
|
1452
1452
|
const existing_isSummarized = existing.isSummarized;
|
|
1453
1453
|
const incoming_isSummarized = incoming.isSummarized;
|
|
1454
1454
|
// if at least one of these optionals is defined
|
|
@@ -1489,7 +1489,7 @@ function equals$n(existing, incoming) {
|
|
|
1489
1489
|
if (!(existing_contentQualityRepresentation === incoming_contentQualityRepresentation
|
|
1490
1490
|
|| (existing_contentQualityRepresentation != null &&
|
|
1491
1491
|
incoming_contentQualityRepresentation != null &&
|
|
1492
|
-
equals$
|
|
1492
|
+
equals$q(existing_contentQualityRepresentation, incoming_contentQualityRepresentation)))) {
|
|
1493
1493
|
return false;
|
|
1494
1494
|
}
|
|
1495
1495
|
}
|
|
@@ -1505,15 +1505,15 @@ function equals$n(existing, incoming) {
|
|
|
1505
1505
|
if (!(existing_safetyScoreRepresentation === incoming_safetyScoreRepresentation
|
|
1506
1506
|
|| (existing_safetyScoreRepresentation != null &&
|
|
1507
1507
|
incoming_safetyScoreRepresentation != null &&
|
|
1508
|
-
equals$
|
|
1508
|
+
equals$p(existing_safetyScoreRepresentation, incoming_safetyScoreRepresentation)))) {
|
|
1509
1509
|
return false;
|
|
1510
1510
|
}
|
|
1511
1511
|
}
|
|
1512
1512
|
return true;
|
|
1513
1513
|
}
|
|
1514
1514
|
|
|
1515
|
-
const VERSION$
|
|
1516
|
-
function validate$
|
|
1515
|
+
const VERSION$n = "379fd960d1a0118f506f458ab2c8dd7e";
|
|
1516
|
+
function validate$t(obj, path = 'WrappedMap') {
|
|
1517
1517
|
const v_error = (() => {
|
|
1518
1518
|
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
1519
1519
|
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
@@ -1535,10 +1535,10 @@ function validate$s(obj, path = 'WrappedMap') {
|
|
|
1535
1535
|
})();
|
|
1536
1536
|
return v_error === undefined ? null : v_error;
|
|
1537
1537
|
}
|
|
1538
|
-
const select$
|
|
1538
|
+
const select$E = function WrappedMapSelect() {
|
|
1539
1539
|
return {
|
|
1540
1540
|
kind: 'Fragment',
|
|
1541
|
-
version: VERSION$
|
|
1541
|
+
version: VERSION$n,
|
|
1542
1542
|
private: [],
|
|
1543
1543
|
selections: [
|
|
1544
1544
|
{
|
|
@@ -1549,7 +1549,7 @@ const select$C = function WrappedMapSelect() {
|
|
|
1549
1549
|
]
|
|
1550
1550
|
};
|
|
1551
1551
|
};
|
|
1552
|
-
function equals$
|
|
1552
|
+
function equals$n(existing, incoming) {
|
|
1553
1553
|
const existing_wrappedMap = existing.wrappedMap;
|
|
1554
1554
|
const incoming_wrappedMap = incoming.wrappedMap;
|
|
1555
1555
|
const equals_wrappedMap_props = equalsObject(existing_wrappedMap, incoming_wrappedMap, (existing_wrappedMap_prop, incoming_wrappedMap_prop) => {
|
|
@@ -1563,9 +1563,9 @@ function equals$m(existing, incoming) {
|
|
|
1563
1563
|
return true;
|
|
1564
1564
|
}
|
|
1565
1565
|
|
|
1566
|
-
const TTL$
|
|
1567
|
-
const VERSION$
|
|
1568
|
-
function validate$
|
|
1566
|
+
const TTL$a = 100;
|
|
1567
|
+
const VERSION$m = "d8abd72a42e842b253da1c38954dafbc";
|
|
1568
|
+
function validate$s(obj, path = 'EinsteinLlmGenerationsRepresentation') {
|
|
1569
1569
|
const v_error = (() => {
|
|
1570
1570
|
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
1571
1571
|
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
@@ -1578,7 +1578,7 @@ function validate$r(obj, path = 'EinsteinLlmGenerationsRepresentation') {
|
|
|
1578
1578
|
for (let i = 0; i < obj_generations.length; i++) {
|
|
1579
1579
|
const obj_generations_item = obj_generations[i];
|
|
1580
1580
|
const path_generations_item = path_generations + '[' + i + ']';
|
|
1581
|
-
const referencepath_generations_itemValidationError = validate$
|
|
1581
|
+
const referencepath_generations_itemValidationError = validate$u(obj_generations_item, path_generations_item);
|
|
1582
1582
|
if (referencepath_generations_itemValidationError !== null) {
|
|
1583
1583
|
let message = 'Object doesn\'t match EinsteinLlmGenerationItemRepresentation (at "' + path_generations_item + '")\n';
|
|
1584
1584
|
message += referencepath_generations_itemValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
@@ -1589,7 +1589,7 @@ function validate$r(obj, path = 'EinsteinLlmGenerationsRepresentation') {
|
|
|
1589
1589
|
const path_parameters = path + '.parameters';
|
|
1590
1590
|
let obj_parameters_union0 = null;
|
|
1591
1591
|
const obj_parameters_union0_error = (() => {
|
|
1592
|
-
const referencepath_parametersValidationError = validate$
|
|
1592
|
+
const referencepath_parametersValidationError = validate$t(obj_parameters, path_parameters);
|
|
1593
1593
|
if (referencepath_parametersValidationError !== null) {
|
|
1594
1594
|
let message = 'Object doesn\'t match WrappedMap (at "' + path_parameters + '")\n';
|
|
1595
1595
|
message += referencepath_parametersValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
@@ -1648,25 +1648,25 @@ function validate$r(obj, path = 'EinsteinLlmGenerationsRepresentation') {
|
|
|
1648
1648
|
})();
|
|
1649
1649
|
return v_error === undefined ? null : v_error;
|
|
1650
1650
|
}
|
|
1651
|
-
const RepresentationType$
|
|
1652
|
-
function keyBuilder$
|
|
1653
|
-
return keyPrefix + '::' + RepresentationType$
|
|
1651
|
+
const RepresentationType$a = 'EinsteinLlmGenerationsRepresentation';
|
|
1652
|
+
function keyBuilder$n(luvio, config) {
|
|
1653
|
+
return keyPrefix + '::' + RepresentationType$a + ':' + config.requestId;
|
|
1654
1654
|
}
|
|
1655
|
-
function keyBuilderFromType$
|
|
1655
|
+
function keyBuilderFromType$3(luvio, object) {
|
|
1656
1656
|
const keyParams = {
|
|
1657
1657
|
requestId: object.requestId
|
|
1658
1658
|
};
|
|
1659
|
-
return keyBuilder$
|
|
1659
|
+
return keyBuilder$n(luvio, keyParams);
|
|
1660
1660
|
}
|
|
1661
|
-
function normalize$
|
|
1661
|
+
function normalize$a(input, existing, path, luvio, store, timestamp) {
|
|
1662
1662
|
return input;
|
|
1663
1663
|
}
|
|
1664
|
-
const select$
|
|
1665
|
-
const { selections: EinsteinLlmGenerationItemRepresentation__selections, opaque: EinsteinLlmGenerationItemRepresentation__opaque, } = select$
|
|
1666
|
-
const { selections: WrappedMap__selections, opaque: WrappedMap__opaque, } = select$
|
|
1664
|
+
const select$D = function EinsteinLlmGenerationsRepresentationSelect() {
|
|
1665
|
+
const { selections: EinsteinLlmGenerationItemRepresentation__selections, opaque: EinsteinLlmGenerationItemRepresentation__opaque, } = select$F();
|
|
1666
|
+
const { selections: WrappedMap__selections, opaque: WrappedMap__opaque, } = select$E();
|
|
1667
1667
|
return {
|
|
1668
1668
|
kind: 'Fragment',
|
|
1669
|
-
version: VERSION$
|
|
1669
|
+
version: VERSION$m,
|
|
1670
1670
|
private: [],
|
|
1671
1671
|
selections: [
|
|
1672
1672
|
{
|
|
@@ -1692,7 +1692,7 @@ const select$B = function EinsteinLlmGenerationsRepresentationSelect() {
|
|
|
1692
1692
|
]
|
|
1693
1693
|
};
|
|
1694
1694
|
};
|
|
1695
|
-
function equals$
|
|
1695
|
+
function equals$m(existing, incoming) {
|
|
1696
1696
|
const existing_requestId = existing.requestId;
|
|
1697
1697
|
const incoming_requestId = incoming.requestId;
|
|
1698
1698
|
if (!(existing_requestId === incoming_requestId)) {
|
|
@@ -1701,7 +1701,7 @@ function equals$l(existing, incoming) {
|
|
|
1701
1701
|
const existing_generations = existing.generations;
|
|
1702
1702
|
const incoming_generations = incoming.generations;
|
|
1703
1703
|
const equals_generations_items = equalsArray(existing_generations, incoming_generations, (existing_generations_item, incoming_generations_item) => {
|
|
1704
|
-
if (!(equals$
|
|
1704
|
+
if (!(equals$o(existing_generations_item, incoming_generations_item))) {
|
|
1705
1705
|
return false;
|
|
1706
1706
|
}
|
|
1707
1707
|
});
|
|
@@ -1713,7 +1713,7 @@ function equals$l(existing, incoming) {
|
|
|
1713
1713
|
if (!(existing_parameters === incoming_parameters
|
|
1714
1714
|
|| (existing_parameters != null &&
|
|
1715
1715
|
incoming_parameters != null &&
|
|
1716
|
-
equals$
|
|
1716
|
+
equals$n(existing_parameters, incoming_parameters)))) {
|
|
1717
1717
|
return false;
|
|
1718
1718
|
}
|
|
1719
1719
|
const existing_prompt = existing.prompt;
|
|
@@ -1723,41 +1723,41 @@ function equals$l(existing, incoming) {
|
|
|
1723
1723
|
}
|
|
1724
1724
|
return true;
|
|
1725
1725
|
}
|
|
1726
|
-
const ingest$
|
|
1726
|
+
const ingest$a = function EinsteinLlmGenerationsRepresentationIngest(input, path, luvio, store, timestamp) {
|
|
1727
1727
|
if (process.env.NODE_ENV !== 'production') {
|
|
1728
|
-
const validateError = validate$
|
|
1728
|
+
const validateError = validate$s(input);
|
|
1729
1729
|
if (validateError !== null) {
|
|
1730
1730
|
throw validateError;
|
|
1731
1731
|
}
|
|
1732
1732
|
}
|
|
1733
|
-
const key = keyBuilderFromType$
|
|
1734
|
-
const ttlToUse = TTL$
|
|
1735
|
-
ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize$
|
|
1733
|
+
const key = keyBuilderFromType$3(luvio, input);
|
|
1734
|
+
const ttlToUse = TTL$a;
|
|
1735
|
+
ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize$a, "EinsteinLLM", VERSION$m, RepresentationType$a, equals$m);
|
|
1736
1736
|
return createLink(key);
|
|
1737
1737
|
};
|
|
1738
|
-
function getTypeCacheKeys$
|
|
1738
|
+
function getTypeCacheKeys$a(rootKeySet, luvio, input, fullPathFactory) {
|
|
1739
1739
|
// root cache key (uses fullPathFactory if keyBuilderFromType isn't defined)
|
|
1740
|
-
const rootKey = keyBuilderFromType$
|
|
1740
|
+
const rootKey = keyBuilderFromType$3(luvio, input);
|
|
1741
1741
|
rootKeySet.set(rootKey, {
|
|
1742
1742
|
namespace: keyPrefix,
|
|
1743
|
-
representationName: RepresentationType$
|
|
1743
|
+
representationName: RepresentationType$a,
|
|
1744
1744
|
mergeable: false
|
|
1745
1745
|
});
|
|
1746
1746
|
}
|
|
1747
1747
|
|
|
1748
|
-
function select$
|
|
1749
|
-
return select$
|
|
1748
|
+
function select$C(luvio, params) {
|
|
1749
|
+
return select$D();
|
|
1750
1750
|
}
|
|
1751
|
-
function getResponseCacheKeys$
|
|
1752
|
-
getTypeCacheKeys$
|
|
1751
|
+
function getResponseCacheKeys$g(storeKeyMap, luvio, resourceParams, response) {
|
|
1752
|
+
getTypeCacheKeys$a(storeKeyMap, luvio, response);
|
|
1753
1753
|
}
|
|
1754
|
-
function ingestSuccess$
|
|
1754
|
+
function ingestSuccess$g(luvio, resourceParams, response) {
|
|
1755
1755
|
const { body } = response;
|
|
1756
|
-
const key = keyBuilderFromType$
|
|
1757
|
-
luvio.storeIngest(key, ingest$
|
|
1756
|
+
const key = keyBuilderFromType$3(luvio, body);
|
|
1757
|
+
luvio.storeIngest(key, ingest$a, body);
|
|
1758
1758
|
const snapshot = luvio.storeLookup({
|
|
1759
1759
|
recordId: key,
|
|
1760
|
-
node: select$
|
|
1760
|
+
node: select$C(),
|
|
1761
1761
|
variables: {},
|
|
1762
1762
|
});
|
|
1763
1763
|
if (process.env.NODE_ENV !== 'production') {
|
|
@@ -1768,10 +1768,10 @@ function ingestSuccess$f(luvio, resourceParams, response) {
|
|
|
1768
1768
|
deepFreeze(snapshot.data);
|
|
1769
1769
|
return snapshot;
|
|
1770
1770
|
}
|
|
1771
|
-
function createResourceRequest$
|
|
1771
|
+
function createResourceRequest$g(config) {
|
|
1772
1772
|
const headers = {};
|
|
1773
1773
|
return {
|
|
1774
|
-
baseUri: '/services/data/
|
|
1774
|
+
baseUri: '/services/data/v67.0',
|
|
1775
1775
|
basePath: '/einstein/llm/prompt/generations',
|
|
1776
1776
|
method: 'post',
|
|
1777
1777
|
body: config.body,
|
|
@@ -1782,45 +1782,45 @@ function createResourceRequest$f(config) {
|
|
|
1782
1782
|
};
|
|
1783
1783
|
}
|
|
1784
1784
|
|
|
1785
|
-
const adapterName$
|
|
1785
|
+
const adapterName$g = 'createGenerations';
|
|
1786
1786
|
const createGenerations_ConfigPropertyMetadata = [
|
|
1787
1787
|
generateParamConfigMetadata('generationsInput', true, 2 /* Body */, 4 /* Unsupported */),
|
|
1788
1788
|
];
|
|
1789
|
-
const createGenerations_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$
|
|
1790
|
-
const createResourceParams$
|
|
1791
|
-
function typeCheckConfig$
|
|
1789
|
+
const createGenerations_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$g, createGenerations_ConfigPropertyMetadata);
|
|
1790
|
+
const createResourceParams$g = /*#__PURE__*/ createResourceParams$j(createGenerations_ConfigPropertyMetadata);
|
|
1791
|
+
function typeCheckConfig$g(untrustedConfig) {
|
|
1792
1792
|
const config = {};
|
|
1793
1793
|
const untrustedConfig_generationsInput = untrustedConfig.generationsInput;
|
|
1794
|
-
const referenceEinsteinLlmGenerationsInputRepresentationValidationError = validate$
|
|
1794
|
+
const referenceEinsteinLlmGenerationsInputRepresentationValidationError = validate$x(untrustedConfig_generationsInput);
|
|
1795
1795
|
if (referenceEinsteinLlmGenerationsInputRepresentationValidationError === null) {
|
|
1796
1796
|
config.generationsInput = untrustedConfig_generationsInput;
|
|
1797
1797
|
}
|
|
1798
1798
|
return config;
|
|
1799
1799
|
}
|
|
1800
|
-
function validateAdapterConfig$
|
|
1800
|
+
function validateAdapterConfig$g(untrustedConfig, configPropertyNames) {
|
|
1801
1801
|
if (!untrustedIsObject(untrustedConfig)) {
|
|
1802
1802
|
return null;
|
|
1803
1803
|
}
|
|
1804
1804
|
if (process.env.NODE_ENV !== 'production') {
|
|
1805
1805
|
validateConfig(untrustedConfig, configPropertyNames);
|
|
1806
1806
|
}
|
|
1807
|
-
const config = typeCheckConfig$
|
|
1807
|
+
const config = typeCheckConfig$g(untrustedConfig);
|
|
1808
1808
|
if (!areRequiredParametersPresent(config, configPropertyNames)) {
|
|
1809
1809
|
return null;
|
|
1810
1810
|
}
|
|
1811
1811
|
return config;
|
|
1812
1812
|
}
|
|
1813
|
-
function buildNetworkSnapshot$
|
|
1814
|
-
const resourceParams = createResourceParams$
|
|
1815
|
-
const request = createResourceRequest$
|
|
1813
|
+
function buildNetworkSnapshot$g(luvio, config, options) {
|
|
1814
|
+
const resourceParams = createResourceParams$g(config);
|
|
1815
|
+
const request = createResourceRequest$g(resourceParams);
|
|
1816
1816
|
return luvio.dispatchResourceRequest(request, options)
|
|
1817
1817
|
.then((response) => {
|
|
1818
1818
|
return luvio.handleSuccessResponse(() => {
|
|
1819
|
-
const snapshot = ingestSuccess$
|
|
1819
|
+
const snapshot = ingestSuccess$g(luvio, resourceParams, response);
|
|
1820
1820
|
return luvio.storeBroadcast().then(() => snapshot);
|
|
1821
1821
|
}, () => {
|
|
1822
1822
|
const cache = new StoreKeyMap();
|
|
1823
|
-
getResponseCacheKeys$
|
|
1823
|
+
getResponseCacheKeys$g(cache, luvio, resourceParams, response.body);
|
|
1824
1824
|
return cache;
|
|
1825
1825
|
});
|
|
1826
1826
|
}, (response) => {
|
|
@@ -1830,16 +1830,16 @@ function buildNetworkSnapshot$f(luvio, config, options) {
|
|
|
1830
1830
|
}
|
|
1831
1831
|
const createGenerationsAdapterFactory = (luvio) => {
|
|
1832
1832
|
return function createGenerations(untrustedConfig) {
|
|
1833
|
-
const config = validateAdapterConfig$
|
|
1833
|
+
const config = validateAdapterConfig$g(untrustedConfig, createGenerations_ConfigPropertyNames);
|
|
1834
1834
|
// Invalid or incomplete config
|
|
1835
1835
|
if (config === null) {
|
|
1836
1836
|
throw new Error('Invalid config for "createGenerations"');
|
|
1837
1837
|
}
|
|
1838
|
-
return buildNetworkSnapshot$
|
|
1838
|
+
return buildNetworkSnapshot$g(luvio, config);
|
|
1839
1839
|
};
|
|
1840
1840
|
};
|
|
1841
1841
|
|
|
1842
|
-
function validate$
|
|
1842
|
+
function validate$r(obj, path = 'EinsteinPromptRecordFieldRepresentation') {
|
|
1843
1843
|
const v_error = (() => {
|
|
1844
1844
|
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
1845
1845
|
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
@@ -1916,9 +1916,9 @@ function validate$q(obj, path = 'EinsteinPromptRecordFieldRepresentation') {
|
|
|
1916
1916
|
return v_error === undefined ? null : v_error;
|
|
1917
1917
|
}
|
|
1918
1918
|
|
|
1919
|
-
const TTL$
|
|
1920
|
-
const VERSION$
|
|
1921
|
-
function validate$
|
|
1919
|
+
const TTL$9 = 100;
|
|
1920
|
+
const VERSION$l = "2d1628544b54fc1701aa9b4eff05127b";
|
|
1921
|
+
function validate$q(obj, path = 'EinsteinPromptRecordRepresentation') {
|
|
1922
1922
|
const v_error = (() => {
|
|
1923
1923
|
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
1924
1924
|
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
@@ -1947,7 +1947,7 @@ function validate$p(obj, path = 'EinsteinPromptRecordRepresentation') {
|
|
|
1947
1947
|
for (let i = 0; i < obj_childRelationships_prop.length; i++) {
|
|
1948
1948
|
const obj_childRelationships_prop_item = obj_childRelationships_prop[i];
|
|
1949
1949
|
const path_childRelationships_prop_item = path_childRelationships_prop + '[' + i + ']';
|
|
1950
|
-
const referencepath_childRelationships_prop_itemValidationError = validate$
|
|
1950
|
+
const referencepath_childRelationships_prop_itemValidationError = validate$q(obj_childRelationships_prop_item, path_childRelationships_prop_item);
|
|
1951
1951
|
if (referencepath_childRelationships_prop_itemValidationError !== null) {
|
|
1952
1952
|
let message = 'Object doesn\'t match EinsteinPromptRecordRepresentation (at "' + path_childRelationships_prop_item + '")\n';
|
|
1953
1953
|
message += referencepath_childRelationships_prop_itemValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
@@ -1967,7 +1967,7 @@ function validate$p(obj, path = 'EinsteinPromptRecordRepresentation') {
|
|
|
1967
1967
|
const key = obj_fields_keys[i];
|
|
1968
1968
|
const obj_fields_prop = obj_fields[key];
|
|
1969
1969
|
const path_fields_prop = path_fields + '["' + key + '"]';
|
|
1970
|
-
const referencepath_fields_propValidationError = validate$
|
|
1970
|
+
const referencepath_fields_propValidationError = validate$r(obj_fields_prop, path_fields_prop);
|
|
1971
1971
|
if (referencepath_fields_propValidationError !== null) {
|
|
1972
1972
|
let message = 'Object doesn\'t match EinsteinPromptRecordFieldRepresentation (at "' + path_fields_prop + '")\n';
|
|
1973
1973
|
message += referencepath_fields_propValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
@@ -1985,49 +1985,49 @@ function validate$p(obj, path = 'EinsteinPromptRecordRepresentation') {
|
|
|
1985
1985
|
})();
|
|
1986
1986
|
return v_error === undefined ? null : v_error;
|
|
1987
1987
|
}
|
|
1988
|
-
const RepresentationType$
|
|
1989
|
-
function normalize$
|
|
1988
|
+
const RepresentationType$9 = 'EinsteinPromptRecordRepresentation';
|
|
1989
|
+
function normalize$9(input, existing, path, luvio, store, timestamp) {
|
|
1990
1990
|
return input;
|
|
1991
1991
|
}
|
|
1992
|
-
const select$
|
|
1992
|
+
const select$B = function EinsteinPromptRecordRepresentationSelect() {
|
|
1993
1993
|
return {
|
|
1994
1994
|
kind: 'Fragment',
|
|
1995
|
-
version: VERSION$
|
|
1995
|
+
version: VERSION$l,
|
|
1996
1996
|
private: [],
|
|
1997
1997
|
opaque: true
|
|
1998
1998
|
};
|
|
1999
1999
|
};
|
|
2000
|
-
function equals$
|
|
2000
|
+
function equals$l(existing, incoming) {
|
|
2001
2001
|
if (JSONStringify(incoming) !== JSONStringify(existing)) {
|
|
2002
2002
|
return false;
|
|
2003
2003
|
}
|
|
2004
2004
|
return true;
|
|
2005
2005
|
}
|
|
2006
|
-
const ingest$
|
|
2006
|
+
const ingest$9 = function EinsteinPromptRecordRepresentationIngest(input, path, luvio, store, timestamp) {
|
|
2007
2007
|
if (process.env.NODE_ENV !== 'production') {
|
|
2008
|
-
const validateError = validate$
|
|
2008
|
+
const validateError = validate$q(input);
|
|
2009
2009
|
if (validateError !== null) {
|
|
2010
2010
|
throw validateError;
|
|
2011
2011
|
}
|
|
2012
2012
|
}
|
|
2013
2013
|
const key = path.fullPath;
|
|
2014
|
-
const ttlToUse = TTL$
|
|
2015
|
-
ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize$
|
|
2014
|
+
const ttlToUse = TTL$9;
|
|
2015
|
+
ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize$9, "EinsteinLLM", VERSION$l, RepresentationType$9, equals$l);
|
|
2016
2016
|
return createLink(key);
|
|
2017
2017
|
};
|
|
2018
|
-
function getTypeCacheKeys$
|
|
2018
|
+
function getTypeCacheKeys$9(rootKeySet, luvio, input, fullPathFactory) {
|
|
2019
2019
|
// root cache key (uses fullPathFactory if keyBuilderFromType isn't defined)
|
|
2020
2020
|
const rootKey = fullPathFactory();
|
|
2021
2021
|
rootKeySet.set(rootKey, {
|
|
2022
2022
|
namespace: keyPrefix,
|
|
2023
|
-
representationName: RepresentationType$
|
|
2023
|
+
representationName: RepresentationType$9,
|
|
2024
2024
|
mergeable: false
|
|
2025
2025
|
});
|
|
2026
2026
|
}
|
|
2027
2027
|
|
|
2028
|
-
const TTL$
|
|
2029
|
-
const VERSION$
|
|
2030
|
-
function validate$
|
|
2028
|
+
const TTL$8 = 100;
|
|
2029
|
+
const VERSION$k = "5fd7b8a03d155ba601bcb4ee725e0893";
|
|
2030
|
+
function validate$p(obj, path = 'EinsteinPromptRecordCollectionOutputRepresentation') {
|
|
2031
2031
|
const v_error = (() => {
|
|
2032
2032
|
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
2033
2033
|
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
@@ -2046,7 +2046,7 @@ function validate$o(obj, path = 'EinsteinPromptRecordCollectionOutputRepresentat
|
|
|
2046
2046
|
for (let i = 0; i < obj_promptRecords.length; i++) {
|
|
2047
2047
|
const obj_promptRecords_item = obj_promptRecords[i];
|
|
2048
2048
|
const path_promptRecords_item = path_promptRecords + '[' + i + ']';
|
|
2049
|
-
const referencepath_promptRecords_itemValidationError = validate$
|
|
2049
|
+
const referencepath_promptRecords_itemValidationError = validate$q(obj_promptRecords_item, path_promptRecords_item);
|
|
2050
2050
|
if (referencepath_promptRecords_itemValidationError !== null) {
|
|
2051
2051
|
let message = 'Object doesn\'t match EinsteinPromptRecordRepresentation (at "' + path_promptRecords_item + '")\n';
|
|
2052
2052
|
message += referencepath_promptRecords_itemValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
@@ -2062,62 +2062,62 @@ function validate$o(obj, path = 'EinsteinPromptRecordCollectionOutputRepresentat
|
|
|
2062
2062
|
})();
|
|
2063
2063
|
return v_error === undefined ? null : v_error;
|
|
2064
2064
|
}
|
|
2065
|
-
const RepresentationType$
|
|
2066
|
-
function normalize$
|
|
2065
|
+
const RepresentationType$8 = 'EinsteinPromptRecordCollectionOutputRepresentation';
|
|
2066
|
+
function normalize$8(input, existing, path, luvio, store, timestamp) {
|
|
2067
2067
|
return input;
|
|
2068
2068
|
}
|
|
2069
|
-
const select$
|
|
2069
|
+
const select$A = function EinsteinPromptRecordCollectionOutputRepresentationSelect() {
|
|
2070
2070
|
return {
|
|
2071
2071
|
kind: 'Fragment',
|
|
2072
|
-
version: VERSION$
|
|
2072
|
+
version: VERSION$k,
|
|
2073
2073
|
private: [],
|
|
2074
2074
|
opaque: true
|
|
2075
2075
|
};
|
|
2076
2076
|
};
|
|
2077
|
-
function equals$
|
|
2077
|
+
function equals$k(existing, incoming) {
|
|
2078
2078
|
if (JSONStringify(incoming) !== JSONStringify(existing)) {
|
|
2079
2079
|
return false;
|
|
2080
2080
|
}
|
|
2081
2081
|
return true;
|
|
2082
2082
|
}
|
|
2083
|
-
const ingest$
|
|
2083
|
+
const ingest$8 = function EinsteinPromptRecordCollectionOutputRepresentationIngest(input, path, luvio, store, timestamp) {
|
|
2084
2084
|
if (process.env.NODE_ENV !== 'production') {
|
|
2085
|
-
const validateError = validate$
|
|
2085
|
+
const validateError = validate$p(input);
|
|
2086
2086
|
if (validateError !== null) {
|
|
2087
2087
|
throw validateError;
|
|
2088
2088
|
}
|
|
2089
2089
|
}
|
|
2090
2090
|
const key = path.fullPath;
|
|
2091
|
-
const ttlToUse = TTL$
|
|
2092
|
-
ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize$
|
|
2091
|
+
const ttlToUse = TTL$8;
|
|
2092
|
+
ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize$8, "EinsteinLLM", VERSION$k, RepresentationType$8, equals$k);
|
|
2093
2093
|
return createLink(key);
|
|
2094
2094
|
};
|
|
2095
|
-
function getTypeCacheKeys$
|
|
2095
|
+
function getTypeCacheKeys$8(rootKeySet, luvio, input, fullPathFactory) {
|
|
2096
2096
|
// root cache key (uses fullPathFactory if keyBuilderFromType isn't defined)
|
|
2097
2097
|
const rootKey = fullPathFactory();
|
|
2098
2098
|
rootKeySet.set(rootKey, {
|
|
2099
2099
|
namespace: keyPrefix,
|
|
2100
|
-
representationName: RepresentationType$
|
|
2100
|
+
representationName: RepresentationType$8,
|
|
2101
2101
|
mergeable: false
|
|
2102
2102
|
});
|
|
2103
2103
|
}
|
|
2104
2104
|
|
|
2105
|
-
function select$
|
|
2106
|
-
return select$
|
|
2105
|
+
function select$z(luvio, params) {
|
|
2106
|
+
return select$A();
|
|
2107
2107
|
}
|
|
2108
|
-
function keyBuilder$
|
|
2108
|
+
function keyBuilder$m(luvio, params) {
|
|
2109
2109
|
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 + ')';
|
|
2110
2110
|
}
|
|
2111
|
-
function getResponseCacheKeys$
|
|
2112
|
-
getTypeCacheKeys$
|
|
2111
|
+
function getResponseCacheKeys$f(storeKeyMap, luvio, resourceParams, response) {
|
|
2112
|
+
getTypeCacheKeys$8(storeKeyMap, luvio, response, () => keyBuilder$m(luvio, resourceParams));
|
|
2113
2113
|
}
|
|
2114
|
-
function ingestSuccess$
|
|
2114
|
+
function ingestSuccess$f(luvio, resourceParams, response, snapshotRefresh) {
|
|
2115
2115
|
const { body } = response;
|
|
2116
|
-
const key = keyBuilder$
|
|
2117
|
-
luvio.storeIngest(key, ingest$
|
|
2116
|
+
const key = keyBuilder$m(luvio, resourceParams);
|
|
2117
|
+
luvio.storeIngest(key, ingest$8, body);
|
|
2118
2118
|
const snapshot = luvio.storeLookup({
|
|
2119
2119
|
recordId: key,
|
|
2120
|
-
node: select$
|
|
2120
|
+
node: select$z(),
|
|
2121
2121
|
variables: {},
|
|
2122
2122
|
}, snapshotRefresh);
|
|
2123
2123
|
if (process.env.NODE_ENV !== 'production') {
|
|
@@ -2129,21 +2129,21 @@ function ingestSuccess$e(luvio, resourceParams, response, snapshotRefresh) {
|
|
|
2129
2129
|
return snapshot;
|
|
2130
2130
|
}
|
|
2131
2131
|
function ingestError$9(luvio, params, error, snapshotRefresh) {
|
|
2132
|
-
const key = keyBuilder$
|
|
2132
|
+
const key = keyBuilder$m(luvio, params);
|
|
2133
2133
|
const errorSnapshot = luvio.errorSnapshot(error, snapshotRefresh);
|
|
2134
2134
|
const storeMetadataParams = {
|
|
2135
|
-
ttl: TTL$
|
|
2135
|
+
ttl: TTL$8,
|
|
2136
2136
|
namespace: keyPrefix,
|
|
2137
|
-
version: VERSION$
|
|
2138
|
-
representationName: RepresentationType$
|
|
2137
|
+
version: VERSION$k,
|
|
2138
|
+
representationName: RepresentationType$8
|
|
2139
2139
|
};
|
|
2140
2140
|
luvio.storeIngestError(key, errorSnapshot, storeMetadataParams);
|
|
2141
2141
|
return errorSnapshot;
|
|
2142
2142
|
}
|
|
2143
|
-
function createResourceRequest$
|
|
2143
|
+
function createResourceRequest$f(config) {
|
|
2144
2144
|
const headers = {};
|
|
2145
2145
|
return {
|
|
2146
|
-
baseUri: '/services/data/
|
|
2146
|
+
baseUri: '/services/data/v67.0',
|
|
2147
2147
|
basePath: '/einstein/prompt-templates',
|
|
2148
2148
|
method: 'get',
|
|
2149
2149
|
body: null,
|
|
@@ -2154,7 +2154,7 @@ function createResourceRequest$e(config) {
|
|
|
2154
2154
|
};
|
|
2155
2155
|
}
|
|
2156
2156
|
|
|
2157
|
-
const adapterName$
|
|
2157
|
+
const adapterName$f = 'getPromptTemplates';
|
|
2158
2158
|
const getPromptTemplates_ConfigPropertyMetadata = [
|
|
2159
2159
|
generateParamConfigMetadata('isActive', false, 1 /* QueryParameter */, 1 /* Boolean */),
|
|
2160
2160
|
generateParamConfigMetadata('fields', false, 1 /* QueryParameter */, 0 /* String */, true),
|
|
@@ -2165,56 +2165,56 @@ const getPromptTemplates_ConfigPropertyMetadata = [
|
|
|
2165
2165
|
generateParamConfigMetadata('query', false, 1 /* QueryParameter */, 0 /* String */),
|
|
2166
2166
|
generateParamConfigMetadata('sortBy', false, 1 /* QueryParameter */, 0 /* String */),
|
|
2167
2167
|
];
|
|
2168
|
-
const getPromptTemplates_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$
|
|
2169
|
-
const createResourceParams$
|
|
2170
|
-
function keyBuilder$
|
|
2171
|
-
const resourceParams = createResourceParams$
|
|
2172
|
-
return keyBuilder$
|
|
2168
|
+
const getPromptTemplates_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$f, getPromptTemplates_ConfigPropertyMetadata);
|
|
2169
|
+
const createResourceParams$f = /*#__PURE__*/ createResourceParams$j(getPromptTemplates_ConfigPropertyMetadata);
|
|
2170
|
+
function keyBuilder$l(luvio, config) {
|
|
2171
|
+
const resourceParams = createResourceParams$f(config);
|
|
2172
|
+
return keyBuilder$m(luvio, resourceParams);
|
|
2173
2173
|
}
|
|
2174
|
-
function typeCheckConfig$
|
|
2174
|
+
function typeCheckConfig$f(untrustedConfig) {
|
|
2175
2175
|
const config = {};
|
|
2176
|
-
typeCheckConfig$
|
|
2176
|
+
typeCheckConfig$j(untrustedConfig, config, getPromptTemplates_ConfigPropertyMetadata);
|
|
2177
2177
|
return config;
|
|
2178
2178
|
}
|
|
2179
|
-
function validateAdapterConfig$
|
|
2179
|
+
function validateAdapterConfig$f(untrustedConfig, configPropertyNames) {
|
|
2180
2180
|
if (!untrustedIsObject(untrustedConfig)) {
|
|
2181
2181
|
return null;
|
|
2182
2182
|
}
|
|
2183
2183
|
if (process.env.NODE_ENV !== 'production') {
|
|
2184
2184
|
validateConfig(untrustedConfig, configPropertyNames);
|
|
2185
2185
|
}
|
|
2186
|
-
const config = typeCheckConfig$
|
|
2186
|
+
const config = typeCheckConfig$f(untrustedConfig);
|
|
2187
2187
|
if (!areRequiredParametersPresent(config, configPropertyNames)) {
|
|
2188
2188
|
return null;
|
|
2189
2189
|
}
|
|
2190
2190
|
return config;
|
|
2191
2191
|
}
|
|
2192
2192
|
function adapterFragment$9(luvio, config) {
|
|
2193
|
-
createResourceParams$
|
|
2194
|
-
return select$
|
|
2193
|
+
createResourceParams$f(config);
|
|
2194
|
+
return select$z();
|
|
2195
2195
|
}
|
|
2196
2196
|
function onFetchResponseSuccess$9(luvio, config, resourceParams, response) {
|
|
2197
|
-
const snapshot = ingestSuccess$
|
|
2197
|
+
const snapshot = ingestSuccess$f(luvio, resourceParams, response, {
|
|
2198
2198
|
config,
|
|
2199
|
-
resolve: () => buildNetworkSnapshot$
|
|
2199
|
+
resolve: () => buildNetworkSnapshot$f(luvio, config, snapshotRefreshOptions)
|
|
2200
2200
|
});
|
|
2201
2201
|
return luvio.storeBroadcast().then(() => snapshot);
|
|
2202
2202
|
}
|
|
2203
2203
|
function onFetchResponseError$9(luvio, config, resourceParams, response) {
|
|
2204
2204
|
const snapshot = ingestError$9(luvio, resourceParams, response, {
|
|
2205
2205
|
config,
|
|
2206
|
-
resolve: () => buildNetworkSnapshot$
|
|
2206
|
+
resolve: () => buildNetworkSnapshot$f(luvio, config, snapshotRefreshOptions)
|
|
2207
2207
|
});
|
|
2208
2208
|
return luvio.storeBroadcast().then(() => snapshot);
|
|
2209
2209
|
}
|
|
2210
|
-
function buildNetworkSnapshot$
|
|
2211
|
-
const resourceParams = createResourceParams$
|
|
2212
|
-
const request = createResourceRequest$
|
|
2210
|
+
function buildNetworkSnapshot$f(luvio, config, options) {
|
|
2211
|
+
const resourceParams = createResourceParams$f(config);
|
|
2212
|
+
const request = createResourceRequest$f(resourceParams);
|
|
2213
2213
|
return luvio.dispatchResourceRequest(request, options)
|
|
2214
2214
|
.then((response) => {
|
|
2215
2215
|
return luvio.handleSuccessResponse(() => onFetchResponseSuccess$9(luvio, config, resourceParams, response), () => {
|
|
2216
2216
|
const cache = new StoreKeyMap();
|
|
2217
|
-
getResponseCacheKeys$
|
|
2217
|
+
getResponseCacheKeys$f(cache, luvio, resourceParams, response.body);
|
|
2218
2218
|
return cache;
|
|
2219
2219
|
});
|
|
2220
2220
|
}, (response) => {
|
|
@@ -2222,23 +2222,23 @@ function buildNetworkSnapshot$e(luvio, config, options) {
|
|
|
2222
2222
|
});
|
|
2223
2223
|
}
|
|
2224
2224
|
function buildNetworkSnapshotCachePolicy$9(context, coercedAdapterRequestContext) {
|
|
2225
|
-
return buildNetworkSnapshotCachePolicy$b(context, coercedAdapterRequestContext, buildNetworkSnapshot$
|
|
2225
|
+
return buildNetworkSnapshotCachePolicy$b(context, coercedAdapterRequestContext, buildNetworkSnapshot$f, undefined, false);
|
|
2226
2226
|
}
|
|
2227
2227
|
function buildCachedSnapshotCachePolicy$9(context, storeLookup) {
|
|
2228
2228
|
const { luvio, config } = context;
|
|
2229
2229
|
const selector = {
|
|
2230
|
-
recordId: keyBuilder$
|
|
2230
|
+
recordId: keyBuilder$l(luvio, config),
|
|
2231
2231
|
node: adapterFragment$9(luvio, config),
|
|
2232
2232
|
variables: {},
|
|
2233
2233
|
};
|
|
2234
2234
|
const cacheSnapshot = storeLookup(selector, {
|
|
2235
2235
|
config,
|
|
2236
|
-
resolve: () => buildNetworkSnapshot$
|
|
2236
|
+
resolve: () => buildNetworkSnapshot$f(luvio, config, snapshotRefreshOptions)
|
|
2237
2237
|
});
|
|
2238
2238
|
return cacheSnapshot;
|
|
2239
2239
|
}
|
|
2240
2240
|
const getPromptTemplatesAdapterFactory = (luvio) => function EinsteinLLM__getPromptTemplates(untrustedConfig, requestContext) {
|
|
2241
|
-
const config = validateAdapterConfig$
|
|
2241
|
+
const config = validateAdapterConfig$f(untrustedConfig, getPromptTemplates_ConfigPropertyNames);
|
|
2242
2242
|
// Invalid or incomplete config
|
|
2243
2243
|
if (config === null) {
|
|
2244
2244
|
return null;
|
|
@@ -2247,9 +2247,9 @@ const getPromptTemplatesAdapterFactory = (luvio) => function EinsteinLLM__getPro
|
|
|
2247
2247
|
buildCachedSnapshotCachePolicy$9, buildNetworkSnapshotCachePolicy$9);
|
|
2248
2248
|
};
|
|
2249
2249
|
|
|
2250
|
-
const TTL$
|
|
2251
|
-
const VERSION$
|
|
2252
|
-
function validate$
|
|
2250
|
+
const TTL$7 = 100;
|
|
2251
|
+
const VERSION$j = "a90a51578e2fdd7a9741d310bed22b1d";
|
|
2252
|
+
function validate$o(obj, path = 'EinsteinPromptTemplateRepresentation') {
|
|
2253
2253
|
const v_error = (() => {
|
|
2254
2254
|
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
2255
2255
|
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
@@ -2257,7 +2257,7 @@ function validate$n(obj, path = 'EinsteinPromptTemplateRepresentation') {
|
|
|
2257
2257
|
if (obj.additionalData !== undefined) {
|
|
2258
2258
|
const obj_additionalData = obj.additionalData;
|
|
2259
2259
|
const path_additionalData = path + '.additionalData';
|
|
2260
|
-
const referencepath_additionalDataValidationError = validate$
|
|
2260
|
+
const referencepath_additionalDataValidationError = validate$t(obj_additionalData, path_additionalData);
|
|
2261
2261
|
if (referencepath_additionalDataValidationError !== null) {
|
|
2262
2262
|
let message = 'Object doesn\'t match WrappedMap (at "' + path_additionalData + '")\n';
|
|
2263
2263
|
message += referencepath_additionalDataValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
@@ -2325,24 +2325,24 @@ function validate$n(obj, path = 'EinsteinPromptTemplateRepresentation') {
|
|
|
2325
2325
|
})();
|
|
2326
2326
|
return v_error === undefined ? null : v_error;
|
|
2327
2327
|
}
|
|
2328
|
-
const RepresentationType$
|
|
2329
|
-
function keyBuilder$
|
|
2330
|
-
return keyPrefix + '::' + RepresentationType$
|
|
2328
|
+
const RepresentationType$7 = 'EinsteinPromptTemplateRepresentation';
|
|
2329
|
+
function keyBuilder$k(luvio, config) {
|
|
2330
|
+
return keyPrefix + '::' + RepresentationType$7 + ':' + config.versionId;
|
|
2331
2331
|
}
|
|
2332
|
-
function keyBuilderFromType$
|
|
2332
|
+
function keyBuilderFromType$2(luvio, object) {
|
|
2333
2333
|
const keyParams = {
|
|
2334
2334
|
versionId: object.versionId
|
|
2335
2335
|
};
|
|
2336
|
-
return keyBuilder$
|
|
2336
|
+
return keyBuilder$k(luvio, keyParams);
|
|
2337
2337
|
}
|
|
2338
|
-
function normalize$
|
|
2338
|
+
function normalize$7(input, existing, path, luvio, store, timestamp) {
|
|
2339
2339
|
return input;
|
|
2340
2340
|
}
|
|
2341
|
-
const select$
|
|
2342
|
-
const { selections: WrappedMap__selections, opaque: WrappedMap__opaque, } = select$
|
|
2341
|
+
const select$y = function EinsteinPromptTemplateRepresentationSelect() {
|
|
2342
|
+
const { selections: WrappedMap__selections, opaque: WrappedMap__opaque, } = select$E();
|
|
2343
2343
|
return {
|
|
2344
2344
|
kind: 'Fragment',
|
|
2345
|
-
version: VERSION$
|
|
2345
|
+
version: VERSION$j,
|
|
2346
2346
|
private: [],
|
|
2347
2347
|
selections: [
|
|
2348
2348
|
{
|
|
@@ -2390,7 +2390,7 @@ const select$w = function EinsteinPromptTemplateRepresentationSelect() {
|
|
|
2390
2390
|
]
|
|
2391
2391
|
};
|
|
2392
2392
|
};
|
|
2393
|
-
function equals$
|
|
2393
|
+
function equals$j(existing, incoming) {
|
|
2394
2394
|
const existing_hasWarning = existing.hasWarning;
|
|
2395
2395
|
const incoming_hasWarning = incoming.hasWarning;
|
|
2396
2396
|
if (!(existing_hasWarning === incoming_hasWarning)) {
|
|
@@ -2446,7 +2446,7 @@ function equals$i(existing, incoming) {
|
|
|
2446
2446
|
if (existing_additionalData === undefined || incoming_additionalData === undefined) {
|
|
2447
2447
|
return false;
|
|
2448
2448
|
}
|
|
2449
|
-
if (!(equals$
|
|
2449
|
+
if (!(equals$n(existing_additionalData, incoming_additionalData))) {
|
|
2450
2450
|
return false;
|
|
2451
2451
|
}
|
|
2452
2452
|
}
|
|
@@ -2472,41 +2472,41 @@ function equals$i(existing, incoming) {
|
|
|
2472
2472
|
}
|
|
2473
2473
|
return true;
|
|
2474
2474
|
}
|
|
2475
|
-
const ingest$
|
|
2475
|
+
const ingest$7 = function EinsteinPromptTemplateRepresentationIngest(input, path, luvio, store, timestamp) {
|
|
2476
2476
|
if (process.env.NODE_ENV !== 'production') {
|
|
2477
|
-
const validateError = validate$
|
|
2477
|
+
const validateError = validate$o(input);
|
|
2478
2478
|
if (validateError !== null) {
|
|
2479
2479
|
throw validateError;
|
|
2480
2480
|
}
|
|
2481
2481
|
}
|
|
2482
|
-
const key = keyBuilderFromType$
|
|
2483
|
-
const ttlToUse = TTL$
|
|
2484
|
-
ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize$
|
|
2482
|
+
const key = keyBuilderFromType$2(luvio, input);
|
|
2483
|
+
const ttlToUse = TTL$7;
|
|
2484
|
+
ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize$7, "EinsteinLLM", VERSION$j, RepresentationType$7, equals$j);
|
|
2485
2485
|
return createLink(key);
|
|
2486
2486
|
};
|
|
2487
|
-
function getTypeCacheKeys$
|
|
2487
|
+
function getTypeCacheKeys$7(rootKeySet, luvio, input, fullPathFactory) {
|
|
2488
2488
|
// root cache key (uses fullPathFactory if keyBuilderFromType isn't defined)
|
|
2489
|
-
const rootKey = keyBuilderFromType$
|
|
2489
|
+
const rootKey = keyBuilderFromType$2(luvio, input);
|
|
2490
2490
|
rootKeySet.set(rootKey, {
|
|
2491
2491
|
namespace: keyPrefix,
|
|
2492
|
-
representationName: RepresentationType$
|
|
2492
|
+
representationName: RepresentationType$7,
|
|
2493
2493
|
mergeable: false
|
|
2494
2494
|
});
|
|
2495
2495
|
}
|
|
2496
2496
|
|
|
2497
|
-
function select$
|
|
2498
|
-
return select$
|
|
2497
|
+
function select$x(luvio, params) {
|
|
2498
|
+
return select$y();
|
|
2499
2499
|
}
|
|
2500
|
-
function getResponseCacheKeys$
|
|
2501
|
-
getTypeCacheKeys$
|
|
2500
|
+
function getResponseCacheKeys$e(storeKeyMap, luvio, resourceParams, response) {
|
|
2501
|
+
getTypeCacheKeys$7(storeKeyMap, luvio, response);
|
|
2502
2502
|
}
|
|
2503
|
-
function ingestSuccess$
|
|
2503
|
+
function ingestSuccess$e(luvio, resourceParams, response) {
|
|
2504
2504
|
const { body } = response;
|
|
2505
|
-
const key = keyBuilderFromType$
|
|
2506
|
-
luvio.storeIngest(key, ingest$
|
|
2505
|
+
const key = keyBuilderFromType$2(luvio, body);
|
|
2506
|
+
luvio.storeIngest(key, ingest$7, body);
|
|
2507
2507
|
const snapshot = luvio.storeLookup({
|
|
2508
2508
|
recordId: key,
|
|
2509
|
-
node: select$
|
|
2509
|
+
node: select$x(),
|
|
2510
2510
|
variables: {},
|
|
2511
2511
|
});
|
|
2512
2512
|
if (process.env.NODE_ENV !== 'production') {
|
|
@@ -2517,10 +2517,10 @@ function ingestSuccess$d(luvio, resourceParams, response) {
|
|
|
2517
2517
|
deepFreeze(snapshot.data);
|
|
2518
2518
|
return snapshot;
|
|
2519
2519
|
}
|
|
2520
|
-
function createResourceRequest$
|
|
2520
|
+
function createResourceRequest$e(config) {
|
|
2521
2521
|
const headers = {};
|
|
2522
2522
|
return {
|
|
2523
|
-
baseUri: '/services/data/
|
|
2523
|
+
baseUri: '/services/data/v67.0',
|
|
2524
2524
|
basePath: '/einstein/prompt-templates',
|
|
2525
2525
|
method: 'post',
|
|
2526
2526
|
body: config.body,
|
|
@@ -2531,18 +2531,18 @@ function createResourceRequest$d(config) {
|
|
|
2531
2531
|
};
|
|
2532
2532
|
}
|
|
2533
2533
|
|
|
2534
|
-
const adapterName$
|
|
2534
|
+
const adapterName$e = 'createPromptTemplate';
|
|
2535
2535
|
const createPromptTemplate_ConfigPropertyMetadata = [
|
|
2536
2536
|
generateParamConfigMetadata('apiName', true, 2 /* Body */, 0 /* String */),
|
|
2537
2537
|
generateParamConfigMetadata('childRelationships', true, 2 /* Body */, 4 /* Unsupported */),
|
|
2538
2538
|
generateParamConfigMetadata('fields', true, 2 /* Body */, 4 /* Unsupported */),
|
|
2539
2539
|
generateParamConfigMetadata('id', false, 2 /* Body */, 0 /* String */),
|
|
2540
2540
|
];
|
|
2541
|
-
const createPromptTemplate_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$
|
|
2542
|
-
const createResourceParams$
|
|
2543
|
-
function typeCheckConfig$
|
|
2541
|
+
const createPromptTemplate_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$e, createPromptTemplate_ConfigPropertyMetadata);
|
|
2542
|
+
const createResourceParams$e = /*#__PURE__*/ createResourceParams$j(createPromptTemplate_ConfigPropertyMetadata);
|
|
2543
|
+
function typeCheckConfig$e(untrustedConfig) {
|
|
2544
2544
|
const config = {};
|
|
2545
|
-
typeCheckConfig$
|
|
2545
|
+
typeCheckConfig$j(untrustedConfig, config, createPromptTemplate_ConfigPropertyMetadata);
|
|
2546
2546
|
const untrustedConfig_childRelationships = untrustedConfig.childRelationships;
|
|
2547
2547
|
if (untrustedIsObject(untrustedConfig_childRelationships)) {
|
|
2548
2548
|
const untrustedConfig_childRelationships_object = {};
|
|
@@ -2575,30 +2575,30 @@ function typeCheckConfig$d(untrustedConfig) {
|
|
|
2575
2575
|
}
|
|
2576
2576
|
return config;
|
|
2577
2577
|
}
|
|
2578
|
-
function validateAdapterConfig$
|
|
2578
|
+
function validateAdapterConfig$e(untrustedConfig, configPropertyNames) {
|
|
2579
2579
|
if (!untrustedIsObject(untrustedConfig)) {
|
|
2580
2580
|
return null;
|
|
2581
2581
|
}
|
|
2582
2582
|
if (process.env.NODE_ENV !== 'production') {
|
|
2583
2583
|
validateConfig(untrustedConfig, configPropertyNames);
|
|
2584
2584
|
}
|
|
2585
|
-
const config = typeCheckConfig$
|
|
2585
|
+
const config = typeCheckConfig$e(untrustedConfig);
|
|
2586
2586
|
if (!areRequiredParametersPresent(config, configPropertyNames)) {
|
|
2587
2587
|
return null;
|
|
2588
2588
|
}
|
|
2589
2589
|
return config;
|
|
2590
2590
|
}
|
|
2591
|
-
function buildNetworkSnapshot$
|
|
2592
|
-
const resourceParams = createResourceParams$
|
|
2593
|
-
const request = createResourceRequest$
|
|
2594
|
-
return luvio.dispatchResourceRequest(request, options)
|
|
2595
|
-
.then((response) => {
|
|
2591
|
+
function buildNetworkSnapshot$e(luvio, config, options) {
|
|
2592
|
+
const resourceParams = createResourceParams$e(config);
|
|
2593
|
+
const request = createResourceRequest$e(resourceParams);
|
|
2594
|
+
return luvio.dispatchResourceRequest(request, options)
|
|
2595
|
+
.then((response) => {
|
|
2596
2596
|
return luvio.handleSuccessResponse(() => {
|
|
2597
|
-
const snapshot = ingestSuccess$
|
|
2597
|
+
const snapshot = ingestSuccess$e(luvio, resourceParams, response);
|
|
2598
2598
|
return luvio.storeBroadcast().then(() => snapshot);
|
|
2599
2599
|
}, () => {
|
|
2600
2600
|
const cache = new StoreKeyMap();
|
|
2601
|
-
getResponseCacheKeys$
|
|
2601
|
+
getResponseCacheKeys$e(cache, luvio, resourceParams, response.body);
|
|
2602
2602
|
return cache;
|
|
2603
2603
|
});
|
|
2604
2604
|
}, (response) => {
|
|
@@ -2608,16 +2608,16 @@ function buildNetworkSnapshot$d(luvio, config, options) {
|
|
|
2608
2608
|
}
|
|
2609
2609
|
const createPromptTemplateAdapterFactory = (luvio) => {
|
|
2610
2610
|
return function createPromptTemplate(untrustedConfig) {
|
|
2611
|
-
const config = validateAdapterConfig$
|
|
2611
|
+
const config = validateAdapterConfig$e(untrustedConfig, createPromptTemplate_ConfigPropertyNames);
|
|
2612
2612
|
// Invalid or incomplete config
|
|
2613
2613
|
if (config === null) {
|
|
2614
2614
|
throw new Error('Invalid config for "createPromptTemplate"');
|
|
2615
2615
|
}
|
|
2616
|
-
return buildNetworkSnapshot$
|
|
2616
|
+
return buildNetworkSnapshot$e(luvio, config);
|
|
2617
2617
|
};
|
|
2618
2618
|
};
|
|
2619
2619
|
|
|
2620
|
-
function validate$
|
|
2620
|
+
function validate$n(obj, path = 'PromptTemplateDataProviderOutputParamRepresentation') {
|
|
2621
2621
|
const v_error = (() => {
|
|
2622
2622
|
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
2623
2623
|
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
@@ -2643,7 +2643,7 @@ function validate$m(obj, path = 'PromptTemplateDataProviderOutputParamRepresenta
|
|
|
2643
2643
|
return v_error === undefined ? null : v_error;
|
|
2644
2644
|
}
|
|
2645
2645
|
|
|
2646
|
-
function validate$
|
|
2646
|
+
function validate$m(obj, path = 'PromptTemplateDataProviderInputParamRepresentation') {
|
|
2647
2647
|
const v_error = (() => {
|
|
2648
2648
|
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
2649
2649
|
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
@@ -2672,9 +2672,9 @@ function validate$l(obj, path = 'PromptTemplateDataProviderInputParamRepresentat
|
|
|
2672
2672
|
return v_error === undefined ? null : v_error;
|
|
2673
2673
|
}
|
|
2674
2674
|
|
|
2675
|
-
const TTL$
|
|
2676
|
-
const VERSION$
|
|
2677
|
-
function validate$
|
|
2675
|
+
const TTL$6 = 300;
|
|
2676
|
+
const VERSION$i = "d4824d8c6e7848df0de89295e6d9d434";
|
|
2677
|
+
function validate$l(obj, path = 'PromptTemplateDataProviderInstanceConfigRepresentation') {
|
|
2678
2678
|
const v_error = (() => {
|
|
2679
2679
|
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
2680
2680
|
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
@@ -2703,7 +2703,7 @@ function validate$k(obj, path = 'PromptTemplateDataProviderInstanceConfigReprese
|
|
|
2703
2703
|
if (obj.defaultOutputParam !== undefined) {
|
|
2704
2704
|
const obj_defaultOutputParam = obj.defaultOutputParam;
|
|
2705
2705
|
const path_defaultOutputParam = path + '.defaultOutputParam';
|
|
2706
|
-
const referencepath_defaultOutputParamValidationError = validate$
|
|
2706
|
+
const referencepath_defaultOutputParamValidationError = validate$n(obj_defaultOutputParam, path_defaultOutputParam);
|
|
2707
2707
|
if (referencepath_defaultOutputParamValidationError !== null) {
|
|
2708
2708
|
let message = 'Object doesn\'t match PromptTemplateDataProviderOutputParamRepresentation (at "' + path_defaultOutputParam + '")\n';
|
|
2709
2709
|
message += referencepath_defaultOutputParamValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
@@ -2757,7 +2757,7 @@ function validate$k(obj, path = 'PromptTemplateDataProviderInstanceConfigReprese
|
|
|
2757
2757
|
for (let i = 0; i < obj_inputParams.length; i++) {
|
|
2758
2758
|
const obj_inputParams_item = obj_inputParams[i];
|
|
2759
2759
|
const path_inputParams_item = path_inputParams + '[' + i + ']';
|
|
2760
|
-
const referencepath_inputParams_itemValidationError = validate$
|
|
2760
|
+
const referencepath_inputParams_itemValidationError = validate$m(obj_inputParams_item, path_inputParams_item);
|
|
2761
2761
|
if (referencepath_inputParams_itemValidationError !== null) {
|
|
2762
2762
|
let message = 'Object doesn\'t match PromptTemplateDataProviderInputParamRepresentation (at "' + path_inputParams_item + '")\n';
|
|
2763
2763
|
message += referencepath_inputParams_itemValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
@@ -2823,7 +2823,7 @@ function validate$k(obj, path = 'PromptTemplateDataProviderInstanceConfigReprese
|
|
|
2823
2823
|
for (let i = 0; i < obj_outputParams.length; i++) {
|
|
2824
2824
|
const obj_outputParams_item = obj_outputParams[i];
|
|
2825
2825
|
const path_outputParams_item = path_outputParams + '[' + i + ']';
|
|
2826
|
-
const referencepath_outputParams_itemValidationError = validate$
|
|
2826
|
+
const referencepath_outputParams_itemValidationError = validate$n(obj_outputParams_item, path_outputParams_item);
|
|
2827
2827
|
if (referencepath_outputParams_itemValidationError !== null) {
|
|
2828
2828
|
let message = 'Object doesn\'t match PromptTemplateDataProviderOutputParamRepresentation (at "' + path_outputParams_item + '")\n';
|
|
2829
2829
|
message += referencepath_outputParams_itemValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
@@ -2895,49 +2895,49 @@ function validate$k(obj, path = 'PromptTemplateDataProviderInstanceConfigReprese
|
|
|
2895
2895
|
})();
|
|
2896
2896
|
return v_error === undefined ? null : v_error;
|
|
2897
2897
|
}
|
|
2898
|
-
const RepresentationType$
|
|
2899
|
-
function normalize$
|
|
2898
|
+
const RepresentationType$6 = 'PromptTemplateDataProviderInstanceConfigRepresentation';
|
|
2899
|
+
function normalize$6(input, existing, path, luvio, store, timestamp) {
|
|
2900
2900
|
return input;
|
|
2901
2901
|
}
|
|
2902
|
-
const select$
|
|
2902
|
+
const select$w = function PromptTemplateDataProviderInstanceConfigRepresentationSelect() {
|
|
2903
2903
|
return {
|
|
2904
2904
|
kind: 'Fragment',
|
|
2905
|
-
version: VERSION$
|
|
2905
|
+
version: VERSION$i,
|
|
2906
2906
|
private: [],
|
|
2907
2907
|
opaque: true
|
|
2908
2908
|
};
|
|
2909
2909
|
};
|
|
2910
|
-
function equals$
|
|
2910
|
+
function equals$i(existing, incoming) {
|
|
2911
2911
|
if (JSONStringify(incoming) !== JSONStringify(existing)) {
|
|
2912
2912
|
return false;
|
|
2913
2913
|
}
|
|
2914
2914
|
return true;
|
|
2915
2915
|
}
|
|
2916
|
-
const ingest$
|
|
2916
|
+
const ingest$6 = function PromptTemplateDataProviderInstanceConfigRepresentationIngest(input, path, luvio, store, timestamp) {
|
|
2917
2917
|
if (process.env.NODE_ENV !== 'production') {
|
|
2918
|
-
const validateError = validate$
|
|
2918
|
+
const validateError = validate$l(input);
|
|
2919
2919
|
if (validateError !== null) {
|
|
2920
2920
|
throw validateError;
|
|
2921
2921
|
}
|
|
2922
2922
|
}
|
|
2923
2923
|
const key = path.fullPath;
|
|
2924
|
-
const ttlToUse = TTL$
|
|
2925
|
-
ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize$
|
|
2924
|
+
const ttlToUse = TTL$6;
|
|
2925
|
+
ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize$6, "EinsteinLLM", VERSION$i, RepresentationType$6, equals$i);
|
|
2926
2926
|
return createLink(key);
|
|
2927
2927
|
};
|
|
2928
|
-
function getTypeCacheKeys$
|
|
2928
|
+
function getTypeCacheKeys$6(rootKeySet, luvio, input, fullPathFactory) {
|
|
2929
2929
|
// root cache key (uses fullPathFactory if keyBuilderFromType isn't defined)
|
|
2930
2930
|
const rootKey = fullPathFactory();
|
|
2931
2931
|
rootKeySet.set(rootKey, {
|
|
2932
2932
|
namespace: keyPrefix,
|
|
2933
|
-
representationName: RepresentationType$
|
|
2933
|
+
representationName: RepresentationType$6,
|
|
2934
2934
|
mergeable: false
|
|
2935
2935
|
});
|
|
2936
2936
|
}
|
|
2937
2937
|
|
|
2938
|
-
const TTL$
|
|
2939
|
-
const VERSION$
|
|
2940
|
-
function validate$
|
|
2938
|
+
const TTL$5 = 300;
|
|
2939
|
+
const VERSION$h = "3a6ecdfe18eb2af8f8f6aaa1a30b194c";
|
|
2940
|
+
function validate$k(obj, path = 'PromptTemplateDataProviderInstanceConfigCollectionRepresentation') {
|
|
2941
2941
|
const v_error = (() => {
|
|
2942
2942
|
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
2943
2943
|
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
@@ -2950,7 +2950,7 @@ function validate$j(obj, path = 'PromptTemplateDataProviderInstanceConfigCollect
|
|
|
2950
2950
|
for (let i = 0; i < obj_dataProviderInstanceConfigs.length; i++) {
|
|
2951
2951
|
const obj_dataProviderInstanceConfigs_item = obj_dataProviderInstanceConfigs[i];
|
|
2952
2952
|
const path_dataProviderInstanceConfigs_item = path_dataProviderInstanceConfigs + '[' + i + ']';
|
|
2953
|
-
const referencepath_dataProviderInstanceConfigs_itemValidationError = validate$
|
|
2953
|
+
const referencepath_dataProviderInstanceConfigs_itemValidationError = validate$l(obj_dataProviderInstanceConfigs_item, path_dataProviderInstanceConfigs_item);
|
|
2954
2954
|
if (referencepath_dataProviderInstanceConfigs_itemValidationError !== null) {
|
|
2955
2955
|
let message = 'Object doesn\'t match PromptTemplateDataProviderInstanceConfigRepresentation (at "' + path_dataProviderInstanceConfigs_item + '")\n';
|
|
2956
2956
|
message += referencepath_dataProviderInstanceConfigs_itemValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
@@ -2960,62 +2960,62 @@ function validate$j(obj, path = 'PromptTemplateDataProviderInstanceConfigCollect
|
|
|
2960
2960
|
})();
|
|
2961
2961
|
return v_error === undefined ? null : v_error;
|
|
2962
2962
|
}
|
|
2963
|
-
const RepresentationType$
|
|
2964
|
-
function normalize$
|
|
2963
|
+
const RepresentationType$5 = 'PromptTemplateDataProviderInstanceConfigCollectionRepresentation';
|
|
2964
|
+
function normalize$5(input, existing, path, luvio, store, timestamp) {
|
|
2965
2965
|
return input;
|
|
2966
2966
|
}
|
|
2967
|
-
const select$
|
|
2967
|
+
const select$v = function PromptTemplateDataProviderInstanceConfigCollectionRepresentationSelect() {
|
|
2968
2968
|
return {
|
|
2969
2969
|
kind: 'Fragment',
|
|
2970
|
-
version: VERSION$
|
|
2970
|
+
version: VERSION$h,
|
|
2971
2971
|
private: [],
|
|
2972
2972
|
opaque: true
|
|
2973
2973
|
};
|
|
2974
2974
|
};
|
|
2975
|
-
function equals$
|
|
2975
|
+
function equals$h(existing, incoming) {
|
|
2976
2976
|
if (JSONStringify(incoming) !== JSONStringify(existing)) {
|
|
2977
2977
|
return false;
|
|
2978
2978
|
}
|
|
2979
2979
|
return true;
|
|
2980
2980
|
}
|
|
2981
|
-
const ingest$
|
|
2981
|
+
const ingest$5 = function PromptTemplateDataProviderInstanceConfigCollectionRepresentationIngest(input, path, luvio, store, timestamp) {
|
|
2982
2982
|
if (process.env.NODE_ENV !== 'production') {
|
|
2983
|
-
const validateError = validate$
|
|
2983
|
+
const validateError = validate$k(input);
|
|
2984
2984
|
if (validateError !== null) {
|
|
2985
2985
|
throw validateError;
|
|
2986
2986
|
}
|
|
2987
2987
|
}
|
|
2988
2988
|
const key = path.fullPath;
|
|
2989
|
-
const ttlToUse = TTL$
|
|
2990
|
-
ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize$
|
|
2989
|
+
const ttlToUse = TTL$5;
|
|
2990
|
+
ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize$5, "EinsteinLLM", VERSION$h, RepresentationType$5, equals$h);
|
|
2991
2991
|
return createLink(key);
|
|
2992
2992
|
};
|
|
2993
|
-
function getTypeCacheKeys$
|
|
2993
|
+
function getTypeCacheKeys$5(rootKeySet, luvio, input, fullPathFactory) {
|
|
2994
2994
|
// root cache key (uses fullPathFactory if keyBuilderFromType isn't defined)
|
|
2995
2995
|
const rootKey = fullPathFactory();
|
|
2996
2996
|
rootKeySet.set(rootKey, {
|
|
2997
2997
|
namespace: keyPrefix,
|
|
2998
|
-
representationName: RepresentationType$
|
|
2998
|
+
representationName: RepresentationType$5,
|
|
2999
2999
|
mergeable: false
|
|
3000
3000
|
});
|
|
3001
3001
|
}
|
|
3002
3002
|
|
|
3003
|
-
function select$
|
|
3004
|
-
return select$
|
|
3003
|
+
function select$u(luvio, params) {
|
|
3004
|
+
return select$v();
|
|
3005
3005
|
}
|
|
3006
|
-
function keyBuilder$
|
|
3006
|
+
function keyBuilder$j(luvio, params) {
|
|
3007
3007
|
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 + ')';
|
|
3008
3008
|
}
|
|
3009
|
-
function getResponseCacheKeys$
|
|
3010
|
-
getTypeCacheKeys$
|
|
3009
|
+
function getResponseCacheKeys$d(storeKeyMap, luvio, resourceParams, response) {
|
|
3010
|
+
getTypeCacheKeys$5(storeKeyMap, luvio, response, () => keyBuilder$j(luvio, resourceParams));
|
|
3011
3011
|
}
|
|
3012
|
-
function ingestSuccess$
|
|
3012
|
+
function ingestSuccess$d(luvio, resourceParams, response, snapshotRefresh) {
|
|
3013
3013
|
const { body } = response;
|
|
3014
|
-
const key = keyBuilder$
|
|
3015
|
-
luvio.storeIngest(key, ingest$
|
|
3014
|
+
const key = keyBuilder$j(luvio, resourceParams);
|
|
3015
|
+
luvio.storeIngest(key, ingest$5, body);
|
|
3016
3016
|
const snapshot = luvio.storeLookup({
|
|
3017
3017
|
recordId: key,
|
|
3018
|
-
node: select$
|
|
3018
|
+
node: select$u(),
|
|
3019
3019
|
variables: {},
|
|
3020
3020
|
}, snapshotRefresh);
|
|
3021
3021
|
if (process.env.NODE_ENV !== 'production') {
|
|
@@ -3027,21 +3027,21 @@ function ingestSuccess$c(luvio, resourceParams, response, snapshotRefresh) {
|
|
|
3027
3027
|
return snapshot;
|
|
3028
3028
|
}
|
|
3029
3029
|
function ingestError$8(luvio, params, error, snapshotRefresh) {
|
|
3030
|
-
const key = keyBuilder$
|
|
3030
|
+
const key = keyBuilder$j(luvio, params);
|
|
3031
3031
|
const errorSnapshot = luvio.errorSnapshot(error, snapshotRefresh);
|
|
3032
3032
|
const storeMetadataParams = {
|
|
3033
|
-
ttl: TTL$
|
|
3033
|
+
ttl: TTL$5,
|
|
3034
3034
|
namespace: keyPrefix,
|
|
3035
|
-
version: VERSION$
|
|
3036
|
-
representationName: RepresentationType$
|
|
3035
|
+
version: VERSION$h,
|
|
3036
|
+
representationName: RepresentationType$5
|
|
3037
3037
|
};
|
|
3038
3038
|
luvio.storeIngestError(key, errorSnapshot, storeMetadataParams);
|
|
3039
3039
|
return errorSnapshot;
|
|
3040
3040
|
}
|
|
3041
|
-
function createResourceRequest$
|
|
3041
|
+
function createResourceRequest$d(config) {
|
|
3042
3042
|
const headers = {};
|
|
3043
3043
|
return {
|
|
3044
|
-
baseUri: '/services/data/
|
|
3044
|
+
baseUri: '/services/data/v67.0',
|
|
3045
3045
|
basePath: '/einstein/prompt-templates/data-providers/mapped',
|
|
3046
3046
|
method: 'post',
|
|
3047
3047
|
body: config.body,
|
|
@@ -3052,22 +3052,22 @@ function createResourceRequest$c(config) {
|
|
|
3052
3052
|
};
|
|
3053
3053
|
}
|
|
3054
3054
|
|
|
3055
|
-
const adapterName$
|
|
3055
|
+
const adapterName$d = 'getInputMappedDataProviders';
|
|
3056
3056
|
const getInputMappedDataProviders_ConfigPropertyMetadata = [
|
|
3057
3057
|
generateParamConfigMetadata('groupName', false, 2 /* Body */, 0 /* String */),
|
|
3058
3058
|
generateParamConfigMetadata('target', false, 2 /* Body */, 0 /* String */),
|
|
3059
3059
|
generateParamConfigMetadata('templateInputs', true, 2 /* Body */, 4 /* Unsupported */, true),
|
|
3060
3060
|
generateParamConfigMetadata('templateTypeName', true, 2 /* Body */, 0 /* String */),
|
|
3061
3061
|
];
|
|
3062
|
-
const getInputMappedDataProviders_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$
|
|
3063
|
-
const createResourceParams$
|
|
3064
|
-
function keyBuilder$
|
|
3065
|
-
const resourceParams = createResourceParams$
|
|
3066
|
-
return keyBuilder$
|
|
3062
|
+
const getInputMappedDataProviders_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$d, getInputMappedDataProviders_ConfigPropertyMetadata);
|
|
3063
|
+
const createResourceParams$d = /*#__PURE__*/ createResourceParams$j(getInputMappedDataProviders_ConfigPropertyMetadata);
|
|
3064
|
+
function keyBuilder$i(luvio, config) {
|
|
3065
|
+
const resourceParams = createResourceParams$d(config);
|
|
3066
|
+
return keyBuilder$j(luvio, resourceParams);
|
|
3067
3067
|
}
|
|
3068
|
-
function typeCheckConfig$
|
|
3068
|
+
function typeCheckConfig$d(untrustedConfig) {
|
|
3069
3069
|
const config = {};
|
|
3070
|
-
typeCheckConfig$
|
|
3070
|
+
typeCheckConfig$j(untrustedConfig, config, getInputMappedDataProviders_ConfigPropertyMetadata);
|
|
3071
3071
|
const untrustedConfig_templateInputs = untrustedConfig.templateInputs;
|
|
3072
3072
|
if (ArrayIsArray$1(untrustedConfig_templateInputs)) {
|
|
3073
3073
|
const untrustedConfig_templateInputs_array = [];
|
|
@@ -3079,45 +3079,45 @@ function typeCheckConfig$c(untrustedConfig) {
|
|
|
3079
3079
|
}
|
|
3080
3080
|
return config;
|
|
3081
3081
|
}
|
|
3082
|
-
function validateAdapterConfig$
|
|
3082
|
+
function validateAdapterConfig$d(untrustedConfig, configPropertyNames) {
|
|
3083
3083
|
if (!untrustedIsObject(untrustedConfig)) {
|
|
3084
3084
|
return null;
|
|
3085
3085
|
}
|
|
3086
3086
|
if (process.env.NODE_ENV !== 'production') {
|
|
3087
3087
|
validateConfig(untrustedConfig, configPropertyNames);
|
|
3088
3088
|
}
|
|
3089
|
-
const config = typeCheckConfig$
|
|
3089
|
+
const config = typeCheckConfig$d(untrustedConfig);
|
|
3090
3090
|
if (!areRequiredParametersPresent(config, configPropertyNames)) {
|
|
3091
3091
|
return null;
|
|
3092
3092
|
}
|
|
3093
3093
|
return config;
|
|
3094
3094
|
}
|
|
3095
3095
|
function adapterFragment$8(luvio, config) {
|
|
3096
|
-
createResourceParams$
|
|
3097
|
-
return select$
|
|
3096
|
+
createResourceParams$d(config);
|
|
3097
|
+
return select$u();
|
|
3098
3098
|
}
|
|
3099
3099
|
function onFetchResponseSuccess$8(luvio, config, resourceParams, response) {
|
|
3100
|
-
const snapshot = ingestSuccess$
|
|
3100
|
+
const snapshot = ingestSuccess$d(luvio, resourceParams, response, {
|
|
3101
3101
|
config,
|
|
3102
|
-
resolve: () => buildNetworkSnapshot$
|
|
3102
|
+
resolve: () => buildNetworkSnapshot$d(luvio, config, snapshotRefreshOptions)
|
|
3103
3103
|
});
|
|
3104
3104
|
return luvio.storeBroadcast().then(() => snapshot);
|
|
3105
3105
|
}
|
|
3106
3106
|
function onFetchResponseError$8(luvio, config, resourceParams, response) {
|
|
3107
3107
|
const snapshot = ingestError$8(luvio, resourceParams, response, {
|
|
3108
3108
|
config,
|
|
3109
|
-
resolve: () => buildNetworkSnapshot$
|
|
3109
|
+
resolve: () => buildNetworkSnapshot$d(luvio, config, snapshotRefreshOptions)
|
|
3110
3110
|
});
|
|
3111
3111
|
return luvio.storeBroadcast().then(() => snapshot);
|
|
3112
3112
|
}
|
|
3113
|
-
function buildNetworkSnapshot$
|
|
3114
|
-
const resourceParams = createResourceParams$
|
|
3115
|
-
const request = createResourceRequest$
|
|
3113
|
+
function buildNetworkSnapshot$d(luvio, config, options) {
|
|
3114
|
+
const resourceParams = createResourceParams$d(config);
|
|
3115
|
+
const request = createResourceRequest$d(resourceParams);
|
|
3116
3116
|
return luvio.dispatchResourceRequest(request, options)
|
|
3117
3117
|
.then((response) => {
|
|
3118
3118
|
return luvio.handleSuccessResponse(() => onFetchResponseSuccess$8(luvio, config, resourceParams, response), () => {
|
|
3119
3119
|
const cache = new StoreKeyMap();
|
|
3120
|
-
getResponseCacheKeys$
|
|
3120
|
+
getResponseCacheKeys$d(cache, luvio, resourceParams, response.body);
|
|
3121
3121
|
return cache;
|
|
3122
3122
|
});
|
|
3123
3123
|
}, (response) => {
|
|
@@ -3125,23 +3125,23 @@ function buildNetworkSnapshot$c(luvio, config, options) {
|
|
|
3125
3125
|
});
|
|
3126
3126
|
}
|
|
3127
3127
|
function buildNetworkSnapshotCachePolicy$8(context, coercedAdapterRequestContext) {
|
|
3128
|
-
return buildNetworkSnapshotCachePolicy$b(context, coercedAdapterRequestContext, buildNetworkSnapshot$
|
|
3128
|
+
return buildNetworkSnapshotCachePolicy$b(context, coercedAdapterRequestContext, buildNetworkSnapshot$d, 'get', false);
|
|
3129
3129
|
}
|
|
3130
3130
|
function buildCachedSnapshotCachePolicy$8(context, storeLookup) {
|
|
3131
3131
|
const { luvio, config } = context;
|
|
3132
3132
|
const selector = {
|
|
3133
|
-
recordId: keyBuilder$
|
|
3133
|
+
recordId: keyBuilder$i(luvio, config),
|
|
3134
3134
|
node: adapterFragment$8(luvio, config),
|
|
3135
3135
|
variables: {},
|
|
3136
3136
|
};
|
|
3137
3137
|
const cacheSnapshot = storeLookup(selector, {
|
|
3138
3138
|
config,
|
|
3139
|
-
resolve: () => buildNetworkSnapshot$
|
|
3139
|
+
resolve: () => buildNetworkSnapshot$d(luvio, config, snapshotRefreshOptions)
|
|
3140
3140
|
});
|
|
3141
3141
|
return cacheSnapshot;
|
|
3142
3142
|
}
|
|
3143
3143
|
const getInputMappedDataProvidersAdapterFactory = (luvio) => function EinsteinLLM__getInputMappedDataProviders(untrustedConfig, requestContext) {
|
|
3144
|
-
const config = validateAdapterConfig$
|
|
3144
|
+
const config = validateAdapterConfig$d(untrustedConfig, getInputMappedDataProviders_ConfigPropertyNames);
|
|
3145
3145
|
// Invalid or incomplete config
|
|
3146
3146
|
if (config === null) {
|
|
3147
3147
|
return null;
|
|
@@ -3150,22 +3150,22 @@ const getInputMappedDataProvidersAdapterFactory = (luvio) => function EinsteinLL
|
|
|
3150
3150
|
buildCachedSnapshotCachePolicy$8, buildNetworkSnapshotCachePolicy$8);
|
|
3151
3151
|
};
|
|
3152
3152
|
|
|
3153
|
-
function select$
|
|
3154
|
-
return select$
|
|
3153
|
+
function select$t(luvio, params) {
|
|
3154
|
+
return select$v();
|
|
3155
3155
|
}
|
|
3156
|
-
function keyBuilder$
|
|
3156
|
+
function keyBuilder$h(luvio, params) {
|
|
3157
3157
|
return keyPrefix + '::PromptTemplateDataProviderInstanceConfigCollectionRepresentation:(' + 'groupNames:' + params.queryParams.groupNames + ',' + 'targets:' + params.queryParams.targets + ',' + 'templateType:' + params.urlParams.templateType + ')';
|
|
3158
3158
|
}
|
|
3159
|
-
function getResponseCacheKeys$
|
|
3160
|
-
getTypeCacheKeys$
|
|
3159
|
+
function getResponseCacheKeys$c(storeKeyMap, luvio, resourceParams, response) {
|
|
3160
|
+
getTypeCacheKeys$5(storeKeyMap, luvio, response, () => keyBuilder$h(luvio, resourceParams));
|
|
3161
3161
|
}
|
|
3162
|
-
function ingestSuccess$
|
|
3162
|
+
function ingestSuccess$c(luvio, resourceParams, response, snapshotRefresh) {
|
|
3163
3163
|
const { body } = response;
|
|
3164
|
-
const key = keyBuilder$
|
|
3165
|
-
luvio.storeIngest(key, ingest$
|
|
3164
|
+
const key = keyBuilder$h(luvio, resourceParams);
|
|
3165
|
+
luvio.storeIngest(key, ingest$5, body);
|
|
3166
3166
|
const snapshot = luvio.storeLookup({
|
|
3167
3167
|
recordId: key,
|
|
3168
|
-
node: select$
|
|
3168
|
+
node: select$t(),
|
|
3169
3169
|
variables: {},
|
|
3170
3170
|
}, snapshotRefresh);
|
|
3171
3171
|
if (process.env.NODE_ENV !== 'production') {
|
|
@@ -3177,21 +3177,21 @@ function ingestSuccess$b(luvio, resourceParams, response, snapshotRefresh) {
|
|
|
3177
3177
|
return snapshot;
|
|
3178
3178
|
}
|
|
3179
3179
|
function ingestError$7(luvio, params, error, snapshotRefresh) {
|
|
3180
|
-
const key = keyBuilder$
|
|
3180
|
+
const key = keyBuilder$h(luvio, params);
|
|
3181
3181
|
const errorSnapshot = luvio.errorSnapshot(error, snapshotRefresh);
|
|
3182
3182
|
const storeMetadataParams = {
|
|
3183
|
-
ttl: TTL$
|
|
3183
|
+
ttl: TTL$5,
|
|
3184
3184
|
namespace: keyPrefix,
|
|
3185
|
-
version: VERSION$
|
|
3186
|
-
representationName: RepresentationType$
|
|
3185
|
+
version: VERSION$h,
|
|
3186
|
+
representationName: RepresentationType$5
|
|
3187
3187
|
};
|
|
3188
3188
|
luvio.storeIngestError(key, errorSnapshot, storeMetadataParams);
|
|
3189
3189
|
return errorSnapshot;
|
|
3190
3190
|
}
|
|
3191
|
-
function createResourceRequest$
|
|
3191
|
+
function createResourceRequest$c(config) {
|
|
3192
3192
|
const headers = {};
|
|
3193
3193
|
return {
|
|
3194
|
-
baseUri: '/services/data/
|
|
3194
|
+
baseUri: '/services/data/v67.0',
|
|
3195
3195
|
basePath: '/einstein/prompt-templates/data-providers/' + config.urlParams.templateType + '',
|
|
3196
3196
|
method: 'get',
|
|
3197
3197
|
body: null,
|
|
@@ -3202,62 +3202,62 @@ function createResourceRequest$b(config) {
|
|
|
3202
3202
|
};
|
|
3203
3203
|
}
|
|
3204
3204
|
|
|
3205
|
-
const adapterName$
|
|
3205
|
+
const adapterName$c = 'getDataProviders';
|
|
3206
3206
|
const getDataProviders_ConfigPropertyMetadata = [
|
|
3207
3207
|
generateParamConfigMetadata('templateType', true, 0 /* UrlParameter */, 0 /* String */),
|
|
3208
3208
|
generateParamConfigMetadata('groupNames', false, 1 /* QueryParameter */, 0 /* String */, true),
|
|
3209
3209
|
generateParamConfigMetadata('targets', false, 1 /* QueryParameter */, 0 /* String */, true),
|
|
3210
3210
|
];
|
|
3211
|
-
const getDataProviders_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$
|
|
3212
|
-
const createResourceParams$
|
|
3213
|
-
function keyBuilder$
|
|
3214
|
-
const resourceParams = createResourceParams$
|
|
3215
|
-
return keyBuilder$
|
|
3211
|
+
const getDataProviders_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$c, getDataProviders_ConfigPropertyMetadata);
|
|
3212
|
+
const createResourceParams$c = /*#__PURE__*/ createResourceParams$j(getDataProviders_ConfigPropertyMetadata);
|
|
3213
|
+
function keyBuilder$g(luvio, config) {
|
|
3214
|
+
const resourceParams = createResourceParams$c(config);
|
|
3215
|
+
return keyBuilder$h(luvio, resourceParams);
|
|
3216
3216
|
}
|
|
3217
|
-
function typeCheckConfig$
|
|
3217
|
+
function typeCheckConfig$c(untrustedConfig) {
|
|
3218
3218
|
const config = {};
|
|
3219
|
-
typeCheckConfig$
|
|
3219
|
+
typeCheckConfig$j(untrustedConfig, config, getDataProviders_ConfigPropertyMetadata);
|
|
3220
3220
|
return config;
|
|
3221
3221
|
}
|
|
3222
|
-
function validateAdapterConfig$
|
|
3222
|
+
function validateAdapterConfig$c(untrustedConfig, configPropertyNames) {
|
|
3223
3223
|
if (!untrustedIsObject(untrustedConfig)) {
|
|
3224
3224
|
return null;
|
|
3225
3225
|
}
|
|
3226
3226
|
if (process.env.NODE_ENV !== 'production') {
|
|
3227
3227
|
validateConfig(untrustedConfig, configPropertyNames);
|
|
3228
3228
|
}
|
|
3229
|
-
const config = typeCheckConfig$
|
|
3229
|
+
const config = typeCheckConfig$c(untrustedConfig);
|
|
3230
3230
|
if (!areRequiredParametersPresent(config, configPropertyNames)) {
|
|
3231
3231
|
return null;
|
|
3232
3232
|
}
|
|
3233
3233
|
return config;
|
|
3234
3234
|
}
|
|
3235
3235
|
function adapterFragment$7(luvio, config) {
|
|
3236
|
-
createResourceParams$
|
|
3237
|
-
return select$
|
|
3236
|
+
createResourceParams$c(config);
|
|
3237
|
+
return select$t();
|
|
3238
3238
|
}
|
|
3239
3239
|
function onFetchResponseSuccess$7(luvio, config, resourceParams, response) {
|
|
3240
|
-
const snapshot = ingestSuccess$
|
|
3240
|
+
const snapshot = ingestSuccess$c(luvio, resourceParams, response, {
|
|
3241
3241
|
config,
|
|
3242
|
-
resolve: () => buildNetworkSnapshot$
|
|
3242
|
+
resolve: () => buildNetworkSnapshot$c(luvio, config, snapshotRefreshOptions)
|
|
3243
3243
|
});
|
|
3244
3244
|
return luvio.storeBroadcast().then(() => snapshot);
|
|
3245
3245
|
}
|
|
3246
3246
|
function onFetchResponseError$7(luvio, config, resourceParams, response) {
|
|
3247
3247
|
const snapshot = ingestError$7(luvio, resourceParams, response, {
|
|
3248
3248
|
config,
|
|
3249
|
-
resolve: () => buildNetworkSnapshot$
|
|
3249
|
+
resolve: () => buildNetworkSnapshot$c(luvio, config, snapshotRefreshOptions)
|
|
3250
3250
|
});
|
|
3251
3251
|
return luvio.storeBroadcast().then(() => snapshot);
|
|
3252
3252
|
}
|
|
3253
|
-
function buildNetworkSnapshot$
|
|
3254
|
-
const resourceParams = createResourceParams$
|
|
3255
|
-
const request = createResourceRequest$
|
|
3253
|
+
function buildNetworkSnapshot$c(luvio, config, options) {
|
|
3254
|
+
const resourceParams = createResourceParams$c(config);
|
|
3255
|
+
const request = createResourceRequest$c(resourceParams);
|
|
3256
3256
|
return luvio.dispatchResourceRequest(request, options)
|
|
3257
3257
|
.then((response) => {
|
|
3258
3258
|
return luvio.handleSuccessResponse(() => onFetchResponseSuccess$7(luvio, config, resourceParams, response), () => {
|
|
3259
3259
|
const cache = new StoreKeyMap();
|
|
3260
|
-
getResponseCacheKeys$
|
|
3260
|
+
getResponseCacheKeys$c(cache, luvio, resourceParams, response.body);
|
|
3261
3261
|
return cache;
|
|
3262
3262
|
});
|
|
3263
3263
|
}, (response) => {
|
|
@@ -3265,23 +3265,23 @@ function buildNetworkSnapshot$b(luvio, config, options) {
|
|
|
3265
3265
|
});
|
|
3266
3266
|
}
|
|
3267
3267
|
function buildNetworkSnapshotCachePolicy$7(context, coercedAdapterRequestContext) {
|
|
3268
|
-
return buildNetworkSnapshotCachePolicy$b(context, coercedAdapterRequestContext, buildNetworkSnapshot$
|
|
3268
|
+
return buildNetworkSnapshotCachePolicy$b(context, coercedAdapterRequestContext, buildNetworkSnapshot$c, undefined, false);
|
|
3269
3269
|
}
|
|
3270
3270
|
function buildCachedSnapshotCachePolicy$7(context, storeLookup) {
|
|
3271
3271
|
const { luvio, config } = context;
|
|
3272
3272
|
const selector = {
|
|
3273
|
-
recordId: keyBuilder$
|
|
3273
|
+
recordId: keyBuilder$g(luvio, config),
|
|
3274
3274
|
node: adapterFragment$7(luvio, config),
|
|
3275
3275
|
variables: {},
|
|
3276
3276
|
};
|
|
3277
3277
|
const cacheSnapshot = storeLookup(selector, {
|
|
3278
3278
|
config,
|
|
3279
|
-
resolve: () => buildNetworkSnapshot$
|
|
3279
|
+
resolve: () => buildNetworkSnapshot$c(luvio, config, snapshotRefreshOptions)
|
|
3280
3280
|
});
|
|
3281
3281
|
return cacheSnapshot;
|
|
3282
3282
|
}
|
|
3283
3283
|
const getDataProvidersAdapterFactory = (luvio) => function EinsteinLLM__getDataProviders(untrustedConfig, requestContext) {
|
|
3284
|
-
const config = validateAdapterConfig$
|
|
3284
|
+
const config = validateAdapterConfig$c(untrustedConfig, getDataProviders_ConfigPropertyNames);
|
|
3285
3285
|
// Invalid or incomplete config
|
|
3286
3286
|
if (config === null) {
|
|
3287
3287
|
return null;
|
|
@@ -3290,22 +3290,22 @@ const getDataProvidersAdapterFactory = (luvio) => function EinsteinLLM__getDataP
|
|
|
3290
3290
|
buildCachedSnapshotCachePolicy$7, buildNetworkSnapshotCachePolicy$7);
|
|
3291
3291
|
};
|
|
3292
3292
|
|
|
3293
|
-
function select$
|
|
3294
|
-
return select$
|
|
3293
|
+
function select$s(luvio, params) {
|
|
3294
|
+
return select$w();
|
|
3295
3295
|
}
|
|
3296
|
-
function keyBuilder$
|
|
3296
|
+
function keyBuilder$f(luvio, params) {
|
|
3297
3297
|
return keyPrefix + '::PromptTemplateDataProviderInstanceConfigRepresentation:(' + stableJSONStringify(params.body.additionalParam) + '::' + 'definition:' + params.body.definition + '::' + 'groupName:' + params.body.groupName + ')';
|
|
3298
3298
|
}
|
|
3299
|
-
function getResponseCacheKeys$
|
|
3300
|
-
getTypeCacheKeys$
|
|
3299
|
+
function getResponseCacheKeys$b(storeKeyMap, luvio, resourceParams, response) {
|
|
3300
|
+
getTypeCacheKeys$6(storeKeyMap, luvio, response, () => keyBuilder$f(luvio, resourceParams));
|
|
3301
3301
|
}
|
|
3302
|
-
function ingestSuccess$
|
|
3302
|
+
function ingestSuccess$b(luvio, resourceParams, response, snapshotRefresh) {
|
|
3303
3303
|
const { body } = response;
|
|
3304
|
-
const key = keyBuilder$
|
|
3305
|
-
luvio.storeIngest(key, ingest$
|
|
3304
|
+
const key = keyBuilder$f(luvio, resourceParams);
|
|
3305
|
+
luvio.storeIngest(key, ingest$6, body);
|
|
3306
3306
|
const snapshot = luvio.storeLookup({
|
|
3307
3307
|
recordId: key,
|
|
3308
|
-
node: select$
|
|
3308
|
+
node: select$s(),
|
|
3309
3309
|
variables: {},
|
|
3310
3310
|
}, snapshotRefresh);
|
|
3311
3311
|
if (process.env.NODE_ENV !== 'production') {
|
|
@@ -3317,21 +3317,21 @@ function ingestSuccess$a(luvio, resourceParams, response, snapshotRefresh) {
|
|
|
3317
3317
|
return snapshot;
|
|
3318
3318
|
}
|
|
3319
3319
|
function ingestError$6(luvio, params, error, snapshotRefresh) {
|
|
3320
|
-
const key = keyBuilder$
|
|
3320
|
+
const key = keyBuilder$f(luvio, params);
|
|
3321
3321
|
const errorSnapshot = luvio.errorSnapshot(error, snapshotRefresh);
|
|
3322
3322
|
const storeMetadataParams = {
|
|
3323
|
-
ttl: TTL$
|
|
3323
|
+
ttl: TTL$6,
|
|
3324
3324
|
namespace: keyPrefix,
|
|
3325
|
-
version: VERSION$
|
|
3326
|
-
representationName: RepresentationType$
|
|
3325
|
+
version: VERSION$i,
|
|
3326
|
+
representationName: RepresentationType$6
|
|
3327
3327
|
};
|
|
3328
3328
|
luvio.storeIngestError(key, errorSnapshot, storeMetadataParams);
|
|
3329
3329
|
return errorSnapshot;
|
|
3330
3330
|
}
|
|
3331
|
-
function createResourceRequest$
|
|
3331
|
+
function createResourceRequest$b(config) {
|
|
3332
3332
|
const headers = {};
|
|
3333
3333
|
return {
|
|
3334
|
-
baseUri: '/services/data/
|
|
3334
|
+
baseUri: '/services/data/v67.0',
|
|
3335
3335
|
basePath: '/einstein/prompt-templates/data-provider/describe',
|
|
3336
3336
|
method: 'post',
|
|
3337
3337
|
body: config.body,
|
|
@@ -3342,21 +3342,21 @@ function createResourceRequest$a(config) {
|
|
|
3342
3342
|
};
|
|
3343
3343
|
}
|
|
3344
3344
|
|
|
3345
|
-
const adapterName$
|
|
3345
|
+
const adapterName$b = 'getDataProviderInstanceConfig';
|
|
3346
3346
|
const getDataProviderInstanceConfig_ConfigPropertyMetadata = [
|
|
3347
3347
|
generateParamConfigMetadata('additionalParam', false, 2 /* Body */, 4 /* Unsupported */),
|
|
3348
3348
|
generateParamConfigMetadata('definition', true, 2 /* Body */, 0 /* String */),
|
|
3349
3349
|
generateParamConfigMetadata('groupName', true, 2 /* Body */, 0 /* String */),
|
|
3350
3350
|
];
|
|
3351
|
-
const getDataProviderInstanceConfig_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$
|
|
3352
|
-
const createResourceParams$
|
|
3353
|
-
function keyBuilder$
|
|
3354
|
-
const resourceParams = createResourceParams$
|
|
3355
|
-
return keyBuilder$
|
|
3351
|
+
const getDataProviderInstanceConfig_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$b, getDataProviderInstanceConfig_ConfigPropertyMetadata);
|
|
3352
|
+
const createResourceParams$b = /*#__PURE__*/ createResourceParams$j(getDataProviderInstanceConfig_ConfigPropertyMetadata);
|
|
3353
|
+
function keyBuilder$e(luvio, config) {
|
|
3354
|
+
const resourceParams = createResourceParams$b(config);
|
|
3355
|
+
return keyBuilder$f(luvio, resourceParams);
|
|
3356
3356
|
}
|
|
3357
|
-
function typeCheckConfig$
|
|
3357
|
+
function typeCheckConfig$b(untrustedConfig) {
|
|
3358
3358
|
const config = {};
|
|
3359
|
-
typeCheckConfig$
|
|
3359
|
+
typeCheckConfig$j(untrustedConfig, config, getDataProviderInstanceConfig_ConfigPropertyMetadata);
|
|
3360
3360
|
const untrustedConfig_additionalParam = untrustedConfig.additionalParam;
|
|
3361
3361
|
if (untrustedIsObject(untrustedConfig_additionalParam)) {
|
|
3362
3362
|
const untrustedConfig_additionalParam_object = {};
|
|
@@ -3374,45 +3374,45 @@ function typeCheckConfig$a(untrustedConfig) {
|
|
|
3374
3374
|
}
|
|
3375
3375
|
return config;
|
|
3376
3376
|
}
|
|
3377
|
-
function validateAdapterConfig$
|
|
3377
|
+
function validateAdapterConfig$b(untrustedConfig, configPropertyNames) {
|
|
3378
3378
|
if (!untrustedIsObject(untrustedConfig)) {
|
|
3379
3379
|
return null;
|
|
3380
3380
|
}
|
|
3381
3381
|
if (process.env.NODE_ENV !== 'production') {
|
|
3382
3382
|
validateConfig(untrustedConfig, configPropertyNames);
|
|
3383
3383
|
}
|
|
3384
|
-
const config = typeCheckConfig$
|
|
3384
|
+
const config = typeCheckConfig$b(untrustedConfig);
|
|
3385
3385
|
if (!areRequiredParametersPresent(config, configPropertyNames)) {
|
|
3386
3386
|
return null;
|
|
3387
3387
|
}
|
|
3388
3388
|
return config;
|
|
3389
3389
|
}
|
|
3390
3390
|
function adapterFragment$6(luvio, config) {
|
|
3391
|
-
createResourceParams$
|
|
3392
|
-
return select$
|
|
3391
|
+
createResourceParams$b(config);
|
|
3392
|
+
return select$s();
|
|
3393
3393
|
}
|
|
3394
3394
|
function onFetchResponseSuccess$6(luvio, config, resourceParams, response) {
|
|
3395
|
-
const snapshot = ingestSuccess$
|
|
3395
|
+
const snapshot = ingestSuccess$b(luvio, resourceParams, response, {
|
|
3396
3396
|
config,
|
|
3397
|
-
resolve: () => buildNetworkSnapshot$
|
|
3397
|
+
resolve: () => buildNetworkSnapshot$b(luvio, config, snapshotRefreshOptions)
|
|
3398
3398
|
});
|
|
3399
3399
|
return luvio.storeBroadcast().then(() => snapshot);
|
|
3400
3400
|
}
|
|
3401
3401
|
function onFetchResponseError$6(luvio, config, resourceParams, response) {
|
|
3402
3402
|
const snapshot = ingestError$6(luvio, resourceParams, response, {
|
|
3403
3403
|
config,
|
|
3404
|
-
resolve: () => buildNetworkSnapshot$
|
|
3404
|
+
resolve: () => buildNetworkSnapshot$b(luvio, config, snapshotRefreshOptions)
|
|
3405
3405
|
});
|
|
3406
3406
|
return luvio.storeBroadcast().then(() => snapshot);
|
|
3407
3407
|
}
|
|
3408
|
-
function buildNetworkSnapshot$
|
|
3409
|
-
const resourceParams = createResourceParams$
|
|
3410
|
-
const request = createResourceRequest$
|
|
3408
|
+
function buildNetworkSnapshot$b(luvio, config, options) {
|
|
3409
|
+
const resourceParams = createResourceParams$b(config);
|
|
3410
|
+
const request = createResourceRequest$b(resourceParams);
|
|
3411
3411
|
return luvio.dispatchResourceRequest(request, options)
|
|
3412
3412
|
.then((response) => {
|
|
3413
3413
|
return luvio.handleSuccessResponse(() => onFetchResponseSuccess$6(luvio, config, resourceParams, response), () => {
|
|
3414
3414
|
const cache = new StoreKeyMap();
|
|
3415
|
-
getResponseCacheKeys$
|
|
3415
|
+
getResponseCacheKeys$b(cache, luvio, resourceParams, response.body);
|
|
3416
3416
|
return cache;
|
|
3417
3417
|
});
|
|
3418
3418
|
}, (response) => {
|
|
@@ -3420,23 +3420,23 @@ function buildNetworkSnapshot$a(luvio, config, options) {
|
|
|
3420
3420
|
});
|
|
3421
3421
|
}
|
|
3422
3422
|
function buildNetworkSnapshotCachePolicy$6(context, coercedAdapterRequestContext) {
|
|
3423
|
-
return buildNetworkSnapshotCachePolicy$b(context, coercedAdapterRequestContext, buildNetworkSnapshot$
|
|
3423
|
+
return buildNetworkSnapshotCachePolicy$b(context, coercedAdapterRequestContext, buildNetworkSnapshot$b, 'get', false);
|
|
3424
3424
|
}
|
|
3425
3425
|
function buildCachedSnapshotCachePolicy$6(context, storeLookup) {
|
|
3426
3426
|
const { luvio, config } = context;
|
|
3427
3427
|
const selector = {
|
|
3428
|
-
recordId: keyBuilder$
|
|
3428
|
+
recordId: keyBuilder$e(luvio, config),
|
|
3429
3429
|
node: adapterFragment$6(luvio, config),
|
|
3430
3430
|
variables: {},
|
|
3431
3431
|
};
|
|
3432
3432
|
const cacheSnapshot = storeLookup(selector, {
|
|
3433
3433
|
config,
|
|
3434
|
-
resolve: () => buildNetworkSnapshot$
|
|
3434
|
+
resolve: () => buildNetworkSnapshot$b(luvio, config, snapshotRefreshOptions)
|
|
3435
3435
|
});
|
|
3436
3436
|
return cacheSnapshot;
|
|
3437
3437
|
}
|
|
3438
3438
|
const getDataProviderInstanceConfigAdapterFactory = (luvio) => function EinsteinLLM__getDataProviderInstanceConfig(untrustedConfig, requestContext) {
|
|
3439
|
-
const config = validateAdapterConfig$
|
|
3439
|
+
const config = validateAdapterConfig$b(untrustedConfig, getDataProviderInstanceConfig_ConfigPropertyNames);
|
|
3440
3440
|
// Invalid or incomplete config
|
|
3441
3441
|
if (config === null) {
|
|
3442
3442
|
return null;
|
|
@@ -3445,7 +3445,7 @@ const getDataProviderInstanceConfigAdapterFactory = (luvio) => function Einstein
|
|
|
3445
3445
|
buildCachedSnapshotCachePolicy$6, buildNetworkSnapshotCachePolicy$6);
|
|
3446
3446
|
};
|
|
3447
3447
|
|
|
3448
|
-
function validate$
|
|
3448
|
+
function validate$j(obj, path = 'PromptTemplateDataProviderTypeConfigRepresentation') {
|
|
3449
3449
|
const v_error = (() => {
|
|
3450
3450
|
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
3451
3451
|
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
@@ -3495,9 +3495,9 @@ function validate$i(obj, path = 'PromptTemplateDataProviderTypeConfigRepresentat
|
|
|
3495
3495
|
return v_error === undefined ? null : v_error;
|
|
3496
3496
|
}
|
|
3497
3497
|
|
|
3498
|
-
const TTL$
|
|
3499
|
-
const VERSION$
|
|
3500
|
-
function validate$
|
|
3498
|
+
const TTL$4 = 300;
|
|
3499
|
+
const VERSION$g = "212332dac1decc071b476742df3440fb";
|
|
3500
|
+
function validate$i(obj, path = 'PromptTemplateDataProviderTypeConfigCollectionRepresentation') {
|
|
3501
3501
|
const v_error = (() => {
|
|
3502
3502
|
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
3503
3503
|
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
@@ -3510,7 +3510,7 @@ function validate$h(obj, path = 'PromptTemplateDataProviderTypeConfigCollectionR
|
|
|
3510
3510
|
for (let i = 0; i < obj_dataProviderTypeConfigs.length; i++) {
|
|
3511
3511
|
const obj_dataProviderTypeConfigs_item = obj_dataProviderTypeConfigs[i];
|
|
3512
3512
|
const path_dataProviderTypeConfigs_item = path_dataProviderTypeConfigs + '[' + i + ']';
|
|
3513
|
-
const referencepath_dataProviderTypeConfigs_itemValidationError = validate$
|
|
3513
|
+
const referencepath_dataProviderTypeConfigs_itemValidationError = validate$j(obj_dataProviderTypeConfigs_item, path_dataProviderTypeConfigs_item);
|
|
3514
3514
|
if (referencepath_dataProviderTypeConfigs_itemValidationError !== null) {
|
|
3515
3515
|
let message = 'Object doesn\'t match PromptTemplateDataProviderTypeConfigRepresentation (at "' + path_dataProviderTypeConfigs_item + '")\n';
|
|
3516
3516
|
message += referencepath_dataProviderTypeConfigs_itemValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
@@ -3520,62 +3520,62 @@ function validate$h(obj, path = 'PromptTemplateDataProviderTypeConfigCollectionR
|
|
|
3520
3520
|
})();
|
|
3521
3521
|
return v_error === undefined ? null : v_error;
|
|
3522
3522
|
}
|
|
3523
|
-
const RepresentationType$
|
|
3524
|
-
function normalize$
|
|
3523
|
+
const RepresentationType$4 = 'PromptTemplateDataProviderTypeConfigCollectionRepresentation';
|
|
3524
|
+
function normalize$4(input, existing, path, luvio, store, timestamp) {
|
|
3525
3525
|
return input;
|
|
3526
3526
|
}
|
|
3527
|
-
const select$
|
|
3527
|
+
const select$r = function PromptTemplateDataProviderTypeConfigCollectionRepresentationSelect() {
|
|
3528
3528
|
return {
|
|
3529
3529
|
kind: 'Fragment',
|
|
3530
|
-
version: VERSION$
|
|
3530
|
+
version: VERSION$g,
|
|
3531
3531
|
private: [],
|
|
3532
3532
|
opaque: true
|
|
3533
3533
|
};
|
|
3534
3534
|
};
|
|
3535
|
-
function equals$
|
|
3535
|
+
function equals$g(existing, incoming) {
|
|
3536
3536
|
if (JSONStringify(incoming) !== JSONStringify(existing)) {
|
|
3537
3537
|
return false;
|
|
3538
3538
|
}
|
|
3539
3539
|
return true;
|
|
3540
3540
|
}
|
|
3541
|
-
const ingest$
|
|
3541
|
+
const ingest$4 = function PromptTemplateDataProviderTypeConfigCollectionRepresentationIngest(input, path, luvio, store, timestamp) {
|
|
3542
3542
|
if (process.env.NODE_ENV !== 'production') {
|
|
3543
|
-
const validateError = validate$
|
|
3543
|
+
const validateError = validate$i(input);
|
|
3544
3544
|
if (validateError !== null) {
|
|
3545
3545
|
throw validateError;
|
|
3546
3546
|
}
|
|
3547
3547
|
}
|
|
3548
3548
|
const key = path.fullPath;
|
|
3549
|
-
const ttlToUse = TTL$
|
|
3550
|
-
ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize$
|
|
3549
|
+
const ttlToUse = TTL$4;
|
|
3550
|
+
ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize$4, "EinsteinLLM", VERSION$g, RepresentationType$4, equals$g);
|
|
3551
3551
|
return createLink(key);
|
|
3552
3552
|
};
|
|
3553
|
-
function getTypeCacheKeys$
|
|
3553
|
+
function getTypeCacheKeys$4(rootKeySet, luvio, input, fullPathFactory) {
|
|
3554
3554
|
// root cache key (uses fullPathFactory if keyBuilderFromType isn't defined)
|
|
3555
3555
|
const rootKey = fullPathFactory();
|
|
3556
3556
|
rootKeySet.set(rootKey, {
|
|
3557
3557
|
namespace: keyPrefix,
|
|
3558
|
-
representationName: RepresentationType$
|
|
3558
|
+
representationName: RepresentationType$4,
|
|
3559
3559
|
mergeable: false
|
|
3560
3560
|
});
|
|
3561
3561
|
}
|
|
3562
3562
|
|
|
3563
|
-
function select$
|
|
3564
|
-
return select$
|
|
3563
|
+
function select$q(luvio, params) {
|
|
3564
|
+
return select$r();
|
|
3565
3565
|
}
|
|
3566
|
-
function keyBuilder$
|
|
3566
|
+
function keyBuilder$d(luvio, params) {
|
|
3567
3567
|
return keyPrefix + '::PromptTemplateDataProviderTypeConfigCollectionRepresentation:(' + 'templateType:' + params.urlParams.templateType + ')';
|
|
3568
3568
|
}
|
|
3569
|
-
function getResponseCacheKeys$
|
|
3570
|
-
getTypeCacheKeys$
|
|
3569
|
+
function getResponseCacheKeys$a(storeKeyMap, luvio, resourceParams, response) {
|
|
3570
|
+
getTypeCacheKeys$4(storeKeyMap, luvio, response, () => keyBuilder$d(luvio, resourceParams));
|
|
3571
3571
|
}
|
|
3572
|
-
function ingestSuccess$
|
|
3572
|
+
function ingestSuccess$a(luvio, resourceParams, response, snapshotRefresh) {
|
|
3573
3573
|
const { body } = response;
|
|
3574
|
-
const key = keyBuilder$
|
|
3575
|
-
luvio.storeIngest(key, ingest$
|
|
3574
|
+
const key = keyBuilder$d(luvio, resourceParams);
|
|
3575
|
+
luvio.storeIngest(key, ingest$4, body);
|
|
3576
3576
|
const snapshot = luvio.storeLookup({
|
|
3577
3577
|
recordId: key,
|
|
3578
|
-
node: select$
|
|
3578
|
+
node: select$q(),
|
|
3579
3579
|
variables: {},
|
|
3580
3580
|
}, snapshotRefresh);
|
|
3581
3581
|
if (process.env.NODE_ENV !== 'production') {
|
|
@@ -3587,21 +3587,21 @@ function ingestSuccess$9(luvio, resourceParams, response, snapshotRefresh) {
|
|
|
3587
3587
|
return snapshot;
|
|
3588
3588
|
}
|
|
3589
3589
|
function ingestError$5(luvio, params, error, snapshotRefresh) {
|
|
3590
|
-
const key = keyBuilder$
|
|
3590
|
+
const key = keyBuilder$d(luvio, params);
|
|
3591
3591
|
const errorSnapshot = luvio.errorSnapshot(error, snapshotRefresh);
|
|
3592
3592
|
const storeMetadataParams = {
|
|
3593
|
-
ttl: TTL$
|
|
3593
|
+
ttl: TTL$4,
|
|
3594
3594
|
namespace: keyPrefix,
|
|
3595
|
-
version: VERSION$
|
|
3596
|
-
representationName: RepresentationType$
|
|
3595
|
+
version: VERSION$g,
|
|
3596
|
+
representationName: RepresentationType$4
|
|
3597
3597
|
};
|
|
3598
3598
|
luvio.storeIngestError(key, errorSnapshot, storeMetadataParams);
|
|
3599
3599
|
return errorSnapshot;
|
|
3600
3600
|
}
|
|
3601
|
-
function createResourceRequest$
|
|
3601
|
+
function createResourceRequest$a(config) {
|
|
3602
3602
|
const headers = {};
|
|
3603
3603
|
return {
|
|
3604
|
-
baseUri: '/services/data/
|
|
3604
|
+
baseUri: '/services/data/v67.0',
|
|
3605
3605
|
basePath: '/einstein/prompt-templates/data-provider-types/' + config.urlParams.templateType + '',
|
|
3606
3606
|
method: 'get',
|
|
3607
3607
|
body: null,
|
|
@@ -3612,60 +3612,60 @@ function createResourceRequest$9(config) {
|
|
|
3612
3612
|
};
|
|
3613
3613
|
}
|
|
3614
3614
|
|
|
3615
|
-
const adapterName$
|
|
3615
|
+
const adapterName$a = 'getDataProviderTypeConfigs';
|
|
3616
3616
|
const getDataProviderTypeConfigs_ConfigPropertyMetadata = [
|
|
3617
3617
|
generateParamConfigMetadata('templateType', true, 0 /* UrlParameter */, 0 /* String */),
|
|
3618
3618
|
];
|
|
3619
|
-
const getDataProviderTypeConfigs_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$
|
|
3620
|
-
const createResourceParams$
|
|
3621
|
-
function keyBuilder$
|
|
3622
|
-
const resourceParams = createResourceParams$
|
|
3623
|
-
return keyBuilder$
|
|
3619
|
+
const getDataProviderTypeConfigs_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$a, getDataProviderTypeConfigs_ConfigPropertyMetadata);
|
|
3620
|
+
const createResourceParams$a = /*#__PURE__*/ createResourceParams$j(getDataProviderTypeConfigs_ConfigPropertyMetadata);
|
|
3621
|
+
function keyBuilder$c(luvio, config) {
|
|
3622
|
+
const resourceParams = createResourceParams$a(config);
|
|
3623
|
+
return keyBuilder$d(luvio, resourceParams);
|
|
3624
3624
|
}
|
|
3625
|
-
function typeCheckConfig$
|
|
3625
|
+
function typeCheckConfig$a(untrustedConfig) {
|
|
3626
3626
|
const config = {};
|
|
3627
|
-
typeCheckConfig$
|
|
3627
|
+
typeCheckConfig$j(untrustedConfig, config, getDataProviderTypeConfigs_ConfigPropertyMetadata);
|
|
3628
3628
|
return config;
|
|
3629
3629
|
}
|
|
3630
|
-
function validateAdapterConfig$
|
|
3630
|
+
function validateAdapterConfig$a(untrustedConfig, configPropertyNames) {
|
|
3631
3631
|
if (!untrustedIsObject(untrustedConfig)) {
|
|
3632
3632
|
return null;
|
|
3633
3633
|
}
|
|
3634
3634
|
if (process.env.NODE_ENV !== 'production') {
|
|
3635
3635
|
validateConfig(untrustedConfig, configPropertyNames);
|
|
3636
3636
|
}
|
|
3637
|
-
const config = typeCheckConfig$
|
|
3637
|
+
const config = typeCheckConfig$a(untrustedConfig);
|
|
3638
3638
|
if (!areRequiredParametersPresent(config, configPropertyNames)) {
|
|
3639
3639
|
return null;
|
|
3640
3640
|
}
|
|
3641
3641
|
return config;
|
|
3642
3642
|
}
|
|
3643
3643
|
function adapterFragment$5(luvio, config) {
|
|
3644
|
-
createResourceParams$
|
|
3645
|
-
return select$
|
|
3644
|
+
createResourceParams$a(config);
|
|
3645
|
+
return select$q();
|
|
3646
3646
|
}
|
|
3647
3647
|
function onFetchResponseSuccess$5(luvio, config, resourceParams, response) {
|
|
3648
|
-
const snapshot = ingestSuccess$
|
|
3648
|
+
const snapshot = ingestSuccess$a(luvio, resourceParams, response, {
|
|
3649
3649
|
config,
|
|
3650
|
-
resolve: () => buildNetworkSnapshot$
|
|
3650
|
+
resolve: () => buildNetworkSnapshot$a(luvio, config, snapshotRefreshOptions)
|
|
3651
3651
|
});
|
|
3652
3652
|
return luvio.storeBroadcast().then(() => snapshot);
|
|
3653
3653
|
}
|
|
3654
3654
|
function onFetchResponseError$5(luvio, config, resourceParams, response) {
|
|
3655
3655
|
const snapshot = ingestError$5(luvio, resourceParams, response, {
|
|
3656
3656
|
config,
|
|
3657
|
-
resolve: () => buildNetworkSnapshot$
|
|
3657
|
+
resolve: () => buildNetworkSnapshot$a(luvio, config, snapshotRefreshOptions)
|
|
3658
3658
|
});
|
|
3659
3659
|
return luvio.storeBroadcast().then(() => snapshot);
|
|
3660
3660
|
}
|
|
3661
|
-
function buildNetworkSnapshot$
|
|
3662
|
-
const resourceParams = createResourceParams$
|
|
3663
|
-
const request = createResourceRequest$
|
|
3661
|
+
function buildNetworkSnapshot$a(luvio, config, options) {
|
|
3662
|
+
const resourceParams = createResourceParams$a(config);
|
|
3663
|
+
const request = createResourceRequest$a(resourceParams);
|
|
3664
3664
|
return luvio.dispatchResourceRequest(request, options)
|
|
3665
3665
|
.then((response) => {
|
|
3666
3666
|
return luvio.handleSuccessResponse(() => onFetchResponseSuccess$5(luvio, config, resourceParams, response), () => {
|
|
3667
3667
|
const cache = new StoreKeyMap();
|
|
3668
|
-
getResponseCacheKeys$
|
|
3668
|
+
getResponseCacheKeys$a(cache, luvio, resourceParams, response.body);
|
|
3669
3669
|
return cache;
|
|
3670
3670
|
});
|
|
3671
3671
|
}, (response) => {
|
|
@@ -3673,23 +3673,23 @@ function buildNetworkSnapshot$9(luvio, config, options) {
|
|
|
3673
3673
|
});
|
|
3674
3674
|
}
|
|
3675
3675
|
function buildNetworkSnapshotCachePolicy$5(context, coercedAdapterRequestContext) {
|
|
3676
|
-
return buildNetworkSnapshotCachePolicy$b(context, coercedAdapterRequestContext, buildNetworkSnapshot$
|
|
3676
|
+
return buildNetworkSnapshotCachePolicy$b(context, coercedAdapterRequestContext, buildNetworkSnapshot$a, undefined, false);
|
|
3677
3677
|
}
|
|
3678
3678
|
function buildCachedSnapshotCachePolicy$5(context, storeLookup) {
|
|
3679
3679
|
const { luvio, config } = context;
|
|
3680
3680
|
const selector = {
|
|
3681
|
-
recordId: keyBuilder$
|
|
3681
|
+
recordId: keyBuilder$c(luvio, config),
|
|
3682
3682
|
node: adapterFragment$5(luvio, config),
|
|
3683
3683
|
variables: {},
|
|
3684
3684
|
};
|
|
3685
3685
|
const cacheSnapshot = storeLookup(selector, {
|
|
3686
3686
|
config,
|
|
3687
|
-
resolve: () => buildNetworkSnapshot$
|
|
3687
|
+
resolve: () => buildNetworkSnapshot$a(luvio, config, snapshotRefreshOptions)
|
|
3688
3688
|
});
|
|
3689
3689
|
return cacheSnapshot;
|
|
3690
3690
|
}
|
|
3691
3691
|
const getDataProviderTypeConfigsAdapterFactory = (luvio) => function EinsteinLLM__getDataProviderTypeConfigs(untrustedConfig, requestContext) {
|
|
3692
|
-
const config = validateAdapterConfig$
|
|
3692
|
+
const config = validateAdapterConfig$a(untrustedConfig, getDataProviderTypeConfigs_ConfigPropertyNames);
|
|
3693
3693
|
// Invalid or incomplete config
|
|
3694
3694
|
if (config === null) {
|
|
3695
3695
|
return null;
|
|
@@ -3698,22 +3698,22 @@ const getDataProviderTypeConfigsAdapterFactory = (luvio) => function EinsteinLLM
|
|
|
3698
3698
|
buildCachedSnapshotCachePolicy$5, buildNetworkSnapshotCachePolicy$5);
|
|
3699
3699
|
};
|
|
3700
3700
|
|
|
3701
|
-
function select$
|
|
3702
|
-
return select$
|
|
3701
|
+
function select$p(luvio, params) {
|
|
3702
|
+
return select$B();
|
|
3703
3703
|
}
|
|
3704
|
-
function keyBuilder$
|
|
3704
|
+
function keyBuilder$b(luvio, params) {
|
|
3705
3705
|
return keyPrefix + '::EinsteinPromptRecordRepresentation:(' + 'versionId:' + params.queryParams.versionId + ',' + 'promptTemplateDevName:' + params.urlParams.promptTemplateDevName + ')';
|
|
3706
3706
|
}
|
|
3707
|
-
function getResponseCacheKeys$
|
|
3708
|
-
getTypeCacheKeys$
|
|
3707
|
+
function getResponseCacheKeys$9(storeKeyMap, luvio, resourceParams, response) {
|
|
3708
|
+
getTypeCacheKeys$9(storeKeyMap, luvio, response, () => keyBuilder$b(luvio, resourceParams));
|
|
3709
3709
|
}
|
|
3710
|
-
function ingestSuccess$
|
|
3710
|
+
function ingestSuccess$9(luvio, resourceParams, response, snapshotRefresh) {
|
|
3711
3711
|
const { body } = response;
|
|
3712
|
-
const key = keyBuilder$
|
|
3713
|
-
luvio.storeIngest(key, ingest$
|
|
3712
|
+
const key = keyBuilder$b(luvio, resourceParams);
|
|
3713
|
+
luvio.storeIngest(key, ingest$9, body);
|
|
3714
3714
|
const snapshot = luvio.storeLookup({
|
|
3715
3715
|
recordId: key,
|
|
3716
|
-
node: select$
|
|
3716
|
+
node: select$p(),
|
|
3717
3717
|
variables: {},
|
|
3718
3718
|
}, snapshotRefresh);
|
|
3719
3719
|
if (process.env.NODE_ENV !== 'production') {
|
|
@@ -3725,21 +3725,21 @@ function ingestSuccess$8(luvio, resourceParams, response, snapshotRefresh) {
|
|
|
3725
3725
|
return snapshot;
|
|
3726
3726
|
}
|
|
3727
3727
|
function ingestError$4(luvio, params, error, snapshotRefresh) {
|
|
3728
|
-
const key = keyBuilder$
|
|
3728
|
+
const key = keyBuilder$b(luvio, params);
|
|
3729
3729
|
const errorSnapshot = luvio.errorSnapshot(error, snapshotRefresh);
|
|
3730
3730
|
const storeMetadataParams = {
|
|
3731
|
-
ttl: TTL$
|
|
3731
|
+
ttl: TTL$9,
|
|
3732
3732
|
namespace: keyPrefix,
|
|
3733
|
-
version: VERSION$
|
|
3734
|
-
representationName: RepresentationType$
|
|
3733
|
+
version: VERSION$l,
|
|
3734
|
+
representationName: RepresentationType$9
|
|
3735
3735
|
};
|
|
3736
3736
|
luvio.storeIngestError(key, errorSnapshot, storeMetadataParams);
|
|
3737
3737
|
return errorSnapshot;
|
|
3738
3738
|
}
|
|
3739
|
-
function createResourceRequest$
|
|
3739
|
+
function createResourceRequest$9(config) {
|
|
3740
3740
|
const headers = {};
|
|
3741
3741
|
return {
|
|
3742
|
-
baseUri: '/services/data/
|
|
3742
|
+
baseUri: '/services/data/v67.0',
|
|
3743
3743
|
basePath: '/einstein/prompt-templates/' + config.urlParams.promptTemplateDevName + '',
|
|
3744
3744
|
method: 'get',
|
|
3745
3745
|
body: null,
|
|
@@ -3750,61 +3750,61 @@ function createResourceRequest$8(config) {
|
|
|
3750
3750
|
};
|
|
3751
3751
|
}
|
|
3752
3752
|
|
|
3753
|
-
const adapterName$
|
|
3753
|
+
const adapterName$9 = 'getPromptTemplate';
|
|
3754
3754
|
const getPromptTemplate_ConfigPropertyMetadata = [
|
|
3755
3755
|
generateParamConfigMetadata('promptTemplateDevName', true, 0 /* UrlParameter */, 0 /* String */),
|
|
3756
3756
|
generateParamConfigMetadata('versionId', false, 1 /* QueryParameter */, 0 /* String */),
|
|
3757
3757
|
];
|
|
3758
|
-
const getPromptTemplate_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$
|
|
3759
|
-
const createResourceParams$
|
|
3760
|
-
function keyBuilder$
|
|
3761
|
-
const resourceParams = createResourceParams$
|
|
3762
|
-
return keyBuilder$
|
|
3758
|
+
const getPromptTemplate_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$9, getPromptTemplate_ConfigPropertyMetadata);
|
|
3759
|
+
const createResourceParams$9 = /*#__PURE__*/ createResourceParams$j(getPromptTemplate_ConfigPropertyMetadata);
|
|
3760
|
+
function keyBuilder$a(luvio, config) {
|
|
3761
|
+
const resourceParams = createResourceParams$9(config);
|
|
3762
|
+
return keyBuilder$b(luvio, resourceParams);
|
|
3763
3763
|
}
|
|
3764
|
-
function typeCheckConfig$
|
|
3764
|
+
function typeCheckConfig$9(untrustedConfig) {
|
|
3765
3765
|
const config = {};
|
|
3766
|
-
typeCheckConfig$
|
|
3766
|
+
typeCheckConfig$j(untrustedConfig, config, getPromptTemplate_ConfigPropertyMetadata);
|
|
3767
3767
|
return config;
|
|
3768
3768
|
}
|
|
3769
|
-
function validateAdapterConfig$
|
|
3769
|
+
function validateAdapterConfig$9(untrustedConfig, configPropertyNames) {
|
|
3770
3770
|
if (!untrustedIsObject(untrustedConfig)) {
|
|
3771
3771
|
return null;
|
|
3772
3772
|
}
|
|
3773
3773
|
if (process.env.NODE_ENV !== 'production') {
|
|
3774
3774
|
validateConfig(untrustedConfig, configPropertyNames);
|
|
3775
3775
|
}
|
|
3776
|
-
const config = typeCheckConfig$
|
|
3776
|
+
const config = typeCheckConfig$9(untrustedConfig);
|
|
3777
3777
|
if (!areRequiredParametersPresent(config, configPropertyNames)) {
|
|
3778
3778
|
return null;
|
|
3779
3779
|
}
|
|
3780
3780
|
return config;
|
|
3781
3781
|
}
|
|
3782
3782
|
function adapterFragment$4(luvio, config) {
|
|
3783
|
-
createResourceParams$
|
|
3784
|
-
return select$
|
|
3783
|
+
createResourceParams$9(config);
|
|
3784
|
+
return select$p();
|
|
3785
3785
|
}
|
|
3786
3786
|
function onFetchResponseSuccess$4(luvio, config, resourceParams, response) {
|
|
3787
|
-
const snapshot = ingestSuccess$
|
|
3787
|
+
const snapshot = ingestSuccess$9(luvio, resourceParams, response, {
|
|
3788
3788
|
config,
|
|
3789
|
-
resolve: () => buildNetworkSnapshot$
|
|
3789
|
+
resolve: () => buildNetworkSnapshot$9(luvio, config, snapshotRefreshOptions)
|
|
3790
3790
|
});
|
|
3791
3791
|
return luvio.storeBroadcast().then(() => snapshot);
|
|
3792
3792
|
}
|
|
3793
3793
|
function onFetchResponseError$4(luvio, config, resourceParams, response) {
|
|
3794
3794
|
const snapshot = ingestError$4(luvio, resourceParams, response, {
|
|
3795
3795
|
config,
|
|
3796
|
-
resolve: () => buildNetworkSnapshot$
|
|
3796
|
+
resolve: () => buildNetworkSnapshot$9(luvio, config, snapshotRefreshOptions)
|
|
3797
3797
|
});
|
|
3798
3798
|
return luvio.storeBroadcast().then(() => snapshot);
|
|
3799
3799
|
}
|
|
3800
|
-
function buildNetworkSnapshot$
|
|
3801
|
-
const resourceParams = createResourceParams$
|
|
3802
|
-
const request = createResourceRequest$
|
|
3800
|
+
function buildNetworkSnapshot$9(luvio, config, options) {
|
|
3801
|
+
const resourceParams = createResourceParams$9(config);
|
|
3802
|
+
const request = createResourceRequest$9(resourceParams);
|
|
3803
3803
|
return luvio.dispatchResourceRequest(request, options)
|
|
3804
3804
|
.then((response) => {
|
|
3805
3805
|
return luvio.handleSuccessResponse(() => onFetchResponseSuccess$4(luvio, config, resourceParams, response), () => {
|
|
3806
3806
|
const cache = new StoreKeyMap();
|
|
3807
|
-
getResponseCacheKeys$
|
|
3807
|
+
getResponseCacheKeys$9(cache, luvio, resourceParams, response.body);
|
|
3808
3808
|
return cache;
|
|
3809
3809
|
});
|
|
3810
3810
|
}, (response) => {
|
|
@@ -3812,23 +3812,23 @@ function buildNetworkSnapshot$8(luvio, config, options) {
|
|
|
3812
3812
|
});
|
|
3813
3813
|
}
|
|
3814
3814
|
function buildNetworkSnapshotCachePolicy$4(context, coercedAdapterRequestContext) {
|
|
3815
|
-
return buildNetworkSnapshotCachePolicy$b(context, coercedAdapterRequestContext, buildNetworkSnapshot$
|
|
3815
|
+
return buildNetworkSnapshotCachePolicy$b(context, coercedAdapterRequestContext, buildNetworkSnapshot$9, undefined, false);
|
|
3816
3816
|
}
|
|
3817
3817
|
function buildCachedSnapshotCachePolicy$4(context, storeLookup) {
|
|
3818
3818
|
const { luvio, config } = context;
|
|
3819
3819
|
const selector = {
|
|
3820
|
-
recordId: keyBuilder$
|
|
3820
|
+
recordId: keyBuilder$a(luvio, config),
|
|
3821
3821
|
node: adapterFragment$4(luvio, config),
|
|
3822
3822
|
variables: {},
|
|
3823
3823
|
};
|
|
3824
3824
|
const cacheSnapshot = storeLookup(selector, {
|
|
3825
3825
|
config,
|
|
3826
|
-
resolve: () => buildNetworkSnapshot$
|
|
3826
|
+
resolve: () => buildNetworkSnapshot$9(luvio, config, snapshotRefreshOptions)
|
|
3827
3827
|
});
|
|
3828
3828
|
return cacheSnapshot;
|
|
3829
3829
|
}
|
|
3830
3830
|
const getPromptTemplateAdapterFactory = (luvio) => function EinsteinLLM__getPromptTemplate(untrustedConfig, requestContext) {
|
|
3831
|
-
const config = validateAdapterConfig$
|
|
3831
|
+
const config = validateAdapterConfig$9(untrustedConfig, getPromptTemplate_ConfigPropertyNames);
|
|
3832
3832
|
// Invalid or incomplete config
|
|
3833
3833
|
if (config === null) {
|
|
3834
3834
|
return null;
|
|
@@ -3837,19 +3837,343 @@ const getPromptTemplateAdapterFactory = (luvio) => function EinsteinLLM__getProm
|
|
|
3837
3837
|
buildCachedSnapshotCachePolicy$4, buildNetworkSnapshotCachePolicy$4);
|
|
3838
3838
|
};
|
|
3839
3839
|
|
|
3840
|
+
const TTL$3 = 100;
|
|
3841
|
+
const VERSION$f = "ecde90304d12947c5205ddc7c99d747b";
|
|
3842
|
+
function validate$h(obj, path = 'EinsteinPromptTemplateStatusRepresentation') {
|
|
3843
|
+
const v_error = (() => {
|
|
3844
|
+
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
3845
|
+
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
3846
|
+
}
|
|
3847
|
+
if (obj.additionalData !== undefined) {
|
|
3848
|
+
const obj_additionalData = obj.additionalData;
|
|
3849
|
+
const path_additionalData = path + '.additionalData';
|
|
3850
|
+
const referencepath_additionalDataValidationError = validate$t(obj_additionalData, path_additionalData);
|
|
3851
|
+
if (referencepath_additionalDataValidationError !== null) {
|
|
3852
|
+
let message = 'Object doesn\'t match WrappedMap (at "' + path_additionalData + '")\n';
|
|
3853
|
+
message += referencepath_additionalDataValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
3854
|
+
return new TypeError(message);
|
|
3855
|
+
}
|
|
3856
|
+
}
|
|
3857
|
+
const obj_errorMessages = obj.errorMessages;
|
|
3858
|
+
const path_errorMessages = path + '.errorMessages';
|
|
3859
|
+
if (!ArrayIsArray(obj_errorMessages)) {
|
|
3860
|
+
return new TypeError('Expected "array" but received "' + typeof obj_errorMessages + '" (at "' + path_errorMessages + '")');
|
|
3861
|
+
}
|
|
3862
|
+
for (let i = 0; i < obj_errorMessages.length; i++) {
|
|
3863
|
+
const obj_errorMessages_item = obj_errorMessages[i];
|
|
3864
|
+
const path_errorMessages_item = path_errorMessages + '[' + i + ']';
|
|
3865
|
+
if (typeof obj_errorMessages_item !== 'string') {
|
|
3866
|
+
return new TypeError('Expected "string" but received "' + typeof obj_errorMessages_item + '" (at "' + path_errorMessages_item + '")');
|
|
3867
|
+
}
|
|
3868
|
+
}
|
|
3869
|
+
const obj_hasWarning = obj.hasWarning;
|
|
3870
|
+
const path_hasWarning = path + '.hasWarning';
|
|
3871
|
+
if (typeof obj_hasWarning !== 'boolean') {
|
|
3872
|
+
return new TypeError('Expected "boolean" but received "' + typeof obj_hasWarning + '" (at "' + path_hasWarning + '")');
|
|
3873
|
+
}
|
|
3874
|
+
const obj_isSuccessful = obj.isSuccessful;
|
|
3875
|
+
const path_isSuccessful = path + '.isSuccessful';
|
|
3876
|
+
if (typeof obj_isSuccessful !== 'boolean') {
|
|
3877
|
+
return new TypeError('Expected "boolean" but received "' + typeof obj_isSuccessful + '" (at "' + path_isSuccessful + '")');
|
|
3878
|
+
}
|
|
3879
|
+
if (obj.statusCode !== undefined) {
|
|
3880
|
+
const obj_statusCode = obj.statusCode;
|
|
3881
|
+
const path_statusCode = path + '.statusCode';
|
|
3882
|
+
if (typeof obj_statusCode !== 'string') {
|
|
3883
|
+
return new TypeError('Expected "string" but received "' + typeof obj_statusCode + '" (at "' + path_statusCode + '")');
|
|
3884
|
+
}
|
|
3885
|
+
}
|
|
3886
|
+
const obj_templateId = obj.templateId;
|
|
3887
|
+
const path_templateId = path + '.templateId';
|
|
3888
|
+
if (typeof obj_templateId !== 'string') {
|
|
3889
|
+
return new TypeError('Expected "string" but received "' + typeof obj_templateId + '" (at "' + path_templateId + '")');
|
|
3890
|
+
}
|
|
3891
|
+
if (obj.templateType !== undefined) {
|
|
3892
|
+
const obj_templateType = obj.templateType;
|
|
3893
|
+
const path_templateType = path + '.templateType';
|
|
3894
|
+
if (typeof obj_templateType !== 'string') {
|
|
3895
|
+
return new TypeError('Expected "string" but received "' + typeof obj_templateType + '" (at "' + path_templateType + '")');
|
|
3896
|
+
}
|
|
3897
|
+
}
|
|
3898
|
+
const obj_warningMessages = obj.warningMessages;
|
|
3899
|
+
const path_warningMessages = path + '.warningMessages';
|
|
3900
|
+
if (!ArrayIsArray(obj_warningMessages)) {
|
|
3901
|
+
return new TypeError('Expected "array" but received "' + typeof obj_warningMessages + '" (at "' + path_warningMessages + '")');
|
|
3902
|
+
}
|
|
3903
|
+
for (let i = 0; i < obj_warningMessages.length; i++) {
|
|
3904
|
+
const obj_warningMessages_item = obj_warningMessages[i];
|
|
3905
|
+
const path_warningMessages_item = path_warningMessages + '[' + i + ']';
|
|
3906
|
+
if (typeof obj_warningMessages_item !== 'string') {
|
|
3907
|
+
return new TypeError('Expected "string" but received "' + typeof obj_warningMessages_item + '" (at "' + path_warningMessages_item + '")');
|
|
3908
|
+
}
|
|
3909
|
+
}
|
|
3910
|
+
})();
|
|
3911
|
+
return v_error === undefined ? null : v_error;
|
|
3912
|
+
}
|
|
3913
|
+
const RepresentationType$3 = 'EinsteinPromptTemplateStatusRepresentation';
|
|
3914
|
+
function keyBuilder$9(luvio, config) {
|
|
3915
|
+
return keyPrefix + '::' + RepresentationType$3 + ':' + config.templateId;
|
|
3916
|
+
}
|
|
3917
|
+
function keyBuilderFromType$1(luvio, object) {
|
|
3918
|
+
const keyParams = {
|
|
3919
|
+
templateId: object.templateId
|
|
3920
|
+
};
|
|
3921
|
+
return keyBuilder$9(luvio, keyParams);
|
|
3922
|
+
}
|
|
3923
|
+
function normalize$3(input, existing, path, luvio, store, timestamp) {
|
|
3924
|
+
return input;
|
|
3925
|
+
}
|
|
3926
|
+
const select$o = function EinsteinPromptTemplateStatusRepresentationSelect() {
|
|
3927
|
+
const { selections: WrappedMap__selections, opaque: WrappedMap__opaque, } = select$E();
|
|
3928
|
+
return {
|
|
3929
|
+
kind: 'Fragment',
|
|
3930
|
+
version: VERSION$f,
|
|
3931
|
+
private: [],
|
|
3932
|
+
selections: [
|
|
3933
|
+
{
|
|
3934
|
+
name: 'additionalData',
|
|
3935
|
+
kind: 'Object',
|
|
3936
|
+
selections: WrappedMap__selections,
|
|
3937
|
+
required: false
|
|
3938
|
+
},
|
|
3939
|
+
{
|
|
3940
|
+
name: 'errorMessages',
|
|
3941
|
+
kind: 'Scalar',
|
|
3942
|
+
plural: true
|
|
3943
|
+
},
|
|
3944
|
+
{
|
|
3945
|
+
name: 'hasWarning',
|
|
3946
|
+
kind: 'Scalar'
|
|
3947
|
+
},
|
|
3948
|
+
{
|
|
3949
|
+
name: 'isSuccessful',
|
|
3950
|
+
kind: 'Scalar'
|
|
3951
|
+
},
|
|
3952
|
+
{
|
|
3953
|
+
name: 'statusCode',
|
|
3954
|
+
kind: 'Scalar',
|
|
3955
|
+
required: false
|
|
3956
|
+
},
|
|
3957
|
+
{
|
|
3958
|
+
name: 'templateId',
|
|
3959
|
+
kind: 'Scalar'
|
|
3960
|
+
},
|
|
3961
|
+
{
|
|
3962
|
+
name: 'templateType',
|
|
3963
|
+
kind: 'Scalar',
|
|
3964
|
+
required: false
|
|
3965
|
+
},
|
|
3966
|
+
{
|
|
3967
|
+
name: 'warningMessages',
|
|
3968
|
+
kind: 'Scalar',
|
|
3969
|
+
plural: true
|
|
3970
|
+
}
|
|
3971
|
+
]
|
|
3972
|
+
};
|
|
3973
|
+
};
|
|
3974
|
+
function equals$f(existing, incoming) {
|
|
3975
|
+
const existing_hasWarning = existing.hasWarning;
|
|
3976
|
+
const incoming_hasWarning = incoming.hasWarning;
|
|
3977
|
+
if (!(existing_hasWarning === incoming_hasWarning)) {
|
|
3978
|
+
return false;
|
|
3979
|
+
}
|
|
3980
|
+
const existing_isSuccessful = existing.isSuccessful;
|
|
3981
|
+
const incoming_isSuccessful = incoming.isSuccessful;
|
|
3982
|
+
if (!(existing_isSuccessful === incoming_isSuccessful)) {
|
|
3983
|
+
return false;
|
|
3984
|
+
}
|
|
3985
|
+
const existing_statusCode = existing.statusCode;
|
|
3986
|
+
const incoming_statusCode = incoming.statusCode;
|
|
3987
|
+
// if at least one of these optionals is defined
|
|
3988
|
+
if (existing_statusCode !== undefined || incoming_statusCode !== undefined) {
|
|
3989
|
+
// if one of these is not defined we know the other is defined and therefore
|
|
3990
|
+
// not equal
|
|
3991
|
+
if (existing_statusCode === undefined || incoming_statusCode === undefined) {
|
|
3992
|
+
return false;
|
|
3993
|
+
}
|
|
3994
|
+
if (!(existing_statusCode === incoming_statusCode)) {
|
|
3995
|
+
return false;
|
|
3996
|
+
}
|
|
3997
|
+
}
|
|
3998
|
+
const existing_templateId = existing.templateId;
|
|
3999
|
+
const incoming_templateId = incoming.templateId;
|
|
4000
|
+
if (!(existing_templateId === incoming_templateId)) {
|
|
4001
|
+
return false;
|
|
4002
|
+
}
|
|
4003
|
+
const existing_templateType = existing.templateType;
|
|
4004
|
+
const incoming_templateType = incoming.templateType;
|
|
4005
|
+
// if at least one of these optionals is defined
|
|
4006
|
+
if (existing_templateType !== undefined || incoming_templateType !== undefined) {
|
|
4007
|
+
// if one of these is not defined we know the other is defined and therefore
|
|
4008
|
+
// not equal
|
|
4009
|
+
if (existing_templateType === undefined || incoming_templateType === undefined) {
|
|
4010
|
+
return false;
|
|
4011
|
+
}
|
|
4012
|
+
if (!(existing_templateType === incoming_templateType)) {
|
|
4013
|
+
return false;
|
|
4014
|
+
}
|
|
4015
|
+
}
|
|
4016
|
+
const existing_additionalData = existing.additionalData;
|
|
4017
|
+
const incoming_additionalData = incoming.additionalData;
|
|
4018
|
+
// if at least one of these optionals is defined
|
|
4019
|
+
if (existing_additionalData !== undefined || incoming_additionalData !== undefined) {
|
|
4020
|
+
// if one of these is not defined we know the other is defined and therefore
|
|
4021
|
+
// not equal
|
|
4022
|
+
if (existing_additionalData === undefined || incoming_additionalData === undefined) {
|
|
4023
|
+
return false;
|
|
4024
|
+
}
|
|
4025
|
+
if (!(equals$n(existing_additionalData, incoming_additionalData))) {
|
|
4026
|
+
return false;
|
|
4027
|
+
}
|
|
4028
|
+
}
|
|
4029
|
+
const existing_errorMessages = existing.errorMessages;
|
|
4030
|
+
const incoming_errorMessages = incoming.errorMessages;
|
|
4031
|
+
const equals_errorMessages_items = equalsArray(existing_errorMessages, incoming_errorMessages, (existing_errorMessages_item, incoming_errorMessages_item) => {
|
|
4032
|
+
if (!(existing_errorMessages_item === incoming_errorMessages_item)) {
|
|
4033
|
+
return false;
|
|
4034
|
+
}
|
|
4035
|
+
});
|
|
4036
|
+
if (equals_errorMessages_items === false) {
|
|
4037
|
+
return false;
|
|
4038
|
+
}
|
|
4039
|
+
const existing_warningMessages = existing.warningMessages;
|
|
4040
|
+
const incoming_warningMessages = incoming.warningMessages;
|
|
4041
|
+
const equals_warningMessages_items = equalsArray(existing_warningMessages, incoming_warningMessages, (existing_warningMessages_item, incoming_warningMessages_item) => {
|
|
4042
|
+
if (!(existing_warningMessages_item === incoming_warningMessages_item)) {
|
|
4043
|
+
return false;
|
|
4044
|
+
}
|
|
4045
|
+
});
|
|
4046
|
+
if (equals_warningMessages_items === false) {
|
|
4047
|
+
return false;
|
|
4048
|
+
}
|
|
4049
|
+
return true;
|
|
4050
|
+
}
|
|
4051
|
+
const ingest$3 = function EinsteinPromptTemplateStatusRepresentationIngest(input, path, luvio, store, timestamp) {
|
|
4052
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
4053
|
+
const validateError = validate$h(input);
|
|
4054
|
+
if (validateError !== null) {
|
|
4055
|
+
throw validateError;
|
|
4056
|
+
}
|
|
4057
|
+
}
|
|
4058
|
+
const key = keyBuilderFromType$1(luvio, input);
|
|
4059
|
+
const ttlToUse = TTL$3;
|
|
4060
|
+
ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize$3, "EinsteinLLM", VERSION$f, RepresentationType$3, equals$f);
|
|
4061
|
+
return createLink(key);
|
|
4062
|
+
};
|
|
4063
|
+
function getTypeCacheKeys$3(rootKeySet, luvio, input, fullPathFactory) {
|
|
4064
|
+
// root cache key (uses fullPathFactory if keyBuilderFromType isn't defined)
|
|
4065
|
+
const rootKey = keyBuilderFromType$1(luvio, input);
|
|
4066
|
+
rootKeySet.set(rootKey, {
|
|
4067
|
+
namespace: keyPrefix,
|
|
4068
|
+
representationName: RepresentationType$3,
|
|
4069
|
+
mergeable: false
|
|
4070
|
+
});
|
|
4071
|
+
}
|
|
4072
|
+
|
|
4073
|
+
function select$n(luvio, params) {
|
|
4074
|
+
return select$o();
|
|
4075
|
+
}
|
|
4076
|
+
function getResponseCacheKeys$8(storeKeyMap, luvio, resourceParams, response) {
|
|
4077
|
+
getTypeCacheKeys$3(storeKeyMap, luvio, response);
|
|
4078
|
+
}
|
|
4079
|
+
function ingestSuccess$8(luvio, resourceParams, response) {
|
|
4080
|
+
const { body } = response;
|
|
4081
|
+
const key = keyBuilderFromType$1(luvio, body);
|
|
4082
|
+
luvio.storeIngest(key, ingest$3, body);
|
|
4083
|
+
const snapshot = luvio.storeLookup({
|
|
4084
|
+
recordId: key,
|
|
4085
|
+
node: select$n(),
|
|
4086
|
+
variables: {},
|
|
4087
|
+
});
|
|
4088
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
4089
|
+
if (snapshot.state !== 'Fulfilled') {
|
|
4090
|
+
throw new Error('Invalid network response. Expected resource response to result in Fulfilled snapshot');
|
|
4091
|
+
}
|
|
4092
|
+
}
|
|
4093
|
+
deepFreeze(snapshot.data);
|
|
4094
|
+
return snapshot;
|
|
4095
|
+
}
|
|
4096
|
+
function createResourceRequest$8(config) {
|
|
4097
|
+
const headers = {};
|
|
4098
|
+
return {
|
|
4099
|
+
baseUri: '/services/data/v67.0',
|
|
4100
|
+
basePath: '/einstein/prompt-templates/' + config.urlParams.promptTemplateDevName + '/status',
|
|
4101
|
+
method: 'put',
|
|
4102
|
+
body: null,
|
|
4103
|
+
urlParams: config.urlParams,
|
|
4104
|
+
queryParams: config.queryParams,
|
|
4105
|
+
headers,
|
|
4106
|
+
priority: 'normal',
|
|
4107
|
+
};
|
|
4108
|
+
}
|
|
4109
|
+
|
|
4110
|
+
const adapterName$8 = 'putEinsteinPromptTemplateStatus';
|
|
4111
|
+
const putEinsteinPromptTemplateStatus_ConfigPropertyMetadata = [
|
|
4112
|
+
generateParamConfigMetadata('promptTemplateDevName', true, 0 /* UrlParameter */, 0 /* String */),
|
|
4113
|
+
generateParamConfigMetadata('action', false, 1 /* QueryParameter */, 0 /* String */),
|
|
4114
|
+
];
|
|
4115
|
+
const putEinsteinPromptTemplateStatus_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$8, putEinsteinPromptTemplateStatus_ConfigPropertyMetadata);
|
|
4116
|
+
const createResourceParams$8 = /*#__PURE__*/ createResourceParams$j(putEinsteinPromptTemplateStatus_ConfigPropertyMetadata);
|
|
4117
|
+
function typeCheckConfig$8(untrustedConfig) {
|
|
4118
|
+
const config = {};
|
|
4119
|
+
typeCheckConfig$j(untrustedConfig, config, putEinsteinPromptTemplateStatus_ConfigPropertyMetadata);
|
|
4120
|
+
return config;
|
|
4121
|
+
}
|
|
4122
|
+
function validateAdapterConfig$8(untrustedConfig, configPropertyNames) {
|
|
4123
|
+
if (!untrustedIsObject(untrustedConfig)) {
|
|
4124
|
+
return null;
|
|
4125
|
+
}
|
|
4126
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
4127
|
+
validateConfig(untrustedConfig, configPropertyNames);
|
|
4128
|
+
}
|
|
4129
|
+
const config = typeCheckConfig$8(untrustedConfig);
|
|
4130
|
+
if (!areRequiredParametersPresent(config, configPropertyNames)) {
|
|
4131
|
+
return null;
|
|
4132
|
+
}
|
|
4133
|
+
return config;
|
|
4134
|
+
}
|
|
4135
|
+
function buildNetworkSnapshot$8(luvio, config, options) {
|
|
4136
|
+
const resourceParams = createResourceParams$8(config);
|
|
4137
|
+
const request = createResourceRequest$8(resourceParams);
|
|
4138
|
+
return luvio.dispatchResourceRequest(request, options)
|
|
4139
|
+
.then((response) => {
|
|
4140
|
+
return luvio.handleSuccessResponse(() => {
|
|
4141
|
+
const snapshot = ingestSuccess$8(luvio, resourceParams, response);
|
|
4142
|
+
return luvio.storeBroadcast().then(() => snapshot);
|
|
4143
|
+
}, () => {
|
|
4144
|
+
const cache = new StoreKeyMap();
|
|
4145
|
+
getResponseCacheKeys$8(cache, luvio, resourceParams, response.body);
|
|
4146
|
+
return cache;
|
|
4147
|
+
});
|
|
4148
|
+
}, (response) => {
|
|
4149
|
+
deepFreeze(response);
|
|
4150
|
+
throw response;
|
|
4151
|
+
});
|
|
4152
|
+
}
|
|
4153
|
+
const putEinsteinPromptTemplateStatusAdapterFactory = (luvio) => {
|
|
4154
|
+
return function putEinsteinPromptTemplateStatus(untrustedConfig) {
|
|
4155
|
+
const config = validateAdapterConfig$8(untrustedConfig, putEinsteinPromptTemplateStatus_ConfigPropertyNames);
|
|
4156
|
+
// Invalid or incomplete config
|
|
4157
|
+
if (config === null) {
|
|
4158
|
+
throw new Error('Invalid config for "putEinsteinPromptTemplateStatus"');
|
|
4159
|
+
}
|
|
4160
|
+
return buildNetworkSnapshot$8(luvio, config);
|
|
4161
|
+
};
|
|
4162
|
+
};
|
|
4163
|
+
|
|
3840
4164
|
function select$m(luvio, params) {
|
|
3841
|
-
return select$
|
|
4165
|
+
return select$B();
|
|
3842
4166
|
}
|
|
3843
4167
|
function keyBuilder$8(luvio, params) {
|
|
3844
4168
|
return keyPrefix + '::EinsteinPromptRecordRepresentation:(' + 'includingContent:' + params.queryParams.includingContent + ',' + 'includingVersionDetail:' + params.queryParams.includingVersionDetail + ',' + 'promptTemplateDevName:' + params.urlParams.promptTemplateDevName + ')';
|
|
3845
4169
|
}
|
|
3846
4170
|
function getResponseCacheKeys$7(storeKeyMap, luvio, resourceParams, response) {
|
|
3847
|
-
getTypeCacheKeys$
|
|
4171
|
+
getTypeCacheKeys$9(storeKeyMap, luvio, response, () => keyBuilder$8(luvio, resourceParams));
|
|
3848
4172
|
}
|
|
3849
4173
|
function ingestSuccess$7(luvio, resourceParams, response, snapshotRefresh) {
|
|
3850
4174
|
const { body } = response;
|
|
3851
4175
|
const key = keyBuilder$8(luvio, resourceParams);
|
|
3852
|
-
luvio.storeIngest(key, ingest$
|
|
4176
|
+
luvio.storeIngest(key, ingest$9, body);
|
|
3853
4177
|
const snapshot = luvio.storeLookup({
|
|
3854
4178
|
recordId: key,
|
|
3855
4179
|
node: select$m(),
|
|
@@ -3867,10 +4191,10 @@ function ingestError$3(luvio, params, error, snapshotRefresh) {
|
|
|
3867
4191
|
const key = keyBuilder$8(luvio, params);
|
|
3868
4192
|
const errorSnapshot = luvio.errorSnapshot(error, snapshotRefresh);
|
|
3869
4193
|
const storeMetadataParams = {
|
|
3870
|
-
ttl: TTL$
|
|
4194
|
+
ttl: TTL$9,
|
|
3871
4195
|
namespace: keyPrefix,
|
|
3872
|
-
version: VERSION$
|
|
3873
|
-
representationName: RepresentationType$
|
|
4196
|
+
version: VERSION$l,
|
|
4197
|
+
representationName: RepresentationType$9
|
|
3874
4198
|
};
|
|
3875
4199
|
luvio.storeIngestError(key, errorSnapshot, storeMetadataParams);
|
|
3876
4200
|
return errorSnapshot;
|
|
@@ -3878,7 +4202,7 @@ function ingestError$3(luvio, params, error, snapshotRefresh) {
|
|
|
3878
4202
|
function createResourceRequest$7(config) {
|
|
3879
4203
|
const headers = {};
|
|
3880
4204
|
return {
|
|
3881
|
-
baseUri: '/services/data/
|
|
4205
|
+
baseUri: '/services/data/v67.0',
|
|
3882
4206
|
basePath: '/einstein/prompt-templates/' + config.urlParams.promptTemplateDevName + '/versions',
|
|
3883
4207
|
method: 'get',
|
|
3884
4208
|
body: null,
|
|
@@ -3896,14 +4220,14 @@ const getPromptTemplateVersions_ConfigPropertyMetadata = [
|
|
|
3896
4220
|
generateParamConfigMetadata('includingVersionDetail', false, 1 /* QueryParameter */, 1 /* Boolean */),
|
|
3897
4221
|
];
|
|
3898
4222
|
const getPromptTemplateVersions_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$7, getPromptTemplateVersions_ConfigPropertyMetadata);
|
|
3899
|
-
const createResourceParams$7 = /*#__PURE__*/ createResourceParams$
|
|
4223
|
+
const createResourceParams$7 = /*#__PURE__*/ createResourceParams$j(getPromptTemplateVersions_ConfigPropertyMetadata);
|
|
3900
4224
|
function keyBuilder$7(luvio, config) {
|
|
3901
4225
|
const resourceParams = createResourceParams$7(config);
|
|
3902
4226
|
return keyBuilder$8(luvio, resourceParams);
|
|
3903
4227
|
}
|
|
3904
4228
|
function typeCheckConfig$7(untrustedConfig) {
|
|
3905
4229
|
const config = {};
|
|
3906
|
-
typeCheckConfig$
|
|
4230
|
+
typeCheckConfig$j(untrustedConfig, config, getPromptTemplateVersions_ConfigPropertyMetadata);
|
|
3907
4231
|
return config;
|
|
3908
4232
|
}
|
|
3909
4233
|
function validateAdapterConfig$7(untrustedConfig, configPropertyNames) {
|
|
@@ -3978,15 +4302,15 @@ const getPromptTemplateVersionsAdapterFactory = (luvio) => function EinsteinLLM_
|
|
|
3978
4302
|
};
|
|
3979
4303
|
|
|
3980
4304
|
function select$l(luvio, params) {
|
|
3981
|
-
return select$
|
|
4305
|
+
return select$y();
|
|
3982
4306
|
}
|
|
3983
4307
|
function getResponseCacheKeys$6(storeKeyMap, luvio, resourceParams, response) {
|
|
3984
|
-
getTypeCacheKeys$
|
|
4308
|
+
getTypeCacheKeys$7(storeKeyMap, luvio, response);
|
|
3985
4309
|
}
|
|
3986
4310
|
function ingestSuccess$6(luvio, resourceParams, response) {
|
|
3987
4311
|
const { body } = response;
|
|
3988
|
-
const key = keyBuilderFromType$
|
|
3989
|
-
luvio.storeIngest(key, ingest$
|
|
4312
|
+
const key = keyBuilderFromType$2(luvio, body);
|
|
4313
|
+
luvio.storeIngest(key, ingest$7, body);
|
|
3990
4314
|
const snapshot = luvio.storeLookup({
|
|
3991
4315
|
recordId: key,
|
|
3992
4316
|
node: select$l(),
|
|
@@ -4003,7 +4327,7 @@ function ingestSuccess$6(luvio, resourceParams, response) {
|
|
|
4003
4327
|
function createResourceRequest$6(config) {
|
|
4004
4328
|
const headers = {};
|
|
4005
4329
|
return {
|
|
4006
|
-
baseUri: '/services/data/
|
|
4330
|
+
baseUri: '/services/data/v67.0',
|
|
4007
4331
|
basePath: '/einstein/prompt-templates/' + config.urlParams.promptTemplateDevName + '/versions',
|
|
4008
4332
|
method: 'post',
|
|
4009
4333
|
body: config.body,
|
|
@@ -4023,10 +4347,10 @@ const createPromptTemplateVersion_ConfigPropertyMetadata = [
|
|
|
4023
4347
|
generateParamConfigMetadata('id', false, 2 /* Body */, 0 /* String */),
|
|
4024
4348
|
];
|
|
4025
4349
|
const createPromptTemplateVersion_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$6, createPromptTemplateVersion_ConfigPropertyMetadata);
|
|
4026
|
-
const createResourceParams$6 = /*#__PURE__*/ createResourceParams$
|
|
4350
|
+
const createResourceParams$6 = /*#__PURE__*/ createResourceParams$j(createPromptTemplateVersion_ConfigPropertyMetadata);
|
|
4027
4351
|
function typeCheckConfig$6(untrustedConfig) {
|
|
4028
4352
|
const config = {};
|
|
4029
|
-
typeCheckConfig$
|
|
4353
|
+
typeCheckConfig$j(untrustedConfig, config, createPromptTemplateVersion_ConfigPropertyMetadata);
|
|
4030
4354
|
const untrustedConfig_childRelationships = untrustedConfig.childRelationships;
|
|
4031
4355
|
if (untrustedIsObject(untrustedConfig_childRelationships)) {
|
|
4032
4356
|
const untrustedConfig_childRelationships_object = {};
|
|
@@ -4102,18 +4426,18 @@ const createPromptTemplateVersionAdapterFactory = (luvio) => {
|
|
|
4102
4426
|
};
|
|
4103
4427
|
|
|
4104
4428
|
function select$k(luvio, params) {
|
|
4105
|
-
return select$
|
|
4429
|
+
return select$B();
|
|
4106
4430
|
}
|
|
4107
4431
|
function keyBuilder$6(luvio, params) {
|
|
4108
4432
|
return keyPrefix + '::EinsteinPromptRecordRepresentation:(' + 'includingContent:' + params.queryParams.includingContent + ',' + 'includingVersionDetail:' + params.queryParams.includingVersionDetail + ',' + 'promptTemplateDevName:' + params.urlParams.promptTemplateDevName + ',' + 'versionId:' + params.urlParams.versionId + ')';
|
|
4109
4433
|
}
|
|
4110
4434
|
function getResponseCacheKeys$5(storeKeyMap, luvio, resourceParams, response) {
|
|
4111
|
-
getTypeCacheKeys$
|
|
4435
|
+
getTypeCacheKeys$9(storeKeyMap, luvio, response, () => keyBuilder$6(luvio, resourceParams));
|
|
4112
4436
|
}
|
|
4113
4437
|
function ingestSuccess$5(luvio, resourceParams, response, snapshotRefresh) {
|
|
4114
4438
|
const { body } = response;
|
|
4115
4439
|
const key = keyBuilder$6(luvio, resourceParams);
|
|
4116
|
-
luvio.storeIngest(key, ingest$
|
|
4440
|
+
luvio.storeIngest(key, ingest$9, body);
|
|
4117
4441
|
const snapshot = luvio.storeLookup({
|
|
4118
4442
|
recordId: key,
|
|
4119
4443
|
node: select$k(),
|
|
@@ -4131,10 +4455,10 @@ function ingestError$2(luvio, params, error, snapshotRefresh) {
|
|
|
4131
4455
|
const key = keyBuilder$6(luvio, params);
|
|
4132
4456
|
const errorSnapshot = luvio.errorSnapshot(error, snapshotRefresh);
|
|
4133
4457
|
const storeMetadataParams = {
|
|
4134
|
-
ttl: TTL$
|
|
4458
|
+
ttl: TTL$9,
|
|
4135
4459
|
namespace: keyPrefix,
|
|
4136
|
-
version: VERSION$
|
|
4137
|
-
representationName: RepresentationType$
|
|
4460
|
+
version: VERSION$l,
|
|
4461
|
+
representationName: RepresentationType$9
|
|
4138
4462
|
};
|
|
4139
4463
|
luvio.storeIngestError(key, errorSnapshot, storeMetadataParams);
|
|
4140
4464
|
return errorSnapshot;
|
|
@@ -4142,7 +4466,7 @@ function ingestError$2(luvio, params, error, snapshotRefresh) {
|
|
|
4142
4466
|
function createResourceRequest$5(config) {
|
|
4143
4467
|
const headers = {};
|
|
4144
4468
|
return {
|
|
4145
|
-
baseUri: '/services/data/
|
|
4469
|
+
baseUri: '/services/data/v67.0',
|
|
4146
4470
|
basePath: '/einstein/prompt-templates/' + config.urlParams.promptTemplateDevName + '/versions/' + config.urlParams.versionId + '',
|
|
4147
4471
|
method: 'get',
|
|
4148
4472
|
body: null,
|
|
@@ -4161,14 +4485,14 @@ const getPromptTemplateVersion_ConfigPropertyMetadata = [
|
|
|
4161
4485
|
generateParamConfigMetadata('includingVersionDetail', false, 1 /* QueryParameter */, 1 /* Boolean */),
|
|
4162
4486
|
];
|
|
4163
4487
|
const getPromptTemplateVersion_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$5, getPromptTemplateVersion_ConfigPropertyMetadata);
|
|
4164
|
-
const createResourceParams$5 = /*#__PURE__*/ createResourceParams$
|
|
4488
|
+
const createResourceParams$5 = /*#__PURE__*/ createResourceParams$j(getPromptTemplateVersion_ConfigPropertyMetadata);
|
|
4165
4489
|
function keyBuilder$5(luvio, config) {
|
|
4166
4490
|
const resourceParams = createResourceParams$5(config);
|
|
4167
4491
|
return keyBuilder$6(luvio, resourceParams);
|
|
4168
4492
|
}
|
|
4169
4493
|
function typeCheckConfig$5(untrustedConfig) {
|
|
4170
4494
|
const config = {};
|
|
4171
|
-
typeCheckConfig$
|
|
4495
|
+
typeCheckConfig$j(untrustedConfig, config, getPromptTemplateVersion_ConfigPropertyMetadata);
|
|
4172
4496
|
return config;
|
|
4173
4497
|
}
|
|
4174
4498
|
function validateAdapterConfig$5(untrustedConfig, configPropertyNames) {
|
|
@@ -4243,15 +4567,15 @@ const getPromptTemplateVersionAdapterFactory = (luvio) => function EinsteinLLM__
|
|
|
4243
4567
|
};
|
|
4244
4568
|
|
|
4245
4569
|
function select$j(luvio, params) {
|
|
4246
|
-
return select$
|
|
4570
|
+
return select$y();
|
|
4247
4571
|
}
|
|
4248
4572
|
function getResponseCacheKeys$4(storeKeyMap, luvio, resourceParams, response) {
|
|
4249
|
-
getTypeCacheKeys$
|
|
4573
|
+
getTypeCacheKeys$7(storeKeyMap, luvio, response);
|
|
4250
4574
|
}
|
|
4251
4575
|
function ingestSuccess$4(luvio, resourceParams, response) {
|
|
4252
4576
|
const { body } = response;
|
|
4253
|
-
const key = keyBuilderFromType$
|
|
4254
|
-
luvio.storeIngest(key, ingest$
|
|
4577
|
+
const key = keyBuilderFromType$2(luvio, body);
|
|
4578
|
+
luvio.storeIngest(key, ingest$7, body);
|
|
4255
4579
|
const snapshot = luvio.storeLookup({
|
|
4256
4580
|
recordId: key,
|
|
4257
4581
|
node: select$j(),
|
|
@@ -4268,7 +4592,7 @@ function ingestSuccess$4(luvio, resourceParams, response) {
|
|
|
4268
4592
|
function createResourceRequest$4(config) {
|
|
4269
4593
|
const headers = {};
|
|
4270
4594
|
return {
|
|
4271
|
-
baseUri: '/services/data/
|
|
4595
|
+
baseUri: '/services/data/v67.0',
|
|
4272
4596
|
basePath: '/einstein/prompt-templates/' + config.urlParams.promptTemplateDevName + '/versions/' + config.urlParams.versionId + '',
|
|
4273
4597
|
method: 'put',
|
|
4274
4598
|
body: config.body,
|
|
@@ -4289,10 +4613,10 @@ const updatePromptTemplateVersion_ConfigPropertyMetadata = [
|
|
|
4289
4613
|
generateParamConfigMetadata('id', false, 2 /* Body */, 0 /* String */),
|
|
4290
4614
|
];
|
|
4291
4615
|
const updatePromptTemplateVersion_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$4, updatePromptTemplateVersion_ConfigPropertyMetadata);
|
|
4292
|
-
const createResourceParams$4 = /*#__PURE__*/ createResourceParams$
|
|
4616
|
+
const createResourceParams$4 = /*#__PURE__*/ createResourceParams$j(updatePromptTemplateVersion_ConfigPropertyMetadata);
|
|
4293
4617
|
function typeCheckConfig$4(untrustedConfig) {
|
|
4294
4618
|
const config = {};
|
|
4295
|
-
typeCheckConfig$
|
|
4619
|
+
typeCheckConfig$j(untrustedConfig, config, updatePromptTemplateVersion_ConfigPropertyMetadata);
|
|
4296
4620
|
const untrustedConfig_childRelationships = untrustedConfig.childRelationships;
|
|
4297
4621
|
if (untrustedIsObject(untrustedConfig_childRelationships)) {
|
|
4298
4622
|
const untrustedConfig_childRelationships_object = {};
|
|
@@ -4368,15 +4692,15 @@ const updatePromptTemplateVersionAdapterFactory = (luvio) => {
|
|
|
4368
4692
|
};
|
|
4369
4693
|
|
|
4370
4694
|
function select$i(luvio, params) {
|
|
4371
|
-
return select$
|
|
4695
|
+
return select$y();
|
|
4372
4696
|
}
|
|
4373
4697
|
function getResponseCacheKeys$3(storeKeyMap, luvio, resourceParams, response) {
|
|
4374
|
-
getTypeCacheKeys$
|
|
4698
|
+
getTypeCacheKeys$7(storeKeyMap, luvio, response);
|
|
4375
4699
|
}
|
|
4376
4700
|
function ingestSuccess$3(luvio, resourceParams, response) {
|
|
4377
4701
|
const { body } = response;
|
|
4378
|
-
const key = keyBuilderFromType$
|
|
4379
|
-
luvio.storeIngest(key, ingest$
|
|
4702
|
+
const key = keyBuilderFromType$2(luvio, body);
|
|
4703
|
+
luvio.storeIngest(key, ingest$7, body);
|
|
4380
4704
|
const snapshot = luvio.storeLookup({
|
|
4381
4705
|
recordId: key,
|
|
4382
4706
|
node: select$i(),
|
|
@@ -4393,7 +4717,7 @@ function ingestSuccess$3(luvio, resourceParams, response) {
|
|
|
4393
4717
|
function createResourceRequest$3(config) {
|
|
4394
4718
|
const headers = {};
|
|
4395
4719
|
return {
|
|
4396
|
-
baseUri: '/services/data/
|
|
4720
|
+
baseUri: '/services/data/v67.0',
|
|
4397
4721
|
basePath: '/einstein/prompt-templates/' + config.urlParams.promptTemplateDevName + '/versions/' + config.urlParams.versionId + '/status',
|
|
4398
4722
|
method: 'put',
|
|
4399
4723
|
body: null,
|
|
@@ -4412,10 +4736,10 @@ const putEinsteinPromptTemplateVersionStatus_ConfigPropertyMetadata = [
|
|
|
4412
4736
|
generateParamConfigMetadata('ignoreWarnings', false, 1 /* QueryParameter */, 1 /* Boolean */),
|
|
4413
4737
|
];
|
|
4414
4738
|
const putEinsteinPromptTemplateVersionStatus_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$3, putEinsteinPromptTemplateVersionStatus_ConfigPropertyMetadata);
|
|
4415
|
-
const createResourceParams$3 = /*#__PURE__*/ createResourceParams$
|
|
4739
|
+
const createResourceParams$3 = /*#__PURE__*/ createResourceParams$j(putEinsteinPromptTemplateVersionStatus_ConfigPropertyMetadata);
|
|
4416
4740
|
function typeCheckConfig$3(untrustedConfig) {
|
|
4417
4741
|
const config = {};
|
|
4418
|
-
typeCheckConfig$
|
|
4742
|
+
typeCheckConfig$j(untrustedConfig, config, putEinsteinPromptTemplateVersionStatus_ConfigPropertyMetadata);
|
|
4419
4743
|
return config;
|
|
4420
4744
|
}
|
|
4421
4745
|
function validateAdapterConfig$3(untrustedConfig, configPropertyNames) {
|
|
@@ -4491,7 +4815,7 @@ function validate$f(obj, path = 'EinsteinPromptTemplateGenerationsInputRepresent
|
|
|
4491
4815
|
if (obj.additionalConfig !== undefined) {
|
|
4492
4816
|
const obj_additionalConfig = obj.additionalConfig;
|
|
4493
4817
|
const path_additionalConfig = path + '.additionalConfig';
|
|
4494
|
-
const referencepath_additionalConfigValidationError = validate$
|
|
4818
|
+
const referencepath_additionalConfigValidationError = validate$y(obj_additionalConfig, path_additionalConfig);
|
|
4495
4819
|
if (referencepath_additionalConfigValidationError !== null) {
|
|
4496
4820
|
let message = 'Object doesn\'t match EinsteinLlmAdditionalConfigInputRepresentation (at "' + path_additionalConfig + '")\n';
|
|
4497
4821
|
message += referencepath_additionalConfigValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
@@ -5359,7 +5683,7 @@ function validate$6(obj, path = 'EinsteinPromptTemplateGenerationsRepresentation
|
|
|
5359
5683
|
for (let i = 0; i < obj_generations.length; i++) {
|
|
5360
5684
|
const obj_generations_item = obj_generations[i];
|
|
5361
5685
|
const path_generations_item = path_generations + '[' + i + ']';
|
|
5362
|
-
const referencepath_generations_itemValidationError = validate$
|
|
5686
|
+
const referencepath_generations_itemValidationError = validate$u(obj_generations_item, path_generations_item);
|
|
5363
5687
|
if (referencepath_generations_itemValidationError !== null) {
|
|
5364
5688
|
let message = 'Object doesn\'t match EinsteinLlmGenerationItemRepresentation (at "' + path_generations_item + '")\n';
|
|
5365
5689
|
message += referencepath_generations_itemValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
@@ -5386,7 +5710,7 @@ function validate$6(obj, path = 'EinsteinPromptTemplateGenerationsRepresentation
|
|
|
5386
5710
|
const path_parameters = path + '.parameters';
|
|
5387
5711
|
let obj_parameters_union0 = null;
|
|
5388
5712
|
const obj_parameters_union0_error = (() => {
|
|
5389
|
-
const referencepath_parametersValidationError = validate$
|
|
5713
|
+
const referencepath_parametersValidationError = validate$t(obj_parameters, path_parameters);
|
|
5390
5714
|
if (referencepath_parametersValidationError !== null) {
|
|
5391
5715
|
let message = 'Object doesn\'t match WrappedMap (at "' + path_parameters + '")\n';
|
|
5392
5716
|
message += referencepath_parametersValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
@@ -5544,8 +5868,8 @@ const select$9 = function EinsteinPromptTemplateGenerationsRepresentationSelect(
|
|
|
5544
5868
|
const { selections: EinsteinLlmGenerationCitationRepresentation__selections, opaque: EinsteinLlmGenerationCitationRepresentation__opaque, } = select$g();
|
|
5545
5869
|
const { selections: EinsteinPromptTemplateAttachmentRepresentation__selections, opaque: EinsteinPromptTemplateAttachmentRepresentation__opaque, } = select$e();
|
|
5546
5870
|
const { selections: EinsteinPromptTemplateGenerationsErrorRepresentation__selections, opaque: EinsteinPromptTemplateGenerationsErrorRepresentation__opaque, } = select$d();
|
|
5547
|
-
const { selections: EinsteinLlmGenerationItemRepresentation__selections, opaque: EinsteinLlmGenerationItemRepresentation__opaque, } = select$
|
|
5548
|
-
const { selections: WrappedMap__selections, opaque: WrappedMap__opaque, } = select$
|
|
5871
|
+
const { selections: EinsteinLlmGenerationItemRepresentation__selections, opaque: EinsteinLlmGenerationItemRepresentation__opaque, } = select$F();
|
|
5872
|
+
const { selections: WrappedMap__selections, opaque: WrappedMap__opaque, } = select$E();
|
|
5549
5873
|
const { selections: EinsteinPromptTemplateMaskContentRepresentation__selections, opaque: EinsteinPromptTemplateMaskContentRepresentation__opaque, } = select$b();
|
|
5550
5874
|
const { selections: EinsteinPromptTemplateMaskDataRepresentation__selections, opaque: EinsteinPromptTemplateMaskDataRepresentation__opaque, } = select$a();
|
|
5551
5875
|
return {
|
|
@@ -5693,7 +6017,7 @@ function equals$6(existing, incoming) {
|
|
|
5693
6017
|
const existing_generations = existing.generations;
|
|
5694
6018
|
const incoming_generations = incoming.generations;
|
|
5695
6019
|
const equals_generations_items = equalsArray(existing_generations, incoming_generations, (existing_generations_item, incoming_generations_item) => {
|
|
5696
|
-
if (!(equals$
|
|
6020
|
+
if (!(equals$o(existing_generations_item, incoming_generations_item))) {
|
|
5697
6021
|
return false;
|
|
5698
6022
|
}
|
|
5699
6023
|
});
|
|
@@ -5723,7 +6047,7 @@ function equals$6(existing, incoming) {
|
|
|
5723
6047
|
if (!(existing_parameters === incoming_parameters
|
|
5724
6048
|
|| (existing_parameters != null &&
|
|
5725
6049
|
incoming_parameters != null &&
|
|
5726
|
-
equals$
|
|
6050
|
+
equals$n(existing_parameters, incoming_parameters)))) {
|
|
5727
6051
|
return false;
|
|
5728
6052
|
}
|
|
5729
6053
|
const existing_prompt = existing.prompt;
|
|
@@ -5840,7 +6164,7 @@ function ingestSuccess$2(luvio, resourceParams, response) {
|
|
|
5840
6164
|
function createResourceRequest$2(config) {
|
|
5841
6165
|
const headers = {};
|
|
5842
6166
|
return {
|
|
5843
|
-
baseUri: '/services/data/
|
|
6167
|
+
baseUri: '/services/data/v67.0',
|
|
5844
6168
|
basePath: '/einstein/prompt-templates/' + config.urlParams.promptTemplateDevName + '/generations',
|
|
5845
6169
|
method: 'post',
|
|
5846
6170
|
body: config.body,
|
|
@@ -5858,10 +6182,10 @@ const createGenerationsForPromptTemplate_ConfigPropertyMetadata = [
|
|
|
5858
6182
|
generateParamConfigMetadata('promptTemplateGenerationsInput', true, 2 /* Body */, 4 /* Unsupported */),
|
|
5859
6183
|
];
|
|
5860
6184
|
const createGenerationsForPromptTemplate_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$2, createGenerationsForPromptTemplate_ConfigPropertyMetadata);
|
|
5861
|
-
const createResourceParams$2 = /*#__PURE__*/ createResourceParams$
|
|
6185
|
+
const createResourceParams$2 = /*#__PURE__*/ createResourceParams$j(createGenerationsForPromptTemplate_ConfigPropertyMetadata);
|
|
5862
6186
|
function typeCheckConfig$2(untrustedConfig) {
|
|
5863
6187
|
const config = {};
|
|
5864
|
-
typeCheckConfig$
|
|
6188
|
+
typeCheckConfig$j(untrustedConfig, config, createGenerationsForPromptTemplate_ConfigPropertyMetadata);
|
|
5865
6189
|
const untrustedConfig_promptTemplateGenerationsInput = untrustedConfig.promptTemplateGenerationsInput;
|
|
5866
6190
|
const referenceEinsteinPromptTemplateGenerationsInputRepresentationValidationError = validate$f(untrustedConfig_promptTemplateGenerationsInput);
|
|
5867
6191
|
if (referenceEinsteinPromptTemplateGenerationsInputRepresentationValidationError === null) {
|
|
@@ -6264,7 +6588,7 @@ function ingestError$1(luvio, params, error, snapshotRefresh) {
|
|
|
6264
6588
|
function createResourceRequest$1(config) {
|
|
6265
6589
|
const headers = {};
|
|
6266
6590
|
return {
|
|
6267
|
-
baseUri: '/services/data/
|
|
6591
|
+
baseUri: '/services/data/v67.0',
|
|
6268
6592
|
basePath: '/einstein/prompt-template-types/' + config.urlParams.templateTypeName + '',
|
|
6269
6593
|
method: 'get',
|
|
6270
6594
|
body: null,
|
|
@@ -6280,14 +6604,14 @@ const getTemplateType_ConfigPropertyMetadata = [
|
|
|
6280
6604
|
generateParamConfigMetadata('templateTypeName', true, 0 /* UrlParameter */, 0 /* String */),
|
|
6281
6605
|
];
|
|
6282
6606
|
const getTemplateType_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$1, getTemplateType_ConfigPropertyMetadata);
|
|
6283
|
-
const createResourceParams$1 = /*#__PURE__*/ createResourceParams$
|
|
6607
|
+
const createResourceParams$1 = /*#__PURE__*/ createResourceParams$j(getTemplateType_ConfigPropertyMetadata);
|
|
6284
6608
|
function keyBuilder$2(luvio, config) {
|
|
6285
6609
|
const resourceParams = createResourceParams$1(config);
|
|
6286
6610
|
return keyBuilder$3(luvio, resourceParams);
|
|
6287
6611
|
}
|
|
6288
6612
|
function typeCheckConfig$1(untrustedConfig) {
|
|
6289
6613
|
const config = {};
|
|
6290
|
-
typeCheckConfig$
|
|
6614
|
+
typeCheckConfig$j(untrustedConfig, config, getTemplateType_ConfigPropertyMetadata);
|
|
6291
6615
|
return config;
|
|
6292
6616
|
}
|
|
6293
6617
|
function validateAdapterConfig$1(untrustedConfig, configPropertyNames) {
|
|
@@ -6656,7 +6980,7 @@ function ingestError(luvio, params, error, snapshotRefresh) {
|
|
|
6656
6980
|
function createResourceRequest(config) {
|
|
6657
6981
|
const headers = {};
|
|
6658
6982
|
return {
|
|
6659
|
-
baseUri: '/services/data/
|
|
6983
|
+
baseUri: '/services/data/v67.0',
|
|
6660
6984
|
basePath: '/einstein/prompt-template/' + config.urlParams.promptTemplateDevName + '/output-languages',
|
|
6661
6985
|
method: 'get',
|
|
6662
6986
|
body: null,
|
|
@@ -6674,14 +6998,14 @@ const getOutputLanguages_ConfigPropertyMetadata = [
|
|
|
6674
6998
|
generateParamConfigMetadata('versionId', false, 1 /* QueryParameter */, 0 /* String */),
|
|
6675
6999
|
];
|
|
6676
7000
|
const getOutputLanguages_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName, getOutputLanguages_ConfigPropertyMetadata);
|
|
6677
|
-
const createResourceParams = /*#__PURE__*/ createResourceParams$
|
|
7001
|
+
const createResourceParams = /*#__PURE__*/ createResourceParams$j(getOutputLanguages_ConfigPropertyMetadata);
|
|
6678
7002
|
function keyBuilder(luvio, config) {
|
|
6679
7003
|
const resourceParams = createResourceParams(config);
|
|
6680
7004
|
return keyBuilder$1(luvio, resourceParams);
|
|
6681
7005
|
}
|
|
6682
7006
|
function typeCheckConfig(untrustedConfig) {
|
|
6683
7007
|
const config = {};
|
|
6684
|
-
typeCheckConfig$
|
|
7008
|
+
typeCheckConfig$j(untrustedConfig, config, getOutputLanguages_ConfigPropertyMetadata);
|
|
6685
7009
|
return config;
|
|
6686
7010
|
}
|
|
6687
7011
|
function validateAdapterConfig(untrustedConfig, configPropertyNames) {
|
|
@@ -6755,4 +7079,4 @@ const getOutputLanguagesAdapterFactory = (luvio) => function EinsteinLLM__getOut
|
|
|
6755
7079
|
buildCachedSnapshotCachePolicy, buildNetworkSnapshotCachePolicy);
|
|
6756
7080
|
};
|
|
6757
7081
|
|
|
6758
|
-
export { createEmbeddingsAdapterFactory, createFeedbackAdapterFactory, createGenerationsAdapterFactory, createGenerationsForPromptTemplateAdapterFactory, createPromptTemplateAdapterFactory, createPromptTemplateVersionAdapterFactory, getDataProviderInstanceConfigAdapterFactory, getDataProviderTypeConfigsAdapterFactory, getDataProvidersAdapterFactory, getInputMappedDataProvidersAdapterFactory, getOutputLanguagesAdapterFactory, getPromptTemplateAdapterFactory, getPromptTemplateVersionAdapterFactory, getPromptTemplateVersionsAdapterFactory, getPromptTemplatesAdapterFactory, getTemplateTypeAdapterFactory, putEinsteinPromptTemplateVersionStatusAdapterFactory, updatePromptTemplateVersionAdapterFactory };
|
|
7082
|
+
export { createEmbeddingsAdapterFactory, createFeedbackAdapterFactory, createGenerationsAdapterFactory, createGenerationsForPromptTemplateAdapterFactory, createPromptTemplateAdapterFactory, createPromptTemplateVersionAdapterFactory, getDataProviderInstanceConfigAdapterFactory, getDataProviderTypeConfigsAdapterFactory, getDataProvidersAdapterFactory, getInputMappedDataProvidersAdapterFactory, getOutputLanguagesAdapterFactory, getPromptTemplateAdapterFactory, getPromptTemplateVersionAdapterFactory, getPromptTemplateVersionsAdapterFactory, getPromptTemplatesAdapterFactory, getTemplateTypeAdapterFactory, putEinsteinPromptTemplateStatusAdapterFactory, putEinsteinPromptTemplateVersionStatusAdapterFactory, updatePromptTemplateVersionAdapterFactory };
|