@salesforce/lds-adapters-service-einsteinllm 1.382.0 → 1.384.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 +1085 -526
- package/dist/es/es2018/types/src/generated/adapters/getDataProviderInstanceConfig.d.ts +31 -0
- package/dist/es/es2018/types/src/generated/adapters/putEinsteinPromptTemplateVersionStatus.d.ts +18 -0
- package/dist/es/es2018/types/src/generated/artifacts/main.d.ts +2 -0
- package/dist/es/es2018/types/src/generated/artifacts/sfdc.d.ts +4 -1
- package/dist/es/es2018/types/src/generated/resources/postEinsteinPromptTemplatesDataProviderDescribe.d.ts +19 -0
- package/dist/es/es2018/types/src/generated/resources/putEinsteinPromptTemplatesVersionsStatusByPromptTemplateDevNameAndVersionId.d.ts +17 -0
- package/dist/es/es2018/types/src/generated/types/EinsteinLlmGenerationCitationRepresentation.d.ts +29 -0
- package/dist/es/es2018/types/src/generated/types/EinsteinLlmGenerationGenAiCitedReferenceRepresentation.d.ts +40 -0
- package/dist/es/es2018/types/src/generated/types/EinsteinPromptTemplateGenerationsRepresentation.d.ts +4 -1
- package/dist/es/es2018/types/src/generated/types/PromptTemplateDataProviderInstanceConfigCollectionRepresentation.d.ts +3 -3
- package/dist/es/es2018/types/src/generated/types/PromptTemplateDataProviderInstanceConfigInputRepresentation.d.ts +5 -5
- package/dist/es/es2018/types/src/generated/types/PromptTemplateDataProviderInstanceConfigRepresentation.d.ts +6 -5
- package/package.json +4 -4
- package/sfdc/index.js +1167 -593
- package/src/raml/api.raml +84 -1
- package/src/raml/luvio.raml +15 -0
package/sfdc/index.js
CHANGED
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
/* proxy-compat-disable */
|
|
15
15
|
import { createInstrumentedAdapter, createLDSAdapter, createWireAdapterConstructor, createImperativeAdapter } from 'force/ldsBindings';
|
|
16
16
|
import { withDefaultLuvio } from 'force/ldsEngine';
|
|
17
|
-
import { serializeStructuredKey, ingestShape, deepFreeze, buildNetworkSnapshotCachePolicy as buildNetworkSnapshotCachePolicy$
|
|
17
|
+
import { serializeStructuredKey, ingestShape, deepFreeze, buildNetworkSnapshotCachePolicy as buildNetworkSnapshotCachePolicy$6, StoreKeyMap, createResourceParams as createResourceParams$d, typeCheckConfig as typeCheckConfig$d } from 'force/luvioEngine';
|
|
18
18
|
|
|
19
19
|
const { hasOwnProperty: ObjectPrototypeHasOwnProperty } = Object.prototype;
|
|
20
20
|
const { keys: ObjectKeys$1, create: ObjectCreate$1 } = Object;
|
|
@@ -178,7 +178,7 @@ function createLink(ref) {
|
|
|
178
178
|
};
|
|
179
179
|
}
|
|
180
180
|
|
|
181
|
-
function validate$
|
|
181
|
+
function validate$z(obj, path = 'EinsteinLlmEmbeddingsAdditionalConfigInputRepresentation') {
|
|
182
182
|
const v_error = (() => {
|
|
183
183
|
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
184
184
|
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
@@ -222,7 +222,7 @@ function validate$x(obj, path = 'EinsteinLlmEmbeddingsAdditionalConfigInputRepre
|
|
|
222
222
|
return v_error === undefined ? null : v_error;
|
|
223
223
|
}
|
|
224
224
|
|
|
225
|
-
function validate$
|
|
225
|
+
function validate$y(obj, path = 'WrappedListString') {
|
|
226
226
|
const v_error = (() => {
|
|
227
227
|
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
228
228
|
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
@@ -243,14 +243,14 @@ function validate$w(obj, path = 'WrappedListString') {
|
|
|
243
243
|
return v_error === undefined ? null : v_error;
|
|
244
244
|
}
|
|
245
245
|
|
|
246
|
-
function validate$
|
|
246
|
+
function validate$x(obj, path = 'EinsteinLlmEmbeddingsInputRepresentation') {
|
|
247
247
|
const v_error = (() => {
|
|
248
248
|
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
249
249
|
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
250
250
|
}
|
|
251
251
|
const obj_additionalConfig = obj.additionalConfig;
|
|
252
252
|
const path_additionalConfig = path + '.additionalConfig';
|
|
253
|
-
const referencepath_additionalConfigValidationError = validate$
|
|
253
|
+
const referencepath_additionalConfigValidationError = validate$z(obj_additionalConfig, path_additionalConfig);
|
|
254
254
|
if (referencepath_additionalConfigValidationError !== null) {
|
|
255
255
|
let message = 'Object doesn\'t match EinsteinLlmEmbeddingsAdditionalConfigInputRepresentation (at "' + path_additionalConfig + '")\n';
|
|
256
256
|
message += referencepath_additionalConfigValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
@@ -258,7 +258,7 @@ function validate$v(obj, path = 'EinsteinLlmEmbeddingsInputRepresentation') {
|
|
|
258
258
|
}
|
|
259
259
|
const obj_prompts = obj.prompts;
|
|
260
260
|
const path_prompts = path + '.prompts';
|
|
261
|
-
const referencepath_promptsValidationError = validate$
|
|
261
|
+
const referencepath_promptsValidationError = validate$y(obj_prompts, path_prompts);
|
|
262
262
|
if (referencepath_promptsValidationError !== null) {
|
|
263
263
|
let message = 'Object doesn\'t match WrappedListString (at "' + path_prompts + '")\n';
|
|
264
264
|
message += referencepath_promptsValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
@@ -275,8 +275,8 @@ function validate$v(obj, path = 'EinsteinLlmEmbeddingsInputRepresentation') {
|
|
|
275
275
|
return v_error === undefined ? null : v_error;
|
|
276
276
|
}
|
|
277
277
|
|
|
278
|
-
const VERSION$
|
|
279
|
-
function validate$
|
|
278
|
+
const VERSION$o = "5ed5ccc6fa6f15691ec0fc1080e41fe6";
|
|
279
|
+
function validate$w(obj, path = 'EinsteinLlmEmbeddingItemRepresentation') {
|
|
280
280
|
const v_error = (() => {
|
|
281
281
|
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
282
282
|
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
@@ -297,10 +297,10 @@ function validate$u(obj, path = 'EinsteinLlmEmbeddingItemRepresentation') {
|
|
|
297
297
|
})();
|
|
298
298
|
return v_error === undefined ? null : v_error;
|
|
299
299
|
}
|
|
300
|
-
const select$
|
|
300
|
+
const select$B = function EinsteinLlmEmbeddingItemRepresentationSelect() {
|
|
301
301
|
return {
|
|
302
302
|
kind: 'Fragment',
|
|
303
|
-
version: VERSION$
|
|
303
|
+
version: VERSION$o,
|
|
304
304
|
private: [],
|
|
305
305
|
selections: [
|
|
306
306
|
{
|
|
@@ -315,7 +315,7 @@ const select$w = function EinsteinLlmEmbeddingItemRepresentationSelect() {
|
|
|
315
315
|
]
|
|
316
316
|
};
|
|
317
317
|
};
|
|
318
|
-
function equals$
|
|
318
|
+
function equals$o(existing, incoming) {
|
|
319
319
|
const existing_index = existing.index;
|
|
320
320
|
const incoming_index = incoming.index;
|
|
321
321
|
if (!(existing_index === incoming_index)) {
|
|
@@ -334,9 +334,9 @@ function equals$l(existing, incoming) {
|
|
|
334
334
|
return true;
|
|
335
335
|
}
|
|
336
336
|
|
|
337
|
-
const TTL$
|
|
338
|
-
const VERSION$
|
|
339
|
-
function validate$
|
|
337
|
+
const TTL$9 = 100;
|
|
338
|
+
const VERSION$n = "d9873651f09d29764ef4d4231eb653d7";
|
|
339
|
+
function validate$v(obj, path = 'EinsteinLlmEmbeddingsRepresentation') {
|
|
340
340
|
const v_error = (() => {
|
|
341
341
|
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
342
342
|
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
@@ -349,7 +349,7 @@ function validate$t(obj, path = 'EinsteinLlmEmbeddingsRepresentation') {
|
|
|
349
349
|
for (let i = 0; i < obj_embeddings.length; i++) {
|
|
350
350
|
const obj_embeddings_item = obj_embeddings[i];
|
|
351
351
|
const path_embeddings_item = path_embeddings + '[' + i + ']';
|
|
352
|
-
const referencepath_embeddings_itemValidationError = validate$
|
|
352
|
+
const referencepath_embeddings_itemValidationError = validate$w(obj_embeddings_item, path_embeddings_item);
|
|
353
353
|
if (referencepath_embeddings_itemValidationError !== null) {
|
|
354
354
|
let message = 'Object doesn\'t match EinsteinLlmEmbeddingItemRepresentation (at "' + path_embeddings_item + '")\n';
|
|
355
355
|
message += referencepath_embeddings_itemValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
@@ -373,15 +373,15 @@ function validate$t(obj, path = 'EinsteinLlmEmbeddingsRepresentation') {
|
|
|
373
373
|
})();
|
|
374
374
|
return v_error === undefined ? null : v_error;
|
|
375
375
|
}
|
|
376
|
-
const RepresentationType$
|
|
377
|
-
function normalize$
|
|
376
|
+
const RepresentationType$9 = 'EinsteinLlmEmbeddingsRepresentation';
|
|
377
|
+
function normalize$9(input, existing, path, luvio, store, timestamp) {
|
|
378
378
|
return input;
|
|
379
379
|
}
|
|
380
|
-
const select$
|
|
381
|
-
const { selections: EinsteinLlmEmbeddingItemRepresentation__selections, opaque: EinsteinLlmEmbeddingItemRepresentation__opaque, } = select$
|
|
380
|
+
const select$A = function EinsteinLlmEmbeddingsRepresentationSelect() {
|
|
381
|
+
const { selections: EinsteinLlmEmbeddingItemRepresentation__selections, opaque: EinsteinLlmEmbeddingItemRepresentation__opaque, } = select$B();
|
|
382
382
|
return {
|
|
383
383
|
kind: 'Fragment',
|
|
384
|
-
version: VERSION$
|
|
384
|
+
version: VERSION$n,
|
|
385
385
|
private: [],
|
|
386
386
|
selections: [
|
|
387
387
|
{
|
|
@@ -398,11 +398,11 @@ const select$v = function EinsteinLlmEmbeddingsRepresentationSelect() {
|
|
|
398
398
|
]
|
|
399
399
|
};
|
|
400
400
|
};
|
|
401
|
-
function equals$
|
|
401
|
+
function equals$n(existing, incoming) {
|
|
402
402
|
const existing_embeddings = existing.embeddings;
|
|
403
403
|
const incoming_embeddings = incoming.embeddings;
|
|
404
404
|
const equals_embeddings_items = equalsArray(existing_embeddings, incoming_embeddings, (existing_embeddings_item, incoming_embeddings_item) => {
|
|
405
|
-
if (!(equals$
|
|
405
|
+
if (!(equals$o(existing_embeddings_item, incoming_embeddings_item))) {
|
|
406
406
|
return false;
|
|
407
407
|
}
|
|
408
408
|
});
|
|
@@ -421,44 +421,44 @@ function equals$k(existing, incoming) {
|
|
|
421
421
|
}
|
|
422
422
|
return true;
|
|
423
423
|
}
|
|
424
|
-
const ingest$
|
|
424
|
+
const ingest$9 = function EinsteinLlmEmbeddingsRepresentationIngest(input, path, luvio, store, timestamp) {
|
|
425
425
|
if (process.env.NODE_ENV !== 'production') {
|
|
426
|
-
const validateError = validate$
|
|
426
|
+
const validateError = validate$v(input);
|
|
427
427
|
if (validateError !== null) {
|
|
428
428
|
throw validateError;
|
|
429
429
|
}
|
|
430
430
|
}
|
|
431
431
|
const key = path.fullPath;
|
|
432
|
-
const ttlToUse = TTL$
|
|
433
|
-
ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize$
|
|
432
|
+
const ttlToUse = TTL$9;
|
|
433
|
+
ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize$9, "EinsteinLLM", VERSION$n, RepresentationType$9, equals$n);
|
|
434
434
|
return createLink(key);
|
|
435
435
|
};
|
|
436
|
-
function getTypeCacheKeys$
|
|
436
|
+
function getTypeCacheKeys$9(rootKeySet, luvio, input, fullPathFactory) {
|
|
437
437
|
// root cache key (uses fullPathFactory if keyBuilderFromType isn't defined)
|
|
438
438
|
const rootKey = fullPathFactory();
|
|
439
439
|
rootKeySet.set(rootKey, {
|
|
440
440
|
namespace: keyPrefix,
|
|
441
|
-
representationName: RepresentationType$
|
|
441
|
+
representationName: RepresentationType$9,
|
|
442
442
|
mergeable: false
|
|
443
443
|
});
|
|
444
444
|
}
|
|
445
445
|
|
|
446
|
-
function select$
|
|
447
|
-
return select$
|
|
446
|
+
function select$z(luvio, params) {
|
|
447
|
+
return select$A();
|
|
448
448
|
}
|
|
449
|
-
function keyBuilder$
|
|
449
|
+
function keyBuilder$f(luvio, params) {
|
|
450
450
|
return keyPrefix + '::EinsteinLlmEmbeddingsRepresentation:(' + stableJSONStringify(params.body.embeddingsInput.additionalConfig.additionalParameters) + '::' + 'embeddingsInput.additionalConfig.applicationName:' + params.body.embeddingsInput.additionalConfig.applicationName + '::' + (params.body.embeddingsInput.additionalConfig.enablePiiMasking === undefined ? 'embeddingsInput.additionalConfig.enablePiiMasking' : 'embeddingsInput.additionalConfig.enablePiiMasking:' + params.body.embeddingsInput.additionalConfig.enablePiiMasking) + '::' + (params.body.embeddingsInput.additionalConfig.model === undefined ? 'embeddingsInput.additionalConfig.model' : 'embeddingsInput.additionalConfig.model:' + params.body.embeddingsInput.additionalConfig.model) + '::' + 'embeddingsInput.prompts.wrappedListString:' + params.body.embeddingsInput.prompts.wrappedListString + '::' + (params.body.embeddingsInput.provider === undefined ? 'embeddingsInput.provider' : 'embeddingsInput.provider:' + params.body.embeddingsInput.provider) + ')';
|
|
451
451
|
}
|
|
452
|
-
function getResponseCacheKeys$
|
|
453
|
-
getTypeCacheKeys$
|
|
452
|
+
function getResponseCacheKeys$c(storeKeyMap, luvio, resourceParams, response) {
|
|
453
|
+
getTypeCacheKeys$9(storeKeyMap, luvio, response, () => keyBuilder$f(luvio, resourceParams));
|
|
454
454
|
}
|
|
455
|
-
function ingestSuccess$
|
|
455
|
+
function ingestSuccess$c(luvio, resourceParams, response, snapshotRefresh) {
|
|
456
456
|
const { body } = response;
|
|
457
|
-
const key = keyBuilder$
|
|
458
|
-
luvio.storeIngest(key, ingest$
|
|
457
|
+
const key = keyBuilder$f(luvio, resourceParams);
|
|
458
|
+
luvio.storeIngest(key, ingest$9, body);
|
|
459
459
|
const snapshot = luvio.storeLookup({
|
|
460
460
|
recordId: key,
|
|
461
|
-
node: select$
|
|
461
|
+
node: select$z(),
|
|
462
462
|
variables: {},
|
|
463
463
|
}, snapshotRefresh);
|
|
464
464
|
if (process.env.NODE_ENV !== 'production') {
|
|
@@ -469,19 +469,19 @@ function ingestSuccess$a(luvio, resourceParams, response, snapshotRefresh) {
|
|
|
469
469
|
deepFreeze(snapshot.data);
|
|
470
470
|
return snapshot;
|
|
471
471
|
}
|
|
472
|
-
function ingestError$
|
|
473
|
-
const key = keyBuilder$
|
|
472
|
+
function ingestError$5(luvio, params, error, snapshotRefresh) {
|
|
473
|
+
const key = keyBuilder$f(luvio, params);
|
|
474
474
|
const errorSnapshot = luvio.errorSnapshot(error, snapshotRefresh);
|
|
475
475
|
const storeMetadataParams = {
|
|
476
|
-
ttl: TTL$
|
|
476
|
+
ttl: TTL$9,
|
|
477
477
|
namespace: keyPrefix,
|
|
478
|
-
version: VERSION$
|
|
479
|
-
representationName: RepresentationType$
|
|
478
|
+
version: VERSION$n,
|
|
479
|
+
representationName: RepresentationType$9
|
|
480
480
|
};
|
|
481
481
|
luvio.storeIngestError(key, errorSnapshot, storeMetadataParams);
|
|
482
482
|
return errorSnapshot;
|
|
483
483
|
}
|
|
484
|
-
function createResourceRequest$
|
|
484
|
+
function createResourceRequest$c(config) {
|
|
485
485
|
const headers = {};
|
|
486
486
|
return {
|
|
487
487
|
baseUri: '/services/data/v65.0',
|
|
@@ -495,97 +495,97 @@ function createResourceRequest$a(config) {
|
|
|
495
495
|
};
|
|
496
496
|
}
|
|
497
497
|
|
|
498
|
-
const adapterName$
|
|
498
|
+
const adapterName$c = 'createEmbeddings';
|
|
499
499
|
const createEmbeddings_ConfigPropertyMetadata = [
|
|
500
500
|
generateParamConfigMetadata('embeddingsInput', true, 2 /* Body */, 4 /* Unsupported */),
|
|
501
501
|
];
|
|
502
|
-
const createEmbeddings_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$
|
|
503
|
-
const createResourceParams$
|
|
504
|
-
function keyBuilder$
|
|
505
|
-
const resourceParams = createResourceParams$
|
|
506
|
-
return keyBuilder$
|
|
502
|
+
const createEmbeddings_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$c, createEmbeddings_ConfigPropertyMetadata);
|
|
503
|
+
const createResourceParams$c = /*#__PURE__*/ createResourceParams$d(createEmbeddings_ConfigPropertyMetadata);
|
|
504
|
+
function keyBuilder$e(luvio, config) {
|
|
505
|
+
const resourceParams = createResourceParams$c(config);
|
|
506
|
+
return keyBuilder$f(luvio, resourceParams);
|
|
507
507
|
}
|
|
508
|
-
function typeCheckConfig$
|
|
508
|
+
function typeCheckConfig$c(untrustedConfig) {
|
|
509
509
|
const config = {};
|
|
510
510
|
const untrustedConfig_embeddingsInput = untrustedConfig.embeddingsInput;
|
|
511
|
-
const referenceEinsteinLlmEmbeddingsInputRepresentationValidationError = validate$
|
|
511
|
+
const referenceEinsteinLlmEmbeddingsInputRepresentationValidationError = validate$x(untrustedConfig_embeddingsInput);
|
|
512
512
|
if (referenceEinsteinLlmEmbeddingsInputRepresentationValidationError === null) {
|
|
513
513
|
config.embeddingsInput = untrustedConfig_embeddingsInput;
|
|
514
514
|
}
|
|
515
515
|
return config;
|
|
516
516
|
}
|
|
517
|
-
function validateAdapterConfig$
|
|
517
|
+
function validateAdapterConfig$c(untrustedConfig, configPropertyNames) {
|
|
518
518
|
if (!untrustedIsObject(untrustedConfig)) {
|
|
519
519
|
return null;
|
|
520
520
|
}
|
|
521
521
|
if (process.env.NODE_ENV !== 'production') {
|
|
522
522
|
validateConfig(untrustedConfig, configPropertyNames);
|
|
523
523
|
}
|
|
524
|
-
const config = typeCheckConfig$
|
|
524
|
+
const config = typeCheckConfig$c(untrustedConfig);
|
|
525
525
|
if (!areRequiredParametersPresent(config, configPropertyNames)) {
|
|
526
526
|
return null;
|
|
527
527
|
}
|
|
528
528
|
return config;
|
|
529
529
|
}
|
|
530
|
-
function adapterFragment$
|
|
531
|
-
createResourceParams$
|
|
532
|
-
return select$
|
|
530
|
+
function adapterFragment$5(luvio, config) {
|
|
531
|
+
createResourceParams$c(config);
|
|
532
|
+
return select$z();
|
|
533
533
|
}
|
|
534
|
-
function onFetchResponseSuccess$
|
|
535
|
-
const snapshot = ingestSuccess$
|
|
534
|
+
function onFetchResponseSuccess$5(luvio, config, resourceParams, response) {
|
|
535
|
+
const snapshot = ingestSuccess$c(luvio, resourceParams, response, {
|
|
536
536
|
config,
|
|
537
|
-
resolve: () => buildNetworkSnapshot$
|
|
537
|
+
resolve: () => buildNetworkSnapshot$c(luvio, config, snapshotRefreshOptions)
|
|
538
538
|
});
|
|
539
539
|
return luvio.storeBroadcast().then(() => snapshot);
|
|
540
540
|
}
|
|
541
|
-
function onFetchResponseError$
|
|
542
|
-
const snapshot = ingestError$
|
|
541
|
+
function onFetchResponseError$5(luvio, config, resourceParams, response) {
|
|
542
|
+
const snapshot = ingestError$5(luvio, resourceParams, response, {
|
|
543
543
|
config,
|
|
544
|
-
resolve: () => buildNetworkSnapshot$
|
|
544
|
+
resolve: () => buildNetworkSnapshot$c(luvio, config, snapshotRefreshOptions)
|
|
545
545
|
});
|
|
546
546
|
return luvio.storeBroadcast().then(() => snapshot);
|
|
547
547
|
}
|
|
548
|
-
function buildNetworkSnapshot$
|
|
549
|
-
const resourceParams = createResourceParams$
|
|
550
|
-
const request = createResourceRequest$
|
|
548
|
+
function buildNetworkSnapshot$c(luvio, config, options) {
|
|
549
|
+
const resourceParams = createResourceParams$c(config);
|
|
550
|
+
const request = createResourceRequest$c(resourceParams);
|
|
551
551
|
return luvio.dispatchResourceRequest(request, options)
|
|
552
552
|
.then((response) => {
|
|
553
|
-
return luvio.handleSuccessResponse(() => onFetchResponseSuccess$
|
|
553
|
+
return luvio.handleSuccessResponse(() => onFetchResponseSuccess$5(luvio, config, resourceParams, response), () => {
|
|
554
554
|
const cache = new StoreKeyMap();
|
|
555
|
-
getResponseCacheKeys$
|
|
555
|
+
getResponseCacheKeys$c(cache, luvio, resourceParams, response.body);
|
|
556
556
|
return cache;
|
|
557
557
|
});
|
|
558
558
|
}, (response) => {
|
|
559
|
-
return luvio.handleErrorResponse(() => onFetchResponseError$
|
|
559
|
+
return luvio.handleErrorResponse(() => onFetchResponseError$5(luvio, config, resourceParams, response));
|
|
560
560
|
});
|
|
561
561
|
}
|
|
562
|
-
function buildNetworkSnapshotCachePolicy$
|
|
563
|
-
return buildNetworkSnapshotCachePolicy$
|
|
562
|
+
function buildNetworkSnapshotCachePolicy$5(context, coercedAdapterRequestContext) {
|
|
563
|
+
return buildNetworkSnapshotCachePolicy$6(context, coercedAdapterRequestContext, buildNetworkSnapshot$c, 'get', false);
|
|
564
564
|
}
|
|
565
|
-
function buildCachedSnapshotCachePolicy$
|
|
565
|
+
function buildCachedSnapshotCachePolicy$5(context, storeLookup) {
|
|
566
566
|
const { luvio, config } = context;
|
|
567
567
|
const selector = {
|
|
568
|
-
recordId: keyBuilder$
|
|
569
|
-
node: adapterFragment$
|
|
568
|
+
recordId: keyBuilder$e(luvio, config),
|
|
569
|
+
node: adapterFragment$5(luvio, config),
|
|
570
570
|
variables: {},
|
|
571
571
|
};
|
|
572
572
|
const cacheSnapshot = storeLookup(selector, {
|
|
573
573
|
config,
|
|
574
|
-
resolve: () => buildNetworkSnapshot$
|
|
574
|
+
resolve: () => buildNetworkSnapshot$c(luvio, config, snapshotRefreshOptions)
|
|
575
575
|
});
|
|
576
576
|
return cacheSnapshot;
|
|
577
577
|
}
|
|
578
578
|
const createEmbeddingsAdapterFactory = (luvio) => function EinsteinLLM__createEmbeddings(untrustedConfig, requestContext) {
|
|
579
|
-
const config = validateAdapterConfig$
|
|
579
|
+
const config = validateAdapterConfig$c(untrustedConfig, createEmbeddings_ConfigPropertyNames);
|
|
580
580
|
// Invalid or incomplete config
|
|
581
581
|
if (config === null) {
|
|
582
582
|
return null;
|
|
583
583
|
}
|
|
584
584
|
return luvio.applyCachePolicy((requestContext || {}), { config, luvio }, // BuildSnapshotContext
|
|
585
|
-
buildCachedSnapshotCachePolicy$
|
|
585
|
+
buildCachedSnapshotCachePolicy$5, buildNetworkSnapshotCachePolicy$5);
|
|
586
586
|
};
|
|
587
587
|
|
|
588
|
-
function validate$
|
|
588
|
+
function validate$u(obj, path = 'EinsteinLlmFeedbackInputRepresentation') {
|
|
589
589
|
const v_error = (() => {
|
|
590
590
|
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
591
591
|
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
@@ -632,9 +632,9 @@ function validate$s(obj, path = 'EinsteinLlmFeedbackInputRepresentation') {
|
|
|
632
632
|
return v_error === undefined ? null : v_error;
|
|
633
633
|
}
|
|
634
634
|
|
|
635
|
-
const TTL$
|
|
636
|
-
const VERSION$
|
|
637
|
-
function validate$
|
|
635
|
+
const TTL$8 = 100;
|
|
636
|
+
const VERSION$m = "4033328f65865dd5d80c68a7573a4522";
|
|
637
|
+
function validate$t(obj, path = 'EinsteinLlmFeedbackRepresentation') {
|
|
638
638
|
const v_error = (() => {
|
|
639
639
|
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
640
640
|
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
@@ -647,23 +647,23 @@ function validate$r(obj, path = 'EinsteinLlmFeedbackRepresentation') {
|
|
|
647
647
|
})();
|
|
648
648
|
return v_error === undefined ? null : v_error;
|
|
649
649
|
}
|
|
650
|
-
const RepresentationType$
|
|
651
|
-
function keyBuilder$
|
|
652
|
-
return keyPrefix + '::' + RepresentationType$
|
|
650
|
+
const RepresentationType$8 = 'EinsteinLlmFeedbackRepresentation';
|
|
651
|
+
function keyBuilder$d(luvio, config) {
|
|
652
|
+
return keyPrefix + '::' + RepresentationType$8 + ':' + config.message;
|
|
653
653
|
}
|
|
654
654
|
function keyBuilderFromType$3(luvio, object) {
|
|
655
655
|
const keyParams = {
|
|
656
656
|
message: object.message
|
|
657
657
|
};
|
|
658
|
-
return keyBuilder$
|
|
658
|
+
return keyBuilder$d(luvio, keyParams);
|
|
659
659
|
}
|
|
660
|
-
function normalize$
|
|
660
|
+
function normalize$8(input, existing, path, luvio, store, timestamp) {
|
|
661
661
|
return input;
|
|
662
662
|
}
|
|
663
|
-
const select$
|
|
663
|
+
const select$y = function EinsteinLlmFeedbackRepresentationSelect() {
|
|
664
664
|
return {
|
|
665
665
|
kind: 'Fragment',
|
|
666
|
-
version: VERSION$
|
|
666
|
+
version: VERSION$m,
|
|
667
667
|
private: [],
|
|
668
668
|
selections: [
|
|
669
669
|
{
|
|
@@ -673,7 +673,7 @@ const select$t = function EinsteinLlmFeedbackRepresentationSelect() {
|
|
|
673
673
|
]
|
|
674
674
|
};
|
|
675
675
|
};
|
|
676
|
-
function equals$
|
|
676
|
+
function equals$m(existing, incoming) {
|
|
677
677
|
const existing_message = existing.message;
|
|
678
678
|
const incoming_message = incoming.message;
|
|
679
679
|
if (!(existing_message === incoming_message)) {
|
|
@@ -681,41 +681,41 @@ function equals$j(existing, incoming) {
|
|
|
681
681
|
}
|
|
682
682
|
return true;
|
|
683
683
|
}
|
|
684
|
-
const ingest$
|
|
684
|
+
const ingest$8 = function EinsteinLlmFeedbackRepresentationIngest(input, path, luvio, store, timestamp) {
|
|
685
685
|
if (process.env.NODE_ENV !== 'production') {
|
|
686
|
-
const validateError = validate$
|
|
686
|
+
const validateError = validate$t(input);
|
|
687
687
|
if (validateError !== null) {
|
|
688
688
|
throw validateError;
|
|
689
689
|
}
|
|
690
690
|
}
|
|
691
691
|
const key = keyBuilderFromType$3(luvio, input);
|
|
692
|
-
const ttlToUse = TTL$
|
|
693
|
-
ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize$
|
|
692
|
+
const ttlToUse = TTL$8;
|
|
693
|
+
ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize$8, "EinsteinLLM", VERSION$m, RepresentationType$8, equals$m);
|
|
694
694
|
return createLink(key);
|
|
695
695
|
};
|
|
696
|
-
function getTypeCacheKeys$
|
|
696
|
+
function getTypeCacheKeys$8(rootKeySet, luvio, input, fullPathFactory) {
|
|
697
697
|
// root cache key (uses fullPathFactory if keyBuilderFromType isn't defined)
|
|
698
698
|
const rootKey = keyBuilderFromType$3(luvio, input);
|
|
699
699
|
rootKeySet.set(rootKey, {
|
|
700
700
|
namespace: keyPrefix,
|
|
701
|
-
representationName: RepresentationType$
|
|
701
|
+
representationName: RepresentationType$8,
|
|
702
702
|
mergeable: false
|
|
703
703
|
});
|
|
704
704
|
}
|
|
705
705
|
|
|
706
|
-
function select$
|
|
707
|
-
return select$
|
|
706
|
+
function select$x(luvio, params) {
|
|
707
|
+
return select$y();
|
|
708
708
|
}
|
|
709
|
-
function getResponseCacheKeys$
|
|
710
|
-
getTypeCacheKeys$
|
|
709
|
+
function getResponseCacheKeys$b(storeKeyMap, luvio, resourceParams, response) {
|
|
710
|
+
getTypeCacheKeys$8(storeKeyMap, luvio, response);
|
|
711
711
|
}
|
|
712
|
-
function ingestSuccess$
|
|
712
|
+
function ingestSuccess$b(luvio, resourceParams, response) {
|
|
713
713
|
const { body } = response;
|
|
714
714
|
const key = keyBuilderFromType$3(luvio, body);
|
|
715
|
-
luvio.storeIngest(key, ingest$
|
|
715
|
+
luvio.storeIngest(key, ingest$8, body);
|
|
716
716
|
const snapshot = luvio.storeLookup({
|
|
717
717
|
recordId: key,
|
|
718
|
-
node: select$
|
|
718
|
+
node: select$x(),
|
|
719
719
|
variables: {},
|
|
720
720
|
});
|
|
721
721
|
if (process.env.NODE_ENV !== 'production') {
|
|
@@ -726,7 +726,7 @@ function ingestSuccess$9(luvio, resourceParams, response) {
|
|
|
726
726
|
deepFreeze(snapshot.data);
|
|
727
727
|
return snapshot;
|
|
728
728
|
}
|
|
729
|
-
function createResourceRequest$
|
|
729
|
+
function createResourceRequest$b(config) {
|
|
730
730
|
const headers = {};
|
|
731
731
|
return {
|
|
732
732
|
baseUri: '/services/data/v65.0',
|
|
@@ -740,45 +740,45 @@ function createResourceRequest$9(config) {
|
|
|
740
740
|
};
|
|
741
741
|
}
|
|
742
742
|
|
|
743
|
-
const adapterName$
|
|
743
|
+
const adapterName$b = 'createFeedback';
|
|
744
744
|
const createFeedback_ConfigPropertyMetadata = [
|
|
745
745
|
generateParamConfigMetadata('feedbackInput', true, 2 /* Body */, 4 /* Unsupported */),
|
|
746
746
|
];
|
|
747
|
-
const createFeedback_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$
|
|
748
|
-
const createResourceParams$
|
|
749
|
-
function typeCheckConfig$
|
|
747
|
+
const createFeedback_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$b, createFeedback_ConfigPropertyMetadata);
|
|
748
|
+
const createResourceParams$b = /*#__PURE__*/ createResourceParams$d(createFeedback_ConfigPropertyMetadata);
|
|
749
|
+
function typeCheckConfig$b(untrustedConfig) {
|
|
750
750
|
const config = {};
|
|
751
751
|
const untrustedConfig_feedbackInput = untrustedConfig.feedbackInput;
|
|
752
|
-
const referenceEinsteinLlmFeedbackInputRepresentationValidationError = validate$
|
|
752
|
+
const referenceEinsteinLlmFeedbackInputRepresentationValidationError = validate$u(untrustedConfig_feedbackInput);
|
|
753
753
|
if (referenceEinsteinLlmFeedbackInputRepresentationValidationError === null) {
|
|
754
754
|
config.feedbackInput = untrustedConfig_feedbackInput;
|
|
755
755
|
}
|
|
756
756
|
return config;
|
|
757
757
|
}
|
|
758
|
-
function validateAdapterConfig$
|
|
758
|
+
function validateAdapterConfig$b(untrustedConfig, configPropertyNames) {
|
|
759
759
|
if (!untrustedIsObject(untrustedConfig)) {
|
|
760
760
|
return null;
|
|
761
761
|
}
|
|
762
762
|
if (process.env.NODE_ENV !== 'production') {
|
|
763
763
|
validateConfig(untrustedConfig, configPropertyNames);
|
|
764
764
|
}
|
|
765
|
-
const config = typeCheckConfig$
|
|
765
|
+
const config = typeCheckConfig$b(untrustedConfig);
|
|
766
766
|
if (!areRequiredParametersPresent(config, configPropertyNames)) {
|
|
767
767
|
return null;
|
|
768
768
|
}
|
|
769
769
|
return config;
|
|
770
770
|
}
|
|
771
|
-
function buildNetworkSnapshot$
|
|
772
|
-
const resourceParams = createResourceParams$
|
|
773
|
-
const request = createResourceRequest$
|
|
771
|
+
function buildNetworkSnapshot$b(luvio, config, options) {
|
|
772
|
+
const resourceParams = createResourceParams$b(config);
|
|
773
|
+
const request = createResourceRequest$b(resourceParams);
|
|
774
774
|
return luvio.dispatchResourceRequest(request, options)
|
|
775
775
|
.then((response) => {
|
|
776
776
|
return luvio.handleSuccessResponse(() => {
|
|
777
|
-
const snapshot = ingestSuccess$
|
|
777
|
+
const snapshot = ingestSuccess$b(luvio, resourceParams, response);
|
|
778
778
|
return luvio.storeBroadcast().then(() => snapshot);
|
|
779
779
|
}, () => {
|
|
780
780
|
const cache = new StoreKeyMap();
|
|
781
|
-
getResponseCacheKeys$
|
|
781
|
+
getResponseCacheKeys$b(cache, luvio, resourceParams, response.body);
|
|
782
782
|
return cache;
|
|
783
783
|
});
|
|
784
784
|
}, (response) => {
|
|
@@ -788,16 +788,16 @@ function buildNetworkSnapshot$9(luvio, config, options) {
|
|
|
788
788
|
}
|
|
789
789
|
const createFeedbackAdapterFactory = (luvio) => {
|
|
790
790
|
return function createFeedback(untrustedConfig) {
|
|
791
|
-
const config = validateAdapterConfig$
|
|
791
|
+
const config = validateAdapterConfig$b(untrustedConfig, createFeedback_ConfigPropertyNames);
|
|
792
792
|
// Invalid or incomplete config
|
|
793
793
|
if (config === null) {
|
|
794
794
|
throw new Error('Invalid config for "createFeedback"');
|
|
795
795
|
}
|
|
796
|
-
return buildNetworkSnapshot$
|
|
796
|
+
return buildNetworkSnapshot$b(luvio, config);
|
|
797
797
|
};
|
|
798
798
|
};
|
|
799
799
|
|
|
800
|
-
function validate$
|
|
800
|
+
function validate$s(obj, path = 'EinsteinLlmAdditionalConfigInputRepresentation') {
|
|
801
801
|
const v_error = (() => {
|
|
802
802
|
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
803
803
|
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
@@ -880,7 +880,7 @@ function validate$q(obj, path = 'EinsteinLlmAdditionalConfigInputRepresentation'
|
|
|
880
880
|
return v_error === undefined ? null : v_error;
|
|
881
881
|
}
|
|
882
882
|
|
|
883
|
-
function validate$
|
|
883
|
+
function validate$r(obj, path = 'EinsteinLlmGenerationsInputRepresentation') {
|
|
884
884
|
const v_error = (() => {
|
|
885
885
|
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
886
886
|
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
@@ -888,7 +888,7 @@ function validate$p(obj, path = 'EinsteinLlmGenerationsInputRepresentation') {
|
|
|
888
888
|
if (obj.additionalConfig !== undefined) {
|
|
889
889
|
const obj_additionalConfig = obj.additionalConfig;
|
|
890
890
|
const path_additionalConfig = path + '.additionalConfig';
|
|
891
|
-
const referencepath_additionalConfigValidationError = validate$
|
|
891
|
+
const referencepath_additionalConfigValidationError = validate$s(obj_additionalConfig, path_additionalConfig);
|
|
892
892
|
if (referencepath_additionalConfigValidationError !== null) {
|
|
893
893
|
let message = 'Object doesn\'t match EinsteinLlmAdditionalConfigInputRepresentation (at "' + path_additionalConfig + '")\n';
|
|
894
894
|
message += referencepath_additionalConfigValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
@@ -911,8 +911,8 @@ function validate$p(obj, path = 'EinsteinLlmGenerationsInputRepresentation') {
|
|
|
911
911
|
return v_error === undefined ? null : v_error;
|
|
912
912
|
}
|
|
913
913
|
|
|
914
|
-
const VERSION$
|
|
915
|
-
function validate$
|
|
914
|
+
const VERSION$l = "9ebac74e6f964c363d5fd1913df363af";
|
|
915
|
+
function validate$q(obj, path = 'EinsteinLlmGenerationsContentQualityRepresentation') {
|
|
916
916
|
const v_error = (() => {
|
|
917
917
|
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
918
918
|
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
@@ -948,10 +948,10 @@ function validate$o(obj, path = 'EinsteinLlmGenerationsContentQualityRepresentat
|
|
|
948
948
|
})();
|
|
949
949
|
return v_error === undefined ? null : v_error;
|
|
950
950
|
}
|
|
951
|
-
const select$
|
|
951
|
+
const select$w = function EinsteinLlmGenerationsContentQualityRepresentationSelect() {
|
|
952
952
|
return {
|
|
953
953
|
kind: 'Fragment',
|
|
954
|
-
version: VERSION$
|
|
954
|
+
version: VERSION$l,
|
|
955
955
|
private: [],
|
|
956
956
|
selections: [
|
|
957
957
|
{
|
|
@@ -962,7 +962,7 @@ const select$r = function EinsteinLlmGenerationsContentQualityRepresentationSele
|
|
|
962
962
|
]
|
|
963
963
|
};
|
|
964
964
|
};
|
|
965
|
-
function equals$
|
|
965
|
+
function equals$l(existing, incoming) {
|
|
966
966
|
const existing_isToxicityDetected = existing.isToxicityDetected;
|
|
967
967
|
const incoming_isToxicityDetected = incoming.isToxicityDetected;
|
|
968
968
|
// if at least one of these optionals is defined
|
|
@@ -979,8 +979,8 @@ function equals$i(existing, incoming) {
|
|
|
979
979
|
return true;
|
|
980
980
|
}
|
|
981
981
|
|
|
982
|
-
const VERSION$
|
|
983
|
-
function validate$
|
|
982
|
+
const VERSION$k = "77af44a252cb5b45b4d9a8101368d2aa";
|
|
983
|
+
function validate$p(obj, path = 'EinsteinLlmGenerationsSafetyScoreRepresentation') {
|
|
984
984
|
const v_error = (() => {
|
|
985
985
|
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
986
986
|
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
@@ -1184,10 +1184,10 @@ function validate$n(obj, path = 'EinsteinLlmGenerationsSafetyScoreRepresentation
|
|
|
1184
1184
|
})();
|
|
1185
1185
|
return v_error === undefined ? null : v_error;
|
|
1186
1186
|
}
|
|
1187
|
-
const select$
|
|
1187
|
+
const select$v = function EinsteinLlmGenerationsSafetyScoreRepresentationSelect() {
|
|
1188
1188
|
return {
|
|
1189
1189
|
kind: 'Fragment',
|
|
1190
|
-
version: VERSION$
|
|
1190
|
+
version: VERSION$k,
|
|
1191
1191
|
private: [],
|
|
1192
1192
|
selections: [
|
|
1193
1193
|
{
|
|
@@ -1228,7 +1228,7 @@ const select$q = function EinsteinLlmGenerationsSafetyScoreRepresentationSelect(
|
|
|
1228
1228
|
]
|
|
1229
1229
|
};
|
|
1230
1230
|
};
|
|
1231
|
-
function equals$
|
|
1231
|
+
function equals$k(existing, incoming) {
|
|
1232
1232
|
const existing_hateScore = existing.hateScore;
|
|
1233
1233
|
const incoming_hateScore = incoming.hateScore;
|
|
1234
1234
|
// if at least one of these optionals is defined
|
|
@@ -1323,8 +1323,8 @@ function equals$h(existing, incoming) {
|
|
|
1323
1323
|
return true;
|
|
1324
1324
|
}
|
|
1325
1325
|
|
|
1326
|
-
const VERSION$
|
|
1327
|
-
function validate$
|
|
1326
|
+
const VERSION$j = "4a07778ff6c595d91c575188146647a1";
|
|
1327
|
+
function validate$o(obj, path = 'EinsteinLlmGenerationItemRepresentation') {
|
|
1328
1328
|
const v_error = (() => {
|
|
1329
1329
|
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
1330
1330
|
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
@@ -1334,7 +1334,7 @@ function validate$m(obj, path = 'EinsteinLlmGenerationItemRepresentation') {
|
|
|
1334
1334
|
const path_contentQualityRepresentation = path + '.contentQualityRepresentation';
|
|
1335
1335
|
let obj_contentQualityRepresentation_union0 = null;
|
|
1336
1336
|
const obj_contentQualityRepresentation_union0_error = (() => {
|
|
1337
|
-
const referencepath_contentQualityRepresentationValidationError = validate$
|
|
1337
|
+
const referencepath_contentQualityRepresentationValidationError = validate$q(obj_contentQualityRepresentation, path_contentQualityRepresentation);
|
|
1338
1338
|
if (referencepath_contentQualityRepresentationValidationError !== null) {
|
|
1339
1339
|
let message = 'Object doesn\'t match EinsteinLlmGenerationsContentQualityRepresentation (at "' + path_contentQualityRepresentation + '")\n';
|
|
1340
1340
|
message += referencepath_contentQualityRepresentationValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
@@ -1382,7 +1382,7 @@ function validate$m(obj, path = 'EinsteinLlmGenerationItemRepresentation') {
|
|
|
1382
1382
|
const path_safetyScoreRepresentation = path + '.safetyScoreRepresentation';
|
|
1383
1383
|
let obj_safetyScoreRepresentation_union0 = null;
|
|
1384
1384
|
const obj_safetyScoreRepresentation_union0_error = (() => {
|
|
1385
|
-
const referencepath_safetyScoreRepresentationValidationError = validate$
|
|
1385
|
+
const referencepath_safetyScoreRepresentationValidationError = validate$p(obj_safetyScoreRepresentation, path_safetyScoreRepresentation);
|
|
1386
1386
|
if (referencepath_safetyScoreRepresentationValidationError !== null) {
|
|
1387
1387
|
let message = 'Object doesn\'t match EinsteinLlmGenerationsSafetyScoreRepresentation (at "' + path_safetyScoreRepresentation + '")\n';
|
|
1388
1388
|
message += referencepath_safetyScoreRepresentationValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
@@ -1416,12 +1416,12 @@ function validate$m(obj, path = 'EinsteinLlmGenerationItemRepresentation') {
|
|
|
1416
1416
|
})();
|
|
1417
1417
|
return v_error === undefined ? null : v_error;
|
|
1418
1418
|
}
|
|
1419
|
-
const select$
|
|
1420
|
-
const { selections: EinsteinLlmGenerationsContentQualityRepresentation__selections, opaque: EinsteinLlmGenerationsContentQualityRepresentation__opaque, } = select$
|
|
1421
|
-
const { selections: EinsteinLlmGenerationsSafetyScoreRepresentation__selections, opaque: EinsteinLlmGenerationsSafetyScoreRepresentation__opaque, } = select$
|
|
1419
|
+
const select$u = function EinsteinLlmGenerationItemRepresentationSelect() {
|
|
1420
|
+
const { selections: EinsteinLlmGenerationsContentQualityRepresentation__selections, opaque: EinsteinLlmGenerationsContentQualityRepresentation__opaque, } = select$w();
|
|
1421
|
+
const { selections: EinsteinLlmGenerationsSafetyScoreRepresentation__selections, opaque: EinsteinLlmGenerationsSafetyScoreRepresentation__opaque, } = select$v();
|
|
1422
1422
|
return {
|
|
1423
1423
|
kind: 'Fragment',
|
|
1424
|
-
version: VERSION$
|
|
1424
|
+
version: VERSION$j,
|
|
1425
1425
|
private: [],
|
|
1426
1426
|
selections: [
|
|
1427
1427
|
{
|
|
@@ -1458,7 +1458,7 @@ const select$p = function EinsteinLlmGenerationItemRepresentationSelect() {
|
|
|
1458
1458
|
]
|
|
1459
1459
|
};
|
|
1460
1460
|
};
|
|
1461
|
-
function equals$
|
|
1461
|
+
function equals$j(existing, incoming) {
|
|
1462
1462
|
const existing_isSummarized = existing.isSummarized;
|
|
1463
1463
|
const incoming_isSummarized = incoming.isSummarized;
|
|
1464
1464
|
// if at least one of these optionals is defined
|
|
@@ -1499,7 +1499,7 @@ function equals$g(existing, incoming) {
|
|
|
1499
1499
|
if (!(existing_contentQualityRepresentation === incoming_contentQualityRepresentation
|
|
1500
1500
|
|| (existing_contentQualityRepresentation != null &&
|
|
1501
1501
|
incoming_contentQualityRepresentation != null &&
|
|
1502
|
-
equals$
|
|
1502
|
+
equals$l(existing_contentQualityRepresentation, incoming_contentQualityRepresentation)))) {
|
|
1503
1503
|
return false;
|
|
1504
1504
|
}
|
|
1505
1505
|
}
|
|
@@ -1515,15 +1515,15 @@ function equals$g(existing, incoming) {
|
|
|
1515
1515
|
if (!(existing_safetyScoreRepresentation === incoming_safetyScoreRepresentation
|
|
1516
1516
|
|| (existing_safetyScoreRepresentation != null &&
|
|
1517
1517
|
incoming_safetyScoreRepresentation != null &&
|
|
1518
|
-
equals$
|
|
1518
|
+
equals$k(existing_safetyScoreRepresentation, incoming_safetyScoreRepresentation)))) {
|
|
1519
1519
|
return false;
|
|
1520
1520
|
}
|
|
1521
1521
|
}
|
|
1522
1522
|
return true;
|
|
1523
1523
|
}
|
|
1524
1524
|
|
|
1525
|
-
const VERSION$
|
|
1526
|
-
function validate$
|
|
1525
|
+
const VERSION$i = "4656c961c9d093a9e206c1db7d4de0b0";
|
|
1526
|
+
function validate$n(obj, path = 'WrappedMap') {
|
|
1527
1527
|
const v_error = (() => {
|
|
1528
1528
|
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
1529
1529
|
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
@@ -1545,15 +1545,15 @@ function validate$l(obj, path = 'WrappedMap') {
|
|
|
1545
1545
|
})();
|
|
1546
1546
|
return v_error === undefined ? null : v_error;
|
|
1547
1547
|
}
|
|
1548
|
-
const select$
|
|
1548
|
+
const select$t = function WrappedMapSelect() {
|
|
1549
1549
|
return {
|
|
1550
1550
|
kind: 'Fragment',
|
|
1551
|
-
version: VERSION$
|
|
1551
|
+
version: VERSION$i,
|
|
1552
1552
|
private: [],
|
|
1553
1553
|
selections: []
|
|
1554
1554
|
};
|
|
1555
1555
|
};
|
|
1556
|
-
function equals$
|
|
1556
|
+
function equals$i(existing, incoming) {
|
|
1557
1557
|
const existing_wrappedMap = existing.wrappedMap;
|
|
1558
1558
|
const incoming_wrappedMap = incoming.wrappedMap;
|
|
1559
1559
|
const equals_wrappedMap_props = equalsObject(existing_wrappedMap, incoming_wrappedMap, (existing_wrappedMap_prop, incoming_wrappedMap_prop) => {
|
|
@@ -1564,9 +1564,9 @@ function equals$f(existing, incoming) {
|
|
|
1564
1564
|
return true;
|
|
1565
1565
|
}
|
|
1566
1566
|
|
|
1567
|
-
const TTL$
|
|
1568
|
-
const VERSION$
|
|
1569
|
-
function validate$
|
|
1567
|
+
const TTL$7 = 100;
|
|
1568
|
+
const VERSION$h = "d8abd72a42e842b253da1c38954dafbc";
|
|
1569
|
+
function validate$m(obj, path = 'EinsteinLlmGenerationsRepresentation') {
|
|
1570
1570
|
const v_error = (() => {
|
|
1571
1571
|
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
1572
1572
|
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
@@ -1579,7 +1579,7 @@ function validate$k(obj, path = 'EinsteinLlmGenerationsRepresentation') {
|
|
|
1579
1579
|
for (let i = 0; i < obj_generations.length; i++) {
|
|
1580
1580
|
const obj_generations_item = obj_generations[i];
|
|
1581
1581
|
const path_generations_item = path_generations + '[' + i + ']';
|
|
1582
|
-
const referencepath_generations_itemValidationError = validate$
|
|
1582
|
+
const referencepath_generations_itemValidationError = validate$o(obj_generations_item, path_generations_item);
|
|
1583
1583
|
if (referencepath_generations_itemValidationError !== null) {
|
|
1584
1584
|
let message = 'Object doesn\'t match EinsteinLlmGenerationItemRepresentation (at "' + path_generations_item + '")\n';
|
|
1585
1585
|
message += referencepath_generations_itemValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
@@ -1590,7 +1590,7 @@ function validate$k(obj, path = 'EinsteinLlmGenerationsRepresentation') {
|
|
|
1590
1590
|
const path_parameters = path + '.parameters';
|
|
1591
1591
|
let obj_parameters_union0 = null;
|
|
1592
1592
|
const obj_parameters_union0_error = (() => {
|
|
1593
|
-
const referencepath_parametersValidationError = validate$
|
|
1593
|
+
const referencepath_parametersValidationError = validate$n(obj_parameters, path_parameters);
|
|
1594
1594
|
if (referencepath_parametersValidationError !== null) {
|
|
1595
1595
|
let message = 'Object doesn\'t match WrappedMap (at "' + path_parameters + '")\n';
|
|
1596
1596
|
message += referencepath_parametersValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
@@ -1649,25 +1649,25 @@ function validate$k(obj, path = 'EinsteinLlmGenerationsRepresentation') {
|
|
|
1649
1649
|
})();
|
|
1650
1650
|
return v_error === undefined ? null : v_error;
|
|
1651
1651
|
}
|
|
1652
|
-
const RepresentationType$
|
|
1653
|
-
function keyBuilder$
|
|
1654
|
-
return keyPrefix + '::' + RepresentationType$
|
|
1652
|
+
const RepresentationType$7 = 'EinsteinLlmGenerationsRepresentation';
|
|
1653
|
+
function keyBuilder$c(luvio, config) {
|
|
1654
|
+
return keyPrefix + '::' + RepresentationType$7 + ':' + config.requestId;
|
|
1655
1655
|
}
|
|
1656
1656
|
function keyBuilderFromType$2(luvio, object) {
|
|
1657
1657
|
const keyParams = {
|
|
1658
1658
|
requestId: object.requestId
|
|
1659
1659
|
};
|
|
1660
|
-
return keyBuilder$
|
|
1660
|
+
return keyBuilder$c(luvio, keyParams);
|
|
1661
1661
|
}
|
|
1662
|
-
function normalize$
|
|
1662
|
+
function normalize$7(input, existing, path, luvio, store, timestamp) {
|
|
1663
1663
|
return input;
|
|
1664
1664
|
}
|
|
1665
|
-
const select$
|
|
1666
|
-
const { selections: EinsteinLlmGenerationItemRepresentation__selections, opaque: EinsteinLlmGenerationItemRepresentation__opaque, } = select$
|
|
1667
|
-
const { selections: WrappedMap__selections, opaque: WrappedMap__opaque, } = select$
|
|
1665
|
+
const select$s = function EinsteinLlmGenerationsRepresentationSelect() {
|
|
1666
|
+
const { selections: EinsteinLlmGenerationItemRepresentation__selections, opaque: EinsteinLlmGenerationItemRepresentation__opaque, } = select$u();
|
|
1667
|
+
const { selections: WrappedMap__selections, opaque: WrappedMap__opaque, } = select$t();
|
|
1668
1668
|
return {
|
|
1669
1669
|
kind: 'Fragment',
|
|
1670
|
-
version: VERSION$
|
|
1670
|
+
version: VERSION$h,
|
|
1671
1671
|
private: [],
|
|
1672
1672
|
selections: [
|
|
1673
1673
|
{
|
|
@@ -1693,7 +1693,7 @@ const select$n = function EinsteinLlmGenerationsRepresentationSelect() {
|
|
|
1693
1693
|
]
|
|
1694
1694
|
};
|
|
1695
1695
|
};
|
|
1696
|
-
function equals$
|
|
1696
|
+
function equals$h(existing, incoming) {
|
|
1697
1697
|
const existing_requestId = existing.requestId;
|
|
1698
1698
|
const incoming_requestId = incoming.requestId;
|
|
1699
1699
|
if (!(existing_requestId === incoming_requestId)) {
|
|
@@ -1702,7 +1702,7 @@ function equals$e(existing, incoming) {
|
|
|
1702
1702
|
const existing_generations = existing.generations;
|
|
1703
1703
|
const incoming_generations = incoming.generations;
|
|
1704
1704
|
const equals_generations_items = equalsArray(existing_generations, incoming_generations, (existing_generations_item, incoming_generations_item) => {
|
|
1705
|
-
if (!(equals$
|
|
1705
|
+
if (!(equals$j(existing_generations_item, incoming_generations_item))) {
|
|
1706
1706
|
return false;
|
|
1707
1707
|
}
|
|
1708
1708
|
});
|
|
@@ -1714,7 +1714,7 @@ function equals$e(existing, incoming) {
|
|
|
1714
1714
|
if (!(existing_parameters === incoming_parameters
|
|
1715
1715
|
|| (existing_parameters != null &&
|
|
1716
1716
|
incoming_parameters != null &&
|
|
1717
|
-
equals$
|
|
1717
|
+
equals$i(existing_parameters, incoming_parameters)))) {
|
|
1718
1718
|
return false;
|
|
1719
1719
|
}
|
|
1720
1720
|
const existing_prompt = existing.prompt;
|
|
@@ -1724,41 +1724,41 @@ function equals$e(existing, incoming) {
|
|
|
1724
1724
|
}
|
|
1725
1725
|
return true;
|
|
1726
1726
|
}
|
|
1727
|
-
const ingest$
|
|
1727
|
+
const ingest$7 = function EinsteinLlmGenerationsRepresentationIngest(input, path, luvio, store, timestamp) {
|
|
1728
1728
|
if (process.env.NODE_ENV !== 'production') {
|
|
1729
|
-
const validateError = validate$
|
|
1729
|
+
const validateError = validate$m(input);
|
|
1730
1730
|
if (validateError !== null) {
|
|
1731
1731
|
throw validateError;
|
|
1732
1732
|
}
|
|
1733
1733
|
}
|
|
1734
1734
|
const key = keyBuilderFromType$2(luvio, input);
|
|
1735
|
-
const ttlToUse = TTL$
|
|
1736
|
-
ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize$
|
|
1735
|
+
const ttlToUse = TTL$7;
|
|
1736
|
+
ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize$7, "EinsteinLLM", VERSION$h, RepresentationType$7, equals$h);
|
|
1737
1737
|
return createLink(key);
|
|
1738
1738
|
};
|
|
1739
|
-
function getTypeCacheKeys$
|
|
1739
|
+
function getTypeCacheKeys$7(rootKeySet, luvio, input, fullPathFactory) {
|
|
1740
1740
|
// root cache key (uses fullPathFactory if keyBuilderFromType isn't defined)
|
|
1741
1741
|
const rootKey = keyBuilderFromType$2(luvio, input);
|
|
1742
1742
|
rootKeySet.set(rootKey, {
|
|
1743
1743
|
namespace: keyPrefix,
|
|
1744
|
-
representationName: RepresentationType$
|
|
1744
|
+
representationName: RepresentationType$7,
|
|
1745
1745
|
mergeable: false
|
|
1746
1746
|
});
|
|
1747
1747
|
}
|
|
1748
1748
|
|
|
1749
|
-
function select$
|
|
1750
|
-
return select$
|
|
1749
|
+
function select$r(luvio, params) {
|
|
1750
|
+
return select$s();
|
|
1751
1751
|
}
|
|
1752
|
-
function getResponseCacheKeys$
|
|
1753
|
-
getTypeCacheKeys$
|
|
1752
|
+
function getResponseCacheKeys$a(storeKeyMap, luvio, resourceParams, response) {
|
|
1753
|
+
getTypeCacheKeys$7(storeKeyMap, luvio, response);
|
|
1754
1754
|
}
|
|
1755
|
-
function ingestSuccess$
|
|
1755
|
+
function ingestSuccess$a(luvio, resourceParams, response) {
|
|
1756
1756
|
const { body } = response;
|
|
1757
1757
|
const key = keyBuilderFromType$2(luvio, body);
|
|
1758
|
-
luvio.storeIngest(key, ingest$
|
|
1758
|
+
luvio.storeIngest(key, ingest$7, body);
|
|
1759
1759
|
const snapshot = luvio.storeLookup({
|
|
1760
1760
|
recordId: key,
|
|
1761
|
-
node: select$
|
|
1761
|
+
node: select$r(),
|
|
1762
1762
|
variables: {},
|
|
1763
1763
|
});
|
|
1764
1764
|
if (process.env.NODE_ENV !== 'production') {
|
|
@@ -1769,7 +1769,7 @@ function ingestSuccess$8(luvio, resourceParams, response) {
|
|
|
1769
1769
|
deepFreeze(snapshot.data);
|
|
1770
1770
|
return snapshot;
|
|
1771
1771
|
}
|
|
1772
|
-
function createResourceRequest$
|
|
1772
|
+
function createResourceRequest$a(config) {
|
|
1773
1773
|
const headers = {};
|
|
1774
1774
|
return {
|
|
1775
1775
|
baseUri: '/services/data/v65.0',
|
|
@@ -1783,45 +1783,45 @@ function createResourceRequest$8(config) {
|
|
|
1783
1783
|
};
|
|
1784
1784
|
}
|
|
1785
1785
|
|
|
1786
|
-
const adapterName$
|
|
1786
|
+
const adapterName$a = 'createGenerations';
|
|
1787
1787
|
const createGenerations_ConfigPropertyMetadata = [
|
|
1788
1788
|
generateParamConfigMetadata('generationsInput', true, 2 /* Body */, 4 /* Unsupported */),
|
|
1789
1789
|
];
|
|
1790
|
-
const createGenerations_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$
|
|
1791
|
-
const createResourceParams$
|
|
1792
|
-
function typeCheckConfig$
|
|
1790
|
+
const createGenerations_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$a, createGenerations_ConfigPropertyMetadata);
|
|
1791
|
+
const createResourceParams$a = /*#__PURE__*/ createResourceParams$d(createGenerations_ConfigPropertyMetadata);
|
|
1792
|
+
function typeCheckConfig$a(untrustedConfig) {
|
|
1793
1793
|
const config = {};
|
|
1794
1794
|
const untrustedConfig_generationsInput = untrustedConfig.generationsInput;
|
|
1795
|
-
const referenceEinsteinLlmGenerationsInputRepresentationValidationError = validate$
|
|
1795
|
+
const referenceEinsteinLlmGenerationsInputRepresentationValidationError = validate$r(untrustedConfig_generationsInput);
|
|
1796
1796
|
if (referenceEinsteinLlmGenerationsInputRepresentationValidationError === null) {
|
|
1797
1797
|
config.generationsInput = untrustedConfig_generationsInput;
|
|
1798
1798
|
}
|
|
1799
1799
|
return config;
|
|
1800
1800
|
}
|
|
1801
|
-
function validateAdapterConfig$
|
|
1801
|
+
function validateAdapterConfig$a(untrustedConfig, configPropertyNames) {
|
|
1802
1802
|
if (!untrustedIsObject(untrustedConfig)) {
|
|
1803
1803
|
return null;
|
|
1804
1804
|
}
|
|
1805
1805
|
if (process.env.NODE_ENV !== 'production') {
|
|
1806
1806
|
validateConfig(untrustedConfig, configPropertyNames);
|
|
1807
1807
|
}
|
|
1808
|
-
const config = typeCheckConfig$
|
|
1808
|
+
const config = typeCheckConfig$a(untrustedConfig);
|
|
1809
1809
|
if (!areRequiredParametersPresent(config, configPropertyNames)) {
|
|
1810
1810
|
return null;
|
|
1811
1811
|
}
|
|
1812
1812
|
return config;
|
|
1813
1813
|
}
|
|
1814
|
-
function buildNetworkSnapshot$
|
|
1815
|
-
const resourceParams = createResourceParams$
|
|
1816
|
-
const request = createResourceRequest$
|
|
1814
|
+
function buildNetworkSnapshot$a(luvio, config, options) {
|
|
1815
|
+
const resourceParams = createResourceParams$a(config);
|
|
1816
|
+
const request = createResourceRequest$a(resourceParams);
|
|
1817
1817
|
return luvio.dispatchResourceRequest(request, options)
|
|
1818
1818
|
.then((response) => {
|
|
1819
1819
|
return luvio.handleSuccessResponse(() => {
|
|
1820
|
-
const snapshot = ingestSuccess$
|
|
1820
|
+
const snapshot = ingestSuccess$a(luvio, resourceParams, response);
|
|
1821
1821
|
return luvio.storeBroadcast().then(() => snapshot);
|
|
1822
1822
|
}, () => {
|
|
1823
1823
|
const cache = new StoreKeyMap();
|
|
1824
|
-
getResponseCacheKeys$
|
|
1824
|
+
getResponseCacheKeys$a(cache, luvio, resourceParams, response.body);
|
|
1825
1825
|
return cache;
|
|
1826
1826
|
});
|
|
1827
1827
|
}, (response) => {
|
|
@@ -1831,16 +1831,16 @@ function buildNetworkSnapshot$8(luvio, config, options) {
|
|
|
1831
1831
|
}
|
|
1832
1832
|
const createGenerationsAdapterFactory = (luvio) => {
|
|
1833
1833
|
return function createGenerations(untrustedConfig) {
|
|
1834
|
-
const config = validateAdapterConfig$
|
|
1834
|
+
const config = validateAdapterConfig$a(untrustedConfig, createGenerations_ConfigPropertyNames);
|
|
1835
1835
|
// Invalid or incomplete config
|
|
1836
1836
|
if (config === null) {
|
|
1837
1837
|
throw new Error('Invalid config for "createGenerations"');
|
|
1838
1838
|
}
|
|
1839
|
-
return buildNetworkSnapshot$
|
|
1839
|
+
return buildNetworkSnapshot$a(luvio, config);
|
|
1840
1840
|
};
|
|
1841
1841
|
};
|
|
1842
1842
|
|
|
1843
|
-
function validate$
|
|
1843
|
+
function validate$l(obj, path = 'WrappedValueMap') {
|
|
1844
1844
|
const v_error = (() => {
|
|
1845
1845
|
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
1846
1846
|
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
@@ -1863,7 +1863,7 @@ function validate$j(obj, path = 'WrappedValueMap') {
|
|
|
1863
1863
|
return v_error === undefined ? null : v_error;
|
|
1864
1864
|
}
|
|
1865
1865
|
|
|
1866
|
-
function validate$
|
|
1866
|
+
function validate$k(obj, path = 'EinsteinPromptTemplateGenerationsInputRepresentation') {
|
|
1867
1867
|
const v_error = (() => {
|
|
1868
1868
|
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
1869
1869
|
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
@@ -1871,7 +1871,7 @@ function validate$i(obj, path = 'EinsteinPromptTemplateGenerationsInputRepresent
|
|
|
1871
1871
|
if (obj.additionalConfig !== undefined) {
|
|
1872
1872
|
const obj_additionalConfig = obj.additionalConfig;
|
|
1873
1873
|
const path_additionalConfig = path + '.additionalConfig';
|
|
1874
|
-
const referencepath_additionalConfigValidationError = validate$
|
|
1874
|
+
const referencepath_additionalConfigValidationError = validate$s(obj_additionalConfig, path_additionalConfig);
|
|
1875
1875
|
if (referencepath_additionalConfigValidationError !== null) {
|
|
1876
1876
|
let message = 'Object doesn\'t match EinsteinLlmAdditionalConfigInputRepresentation (at "' + path_additionalConfig + '")\n';
|
|
1877
1877
|
message += referencepath_additionalConfigValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
@@ -1880,7 +1880,7 @@ function validate$i(obj, path = 'EinsteinPromptTemplateGenerationsInputRepresent
|
|
|
1880
1880
|
}
|
|
1881
1881
|
const obj_inputParams = obj.inputParams;
|
|
1882
1882
|
const path_inputParams = path + '.inputParams';
|
|
1883
|
-
const referencepath_inputParamsValidationError = validate$
|
|
1883
|
+
const referencepath_inputParamsValidationError = validate$l(obj_inputParams, path_inputParams);
|
|
1884
1884
|
if (referencepath_inputParamsValidationError !== null) {
|
|
1885
1885
|
let message = 'Object doesn\'t match WrappedValueMap (at "' + path_inputParams + '")\n';
|
|
1886
1886
|
message += referencepath_inputParamsValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
@@ -1916,171 +1916,409 @@ function validate$i(obj, path = 'EinsteinPromptTemplateGenerationsInputRepresent
|
|
|
1916
1916
|
return v_error === undefined ? null : v_error;
|
|
1917
1917
|
}
|
|
1918
1918
|
|
|
1919
|
-
const VERSION$
|
|
1920
|
-
function validate$
|
|
1919
|
+
const VERSION$g = "63584d83290e21bdff26b1bef3db119c";
|
|
1920
|
+
function validate$j(obj, path = 'EinsteinLlmGenerationGenAiCitedReferenceRepresentation') {
|
|
1921
1921
|
const v_error = (() => {
|
|
1922
1922
|
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
1923
1923
|
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
1924
1924
|
}
|
|
1925
|
-
|
|
1926
|
-
|
|
1927
|
-
|
|
1928
|
-
|
|
1929
|
-
|
|
1930
|
-
|
|
1931
|
-
|
|
1932
|
-
|
|
1933
|
-
|
|
1934
|
-
|
|
1935
|
-
|
|
1936
|
-
|
|
1937
|
-
}
|
|
1938
|
-
const select$l = function EinsteinPromptTemplateAttachmentExclusionInfoRepresentationSelect() {
|
|
1939
|
-
return {
|
|
1940
|
-
kind: 'Fragment',
|
|
1941
|
-
version: VERSION$d,
|
|
1942
|
-
private: [],
|
|
1943
|
-
selections: [
|
|
1944
|
-
{
|
|
1945
|
-
name: 'exclusionReason',
|
|
1946
|
-
kind: 'Scalar'
|
|
1947
|
-
},
|
|
1948
|
-
{
|
|
1949
|
-
name: 'isExcluded',
|
|
1950
|
-
kind: 'Scalar'
|
|
1925
|
+
if (obj.citationLocations !== undefined) {
|
|
1926
|
+
const obj_citationLocations = obj.citationLocations;
|
|
1927
|
+
const path_citationLocations = path + '.citationLocations';
|
|
1928
|
+
if (!ArrayIsArray(obj_citationLocations)) {
|
|
1929
|
+
return new TypeError('Expected "array" but received "' + typeof obj_citationLocations + '" (at "' + path_citationLocations + '")');
|
|
1930
|
+
}
|
|
1931
|
+
for (let i = 0; i < obj_citationLocations.length; i++) {
|
|
1932
|
+
const obj_citationLocations_item = obj_citationLocations[i];
|
|
1933
|
+
const path_citationLocations_item = path_citationLocations + '[' + i + ']';
|
|
1934
|
+
if (typeof obj_citationLocations_item !== 'number' || (typeof obj_citationLocations_item === 'number' && Math.floor(obj_citationLocations_item) !== obj_citationLocations_item)) {
|
|
1935
|
+
return new TypeError('Expected "integer" but received "' + typeof obj_citationLocations_item + '" (at "' + path_citationLocations_item + '")');
|
|
1936
|
+
}
|
|
1951
1937
|
}
|
|
1952
|
-
]
|
|
1953
|
-
};
|
|
1954
|
-
};
|
|
1955
|
-
function equals$d(existing, incoming) {
|
|
1956
|
-
const existing_isExcluded = existing.isExcluded;
|
|
1957
|
-
const incoming_isExcluded = incoming.isExcluded;
|
|
1958
|
-
if (!(existing_isExcluded === incoming_isExcluded)) {
|
|
1959
|
-
return false;
|
|
1960
|
-
}
|
|
1961
|
-
const existing_exclusionReason = existing.exclusionReason;
|
|
1962
|
-
const incoming_exclusionReason = incoming.exclusionReason;
|
|
1963
|
-
if (!(existing_exclusionReason === incoming_exclusionReason)) {
|
|
1964
|
-
return false;
|
|
1965
|
-
}
|
|
1966
|
-
return true;
|
|
1967
|
-
}
|
|
1968
|
-
|
|
1969
|
-
const VERSION$c = "b85a5621c60125d9f1644af130f67680";
|
|
1970
|
-
function validate$g(obj, path = 'EinsteinPromptTemplateAttachmentRepresentation') {
|
|
1971
|
-
const v_error = (() => {
|
|
1972
|
-
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
1973
|
-
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
1974
1938
|
}
|
|
1975
|
-
if (obj.
|
|
1976
|
-
const
|
|
1977
|
-
const
|
|
1978
|
-
|
|
1979
|
-
|
|
1980
|
-
|
|
1981
|
-
|
|
1982
|
-
|
|
1939
|
+
if (obj.claims !== undefined) {
|
|
1940
|
+
const obj_claims = obj.claims;
|
|
1941
|
+
const path_claims = path + '.claims';
|
|
1942
|
+
if (!ArrayIsArray(obj_claims)) {
|
|
1943
|
+
return new TypeError('Expected "array" but received "' + typeof obj_claims + '" (at "' + path_claims + '")');
|
|
1944
|
+
}
|
|
1945
|
+
for (let i = 0; i < obj_claims.length; i++) {
|
|
1946
|
+
const obj_claims_item = obj_claims[i];
|
|
1947
|
+
const path_claims_item = path_claims + '[' + i + ']';
|
|
1948
|
+
if (typeof obj_claims_item !== 'string') {
|
|
1949
|
+
return new TypeError('Expected "string" but received "' + typeof obj_claims_item + '" (at "' + path_claims_item + '")');
|
|
1950
|
+
}
|
|
1983
1951
|
}
|
|
1984
1952
|
}
|
|
1985
|
-
|
|
1986
|
-
|
|
1987
|
-
|
|
1988
|
-
|
|
1989
|
-
|
|
1990
|
-
|
|
1991
|
-
const path_id = path + '.id';
|
|
1992
|
-
if (typeof obj_id !== 'string') {
|
|
1993
|
-
return new TypeError('Expected "string" but received "' + typeof obj_id + '" (at "' + path_id + '")');
|
|
1994
|
-
}
|
|
1995
|
-
const obj_latestPublishedVersion = obj.latestPublishedVersion;
|
|
1996
|
-
const path_latestPublishedVersion = path + '.latestPublishedVersion';
|
|
1997
|
-
if (typeof obj_latestPublishedVersion !== 'string') {
|
|
1998
|
-
return new TypeError('Expected "string" but received "' + typeof obj_latestPublishedVersion + '" (at "' + path_latestPublishedVersion + '")');
|
|
1953
|
+
if (obj.link !== undefined) {
|
|
1954
|
+
const obj_link = obj.link;
|
|
1955
|
+
const path_link = path + '.link';
|
|
1956
|
+
if (typeof obj_link !== 'string') {
|
|
1957
|
+
return new TypeError('Expected "string" but received "' + typeof obj_link + '" (at "' + path_link + '")');
|
|
1958
|
+
}
|
|
1999
1959
|
}
|
|
2000
|
-
if (obj.
|
|
2001
|
-
const
|
|
2002
|
-
const
|
|
2003
|
-
if (typeof
|
|
2004
|
-
return new TypeError('Expected "string" but received "' + typeof
|
|
1960
|
+
if (obj.sourceObjectApiName !== undefined) {
|
|
1961
|
+
const obj_sourceObjectApiName = obj.sourceObjectApiName;
|
|
1962
|
+
const path_sourceObjectApiName = path + '.sourceObjectApiName';
|
|
1963
|
+
if (typeof obj_sourceObjectApiName !== 'string') {
|
|
1964
|
+
return new TypeError('Expected "string" but received "' + typeof obj_sourceObjectApiName + '" (at "' + path_sourceObjectApiName + '")');
|
|
2005
1965
|
}
|
|
2006
1966
|
}
|
|
2007
|
-
|
|
2008
|
-
|
|
2009
|
-
|
|
2010
|
-
|
|
1967
|
+
if (obj.sourceObjectRecordId !== undefined) {
|
|
1968
|
+
const obj_sourceObjectRecordId = obj.sourceObjectRecordId;
|
|
1969
|
+
const path_sourceObjectRecordId = path + '.sourceObjectRecordId';
|
|
1970
|
+
if (typeof obj_sourceObjectRecordId !== 'string') {
|
|
1971
|
+
return new TypeError('Expected "string" but received "' + typeof obj_sourceObjectRecordId + '" (at "' + path_sourceObjectRecordId + '")');
|
|
1972
|
+
}
|
|
2011
1973
|
}
|
|
2012
1974
|
})();
|
|
2013
1975
|
return v_error === undefined ? null : v_error;
|
|
2014
1976
|
}
|
|
2015
|
-
const select$
|
|
2016
|
-
const { selections: EinsteinPromptTemplateAttachmentExclusionInfoRepresentation__selections, opaque: EinsteinPromptTemplateAttachmentExclusionInfoRepresentation__opaque, } = select$l();
|
|
1977
|
+
const select$q = function EinsteinLlmGenerationGenAiCitedReferenceRepresentationSelect() {
|
|
2017
1978
|
return {
|
|
2018
1979
|
kind: 'Fragment',
|
|
2019
|
-
version: VERSION$
|
|
1980
|
+
version: VERSION$g,
|
|
2020
1981
|
private: [],
|
|
2021
1982
|
selections: [
|
|
2022
1983
|
{
|
|
2023
|
-
name: '
|
|
2024
|
-
kind: '
|
|
2025
|
-
|
|
1984
|
+
name: 'citationLocations',
|
|
1985
|
+
kind: 'Scalar',
|
|
1986
|
+
plural: true,
|
|
2026
1987
|
required: false
|
|
2027
1988
|
},
|
|
2028
1989
|
{
|
|
2029
|
-
name: '
|
|
2030
|
-
kind: 'Scalar'
|
|
2031
|
-
|
|
2032
|
-
|
|
2033
|
-
name: 'id',
|
|
2034
|
-
kind: 'Scalar'
|
|
1990
|
+
name: 'claims',
|
|
1991
|
+
kind: 'Scalar',
|
|
1992
|
+
plural: true,
|
|
1993
|
+
required: false
|
|
2035
1994
|
},
|
|
2036
1995
|
{
|
|
2037
|
-
name: '
|
|
2038
|
-
kind: 'Scalar'
|
|
1996
|
+
name: 'link',
|
|
1997
|
+
kind: 'Scalar',
|
|
1998
|
+
required: false
|
|
2039
1999
|
},
|
|
2040
2000
|
{
|
|
2041
|
-
name: '
|
|
2001
|
+
name: 'sourceObjectApiName',
|
|
2042
2002
|
kind: 'Scalar',
|
|
2043
2003
|
required: false
|
|
2044
2004
|
},
|
|
2045
2005
|
{
|
|
2046
|
-
name: '
|
|
2047
|
-
kind: 'Scalar'
|
|
2006
|
+
name: 'sourceObjectRecordId',
|
|
2007
|
+
kind: 'Scalar',
|
|
2008
|
+
required: false
|
|
2048
2009
|
}
|
|
2049
2010
|
]
|
|
2050
2011
|
};
|
|
2051
2012
|
};
|
|
2052
|
-
function equals$
|
|
2053
|
-
const
|
|
2054
|
-
const
|
|
2055
|
-
if (!(existing_fileExtension === incoming_fileExtension)) {
|
|
2056
|
-
return false;
|
|
2057
|
-
}
|
|
2058
|
-
const existing_id = existing.id;
|
|
2059
|
-
const incoming_id = incoming.id;
|
|
2060
|
-
if (!(existing_id === incoming_id)) {
|
|
2061
|
-
return false;
|
|
2062
|
-
}
|
|
2063
|
-
const existing_latestPublishedVersion = existing.latestPublishedVersion;
|
|
2064
|
-
const incoming_latestPublishedVersion = incoming.latestPublishedVersion;
|
|
2065
|
-
if (!(existing_latestPublishedVersion === incoming_latestPublishedVersion)) {
|
|
2066
|
-
return false;
|
|
2067
|
-
}
|
|
2068
|
-
const existing_parentName = existing.parentName;
|
|
2069
|
-
const incoming_parentName = incoming.parentName;
|
|
2013
|
+
function equals$g(existing, incoming) {
|
|
2014
|
+
const existing_link = existing.link;
|
|
2015
|
+
const incoming_link = incoming.link;
|
|
2070
2016
|
// if at least one of these optionals is defined
|
|
2071
|
-
if (
|
|
2017
|
+
if (existing_link !== undefined || incoming_link !== undefined) {
|
|
2072
2018
|
// if one of these is not defined we know the other is defined and therefore
|
|
2073
2019
|
// not equal
|
|
2074
|
-
if (
|
|
2020
|
+
if (existing_link === undefined || incoming_link === undefined) {
|
|
2075
2021
|
return false;
|
|
2076
2022
|
}
|
|
2077
|
-
if (!(
|
|
2023
|
+
if (!(existing_link === incoming_link)) {
|
|
2078
2024
|
return false;
|
|
2079
2025
|
}
|
|
2080
2026
|
}
|
|
2081
|
-
const
|
|
2082
|
-
const
|
|
2083
|
-
if
|
|
2027
|
+
const existing_sourceObjectApiName = existing.sourceObjectApiName;
|
|
2028
|
+
const incoming_sourceObjectApiName = incoming.sourceObjectApiName;
|
|
2029
|
+
// if at least one of these optionals is defined
|
|
2030
|
+
if (existing_sourceObjectApiName !== undefined || incoming_sourceObjectApiName !== undefined) {
|
|
2031
|
+
// if one of these is not defined we know the other is defined and therefore
|
|
2032
|
+
// not equal
|
|
2033
|
+
if (existing_sourceObjectApiName === undefined || incoming_sourceObjectApiName === undefined) {
|
|
2034
|
+
return false;
|
|
2035
|
+
}
|
|
2036
|
+
if (!(existing_sourceObjectApiName === incoming_sourceObjectApiName)) {
|
|
2037
|
+
return false;
|
|
2038
|
+
}
|
|
2039
|
+
}
|
|
2040
|
+
const existing_sourceObjectRecordId = existing.sourceObjectRecordId;
|
|
2041
|
+
const incoming_sourceObjectRecordId = incoming.sourceObjectRecordId;
|
|
2042
|
+
// if at least one of these optionals is defined
|
|
2043
|
+
if (existing_sourceObjectRecordId !== undefined || incoming_sourceObjectRecordId !== undefined) {
|
|
2044
|
+
// if one of these is not defined we know the other is defined and therefore
|
|
2045
|
+
// not equal
|
|
2046
|
+
if (existing_sourceObjectRecordId === undefined || incoming_sourceObjectRecordId === undefined) {
|
|
2047
|
+
return false;
|
|
2048
|
+
}
|
|
2049
|
+
if (!(existing_sourceObjectRecordId === incoming_sourceObjectRecordId)) {
|
|
2050
|
+
return false;
|
|
2051
|
+
}
|
|
2052
|
+
}
|
|
2053
|
+
const existing_citationLocations = existing.citationLocations;
|
|
2054
|
+
const incoming_citationLocations = incoming.citationLocations;
|
|
2055
|
+
// if at least one of these optionals is defined
|
|
2056
|
+
if (existing_citationLocations !== undefined || incoming_citationLocations !== undefined) {
|
|
2057
|
+
// if one of these is not defined we know the other is defined and therefore
|
|
2058
|
+
// not equal
|
|
2059
|
+
if (existing_citationLocations === undefined || incoming_citationLocations === undefined) {
|
|
2060
|
+
return false;
|
|
2061
|
+
}
|
|
2062
|
+
const equals_citationLocations_items = equalsArray(existing_citationLocations, incoming_citationLocations, (existing_citationLocations_item, incoming_citationLocations_item) => {
|
|
2063
|
+
if (!(existing_citationLocations_item === incoming_citationLocations_item)) {
|
|
2064
|
+
return false;
|
|
2065
|
+
}
|
|
2066
|
+
});
|
|
2067
|
+
if (equals_citationLocations_items === false) {
|
|
2068
|
+
return false;
|
|
2069
|
+
}
|
|
2070
|
+
}
|
|
2071
|
+
const existing_claims = existing.claims;
|
|
2072
|
+
const incoming_claims = incoming.claims;
|
|
2073
|
+
// if at least one of these optionals is defined
|
|
2074
|
+
if (existing_claims !== undefined || incoming_claims !== undefined) {
|
|
2075
|
+
// if one of these is not defined we know the other is defined and therefore
|
|
2076
|
+
// not equal
|
|
2077
|
+
if (existing_claims === undefined || incoming_claims === undefined) {
|
|
2078
|
+
return false;
|
|
2079
|
+
}
|
|
2080
|
+
const equals_claims_items = equalsArray(existing_claims, incoming_claims, (existing_claims_item, incoming_claims_item) => {
|
|
2081
|
+
if (!(existing_claims_item === incoming_claims_item)) {
|
|
2082
|
+
return false;
|
|
2083
|
+
}
|
|
2084
|
+
});
|
|
2085
|
+
if (equals_claims_items === false) {
|
|
2086
|
+
return false;
|
|
2087
|
+
}
|
|
2088
|
+
}
|
|
2089
|
+
return true;
|
|
2090
|
+
}
|
|
2091
|
+
|
|
2092
|
+
const VERSION$f = "bcc0ea08323732f4187dd2b9f70fea6c";
|
|
2093
|
+
function validate$i(obj, path = 'EinsteinLlmGenerationCitationRepresentation') {
|
|
2094
|
+
const v_error = (() => {
|
|
2095
|
+
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
2096
|
+
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
2097
|
+
}
|
|
2098
|
+
if (obj.citedReferences !== undefined) {
|
|
2099
|
+
const obj_citedReferences = obj.citedReferences;
|
|
2100
|
+
const path_citedReferences = path + '.citedReferences';
|
|
2101
|
+
if (!ArrayIsArray(obj_citedReferences)) {
|
|
2102
|
+
return new TypeError('Expected "array" but received "' + typeof obj_citedReferences + '" (at "' + path_citedReferences + '")');
|
|
2103
|
+
}
|
|
2104
|
+
for (let i = 0; i < obj_citedReferences.length; i++) {
|
|
2105
|
+
const obj_citedReferences_item = obj_citedReferences[i];
|
|
2106
|
+
const path_citedReferences_item = path_citedReferences + '[' + i + ']';
|
|
2107
|
+
const referencepath_citedReferences_itemValidationError = validate$j(obj_citedReferences_item, path_citedReferences_item);
|
|
2108
|
+
if (referencepath_citedReferences_itemValidationError !== null) {
|
|
2109
|
+
let message = 'Object doesn\'t match EinsteinLlmGenerationGenAiCitedReferenceRepresentation (at "' + path_citedReferences_item + '")\n';
|
|
2110
|
+
message += referencepath_citedReferences_itemValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
2111
|
+
return new TypeError(message);
|
|
2112
|
+
}
|
|
2113
|
+
}
|
|
2114
|
+
}
|
|
2115
|
+
})();
|
|
2116
|
+
return v_error === undefined ? null : v_error;
|
|
2117
|
+
}
|
|
2118
|
+
const select$p = function EinsteinLlmGenerationCitationRepresentationSelect() {
|
|
2119
|
+
const { selections: EinsteinLlmGenerationGenAiCitedReferenceRepresentation__selections, opaque: EinsteinLlmGenerationGenAiCitedReferenceRepresentation__opaque, } = select$q();
|
|
2120
|
+
return {
|
|
2121
|
+
kind: 'Fragment',
|
|
2122
|
+
version: VERSION$f,
|
|
2123
|
+
private: [],
|
|
2124
|
+
selections: [
|
|
2125
|
+
{
|
|
2126
|
+
name: 'citedReferences',
|
|
2127
|
+
kind: 'Object',
|
|
2128
|
+
plural: true,
|
|
2129
|
+
selections: EinsteinLlmGenerationGenAiCitedReferenceRepresentation__selections,
|
|
2130
|
+
required: false
|
|
2131
|
+
}
|
|
2132
|
+
]
|
|
2133
|
+
};
|
|
2134
|
+
};
|
|
2135
|
+
function equals$f(existing, incoming) {
|
|
2136
|
+
const existing_citedReferences = existing.citedReferences;
|
|
2137
|
+
const incoming_citedReferences = incoming.citedReferences;
|
|
2138
|
+
// if at least one of these optionals is defined
|
|
2139
|
+
if (existing_citedReferences !== undefined || incoming_citedReferences !== undefined) {
|
|
2140
|
+
// if one of these is not defined we know the other is defined and therefore
|
|
2141
|
+
// not equal
|
|
2142
|
+
if (existing_citedReferences === undefined || incoming_citedReferences === undefined) {
|
|
2143
|
+
return false;
|
|
2144
|
+
}
|
|
2145
|
+
const equals_citedReferences_items = equalsArray(existing_citedReferences, incoming_citedReferences, (existing_citedReferences_item, incoming_citedReferences_item) => {
|
|
2146
|
+
if (!(equals$g(existing_citedReferences_item, incoming_citedReferences_item))) {
|
|
2147
|
+
return false;
|
|
2148
|
+
}
|
|
2149
|
+
});
|
|
2150
|
+
if (equals_citedReferences_items === false) {
|
|
2151
|
+
return false;
|
|
2152
|
+
}
|
|
2153
|
+
}
|
|
2154
|
+
return true;
|
|
2155
|
+
}
|
|
2156
|
+
|
|
2157
|
+
const VERSION$e = "f62ac44b024b123f079b57f349e05230";
|
|
2158
|
+
function validate$h(obj, path = 'EinsteinPromptTemplateAttachmentExclusionInfoRepresentation') {
|
|
2159
|
+
const v_error = (() => {
|
|
2160
|
+
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
2161
|
+
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
2162
|
+
}
|
|
2163
|
+
const obj_exclusionReason = obj.exclusionReason;
|
|
2164
|
+
const path_exclusionReason = path + '.exclusionReason';
|
|
2165
|
+
if (typeof obj_exclusionReason !== 'string') {
|
|
2166
|
+
return new TypeError('Expected "string" but received "' + typeof obj_exclusionReason + '" (at "' + path_exclusionReason + '")');
|
|
2167
|
+
}
|
|
2168
|
+
const obj_isExcluded = obj.isExcluded;
|
|
2169
|
+
const path_isExcluded = path + '.isExcluded';
|
|
2170
|
+
if (typeof obj_isExcluded !== 'boolean') {
|
|
2171
|
+
return new TypeError('Expected "boolean" but received "' + typeof obj_isExcluded + '" (at "' + path_isExcluded + '")');
|
|
2172
|
+
}
|
|
2173
|
+
})();
|
|
2174
|
+
return v_error === undefined ? null : v_error;
|
|
2175
|
+
}
|
|
2176
|
+
const select$o = function EinsteinPromptTemplateAttachmentExclusionInfoRepresentationSelect() {
|
|
2177
|
+
return {
|
|
2178
|
+
kind: 'Fragment',
|
|
2179
|
+
version: VERSION$e,
|
|
2180
|
+
private: [],
|
|
2181
|
+
selections: [
|
|
2182
|
+
{
|
|
2183
|
+
name: 'exclusionReason',
|
|
2184
|
+
kind: 'Scalar'
|
|
2185
|
+
},
|
|
2186
|
+
{
|
|
2187
|
+
name: 'isExcluded',
|
|
2188
|
+
kind: 'Scalar'
|
|
2189
|
+
}
|
|
2190
|
+
]
|
|
2191
|
+
};
|
|
2192
|
+
};
|
|
2193
|
+
function equals$e(existing, incoming) {
|
|
2194
|
+
const existing_isExcluded = existing.isExcluded;
|
|
2195
|
+
const incoming_isExcluded = incoming.isExcluded;
|
|
2196
|
+
if (!(existing_isExcluded === incoming_isExcluded)) {
|
|
2197
|
+
return false;
|
|
2198
|
+
}
|
|
2199
|
+
const existing_exclusionReason = existing.exclusionReason;
|
|
2200
|
+
const incoming_exclusionReason = incoming.exclusionReason;
|
|
2201
|
+
if (!(existing_exclusionReason === incoming_exclusionReason)) {
|
|
2202
|
+
return false;
|
|
2203
|
+
}
|
|
2204
|
+
return true;
|
|
2205
|
+
}
|
|
2206
|
+
|
|
2207
|
+
const VERSION$d = "b85a5621c60125d9f1644af130f67680";
|
|
2208
|
+
function validate$g(obj, path = 'EinsteinPromptTemplateAttachmentRepresentation') {
|
|
2209
|
+
const v_error = (() => {
|
|
2210
|
+
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
2211
|
+
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
2212
|
+
}
|
|
2213
|
+
if (obj.exclusionInfo !== undefined) {
|
|
2214
|
+
const obj_exclusionInfo = obj.exclusionInfo;
|
|
2215
|
+
const path_exclusionInfo = path + '.exclusionInfo';
|
|
2216
|
+
const referencepath_exclusionInfoValidationError = validate$h(obj_exclusionInfo, path_exclusionInfo);
|
|
2217
|
+
if (referencepath_exclusionInfoValidationError !== null) {
|
|
2218
|
+
let message = 'Object doesn\'t match EinsteinPromptTemplateAttachmentExclusionInfoRepresentation (at "' + path_exclusionInfo + '")\n';
|
|
2219
|
+
message += referencepath_exclusionInfoValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
2220
|
+
return new TypeError(message);
|
|
2221
|
+
}
|
|
2222
|
+
}
|
|
2223
|
+
const obj_fileExtension = obj.fileExtension;
|
|
2224
|
+
const path_fileExtension = path + '.fileExtension';
|
|
2225
|
+
if (typeof obj_fileExtension !== 'string') {
|
|
2226
|
+
return new TypeError('Expected "string" but received "' + typeof obj_fileExtension + '" (at "' + path_fileExtension + '")');
|
|
2227
|
+
}
|
|
2228
|
+
const obj_id = obj.id;
|
|
2229
|
+
const path_id = path + '.id';
|
|
2230
|
+
if (typeof obj_id !== 'string') {
|
|
2231
|
+
return new TypeError('Expected "string" but received "' + typeof obj_id + '" (at "' + path_id + '")');
|
|
2232
|
+
}
|
|
2233
|
+
const obj_latestPublishedVersion = obj.latestPublishedVersion;
|
|
2234
|
+
const path_latestPublishedVersion = path + '.latestPublishedVersion';
|
|
2235
|
+
if (typeof obj_latestPublishedVersion !== 'string') {
|
|
2236
|
+
return new TypeError('Expected "string" but received "' + typeof obj_latestPublishedVersion + '" (at "' + path_latestPublishedVersion + '")');
|
|
2237
|
+
}
|
|
2238
|
+
if (obj.parentName !== undefined) {
|
|
2239
|
+
const obj_parentName = obj.parentName;
|
|
2240
|
+
const path_parentName = path + '.parentName';
|
|
2241
|
+
if (typeof obj_parentName !== 'string') {
|
|
2242
|
+
return new TypeError('Expected "string" but received "' + typeof obj_parentName + '" (at "' + path_parentName + '")');
|
|
2243
|
+
}
|
|
2244
|
+
}
|
|
2245
|
+
const obj_title = obj.title;
|
|
2246
|
+
const path_title = path + '.title';
|
|
2247
|
+
if (typeof obj_title !== 'string') {
|
|
2248
|
+
return new TypeError('Expected "string" but received "' + typeof obj_title + '" (at "' + path_title + '")');
|
|
2249
|
+
}
|
|
2250
|
+
})();
|
|
2251
|
+
return v_error === undefined ? null : v_error;
|
|
2252
|
+
}
|
|
2253
|
+
const select$n = function EinsteinPromptTemplateAttachmentRepresentationSelect() {
|
|
2254
|
+
const { selections: EinsteinPromptTemplateAttachmentExclusionInfoRepresentation__selections, opaque: EinsteinPromptTemplateAttachmentExclusionInfoRepresentation__opaque, } = select$o();
|
|
2255
|
+
return {
|
|
2256
|
+
kind: 'Fragment',
|
|
2257
|
+
version: VERSION$d,
|
|
2258
|
+
private: [],
|
|
2259
|
+
selections: [
|
|
2260
|
+
{
|
|
2261
|
+
name: 'exclusionInfo',
|
|
2262
|
+
kind: 'Object',
|
|
2263
|
+
selections: EinsteinPromptTemplateAttachmentExclusionInfoRepresentation__selections,
|
|
2264
|
+
required: false
|
|
2265
|
+
},
|
|
2266
|
+
{
|
|
2267
|
+
name: 'fileExtension',
|
|
2268
|
+
kind: 'Scalar'
|
|
2269
|
+
},
|
|
2270
|
+
{
|
|
2271
|
+
name: 'id',
|
|
2272
|
+
kind: 'Scalar'
|
|
2273
|
+
},
|
|
2274
|
+
{
|
|
2275
|
+
name: 'latestPublishedVersion',
|
|
2276
|
+
kind: 'Scalar'
|
|
2277
|
+
},
|
|
2278
|
+
{
|
|
2279
|
+
name: 'parentName',
|
|
2280
|
+
kind: 'Scalar',
|
|
2281
|
+
required: false
|
|
2282
|
+
},
|
|
2283
|
+
{
|
|
2284
|
+
name: 'title',
|
|
2285
|
+
kind: 'Scalar'
|
|
2286
|
+
}
|
|
2287
|
+
]
|
|
2288
|
+
};
|
|
2289
|
+
};
|
|
2290
|
+
function equals$d(existing, incoming) {
|
|
2291
|
+
const existing_fileExtension = existing.fileExtension;
|
|
2292
|
+
const incoming_fileExtension = incoming.fileExtension;
|
|
2293
|
+
if (!(existing_fileExtension === incoming_fileExtension)) {
|
|
2294
|
+
return false;
|
|
2295
|
+
}
|
|
2296
|
+
const existing_id = existing.id;
|
|
2297
|
+
const incoming_id = incoming.id;
|
|
2298
|
+
if (!(existing_id === incoming_id)) {
|
|
2299
|
+
return false;
|
|
2300
|
+
}
|
|
2301
|
+
const existing_latestPublishedVersion = existing.latestPublishedVersion;
|
|
2302
|
+
const incoming_latestPublishedVersion = incoming.latestPublishedVersion;
|
|
2303
|
+
if (!(existing_latestPublishedVersion === incoming_latestPublishedVersion)) {
|
|
2304
|
+
return false;
|
|
2305
|
+
}
|
|
2306
|
+
const existing_parentName = existing.parentName;
|
|
2307
|
+
const incoming_parentName = incoming.parentName;
|
|
2308
|
+
// if at least one of these optionals is defined
|
|
2309
|
+
if (existing_parentName !== undefined || incoming_parentName !== undefined) {
|
|
2310
|
+
// if one of these is not defined we know the other is defined and therefore
|
|
2311
|
+
// not equal
|
|
2312
|
+
if (existing_parentName === undefined || incoming_parentName === undefined) {
|
|
2313
|
+
return false;
|
|
2314
|
+
}
|
|
2315
|
+
if (!(existing_parentName === incoming_parentName)) {
|
|
2316
|
+
return false;
|
|
2317
|
+
}
|
|
2318
|
+
}
|
|
2319
|
+
const existing_title = existing.title;
|
|
2320
|
+
const incoming_title = incoming.title;
|
|
2321
|
+
if (!(existing_title === incoming_title)) {
|
|
2084
2322
|
return false;
|
|
2085
2323
|
}
|
|
2086
2324
|
const existing_exclusionInfo = existing.exclusionInfo;
|
|
@@ -2092,14 +2330,14 @@ function equals$c(existing, incoming) {
|
|
|
2092
2330
|
if (existing_exclusionInfo === undefined || incoming_exclusionInfo === undefined) {
|
|
2093
2331
|
return false;
|
|
2094
2332
|
}
|
|
2095
|
-
if (!(equals$
|
|
2333
|
+
if (!(equals$e(existing_exclusionInfo, incoming_exclusionInfo))) {
|
|
2096
2334
|
return false;
|
|
2097
2335
|
}
|
|
2098
2336
|
}
|
|
2099
2337
|
return true;
|
|
2100
2338
|
}
|
|
2101
2339
|
|
|
2102
|
-
const VERSION$
|
|
2340
|
+
const VERSION$c = "6458d624e5a1691821c764b6de0badb3";
|
|
2103
2341
|
function validate$f(obj, path = 'EinsteinPromptTemplateGenerationsErrorRepresentation') {
|
|
2104
2342
|
const v_error = (() => {
|
|
2105
2343
|
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
@@ -2130,10 +2368,10 @@ function validate$f(obj, path = 'EinsteinPromptTemplateGenerationsErrorRepresent
|
|
|
2130
2368
|
})();
|
|
2131
2369
|
return v_error === undefined ? null : v_error;
|
|
2132
2370
|
}
|
|
2133
|
-
const select$
|
|
2371
|
+
const select$m = function EinsteinPromptTemplateGenerationsErrorRepresentationSelect() {
|
|
2134
2372
|
return {
|
|
2135
2373
|
kind: 'Fragment',
|
|
2136
|
-
version: VERSION$
|
|
2374
|
+
version: VERSION$c,
|
|
2137
2375
|
private: [],
|
|
2138
2376
|
selections: [
|
|
2139
2377
|
{
|
|
@@ -2156,7 +2394,7 @@ const select$j = function EinsteinPromptTemplateGenerationsErrorRepresentationSe
|
|
|
2156
2394
|
]
|
|
2157
2395
|
};
|
|
2158
2396
|
};
|
|
2159
|
-
function equals$
|
|
2397
|
+
function equals$c(existing, incoming) {
|
|
2160
2398
|
const existing_errorMessage = existing.errorMessage;
|
|
2161
2399
|
const incoming_errorMessage = incoming.errorMessage;
|
|
2162
2400
|
if (!(existing_errorMessage === incoming_errorMessage)) {
|
|
@@ -2188,7 +2426,7 @@ function equals$b(existing, incoming) {
|
|
|
2188
2426
|
return true;
|
|
2189
2427
|
}
|
|
2190
2428
|
|
|
2191
|
-
const VERSION$
|
|
2429
|
+
const VERSION$b = "7c417ce44e4bc05dfcc454e6825590e8";
|
|
2192
2430
|
function validate$e(obj, path = 'EinsteinPromptTemplateMaskSettingsRepresentation') {
|
|
2193
2431
|
const v_error = (() => {
|
|
2194
2432
|
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
@@ -2202,10 +2440,10 @@ function validate$e(obj, path = 'EinsteinPromptTemplateMaskSettingsRepresentatio
|
|
|
2202
2440
|
})();
|
|
2203
2441
|
return v_error === undefined ? null : v_error;
|
|
2204
2442
|
}
|
|
2205
|
-
const select$
|
|
2443
|
+
const select$l = function EinsteinPromptTemplateMaskSettingsRepresentationSelect() {
|
|
2206
2444
|
return {
|
|
2207
2445
|
kind: 'Fragment',
|
|
2208
|
-
version: VERSION$
|
|
2446
|
+
version: VERSION$b,
|
|
2209
2447
|
private: [],
|
|
2210
2448
|
selections: [
|
|
2211
2449
|
{
|
|
@@ -2215,7 +2453,7 @@ const select$i = function EinsteinPromptTemplateMaskSettingsRepresentationSelect
|
|
|
2215
2453
|
]
|
|
2216
2454
|
};
|
|
2217
2455
|
};
|
|
2218
|
-
function equals$
|
|
2456
|
+
function equals$b(existing, incoming) {
|
|
2219
2457
|
const existing_enableModeration = existing.enableModeration;
|
|
2220
2458
|
const incoming_enableModeration = incoming.enableModeration;
|
|
2221
2459
|
if (!(existing_enableModeration === incoming_enableModeration)) {
|
|
@@ -2224,7 +2462,7 @@ function equals$a(existing, incoming) {
|
|
|
2224
2462
|
return true;
|
|
2225
2463
|
}
|
|
2226
2464
|
|
|
2227
|
-
const VERSION$
|
|
2465
|
+
const VERSION$a = "92ad1abd0e2a60bc36941409cadda7e2";
|
|
2228
2466
|
function validate$d(obj, path = 'EinsteinPromptTemplateMaskContentRepresentation') {
|
|
2229
2467
|
const v_error = (() => {
|
|
2230
2468
|
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
@@ -2276,11 +2514,11 @@ function validate$d(obj, path = 'EinsteinPromptTemplateMaskContentRepresentation
|
|
|
2276
2514
|
})();
|
|
2277
2515
|
return v_error === undefined ? null : v_error;
|
|
2278
2516
|
}
|
|
2279
|
-
const select$
|
|
2280
|
-
const { selections: EinsteinPromptTemplateMaskSettingsRepresentation__selections, opaque: EinsteinPromptTemplateMaskSettingsRepresentation__opaque, } = select$
|
|
2517
|
+
const select$k = function EinsteinPromptTemplateMaskContentRepresentationSelect() {
|
|
2518
|
+
const { selections: EinsteinPromptTemplateMaskSettingsRepresentation__selections, opaque: EinsteinPromptTemplateMaskSettingsRepresentation__opaque, } = select$l();
|
|
2281
2519
|
return {
|
|
2282
2520
|
kind: 'Fragment',
|
|
2283
|
-
version: VERSION$
|
|
2521
|
+
version: VERSION$a,
|
|
2284
2522
|
private: [],
|
|
2285
2523
|
selections: [
|
|
2286
2524
|
{
|
|
@@ -2302,7 +2540,7 @@ const select$h = function EinsteinPromptTemplateMaskContentRepresentationSelect(
|
|
|
2302
2540
|
]
|
|
2303
2541
|
};
|
|
2304
2542
|
};
|
|
2305
|
-
function equals$
|
|
2543
|
+
function equals$a(existing, incoming) {
|
|
2306
2544
|
const existing_content = existing.content;
|
|
2307
2545
|
const incoming_content = incoming.content;
|
|
2308
2546
|
if (!(existing_content === incoming_content)) {
|
|
@@ -2333,14 +2571,14 @@ function equals$9(existing, incoming) {
|
|
|
2333
2571
|
if (!(existing_moderationSettings === incoming_moderationSettings
|
|
2334
2572
|
|| (existing_moderationSettings != null &&
|
|
2335
2573
|
incoming_moderationSettings != null &&
|
|
2336
|
-
equals$
|
|
2574
|
+
equals$b(existing_moderationSettings, incoming_moderationSettings)))) {
|
|
2337
2575
|
return false;
|
|
2338
2576
|
}
|
|
2339
2577
|
}
|
|
2340
2578
|
return true;
|
|
2341
2579
|
}
|
|
2342
2580
|
|
|
2343
|
-
const VERSION$
|
|
2581
|
+
const VERSION$9 = "507a815605f8d30ae9b52b0ec513d25e";
|
|
2344
2582
|
function validate$c(obj, path = 'EinsteinPromptTemplateMaskDataRepresentation') {
|
|
2345
2583
|
const v_error = (() => {
|
|
2346
2584
|
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
@@ -2371,10 +2609,10 @@ function validate$c(obj, path = 'EinsteinPromptTemplateMaskDataRepresentation')
|
|
|
2371
2609
|
})();
|
|
2372
2610
|
return v_error === undefined ? null : v_error;
|
|
2373
2611
|
}
|
|
2374
|
-
const select$
|
|
2612
|
+
const select$j = function EinsteinPromptTemplateMaskDataRepresentationSelect() {
|
|
2375
2613
|
return {
|
|
2376
2614
|
kind: 'Fragment',
|
|
2377
|
-
version: VERSION$
|
|
2615
|
+
version: VERSION$9,
|
|
2378
2616
|
private: [],
|
|
2379
2617
|
selections: [
|
|
2380
2618
|
{
|
|
@@ -2393,7 +2631,7 @@ const select$g = function EinsteinPromptTemplateMaskDataRepresentationSelect() {
|
|
|
2393
2631
|
]
|
|
2394
2632
|
};
|
|
2395
2633
|
};
|
|
2396
|
-
function equals$
|
|
2634
|
+
function equals$9(existing, incoming) {
|
|
2397
2635
|
const existing_originalValue = existing.originalValue;
|
|
2398
2636
|
const incoming_originalValue = incoming.originalValue;
|
|
2399
2637
|
if (!(existing_originalValue === incoming_originalValue)) {
|
|
@@ -2417,13 +2655,23 @@ function equals$8(existing, incoming) {
|
|
|
2417
2655
|
return true;
|
|
2418
2656
|
}
|
|
2419
2657
|
|
|
2420
|
-
const TTL$
|
|
2421
|
-
const VERSION$
|
|
2658
|
+
const TTL$6 = 100;
|
|
2659
|
+
const VERSION$8 = "25461f267931be0754b36e2788461191";
|
|
2422
2660
|
function validate$b(obj, path = 'EinsteinPromptTemplateGenerationsRepresentation') {
|
|
2423
2661
|
const v_error = (() => {
|
|
2424
2662
|
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
2425
2663
|
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
2426
2664
|
}
|
|
2665
|
+
if (obj.citations !== undefined) {
|
|
2666
|
+
const obj_citations = obj.citations;
|
|
2667
|
+
const path_citations = path + '.citations';
|
|
2668
|
+
const referencepath_citationsValidationError = validate$i(obj_citations, path_citations);
|
|
2669
|
+
if (referencepath_citationsValidationError !== null) {
|
|
2670
|
+
let message = 'Object doesn\'t match EinsteinLlmGenerationCitationRepresentation (at "' + path_citations + '")\n';
|
|
2671
|
+
message += referencepath_citationsValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
2672
|
+
return new TypeError(message);
|
|
2673
|
+
}
|
|
2674
|
+
}
|
|
2427
2675
|
if (obj.fileData !== undefined) {
|
|
2428
2676
|
const obj_fileData = obj.fileData;
|
|
2429
2677
|
const path_fileData = path + '.fileData';
|
|
@@ -2466,7 +2714,7 @@ function validate$b(obj, path = 'EinsteinPromptTemplateGenerationsRepresentation
|
|
|
2466
2714
|
for (let i = 0; i < obj_generations.length; i++) {
|
|
2467
2715
|
const obj_generations_item = obj_generations[i];
|
|
2468
2716
|
const path_generations_item = path_generations + '[' + i + ']';
|
|
2469
|
-
const referencepath_generations_itemValidationError = validate$
|
|
2717
|
+
const referencepath_generations_itemValidationError = validate$o(obj_generations_item, path_generations_item);
|
|
2470
2718
|
if (referencepath_generations_itemValidationError !== null) {
|
|
2471
2719
|
let message = 'Object doesn\'t match EinsteinLlmGenerationItemRepresentation (at "' + path_generations_item + '")\n';
|
|
2472
2720
|
message += referencepath_generations_itemValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
@@ -2493,7 +2741,7 @@ function validate$b(obj, path = 'EinsteinPromptTemplateGenerationsRepresentation
|
|
|
2493
2741
|
const path_parameters = path + '.parameters';
|
|
2494
2742
|
let obj_parameters_union0 = null;
|
|
2495
2743
|
const obj_parameters_union0_error = (() => {
|
|
2496
|
-
const referencepath_parametersValidationError = validate$
|
|
2744
|
+
const referencepath_parametersValidationError = validate$n(obj_parameters, path_parameters);
|
|
2497
2745
|
if (referencepath_parametersValidationError !== null) {
|
|
2498
2746
|
let message = 'Object doesn\'t match WrappedMap (at "' + path_parameters + '")\n';
|
|
2499
2747
|
message += referencepath_parametersValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
@@ -2608,31 +2856,38 @@ function validate$b(obj, path = 'EinsteinPromptTemplateGenerationsRepresentation
|
|
|
2608
2856
|
})();
|
|
2609
2857
|
return v_error === undefined ? null : v_error;
|
|
2610
2858
|
}
|
|
2611
|
-
const RepresentationType$
|
|
2612
|
-
function keyBuilder$
|
|
2613
|
-
return keyPrefix + '::' + RepresentationType$
|
|
2859
|
+
const RepresentationType$6 = 'EinsteinPromptTemplateGenerationsRepresentation';
|
|
2860
|
+
function keyBuilder$b(luvio, config) {
|
|
2861
|
+
return keyPrefix + '::' + RepresentationType$6 + ':' + config.requestId;
|
|
2614
2862
|
}
|
|
2615
2863
|
function keyBuilderFromType$1(luvio, object) {
|
|
2616
2864
|
const keyParams = {
|
|
2617
2865
|
requestId: object.requestId
|
|
2618
2866
|
};
|
|
2619
|
-
return keyBuilder$
|
|
2867
|
+
return keyBuilder$b(luvio, keyParams);
|
|
2620
2868
|
}
|
|
2621
|
-
function normalize$
|
|
2869
|
+
function normalize$6(input, existing, path, luvio, store, timestamp) {
|
|
2622
2870
|
return input;
|
|
2623
2871
|
}
|
|
2624
|
-
const select$
|
|
2625
|
-
const { selections:
|
|
2626
|
-
const { selections:
|
|
2627
|
-
const { selections:
|
|
2628
|
-
const { selections:
|
|
2629
|
-
const { selections:
|
|
2630
|
-
const { selections:
|
|
2872
|
+
const select$i = function EinsteinPromptTemplateGenerationsRepresentationSelect() {
|
|
2873
|
+
const { selections: EinsteinLlmGenerationCitationRepresentation__selections, opaque: EinsteinLlmGenerationCitationRepresentation__opaque, } = select$p();
|
|
2874
|
+
const { selections: EinsteinPromptTemplateAttachmentRepresentation__selections, opaque: EinsteinPromptTemplateAttachmentRepresentation__opaque, } = select$n();
|
|
2875
|
+
const { selections: EinsteinPromptTemplateGenerationsErrorRepresentation__selections, opaque: EinsteinPromptTemplateGenerationsErrorRepresentation__opaque, } = select$m();
|
|
2876
|
+
const { selections: EinsteinLlmGenerationItemRepresentation__selections, opaque: EinsteinLlmGenerationItemRepresentation__opaque, } = select$u();
|
|
2877
|
+
const { selections: WrappedMap__selections, opaque: WrappedMap__opaque, } = select$t();
|
|
2878
|
+
const { selections: EinsteinPromptTemplateMaskContentRepresentation__selections, opaque: EinsteinPromptTemplateMaskContentRepresentation__opaque, } = select$k();
|
|
2879
|
+
const { selections: EinsteinPromptTemplateMaskDataRepresentation__selections, opaque: EinsteinPromptTemplateMaskDataRepresentation__opaque, } = select$j();
|
|
2631
2880
|
return {
|
|
2632
2881
|
kind: 'Fragment',
|
|
2633
|
-
version: VERSION$
|
|
2882
|
+
version: VERSION$8,
|
|
2634
2883
|
private: [],
|
|
2635
2884
|
selections: [
|
|
2885
|
+
{
|
|
2886
|
+
name: 'citations',
|
|
2887
|
+
kind: 'Object',
|
|
2888
|
+
selections: EinsteinLlmGenerationCitationRepresentation__selections,
|
|
2889
|
+
required: false
|
|
2890
|
+
},
|
|
2636
2891
|
{
|
|
2637
2892
|
name: 'fileData',
|
|
2638
2893
|
kind: 'Object',
|
|
@@ -2700,7 +2955,7 @@ const select$f = function EinsteinPromptTemplateGenerationsRepresentationSelect(
|
|
|
2700
2955
|
]
|
|
2701
2956
|
};
|
|
2702
2957
|
};
|
|
2703
|
-
function equals$
|
|
2958
|
+
function equals$8(existing, incoming) {
|
|
2704
2959
|
const existing_promptTemplateDevName = existing.promptTemplateDevName;
|
|
2705
2960
|
const incoming_promptTemplateDevName = incoming.promptTemplateDevName;
|
|
2706
2961
|
if (!(existing_promptTemplateDevName === incoming_promptTemplateDevName)) {
|
|
@@ -2711,6 +2966,19 @@ function equals$7(existing, incoming) {
|
|
|
2711
2966
|
if (!(existing_requestId === incoming_requestId)) {
|
|
2712
2967
|
return false;
|
|
2713
2968
|
}
|
|
2969
|
+
const existing_citations = existing.citations;
|
|
2970
|
+
const incoming_citations = incoming.citations;
|
|
2971
|
+
// if at least one of these optionals is defined
|
|
2972
|
+
if (existing_citations !== undefined || incoming_citations !== undefined) {
|
|
2973
|
+
// if one of these is not defined we know the other is defined and therefore
|
|
2974
|
+
// not equal
|
|
2975
|
+
if (existing_citations === undefined || incoming_citations === undefined) {
|
|
2976
|
+
return false;
|
|
2977
|
+
}
|
|
2978
|
+
if (!(equals$f(existing_citations, incoming_citations))) {
|
|
2979
|
+
return false;
|
|
2980
|
+
}
|
|
2981
|
+
}
|
|
2714
2982
|
const existing_fileData = existing.fileData;
|
|
2715
2983
|
const incoming_fileData = incoming.fileData;
|
|
2716
2984
|
// if at least one of these optionals is defined
|
|
@@ -2721,7 +2989,7 @@ function equals$7(existing, incoming) {
|
|
|
2721
2989
|
return false;
|
|
2722
2990
|
}
|
|
2723
2991
|
const equals_fileData_items = equalsArray(existing_fileData, incoming_fileData, (existing_fileData_item, incoming_fileData_item) => {
|
|
2724
|
-
if (!(equals$
|
|
2992
|
+
if (!(equals$d(existing_fileData_item, incoming_fileData_item))) {
|
|
2725
2993
|
return false;
|
|
2726
2994
|
}
|
|
2727
2995
|
});
|
|
@@ -2739,7 +3007,7 @@ function equals$7(existing, incoming) {
|
|
|
2739
3007
|
return false;
|
|
2740
3008
|
}
|
|
2741
3009
|
const equals_generationErrors_items = equalsArray(existing_generationErrors, incoming_generationErrors, (existing_generationErrors_item, incoming_generationErrors_item) => {
|
|
2742
|
-
if (!(equals$
|
|
3010
|
+
if (!(equals$c(existing_generationErrors_item, incoming_generationErrors_item))) {
|
|
2743
3011
|
return false;
|
|
2744
3012
|
}
|
|
2745
3013
|
});
|
|
@@ -2750,7 +3018,7 @@ function equals$7(existing, incoming) {
|
|
|
2750
3018
|
const existing_generations = existing.generations;
|
|
2751
3019
|
const incoming_generations = incoming.generations;
|
|
2752
3020
|
const equals_generations_items = equalsArray(existing_generations, incoming_generations, (existing_generations_item, incoming_generations_item) => {
|
|
2753
|
-
if (!(equals$
|
|
3021
|
+
if (!(equals$j(existing_generations_item, incoming_generations_item))) {
|
|
2754
3022
|
return false;
|
|
2755
3023
|
}
|
|
2756
3024
|
});
|
|
@@ -2780,7 +3048,7 @@ function equals$7(existing, incoming) {
|
|
|
2780
3048
|
if (!(existing_parameters === incoming_parameters
|
|
2781
3049
|
|| (existing_parameters != null &&
|
|
2782
3050
|
incoming_parameters != null &&
|
|
2783
|
-
equals$
|
|
3051
|
+
equals$i(existing_parameters, incoming_parameters)))) {
|
|
2784
3052
|
return false;
|
|
2785
3053
|
}
|
|
2786
3054
|
const existing_prompt = existing.prompt;
|
|
@@ -2798,7 +3066,7 @@ function equals$7(existing, incoming) {
|
|
|
2798
3066
|
return false;
|
|
2799
3067
|
}
|
|
2800
3068
|
const equals_requestMessages_items = equalsArray(existing_requestMessages, incoming_requestMessages, (existing_requestMessages_item, incoming_requestMessages_item) => {
|
|
2801
|
-
if (!(equals$
|
|
3069
|
+
if (!(equals$a(existing_requestMessages_item, incoming_requestMessages_item))) {
|
|
2802
3070
|
return false;
|
|
2803
3071
|
}
|
|
2804
3072
|
});
|
|
@@ -2816,7 +3084,7 @@ function equals$7(existing, incoming) {
|
|
|
2816
3084
|
return false;
|
|
2817
3085
|
}
|
|
2818
3086
|
const equals_responseMessages_items = equalsArray(existing_responseMessages, incoming_responseMessages, (existing_responseMessages_item, incoming_responseMessages_item) => {
|
|
2819
|
-
if (!(equals$
|
|
3087
|
+
if (!(equals$a(existing_responseMessages_item, incoming_responseMessages_item))) {
|
|
2820
3088
|
return false;
|
|
2821
3089
|
}
|
|
2822
3090
|
});
|
|
@@ -2834,7 +3102,7 @@ function equals$7(existing, incoming) {
|
|
|
2834
3102
|
return false;
|
|
2835
3103
|
}
|
|
2836
3104
|
const equals_slotsMaskingInformation_items = equalsArray(existing_slotsMaskingInformation, incoming_slotsMaskingInformation, (existing_slotsMaskingInformation_item, incoming_slotsMaskingInformation_item) => {
|
|
2837
|
-
if (!(equals$
|
|
3105
|
+
if (!(equals$9(existing_slotsMaskingInformation_item, incoming_slotsMaskingInformation_item))) {
|
|
2838
3106
|
return false;
|
|
2839
3107
|
}
|
|
2840
3108
|
});
|
|
@@ -2844,7 +3112,7 @@ function equals$7(existing, incoming) {
|
|
|
2844
3112
|
}
|
|
2845
3113
|
return true;
|
|
2846
3114
|
}
|
|
2847
|
-
const ingest$
|
|
3115
|
+
const ingest$6 = function EinsteinPromptTemplateGenerationsRepresentationIngest(input, path, luvio, store, timestamp) {
|
|
2848
3116
|
if (process.env.NODE_ENV !== 'production') {
|
|
2849
3117
|
const validateError = validate$b(input);
|
|
2850
3118
|
if (validateError !== null) {
|
|
@@ -2852,33 +3120,33 @@ const ingest$5 = function EinsteinPromptTemplateGenerationsRepresentationIngest(
|
|
|
2852
3120
|
}
|
|
2853
3121
|
}
|
|
2854
3122
|
const key = keyBuilderFromType$1(luvio, input);
|
|
2855
|
-
const ttlToUse = TTL$
|
|
2856
|
-
ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize$
|
|
3123
|
+
const ttlToUse = TTL$6;
|
|
3124
|
+
ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize$6, "EinsteinLLM", VERSION$8, RepresentationType$6, equals$8);
|
|
2857
3125
|
return createLink(key);
|
|
2858
3126
|
};
|
|
2859
|
-
function getTypeCacheKeys$
|
|
3127
|
+
function getTypeCacheKeys$6(rootKeySet, luvio, input, fullPathFactory) {
|
|
2860
3128
|
// root cache key (uses fullPathFactory if keyBuilderFromType isn't defined)
|
|
2861
3129
|
const rootKey = keyBuilderFromType$1(luvio, input);
|
|
2862
3130
|
rootKeySet.set(rootKey, {
|
|
2863
3131
|
namespace: keyPrefix,
|
|
2864
|
-
representationName: RepresentationType$
|
|
3132
|
+
representationName: RepresentationType$6,
|
|
2865
3133
|
mergeable: false
|
|
2866
3134
|
});
|
|
2867
3135
|
}
|
|
2868
3136
|
|
|
2869
|
-
function select$
|
|
2870
|
-
return select$
|
|
3137
|
+
function select$h(luvio, params) {
|
|
3138
|
+
return select$i();
|
|
2871
3139
|
}
|
|
2872
|
-
function getResponseCacheKeys$
|
|
2873
|
-
getTypeCacheKeys$
|
|
3140
|
+
function getResponseCacheKeys$9(storeKeyMap, luvio, resourceParams, response) {
|
|
3141
|
+
getTypeCacheKeys$6(storeKeyMap, luvio, response);
|
|
2874
3142
|
}
|
|
2875
|
-
function ingestSuccess$
|
|
3143
|
+
function ingestSuccess$9(luvio, resourceParams, response) {
|
|
2876
3144
|
const { body } = response;
|
|
2877
3145
|
const key = keyBuilderFromType$1(luvio, body);
|
|
2878
|
-
luvio.storeIngest(key, ingest$
|
|
3146
|
+
luvio.storeIngest(key, ingest$6, body);
|
|
2879
3147
|
const snapshot = luvio.storeLookup({
|
|
2880
3148
|
recordId: key,
|
|
2881
|
-
node: select$
|
|
3149
|
+
node: select$h(),
|
|
2882
3150
|
variables: {},
|
|
2883
3151
|
});
|
|
2884
3152
|
if (process.env.NODE_ENV !== 'production') {
|
|
@@ -2889,7 +3157,7 @@ function ingestSuccess$7(luvio, resourceParams, response) {
|
|
|
2889
3157
|
deepFreeze(snapshot.data);
|
|
2890
3158
|
return snapshot;
|
|
2891
3159
|
}
|
|
2892
|
-
function createResourceRequest$
|
|
3160
|
+
function createResourceRequest$9(config) {
|
|
2893
3161
|
const headers = {};
|
|
2894
3162
|
return {
|
|
2895
3163
|
baseUri: '/services/data/v65.0',
|
|
@@ -2903,48 +3171,48 @@ function createResourceRequest$7(config) {
|
|
|
2903
3171
|
};
|
|
2904
3172
|
}
|
|
2905
3173
|
|
|
2906
|
-
const adapterName$
|
|
3174
|
+
const adapterName$9 = 'createGenerationsForPromptTemplate';
|
|
2907
3175
|
const createGenerationsForPromptTemplate_ConfigPropertyMetadata = [
|
|
2908
3176
|
generateParamConfigMetadata('promptTemplateDevName', true, 0 /* UrlParameter */, 0 /* String */),
|
|
2909
3177
|
generateParamConfigMetadata('versionId', false, 1 /* QueryParameter */, 0 /* String */),
|
|
2910
3178
|
generateParamConfigMetadata('promptTemplateGenerationsInput', true, 2 /* Body */, 4 /* Unsupported */),
|
|
2911
3179
|
];
|
|
2912
|
-
const createGenerationsForPromptTemplate_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$
|
|
2913
|
-
const createResourceParams$
|
|
2914
|
-
function typeCheckConfig$
|
|
3180
|
+
const createGenerationsForPromptTemplate_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$9, createGenerationsForPromptTemplate_ConfigPropertyMetadata);
|
|
3181
|
+
const createResourceParams$9 = /*#__PURE__*/ createResourceParams$d(createGenerationsForPromptTemplate_ConfigPropertyMetadata);
|
|
3182
|
+
function typeCheckConfig$9(untrustedConfig) {
|
|
2915
3183
|
const config = {};
|
|
2916
|
-
typeCheckConfig$
|
|
3184
|
+
typeCheckConfig$d(untrustedConfig, config, createGenerationsForPromptTemplate_ConfigPropertyMetadata);
|
|
2917
3185
|
const untrustedConfig_promptTemplateGenerationsInput = untrustedConfig.promptTemplateGenerationsInput;
|
|
2918
|
-
const referenceEinsteinPromptTemplateGenerationsInputRepresentationValidationError = validate$
|
|
3186
|
+
const referenceEinsteinPromptTemplateGenerationsInputRepresentationValidationError = validate$k(untrustedConfig_promptTemplateGenerationsInput);
|
|
2919
3187
|
if (referenceEinsteinPromptTemplateGenerationsInputRepresentationValidationError === null) {
|
|
2920
3188
|
config.promptTemplateGenerationsInput = untrustedConfig_promptTemplateGenerationsInput;
|
|
2921
3189
|
}
|
|
2922
3190
|
return config;
|
|
2923
3191
|
}
|
|
2924
|
-
function validateAdapterConfig$
|
|
3192
|
+
function validateAdapterConfig$9(untrustedConfig, configPropertyNames) {
|
|
2925
3193
|
if (!untrustedIsObject(untrustedConfig)) {
|
|
2926
3194
|
return null;
|
|
2927
3195
|
}
|
|
2928
3196
|
if (process.env.NODE_ENV !== 'production') {
|
|
2929
3197
|
validateConfig(untrustedConfig, configPropertyNames);
|
|
2930
3198
|
}
|
|
2931
|
-
const config = typeCheckConfig$
|
|
3199
|
+
const config = typeCheckConfig$9(untrustedConfig);
|
|
2932
3200
|
if (!areRequiredParametersPresent(config, configPropertyNames)) {
|
|
2933
3201
|
return null;
|
|
2934
3202
|
}
|
|
2935
3203
|
return config;
|
|
2936
3204
|
}
|
|
2937
|
-
function buildNetworkSnapshot$
|
|
2938
|
-
const resourceParams = createResourceParams$
|
|
2939
|
-
const request = createResourceRequest$
|
|
3205
|
+
function buildNetworkSnapshot$9(luvio, config, options) {
|
|
3206
|
+
const resourceParams = createResourceParams$9(config);
|
|
3207
|
+
const request = createResourceRequest$9(resourceParams);
|
|
2940
3208
|
return luvio.dispatchResourceRequest(request, options)
|
|
2941
3209
|
.then((response) => {
|
|
2942
3210
|
return luvio.handleSuccessResponse(() => {
|
|
2943
|
-
const snapshot = ingestSuccess$
|
|
3211
|
+
const snapshot = ingestSuccess$9(luvio, resourceParams, response);
|
|
2944
3212
|
return luvio.storeBroadcast().then(() => snapshot);
|
|
2945
3213
|
}, () => {
|
|
2946
3214
|
const cache = new StoreKeyMap();
|
|
2947
|
-
getResponseCacheKeys$
|
|
3215
|
+
getResponseCacheKeys$9(cache, luvio, resourceParams, response.body);
|
|
2948
3216
|
return cache;
|
|
2949
3217
|
});
|
|
2950
3218
|
}, (response) => {
|
|
@@ -2954,17 +3222,17 @@ function buildNetworkSnapshot$7(luvio, config, options) {
|
|
|
2954
3222
|
}
|
|
2955
3223
|
const createGenerationsForPromptTemplateAdapterFactory = (luvio) => {
|
|
2956
3224
|
return function createGenerationsForPromptTemplate(untrustedConfig) {
|
|
2957
|
-
const config = validateAdapterConfig$
|
|
3225
|
+
const config = validateAdapterConfig$9(untrustedConfig, createGenerationsForPromptTemplate_ConfigPropertyNames);
|
|
2958
3226
|
// Invalid or incomplete config
|
|
2959
3227
|
if (config === null) {
|
|
2960
3228
|
throw new Error('Invalid config for "createGenerationsForPromptTemplate"');
|
|
2961
3229
|
}
|
|
2962
|
-
return buildNetworkSnapshot$
|
|
3230
|
+
return buildNetworkSnapshot$9(luvio, config);
|
|
2963
3231
|
};
|
|
2964
3232
|
};
|
|
2965
3233
|
|
|
2966
|
-
const TTL$
|
|
2967
|
-
const VERSION$
|
|
3234
|
+
const TTL$5 = 100;
|
|
3235
|
+
const VERSION$7 = "a90a51578e2fdd7a9741d310bed22b1d";
|
|
2968
3236
|
function validate$a(obj, path = 'EinsteinPromptTemplateRepresentation') {
|
|
2969
3237
|
const v_error = (() => {
|
|
2970
3238
|
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
@@ -2973,7 +3241,7 @@ function validate$a(obj, path = 'EinsteinPromptTemplateRepresentation') {
|
|
|
2973
3241
|
if (obj.additionalData !== undefined) {
|
|
2974
3242
|
const obj_additionalData = obj.additionalData;
|
|
2975
3243
|
const path_additionalData = path + '.additionalData';
|
|
2976
|
-
const referencepath_additionalDataValidationError = validate$
|
|
3244
|
+
const referencepath_additionalDataValidationError = validate$n(obj_additionalData, path_additionalData);
|
|
2977
3245
|
if (referencepath_additionalDataValidationError !== null) {
|
|
2978
3246
|
let message = 'Object doesn\'t match WrappedMap (at "' + path_additionalData + '")\n';
|
|
2979
3247
|
message += referencepath_additionalDataValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
@@ -3041,24 +3309,24 @@ function validate$a(obj, path = 'EinsteinPromptTemplateRepresentation') {
|
|
|
3041
3309
|
})();
|
|
3042
3310
|
return v_error === undefined ? null : v_error;
|
|
3043
3311
|
}
|
|
3044
|
-
const RepresentationType$
|
|
3045
|
-
function keyBuilder$
|
|
3046
|
-
return keyPrefix + '::' + RepresentationType$
|
|
3312
|
+
const RepresentationType$5 = 'EinsteinPromptTemplateRepresentation';
|
|
3313
|
+
function keyBuilder$a(luvio, config) {
|
|
3314
|
+
return keyPrefix + '::' + RepresentationType$5 + ':' + config.versionId;
|
|
3047
3315
|
}
|
|
3048
3316
|
function keyBuilderFromType(luvio, object) {
|
|
3049
3317
|
const keyParams = {
|
|
3050
3318
|
versionId: object.versionId
|
|
3051
3319
|
};
|
|
3052
|
-
return keyBuilder$
|
|
3320
|
+
return keyBuilder$a(luvio, keyParams);
|
|
3053
3321
|
}
|
|
3054
|
-
function normalize$
|
|
3322
|
+
function normalize$5(input, existing, path, luvio, store, timestamp) {
|
|
3055
3323
|
return input;
|
|
3056
3324
|
}
|
|
3057
|
-
const select$
|
|
3058
|
-
const { selections: WrappedMap__selections, opaque: WrappedMap__opaque, } = select$
|
|
3325
|
+
const select$g = function EinsteinPromptTemplateRepresentationSelect() {
|
|
3326
|
+
const { selections: WrappedMap__selections, opaque: WrappedMap__opaque, } = select$t();
|
|
3059
3327
|
return {
|
|
3060
3328
|
kind: 'Fragment',
|
|
3061
|
-
version: VERSION$
|
|
3329
|
+
version: VERSION$7,
|
|
3062
3330
|
private: [],
|
|
3063
3331
|
selections: [
|
|
3064
3332
|
{
|
|
@@ -3106,7 +3374,7 @@ const select$d = function EinsteinPromptTemplateRepresentationSelect() {
|
|
|
3106
3374
|
]
|
|
3107
3375
|
};
|
|
3108
3376
|
};
|
|
3109
|
-
function equals$
|
|
3377
|
+
function equals$7(existing, incoming) {
|
|
3110
3378
|
const existing_hasWarning = existing.hasWarning;
|
|
3111
3379
|
const incoming_hasWarning = incoming.hasWarning;
|
|
3112
3380
|
if (!(existing_hasWarning === incoming_hasWarning)) {
|
|
@@ -3162,7 +3430,7 @@ function equals$6(existing, incoming) {
|
|
|
3162
3430
|
if (existing_additionalData === undefined || incoming_additionalData === undefined) {
|
|
3163
3431
|
return false;
|
|
3164
3432
|
}
|
|
3165
|
-
if (!(equals$
|
|
3433
|
+
if (!(equals$i(existing_additionalData, incoming_additionalData))) {
|
|
3166
3434
|
return false;
|
|
3167
3435
|
}
|
|
3168
3436
|
}
|
|
@@ -3188,7 +3456,7 @@ function equals$6(existing, incoming) {
|
|
|
3188
3456
|
}
|
|
3189
3457
|
return true;
|
|
3190
3458
|
}
|
|
3191
|
-
const ingest$
|
|
3459
|
+
const ingest$5 = function EinsteinPromptTemplateRepresentationIngest(input, path, luvio, store, timestamp) {
|
|
3192
3460
|
if (process.env.NODE_ENV !== 'production') {
|
|
3193
3461
|
const validateError = validate$a(input);
|
|
3194
3462
|
if (validateError !== null) {
|
|
@@ -3196,33 +3464,33 @@ const ingest$4 = function EinsteinPromptTemplateRepresentationIngest(input, path
|
|
|
3196
3464
|
}
|
|
3197
3465
|
}
|
|
3198
3466
|
const key = keyBuilderFromType(luvio, input);
|
|
3199
|
-
const ttlToUse = TTL$
|
|
3200
|
-
ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize$
|
|
3467
|
+
const ttlToUse = TTL$5;
|
|
3468
|
+
ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize$5, "EinsteinLLM", VERSION$7, RepresentationType$5, equals$7);
|
|
3201
3469
|
return createLink(key);
|
|
3202
3470
|
};
|
|
3203
|
-
function getTypeCacheKeys$
|
|
3471
|
+
function getTypeCacheKeys$5(rootKeySet, luvio, input, fullPathFactory) {
|
|
3204
3472
|
// root cache key (uses fullPathFactory if keyBuilderFromType isn't defined)
|
|
3205
3473
|
const rootKey = keyBuilderFromType(luvio, input);
|
|
3206
3474
|
rootKeySet.set(rootKey, {
|
|
3207
3475
|
namespace: keyPrefix,
|
|
3208
|
-
representationName: RepresentationType$
|
|
3476
|
+
representationName: RepresentationType$5,
|
|
3209
3477
|
mergeable: false
|
|
3210
3478
|
});
|
|
3211
3479
|
}
|
|
3212
3480
|
|
|
3213
|
-
function select$
|
|
3214
|
-
return select$
|
|
3481
|
+
function select$f(luvio, params) {
|
|
3482
|
+
return select$g();
|
|
3215
3483
|
}
|
|
3216
|
-
function getResponseCacheKeys$
|
|
3217
|
-
getTypeCacheKeys$
|
|
3484
|
+
function getResponseCacheKeys$8(storeKeyMap, luvio, resourceParams, response) {
|
|
3485
|
+
getTypeCacheKeys$5(storeKeyMap, luvio, response);
|
|
3218
3486
|
}
|
|
3219
|
-
function ingestSuccess$
|
|
3487
|
+
function ingestSuccess$8(luvio, resourceParams, response) {
|
|
3220
3488
|
const { body } = response;
|
|
3221
3489
|
const key = keyBuilderFromType(luvio, body);
|
|
3222
|
-
luvio.storeIngest(key, ingest$
|
|
3490
|
+
luvio.storeIngest(key, ingest$5, body);
|
|
3223
3491
|
const snapshot = luvio.storeLookup({
|
|
3224
3492
|
recordId: key,
|
|
3225
|
-
node: select$
|
|
3493
|
+
node: select$f(),
|
|
3226
3494
|
variables: {},
|
|
3227
3495
|
});
|
|
3228
3496
|
if (process.env.NODE_ENV !== 'production') {
|
|
@@ -3233,7 +3501,7 @@ function ingestSuccess$6(luvio, resourceParams, response) {
|
|
|
3233
3501
|
deepFreeze(snapshot.data);
|
|
3234
3502
|
return snapshot;
|
|
3235
3503
|
}
|
|
3236
|
-
function createResourceRequest$
|
|
3504
|
+
function createResourceRequest$8(config) {
|
|
3237
3505
|
const headers = {};
|
|
3238
3506
|
return {
|
|
3239
3507
|
baseUri: '/services/data/v65.0',
|
|
@@ -3247,7 +3515,7 @@ function createResourceRequest$6(config) {
|
|
|
3247
3515
|
};
|
|
3248
3516
|
}
|
|
3249
3517
|
|
|
3250
|
-
const adapterName$
|
|
3518
|
+
const adapterName$8 = 'createPromptTemplate';
|
|
3251
3519
|
const createPromptTemplate_ConfigPropertyMetadata = [
|
|
3252
3520
|
generateParamConfigMetadata('apiName', true, 2 /* Body */, 0 /* String */),
|
|
3253
3521
|
generateParamConfigMetadata('childRelationships', true, 2 /* Body */, 4 /* Unsupported */),
|
|
@@ -3255,11 +3523,11 @@ const createPromptTemplate_ConfigPropertyMetadata = [
|
|
|
3255
3523
|
generateParamConfigMetadata('id', false, 2 /* Body */, 0 /* String */),
|
|
3256
3524
|
generateParamConfigMetadata('isStandard', true, 2 /* Body */, 1 /* Boolean */),
|
|
3257
3525
|
];
|
|
3258
|
-
const createPromptTemplate_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$
|
|
3259
|
-
const createResourceParams$
|
|
3260
|
-
function typeCheckConfig$
|
|
3526
|
+
const createPromptTemplate_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$8, createPromptTemplate_ConfigPropertyMetadata);
|
|
3527
|
+
const createResourceParams$8 = /*#__PURE__*/ createResourceParams$d(createPromptTemplate_ConfigPropertyMetadata);
|
|
3528
|
+
function typeCheckConfig$8(untrustedConfig) {
|
|
3261
3529
|
const config = {};
|
|
3262
|
-
typeCheckConfig$
|
|
3530
|
+
typeCheckConfig$d(untrustedConfig, config, createPromptTemplate_ConfigPropertyMetadata);
|
|
3263
3531
|
const untrustedConfig_childRelationships = untrustedConfig.childRelationships;
|
|
3264
3532
|
if (untrustedIsObject(untrustedConfig_childRelationships)) {
|
|
3265
3533
|
const untrustedConfig_childRelationships_object = {};
|
|
@@ -3299,30 +3567,30 @@ function typeCheckConfig$6(untrustedConfig) {
|
|
|
3299
3567
|
}
|
|
3300
3568
|
return config;
|
|
3301
3569
|
}
|
|
3302
|
-
function validateAdapterConfig$
|
|
3570
|
+
function validateAdapterConfig$8(untrustedConfig, configPropertyNames) {
|
|
3303
3571
|
if (!untrustedIsObject(untrustedConfig)) {
|
|
3304
3572
|
return null;
|
|
3305
3573
|
}
|
|
3306
3574
|
if (process.env.NODE_ENV !== 'production') {
|
|
3307
3575
|
validateConfig(untrustedConfig, configPropertyNames);
|
|
3308
3576
|
}
|
|
3309
|
-
const config = typeCheckConfig$
|
|
3577
|
+
const config = typeCheckConfig$8(untrustedConfig);
|
|
3310
3578
|
if (!areRequiredParametersPresent(config, configPropertyNames)) {
|
|
3311
3579
|
return null;
|
|
3312
3580
|
}
|
|
3313
3581
|
return config;
|
|
3314
3582
|
}
|
|
3315
|
-
function buildNetworkSnapshot$
|
|
3316
|
-
const resourceParams = createResourceParams$
|
|
3317
|
-
const request = createResourceRequest$
|
|
3583
|
+
function buildNetworkSnapshot$8(luvio, config, options) {
|
|
3584
|
+
const resourceParams = createResourceParams$8(config);
|
|
3585
|
+
const request = createResourceRequest$8(resourceParams);
|
|
3318
3586
|
return luvio.dispatchResourceRequest(request, options)
|
|
3319
3587
|
.then((response) => {
|
|
3320
3588
|
return luvio.handleSuccessResponse(() => {
|
|
3321
|
-
const snapshot = ingestSuccess$
|
|
3589
|
+
const snapshot = ingestSuccess$8(luvio, resourceParams, response);
|
|
3322
3590
|
return luvio.storeBroadcast().then(() => snapshot);
|
|
3323
3591
|
}, () => {
|
|
3324
3592
|
const cache = new StoreKeyMap();
|
|
3325
|
-
getResponseCacheKeys$
|
|
3593
|
+
getResponseCacheKeys$8(cache, luvio, resourceParams, response.body);
|
|
3326
3594
|
return cache;
|
|
3327
3595
|
});
|
|
3328
3596
|
}, (response) => {
|
|
@@ -3332,28 +3600,28 @@ function buildNetworkSnapshot$6(luvio, config, options) {
|
|
|
3332
3600
|
}
|
|
3333
3601
|
const createPromptTemplateAdapterFactory = (luvio) => {
|
|
3334
3602
|
return function createPromptTemplate(untrustedConfig) {
|
|
3335
|
-
const config = validateAdapterConfig$
|
|
3603
|
+
const config = validateAdapterConfig$8(untrustedConfig, createPromptTemplate_ConfigPropertyNames);
|
|
3336
3604
|
// Invalid or incomplete config
|
|
3337
3605
|
if (config === null) {
|
|
3338
3606
|
throw new Error('Invalid config for "createPromptTemplate"');
|
|
3339
3607
|
}
|
|
3340
|
-
return buildNetworkSnapshot$
|
|
3608
|
+
return buildNetworkSnapshot$8(luvio, config);
|
|
3341
3609
|
};
|
|
3342
3610
|
};
|
|
3343
3611
|
|
|
3344
|
-
function select$
|
|
3345
|
-
return select$
|
|
3612
|
+
function select$e(luvio, params) {
|
|
3613
|
+
return select$g();
|
|
3346
3614
|
}
|
|
3347
|
-
function getResponseCacheKeys$
|
|
3348
|
-
getTypeCacheKeys$
|
|
3615
|
+
function getResponseCacheKeys$7(storeKeyMap, luvio, resourceParams, response) {
|
|
3616
|
+
getTypeCacheKeys$5(storeKeyMap, luvio, response);
|
|
3349
3617
|
}
|
|
3350
|
-
function ingestSuccess$
|
|
3618
|
+
function ingestSuccess$7(luvio, resourceParams, response) {
|
|
3351
3619
|
const { body } = response;
|
|
3352
3620
|
const key = keyBuilderFromType(luvio, body);
|
|
3353
|
-
luvio.storeIngest(key, ingest$
|
|
3621
|
+
luvio.storeIngest(key, ingest$5, body);
|
|
3354
3622
|
const snapshot = luvio.storeLookup({
|
|
3355
3623
|
recordId: key,
|
|
3356
|
-
node: select$
|
|
3624
|
+
node: select$e(),
|
|
3357
3625
|
variables: {},
|
|
3358
3626
|
});
|
|
3359
3627
|
if (process.env.NODE_ENV !== 'production') {
|
|
@@ -3364,7 +3632,7 @@ function ingestSuccess$5(luvio, resourceParams, response) {
|
|
|
3364
3632
|
deepFreeze(snapshot.data);
|
|
3365
3633
|
return snapshot;
|
|
3366
3634
|
}
|
|
3367
|
-
function createResourceRequest$
|
|
3635
|
+
function createResourceRequest$7(config) {
|
|
3368
3636
|
const headers = {};
|
|
3369
3637
|
return {
|
|
3370
3638
|
baseUri: '/services/data/v65.0',
|
|
@@ -3378,7 +3646,7 @@ function createResourceRequest$5(config) {
|
|
|
3378
3646
|
};
|
|
3379
3647
|
}
|
|
3380
3648
|
|
|
3381
|
-
const adapterName$
|
|
3649
|
+
const adapterName$7 = 'createPromptTemplateVersion';
|
|
3382
3650
|
const createPromptTemplateVersion_ConfigPropertyMetadata = [
|
|
3383
3651
|
generateParamConfigMetadata('promptTemplateDevName', true, 0 /* UrlParameter */, 0 /* String */),
|
|
3384
3652
|
generateParamConfigMetadata('apiName', true, 2 /* Body */, 0 /* String */),
|
|
@@ -3387,11 +3655,11 @@ const createPromptTemplateVersion_ConfigPropertyMetadata = [
|
|
|
3387
3655
|
generateParamConfigMetadata('id', false, 2 /* Body */, 0 /* String */),
|
|
3388
3656
|
generateParamConfigMetadata('isStandard', true, 2 /* Body */, 1 /* Boolean */),
|
|
3389
3657
|
];
|
|
3390
|
-
const createPromptTemplateVersion_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$
|
|
3391
|
-
const createResourceParams$
|
|
3392
|
-
function typeCheckConfig$
|
|
3658
|
+
const createPromptTemplateVersion_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$7, createPromptTemplateVersion_ConfigPropertyMetadata);
|
|
3659
|
+
const createResourceParams$7 = /*#__PURE__*/ createResourceParams$d(createPromptTemplateVersion_ConfigPropertyMetadata);
|
|
3660
|
+
function typeCheckConfig$7(untrustedConfig) {
|
|
3393
3661
|
const config = {};
|
|
3394
|
-
typeCheckConfig$
|
|
3662
|
+
typeCheckConfig$d(untrustedConfig, config, createPromptTemplateVersion_ConfigPropertyMetadata);
|
|
3395
3663
|
const untrustedConfig_childRelationships = untrustedConfig.childRelationships;
|
|
3396
3664
|
if (untrustedIsObject(untrustedConfig_childRelationships)) {
|
|
3397
3665
|
const untrustedConfig_childRelationships_object = {};
|
|
@@ -3431,30 +3699,30 @@ function typeCheckConfig$5(untrustedConfig) {
|
|
|
3431
3699
|
}
|
|
3432
3700
|
return config;
|
|
3433
3701
|
}
|
|
3434
|
-
function validateAdapterConfig$
|
|
3702
|
+
function validateAdapterConfig$7(untrustedConfig, configPropertyNames) {
|
|
3435
3703
|
if (!untrustedIsObject(untrustedConfig)) {
|
|
3436
3704
|
return null;
|
|
3437
3705
|
}
|
|
3438
3706
|
if (process.env.NODE_ENV !== 'production') {
|
|
3439
3707
|
validateConfig(untrustedConfig, configPropertyNames);
|
|
3440
3708
|
}
|
|
3441
|
-
const config = typeCheckConfig$
|
|
3709
|
+
const config = typeCheckConfig$7(untrustedConfig);
|
|
3442
3710
|
if (!areRequiredParametersPresent(config, configPropertyNames)) {
|
|
3443
3711
|
return null;
|
|
3444
3712
|
}
|
|
3445
3713
|
return config;
|
|
3446
3714
|
}
|
|
3447
|
-
function buildNetworkSnapshot$
|
|
3448
|
-
const resourceParams = createResourceParams$
|
|
3449
|
-
const request = createResourceRequest$
|
|
3715
|
+
function buildNetworkSnapshot$7(luvio, config, options) {
|
|
3716
|
+
const resourceParams = createResourceParams$7(config);
|
|
3717
|
+
const request = createResourceRequest$7(resourceParams);
|
|
3450
3718
|
return luvio.dispatchResourceRequest(request, options)
|
|
3451
3719
|
.then((response) => {
|
|
3452
3720
|
return luvio.handleSuccessResponse(() => {
|
|
3453
|
-
const snapshot = ingestSuccess$
|
|
3721
|
+
const snapshot = ingestSuccess$7(luvio, resourceParams, response);
|
|
3454
3722
|
return luvio.storeBroadcast().then(() => snapshot);
|
|
3455
3723
|
}, () => {
|
|
3456
3724
|
const cache = new StoreKeyMap();
|
|
3457
|
-
getResponseCacheKeys$
|
|
3725
|
+
getResponseCacheKeys$7(cache, luvio, resourceParams, response.body);
|
|
3458
3726
|
return cache;
|
|
3459
3727
|
});
|
|
3460
3728
|
}, (response) => {
|
|
@@ -3464,12 +3732,12 @@ function buildNetworkSnapshot$5(luvio, config, options) {
|
|
|
3464
3732
|
}
|
|
3465
3733
|
const createPromptTemplateVersionAdapterFactory = (luvio) => {
|
|
3466
3734
|
return function createPromptTemplateVersion(untrustedConfig) {
|
|
3467
|
-
const config = validateAdapterConfig$
|
|
3735
|
+
const config = validateAdapterConfig$7(untrustedConfig, createPromptTemplateVersion_ConfigPropertyNames);
|
|
3468
3736
|
// Invalid or incomplete config
|
|
3469
3737
|
if (config === null) {
|
|
3470
3738
|
throw new Error('Invalid config for "createPromptTemplateVersion"');
|
|
3471
3739
|
}
|
|
3472
|
-
return buildNetworkSnapshot$
|
|
3740
|
+
return buildNetworkSnapshot$7(luvio, config);
|
|
3473
3741
|
};
|
|
3474
3742
|
};
|
|
3475
3743
|
|
|
@@ -3521,6 +3789,8 @@ function validate$8(obj, path = 'PromptTemplateDataProviderInputParamRepresentat
|
|
|
3521
3789
|
return v_error === undefined ? null : v_error;
|
|
3522
3790
|
}
|
|
3523
3791
|
|
|
3792
|
+
const TTL$4 = 300;
|
|
3793
|
+
const VERSION$6 = "d4824d8c6e7848df0de89295e6d9d434";
|
|
3524
3794
|
function validate$7(obj, path = 'PromptTemplateDataProviderInstanceConfigRepresentation') {
|
|
3525
3795
|
const v_error = (() => {
|
|
3526
3796
|
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
@@ -3633,31 +3903,33 @@ function validate$7(obj, path = 'PromptTemplateDataProviderInstanceConfigReprese
|
|
|
3633
3903
|
}
|
|
3634
3904
|
}
|
|
3635
3905
|
}
|
|
3636
|
-
|
|
3637
|
-
|
|
3638
|
-
|
|
3639
|
-
|
|
3640
|
-
|
|
3641
|
-
|
|
3906
|
+
if (obj.nodeIcon !== undefined) {
|
|
3907
|
+
const obj_nodeIcon = obj.nodeIcon;
|
|
3908
|
+
const path_nodeIcon = path + '.nodeIcon';
|
|
3909
|
+
let obj_nodeIcon_union0 = null;
|
|
3910
|
+
const obj_nodeIcon_union0_error = (() => {
|
|
3911
|
+
if (typeof obj_nodeIcon !== 'string') {
|
|
3912
|
+
return new TypeError('Expected "string" but received "' + typeof obj_nodeIcon + '" (at "' + path_nodeIcon + '")');
|
|
3913
|
+
}
|
|
3914
|
+
})();
|
|
3915
|
+
if (obj_nodeIcon_union0_error != null) {
|
|
3916
|
+
obj_nodeIcon_union0 = obj_nodeIcon_union0_error.message;
|
|
3642
3917
|
}
|
|
3643
|
-
|
|
3644
|
-
|
|
3645
|
-
|
|
3646
|
-
|
|
3647
|
-
|
|
3648
|
-
|
|
3649
|
-
if (
|
|
3650
|
-
|
|
3918
|
+
let obj_nodeIcon_union1 = null;
|
|
3919
|
+
const obj_nodeIcon_union1_error = (() => {
|
|
3920
|
+
if (obj_nodeIcon !== null) {
|
|
3921
|
+
return new TypeError('Expected "null" but received "' + typeof obj_nodeIcon + '" (at "' + path_nodeIcon + '")');
|
|
3922
|
+
}
|
|
3923
|
+
})();
|
|
3924
|
+
if (obj_nodeIcon_union1_error != null) {
|
|
3925
|
+
obj_nodeIcon_union1 = obj_nodeIcon_union1_error.message;
|
|
3926
|
+
}
|
|
3927
|
+
if (obj_nodeIcon_union0 && obj_nodeIcon_union1) {
|
|
3928
|
+
let message = 'Object doesn\'t match union (at "' + path_nodeIcon + '")';
|
|
3929
|
+
message += '\n' + obj_nodeIcon_union0.split('\n').map((line) => '\t' + line).join('\n');
|
|
3930
|
+
message += '\n' + obj_nodeIcon_union1.split('\n').map((line) => '\t' + line).join('\n');
|
|
3931
|
+
return new TypeError(message);
|
|
3651
3932
|
}
|
|
3652
|
-
})();
|
|
3653
|
-
if (obj_nodeIcon_union1_error != null) {
|
|
3654
|
-
obj_nodeIcon_union1 = obj_nodeIcon_union1_error.message;
|
|
3655
|
-
}
|
|
3656
|
-
if (obj_nodeIcon_union0 && obj_nodeIcon_union1) {
|
|
3657
|
-
let message = 'Object doesn\'t match union (at "' + path_nodeIcon + '")';
|
|
3658
|
-
message += '\n' + obj_nodeIcon_union0.split('\n').map((line) => '\t' + line).join('\n');
|
|
3659
|
-
message += '\n' + obj_nodeIcon_union1.split('\n').map((line) => '\t' + line).join('\n');
|
|
3660
|
-
return new TypeError(message);
|
|
3661
3933
|
}
|
|
3662
3934
|
if (obj.outputParams !== undefined) {
|
|
3663
3935
|
const obj_outputParams = obj.outputParams;
|
|
@@ -3740,9 +4012,203 @@ function validate$7(obj, path = 'PromptTemplateDataProviderInstanceConfigReprese
|
|
|
3740
4012
|
})();
|
|
3741
4013
|
return v_error === undefined ? null : v_error;
|
|
3742
4014
|
}
|
|
4015
|
+
const RepresentationType$4 = 'PromptTemplateDataProviderInstanceConfigRepresentation';
|
|
4016
|
+
function normalize$4(input, existing, path, luvio, store, timestamp) {
|
|
4017
|
+
return input;
|
|
4018
|
+
}
|
|
4019
|
+
const select$d = function PromptTemplateDataProviderInstanceConfigRepresentationSelect() {
|
|
4020
|
+
return {
|
|
4021
|
+
kind: 'Fragment',
|
|
4022
|
+
version: VERSION$6,
|
|
4023
|
+
private: [],
|
|
4024
|
+
opaque: true
|
|
4025
|
+
};
|
|
4026
|
+
};
|
|
4027
|
+
function equals$6(existing, incoming) {
|
|
4028
|
+
if (JSONStringify(incoming) !== JSONStringify(existing)) {
|
|
4029
|
+
return false;
|
|
4030
|
+
}
|
|
4031
|
+
return true;
|
|
4032
|
+
}
|
|
4033
|
+
const ingest$4 = function PromptTemplateDataProviderInstanceConfigRepresentationIngest(input, path, luvio, store, timestamp) {
|
|
4034
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
4035
|
+
const validateError = validate$7(input);
|
|
4036
|
+
if (validateError !== null) {
|
|
4037
|
+
throw validateError;
|
|
4038
|
+
}
|
|
4039
|
+
}
|
|
4040
|
+
const key = path.fullPath;
|
|
4041
|
+
const ttlToUse = TTL$4;
|
|
4042
|
+
ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize$4, "EinsteinLLM", VERSION$6, RepresentationType$4, equals$6);
|
|
4043
|
+
return createLink(key);
|
|
4044
|
+
};
|
|
4045
|
+
function getTypeCacheKeys$4(rootKeySet, luvio, input, fullPathFactory) {
|
|
4046
|
+
// root cache key (uses fullPathFactory if keyBuilderFromType isn't defined)
|
|
4047
|
+
const rootKey = fullPathFactory();
|
|
4048
|
+
rootKeySet.set(rootKey, {
|
|
4049
|
+
namespace: keyPrefix,
|
|
4050
|
+
representationName: RepresentationType$4,
|
|
4051
|
+
mergeable: false
|
|
4052
|
+
});
|
|
4053
|
+
}
|
|
4054
|
+
|
|
4055
|
+
function select$c(luvio, params) {
|
|
4056
|
+
return select$d();
|
|
4057
|
+
}
|
|
4058
|
+
function keyBuilder$9(luvio, params) {
|
|
4059
|
+
return keyPrefix + '::PromptTemplateDataProviderInstanceConfigRepresentation:(' + stableJSONStringify(params.body.additionalParam) + '::' + 'definition:' + params.body.definition + '::' + 'groupName:' + params.body.groupName + ')';
|
|
4060
|
+
}
|
|
4061
|
+
function getResponseCacheKeys$6(storeKeyMap, luvio, resourceParams, response) {
|
|
4062
|
+
getTypeCacheKeys$4(storeKeyMap, luvio, response, () => keyBuilder$9(luvio, resourceParams));
|
|
4063
|
+
}
|
|
4064
|
+
function ingestSuccess$6(luvio, resourceParams, response, snapshotRefresh) {
|
|
4065
|
+
const { body } = response;
|
|
4066
|
+
const key = keyBuilder$9(luvio, resourceParams);
|
|
4067
|
+
luvio.storeIngest(key, ingest$4, body);
|
|
4068
|
+
const snapshot = luvio.storeLookup({
|
|
4069
|
+
recordId: key,
|
|
4070
|
+
node: select$c(),
|
|
4071
|
+
variables: {},
|
|
4072
|
+
}, snapshotRefresh);
|
|
4073
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
4074
|
+
if (snapshot.state !== 'Fulfilled') {
|
|
4075
|
+
throw new Error('Invalid network response. Expected resource response to result in Fulfilled snapshot');
|
|
4076
|
+
}
|
|
4077
|
+
}
|
|
4078
|
+
deepFreeze(snapshot.data);
|
|
4079
|
+
return snapshot;
|
|
4080
|
+
}
|
|
4081
|
+
function ingestError$4(luvio, params, error, snapshotRefresh) {
|
|
4082
|
+
const key = keyBuilder$9(luvio, params);
|
|
4083
|
+
const errorSnapshot = luvio.errorSnapshot(error, snapshotRefresh);
|
|
4084
|
+
const storeMetadataParams = {
|
|
4085
|
+
ttl: TTL$4,
|
|
4086
|
+
namespace: keyPrefix,
|
|
4087
|
+
version: VERSION$6,
|
|
4088
|
+
representationName: RepresentationType$4
|
|
4089
|
+
};
|
|
4090
|
+
luvio.storeIngestError(key, errorSnapshot, storeMetadataParams);
|
|
4091
|
+
return errorSnapshot;
|
|
4092
|
+
}
|
|
4093
|
+
function createResourceRequest$6(config) {
|
|
4094
|
+
const headers = {};
|
|
4095
|
+
return {
|
|
4096
|
+
baseUri: '/services/data/v65.0',
|
|
4097
|
+
basePath: '/einstein/prompt-templates/data-provider/describe',
|
|
4098
|
+
method: 'post',
|
|
4099
|
+
body: config.body,
|
|
4100
|
+
urlParams: {},
|
|
4101
|
+
queryParams: {},
|
|
4102
|
+
headers,
|
|
4103
|
+
priority: 'normal',
|
|
4104
|
+
};
|
|
4105
|
+
}
|
|
4106
|
+
|
|
4107
|
+
const adapterName$6 = 'getDataProviderInstanceConfig';
|
|
4108
|
+
const getDataProviderInstanceConfig_ConfigPropertyMetadata = [
|
|
4109
|
+
generateParamConfigMetadata('additionalParam', false, 2 /* Body */, 4 /* Unsupported */),
|
|
4110
|
+
generateParamConfigMetadata('definition', true, 2 /* Body */, 0 /* String */),
|
|
4111
|
+
generateParamConfigMetadata('groupName', true, 2 /* Body */, 0 /* String */),
|
|
4112
|
+
];
|
|
4113
|
+
const getDataProviderInstanceConfig_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$6, getDataProviderInstanceConfig_ConfigPropertyMetadata);
|
|
4114
|
+
const createResourceParams$6 = /*#__PURE__*/ createResourceParams$d(getDataProviderInstanceConfig_ConfigPropertyMetadata);
|
|
4115
|
+
function keyBuilder$8(luvio, config) {
|
|
4116
|
+
const resourceParams = createResourceParams$6(config);
|
|
4117
|
+
return keyBuilder$9(luvio, resourceParams);
|
|
4118
|
+
}
|
|
4119
|
+
function typeCheckConfig$6(untrustedConfig) {
|
|
4120
|
+
const config = {};
|
|
4121
|
+
typeCheckConfig$d(untrustedConfig, config, getDataProviderInstanceConfig_ConfigPropertyMetadata);
|
|
4122
|
+
const untrustedConfig_additionalParam = untrustedConfig.additionalParam;
|
|
4123
|
+
if (untrustedIsObject(untrustedConfig_additionalParam)) {
|
|
4124
|
+
const untrustedConfig_additionalParam_object = {};
|
|
4125
|
+
const untrustedConfig_additionalParam_keys = Object.keys(untrustedConfig_additionalParam);
|
|
4126
|
+
for (let i = 0, arrayLength = untrustedConfig_additionalParam_keys.length; i < arrayLength; i++) {
|
|
4127
|
+
const key = untrustedConfig_additionalParam_keys[i];
|
|
4128
|
+
const untrustedConfig_additionalParam_prop = untrustedConfig_additionalParam[key];
|
|
4129
|
+
if (untrustedConfig_additionalParam_object !== undefined) {
|
|
4130
|
+
untrustedConfig_additionalParam_object[key] = untrustedConfig_additionalParam_prop;
|
|
4131
|
+
}
|
|
4132
|
+
}
|
|
4133
|
+
if (untrustedConfig_additionalParam_object !== undefined && Object.keys(untrustedConfig_additionalParam_object).length >= 0) {
|
|
4134
|
+
config.additionalParam = untrustedConfig_additionalParam_object;
|
|
4135
|
+
}
|
|
4136
|
+
}
|
|
4137
|
+
return config;
|
|
4138
|
+
}
|
|
4139
|
+
function validateAdapterConfig$6(untrustedConfig, configPropertyNames) {
|
|
4140
|
+
if (!untrustedIsObject(untrustedConfig)) {
|
|
4141
|
+
return null;
|
|
4142
|
+
}
|
|
4143
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
4144
|
+
validateConfig(untrustedConfig, configPropertyNames);
|
|
4145
|
+
}
|
|
4146
|
+
const config = typeCheckConfig$6(untrustedConfig);
|
|
4147
|
+
if (!areRequiredParametersPresent(config, configPropertyNames)) {
|
|
4148
|
+
return null;
|
|
4149
|
+
}
|
|
4150
|
+
return config;
|
|
4151
|
+
}
|
|
4152
|
+
function adapterFragment$4(luvio, config) {
|
|
4153
|
+
createResourceParams$6(config);
|
|
4154
|
+
return select$c();
|
|
4155
|
+
}
|
|
4156
|
+
function onFetchResponseSuccess$4(luvio, config, resourceParams, response) {
|
|
4157
|
+
const snapshot = ingestSuccess$6(luvio, resourceParams, response, {
|
|
4158
|
+
config,
|
|
4159
|
+
resolve: () => buildNetworkSnapshot$6(luvio, config, snapshotRefreshOptions)
|
|
4160
|
+
});
|
|
4161
|
+
return luvio.storeBroadcast().then(() => snapshot);
|
|
4162
|
+
}
|
|
4163
|
+
function onFetchResponseError$4(luvio, config, resourceParams, response) {
|
|
4164
|
+
const snapshot = ingestError$4(luvio, resourceParams, response, {
|
|
4165
|
+
config,
|
|
4166
|
+
resolve: () => buildNetworkSnapshot$6(luvio, config, snapshotRefreshOptions)
|
|
4167
|
+
});
|
|
4168
|
+
return luvio.storeBroadcast().then(() => snapshot);
|
|
4169
|
+
}
|
|
4170
|
+
function buildNetworkSnapshot$6(luvio, config, options) {
|
|
4171
|
+
const resourceParams = createResourceParams$6(config);
|
|
4172
|
+
const request = createResourceRequest$6(resourceParams);
|
|
4173
|
+
return luvio.dispatchResourceRequest(request, options)
|
|
4174
|
+
.then((response) => {
|
|
4175
|
+
return luvio.handleSuccessResponse(() => onFetchResponseSuccess$4(luvio, config, resourceParams, response), () => {
|
|
4176
|
+
const cache = new StoreKeyMap();
|
|
4177
|
+
getResponseCacheKeys$6(cache, luvio, resourceParams, response.body);
|
|
4178
|
+
return cache;
|
|
4179
|
+
});
|
|
4180
|
+
}, (response) => {
|
|
4181
|
+
return luvio.handleErrorResponse(() => onFetchResponseError$4(luvio, config, resourceParams, response));
|
|
4182
|
+
});
|
|
4183
|
+
}
|
|
4184
|
+
function buildNetworkSnapshotCachePolicy$4(context, coercedAdapterRequestContext) {
|
|
4185
|
+
return buildNetworkSnapshotCachePolicy$6(context, coercedAdapterRequestContext, buildNetworkSnapshot$6, 'get', false);
|
|
4186
|
+
}
|
|
4187
|
+
function buildCachedSnapshotCachePolicy$4(context, storeLookup) {
|
|
4188
|
+
const { luvio, config } = context;
|
|
4189
|
+
const selector = {
|
|
4190
|
+
recordId: keyBuilder$8(luvio, config),
|
|
4191
|
+
node: adapterFragment$4(luvio, config),
|
|
4192
|
+
variables: {},
|
|
4193
|
+
};
|
|
4194
|
+
const cacheSnapshot = storeLookup(selector, {
|
|
4195
|
+
config,
|
|
4196
|
+
resolve: () => buildNetworkSnapshot$6(luvio, config, snapshotRefreshOptions)
|
|
4197
|
+
});
|
|
4198
|
+
return cacheSnapshot;
|
|
4199
|
+
}
|
|
4200
|
+
const getDataProviderInstanceConfigAdapterFactory = (luvio) => function EinsteinLLM__getDataProviderInstanceConfig(untrustedConfig, requestContext) {
|
|
4201
|
+
const config = validateAdapterConfig$6(untrustedConfig, getDataProviderInstanceConfig_ConfigPropertyNames);
|
|
4202
|
+
// Invalid or incomplete config
|
|
4203
|
+
if (config === null) {
|
|
4204
|
+
return null;
|
|
4205
|
+
}
|
|
4206
|
+
return luvio.applyCachePolicy((requestContext || {}), { config, luvio }, // BuildSnapshotContext
|
|
4207
|
+
buildCachedSnapshotCachePolicy$4, buildNetworkSnapshotCachePolicy$4);
|
|
4208
|
+
};
|
|
3743
4209
|
|
|
3744
4210
|
const TTL$3 = 300;
|
|
3745
|
-
const VERSION$5 = "
|
|
4211
|
+
const VERSION$5 = "3a6ecdfe18eb2af8f8f6aaa1a30b194c";
|
|
3746
4212
|
function validate$6(obj, path = 'PromptTemplateDataProviderInstanceConfigCollectionRepresentation') {
|
|
3747
4213
|
const v_error = (() => {
|
|
3748
4214
|
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
@@ -3770,7 +4236,7 @@ const RepresentationType$3 = 'PromptTemplateDataProviderInstanceConfigCollection
|
|
|
3770
4236
|
function normalize$3(input, existing, path, luvio, store, timestamp) {
|
|
3771
4237
|
return input;
|
|
3772
4238
|
}
|
|
3773
|
-
const select$
|
|
4239
|
+
const select$b = function PromptTemplateDataProviderInstanceConfigCollectionRepresentationSelect() {
|
|
3774
4240
|
return {
|
|
3775
4241
|
kind: 'Fragment',
|
|
3776
4242
|
version: VERSION$5,
|
|
@@ -3806,22 +4272,22 @@ function getTypeCacheKeys$3(rootKeySet, luvio, input, fullPathFactory) {
|
|
|
3806
4272
|
});
|
|
3807
4273
|
}
|
|
3808
4274
|
|
|
3809
|
-
function select$
|
|
3810
|
-
return select$
|
|
4275
|
+
function select$a(luvio, params) {
|
|
4276
|
+
return select$b();
|
|
3811
4277
|
}
|
|
3812
4278
|
function keyBuilder$7(luvio, params) {
|
|
3813
4279
|
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 + ')';
|
|
3814
4280
|
}
|
|
3815
|
-
function getResponseCacheKeys$
|
|
4281
|
+
function getResponseCacheKeys$5(storeKeyMap, luvio, resourceParams, response) {
|
|
3816
4282
|
getTypeCacheKeys$3(storeKeyMap, luvio, response, () => keyBuilder$7(luvio, resourceParams));
|
|
3817
4283
|
}
|
|
3818
|
-
function ingestSuccess$
|
|
4284
|
+
function ingestSuccess$5(luvio, resourceParams, response, snapshotRefresh) {
|
|
3819
4285
|
const { body } = response;
|
|
3820
4286
|
const key = keyBuilder$7(luvio, resourceParams);
|
|
3821
4287
|
luvio.storeIngest(key, ingest$3, body);
|
|
3822
4288
|
const snapshot = luvio.storeLookup({
|
|
3823
4289
|
recordId: key,
|
|
3824
|
-
node: select$
|
|
4290
|
+
node: select$a(),
|
|
3825
4291
|
variables: {},
|
|
3826
4292
|
}, snapshotRefresh);
|
|
3827
4293
|
if (process.env.NODE_ENV !== 'production') {
|
|
@@ -3844,7 +4310,7 @@ function ingestError$3(luvio, params, error, snapshotRefresh) {
|
|
|
3844
4310
|
luvio.storeIngestError(key, errorSnapshot, storeMetadataParams);
|
|
3845
4311
|
return errorSnapshot;
|
|
3846
4312
|
}
|
|
3847
|
-
function createResourceRequest$
|
|
4313
|
+
function createResourceRequest$5(config) {
|
|
3848
4314
|
const headers = {};
|
|
3849
4315
|
return {
|
|
3850
4316
|
baseUri: '/services/data/v65.0',
|
|
@@ -3858,22 +4324,22 @@ function createResourceRequest$4(config) {
|
|
|
3858
4324
|
};
|
|
3859
4325
|
}
|
|
3860
4326
|
|
|
3861
|
-
const adapterName$
|
|
4327
|
+
const adapterName$5 = 'getInputMappedDataProviders';
|
|
3862
4328
|
const getInputMappedDataProviders_ConfigPropertyMetadata = [
|
|
3863
4329
|
generateParamConfigMetadata('groupName', false, 2 /* Body */, 0 /* String */),
|
|
3864
4330
|
generateParamConfigMetadata('target', false, 2 /* Body */, 0 /* String */),
|
|
3865
4331
|
generateParamConfigMetadata('templateInputs', true, 2 /* Body */, 4 /* Unsupported */, true),
|
|
3866
4332
|
generateParamConfigMetadata('templateTypeName', true, 2 /* Body */, 0 /* String */),
|
|
3867
4333
|
];
|
|
3868
|
-
const getInputMappedDataProviders_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$
|
|
3869
|
-
const createResourceParams$
|
|
4334
|
+
const getInputMappedDataProviders_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$5, getInputMappedDataProviders_ConfigPropertyMetadata);
|
|
4335
|
+
const createResourceParams$5 = /*#__PURE__*/ createResourceParams$d(getInputMappedDataProviders_ConfigPropertyMetadata);
|
|
3870
4336
|
function keyBuilder$6(luvio, config) {
|
|
3871
|
-
const resourceParams = createResourceParams$
|
|
4337
|
+
const resourceParams = createResourceParams$5(config);
|
|
3872
4338
|
return keyBuilder$7(luvio, resourceParams);
|
|
3873
4339
|
}
|
|
3874
|
-
function typeCheckConfig$
|
|
4340
|
+
function typeCheckConfig$5(untrustedConfig) {
|
|
3875
4341
|
const config = {};
|
|
3876
|
-
typeCheckConfig$
|
|
4342
|
+
typeCheckConfig$d(untrustedConfig, config, getInputMappedDataProviders_ConfigPropertyMetadata);
|
|
3877
4343
|
const untrustedConfig_templateInputs = untrustedConfig.templateInputs;
|
|
3878
4344
|
if (ArrayIsArray$1(untrustedConfig_templateInputs)) {
|
|
3879
4345
|
const untrustedConfig_templateInputs_array = [];
|
|
@@ -3885,45 +4351,45 @@ function typeCheckConfig$4(untrustedConfig) {
|
|
|
3885
4351
|
}
|
|
3886
4352
|
return config;
|
|
3887
4353
|
}
|
|
3888
|
-
function validateAdapterConfig$
|
|
4354
|
+
function validateAdapterConfig$5(untrustedConfig, configPropertyNames) {
|
|
3889
4355
|
if (!untrustedIsObject(untrustedConfig)) {
|
|
3890
4356
|
return null;
|
|
3891
4357
|
}
|
|
3892
4358
|
if (process.env.NODE_ENV !== 'production') {
|
|
3893
4359
|
validateConfig(untrustedConfig, configPropertyNames);
|
|
3894
4360
|
}
|
|
3895
|
-
const config = typeCheckConfig$
|
|
4361
|
+
const config = typeCheckConfig$5(untrustedConfig);
|
|
3896
4362
|
if (!areRequiredParametersPresent(config, configPropertyNames)) {
|
|
3897
4363
|
return null;
|
|
3898
4364
|
}
|
|
3899
4365
|
return config;
|
|
3900
4366
|
}
|
|
3901
4367
|
function adapterFragment$3(luvio, config) {
|
|
3902
|
-
createResourceParams$
|
|
3903
|
-
return select$
|
|
4368
|
+
createResourceParams$5(config);
|
|
4369
|
+
return select$a();
|
|
3904
4370
|
}
|
|
3905
4371
|
function onFetchResponseSuccess$3(luvio, config, resourceParams, response) {
|
|
3906
|
-
const snapshot = ingestSuccess$
|
|
4372
|
+
const snapshot = ingestSuccess$5(luvio, resourceParams, response, {
|
|
3907
4373
|
config,
|
|
3908
|
-
resolve: () => buildNetworkSnapshot$
|
|
4374
|
+
resolve: () => buildNetworkSnapshot$5(luvio, config, snapshotRefreshOptions)
|
|
3909
4375
|
});
|
|
3910
4376
|
return luvio.storeBroadcast().then(() => snapshot);
|
|
3911
4377
|
}
|
|
3912
4378
|
function onFetchResponseError$3(luvio, config, resourceParams, response) {
|
|
3913
4379
|
const snapshot = ingestError$3(luvio, resourceParams, response, {
|
|
3914
4380
|
config,
|
|
3915
|
-
resolve: () => buildNetworkSnapshot$
|
|
4381
|
+
resolve: () => buildNetworkSnapshot$5(luvio, config, snapshotRefreshOptions)
|
|
3916
4382
|
});
|
|
3917
4383
|
return luvio.storeBroadcast().then(() => snapshot);
|
|
3918
4384
|
}
|
|
3919
|
-
function buildNetworkSnapshot$
|
|
3920
|
-
const resourceParams = createResourceParams$
|
|
3921
|
-
const request = createResourceRequest$
|
|
4385
|
+
function buildNetworkSnapshot$5(luvio, config, options) {
|
|
4386
|
+
const resourceParams = createResourceParams$5(config);
|
|
4387
|
+
const request = createResourceRequest$5(resourceParams);
|
|
3922
4388
|
return luvio.dispatchResourceRequest(request, options)
|
|
3923
4389
|
.then((response) => {
|
|
3924
4390
|
return luvio.handleSuccessResponse(() => onFetchResponseSuccess$3(luvio, config, resourceParams, response), () => {
|
|
3925
4391
|
const cache = new StoreKeyMap();
|
|
3926
|
-
getResponseCacheKeys$
|
|
4392
|
+
getResponseCacheKeys$5(cache, luvio, resourceParams, response.body);
|
|
3927
4393
|
return cache;
|
|
3928
4394
|
});
|
|
3929
4395
|
}, (response) => {
|
|
@@ -3931,7 +4397,7 @@ function buildNetworkSnapshot$4(luvio, config, options) {
|
|
|
3931
4397
|
});
|
|
3932
4398
|
}
|
|
3933
4399
|
function buildNetworkSnapshotCachePolicy$3(context, coercedAdapterRequestContext) {
|
|
3934
|
-
return buildNetworkSnapshotCachePolicy$
|
|
4400
|
+
return buildNetworkSnapshotCachePolicy$6(context, coercedAdapterRequestContext, buildNetworkSnapshot$5, 'get', false);
|
|
3935
4401
|
}
|
|
3936
4402
|
function buildCachedSnapshotCachePolicy$3(context, storeLookup) {
|
|
3937
4403
|
const { luvio, config } = context;
|
|
@@ -3942,12 +4408,12 @@ function buildCachedSnapshotCachePolicy$3(context, storeLookup) {
|
|
|
3942
4408
|
};
|
|
3943
4409
|
const cacheSnapshot = storeLookup(selector, {
|
|
3944
4410
|
config,
|
|
3945
|
-
resolve: () => buildNetworkSnapshot$
|
|
4411
|
+
resolve: () => buildNetworkSnapshot$5(luvio, config, snapshotRefreshOptions)
|
|
3946
4412
|
});
|
|
3947
4413
|
return cacheSnapshot;
|
|
3948
4414
|
}
|
|
3949
4415
|
const getInputMappedDataProvidersAdapterFactory = (luvio) => function EinsteinLLM__getInputMappedDataProviders(untrustedConfig, requestContext) {
|
|
3950
|
-
const config = validateAdapterConfig$
|
|
4416
|
+
const config = validateAdapterConfig$5(untrustedConfig, getInputMappedDataProviders_ConfigPropertyNames);
|
|
3951
4417
|
// Invalid or incomplete config
|
|
3952
4418
|
if (config === null) {
|
|
3953
4419
|
return null;
|
|
@@ -3975,7 +4441,7 @@ function validate$5(obj, path = 'EinsteinPromptTemplateSupportedLanguageErrorRep
|
|
|
3975
4441
|
})();
|
|
3976
4442
|
return v_error === undefined ? null : v_error;
|
|
3977
4443
|
}
|
|
3978
|
-
const select$
|
|
4444
|
+
const select$9 = function EinsteinPromptTemplateSupportedLanguageErrorRepresentationSelect() {
|
|
3979
4445
|
return {
|
|
3980
4446
|
kind: 'Fragment',
|
|
3981
4447
|
version: VERSION$4,
|
|
@@ -4025,7 +4491,7 @@ function validate$4(obj, path = 'EinsteinPromptTemplateSupportedLanguageRepresen
|
|
|
4025
4491
|
})();
|
|
4026
4492
|
return v_error === undefined ? null : v_error;
|
|
4027
4493
|
}
|
|
4028
|
-
const select$
|
|
4494
|
+
const select$8 = function EinsteinPromptTemplateSupportedLanguageRepresentationSelect() {
|
|
4029
4495
|
return {
|
|
4030
4496
|
kind: 'Fragment',
|
|
4031
4497
|
version: VERSION$3,
|
|
@@ -4115,9 +4581,9 @@ const RepresentationType$2 = 'EinsteinPromptTemplateVersionOutputLanguagesRepres
|
|
|
4115
4581
|
function normalize$2(input, existing, path, luvio, store, timestamp) {
|
|
4116
4582
|
return input;
|
|
4117
4583
|
}
|
|
4118
|
-
const select$
|
|
4119
|
-
const { selections: EinsteinPromptTemplateSupportedLanguageErrorRepresentation__selections, opaque: EinsteinPromptTemplateSupportedLanguageErrorRepresentation__opaque, } = select$
|
|
4120
|
-
const { selections: EinsteinPromptTemplateSupportedLanguageRepresentation__selections, opaque: EinsteinPromptTemplateSupportedLanguageRepresentation__opaque, } = select$
|
|
4584
|
+
const select$7 = function EinsteinPromptTemplateVersionOutputLanguagesRepresentationSelect() {
|
|
4585
|
+
const { selections: EinsteinPromptTemplateSupportedLanguageErrorRepresentation__selections, opaque: EinsteinPromptTemplateSupportedLanguageErrorRepresentation__opaque, } = select$9();
|
|
4586
|
+
const { selections: EinsteinPromptTemplateSupportedLanguageRepresentation__selections, opaque: EinsteinPromptTemplateSupportedLanguageRepresentation__opaque, } = select$8();
|
|
4121
4587
|
return {
|
|
4122
4588
|
kind: 'Fragment',
|
|
4123
4589
|
version: VERSION$2,
|
|
@@ -4210,22 +4676,22 @@ function getTypeCacheKeys$2(rootKeySet, luvio, input, fullPathFactory) {
|
|
|
4210
4676
|
});
|
|
4211
4677
|
}
|
|
4212
4678
|
|
|
4213
|
-
function select$
|
|
4214
|
-
return select$
|
|
4679
|
+
function select$6(luvio, params) {
|
|
4680
|
+
return select$7();
|
|
4215
4681
|
}
|
|
4216
4682
|
function keyBuilder$5(luvio, params) {
|
|
4217
4683
|
return keyPrefix + '::EinsteinPromptTemplateVersionOutputLanguagesRepresentation:(' + 'useStandardVersion:' + params.queryParams.useStandardVersion + ',' + 'versionId:' + params.queryParams.versionId + ',' + 'promptTemplateDevName:' + params.urlParams.promptTemplateDevName + ')';
|
|
4218
4684
|
}
|
|
4219
|
-
function getResponseCacheKeys$
|
|
4685
|
+
function getResponseCacheKeys$4(storeKeyMap, luvio, resourceParams, response) {
|
|
4220
4686
|
getTypeCacheKeys$2(storeKeyMap, luvio, response, () => keyBuilder$5(luvio, resourceParams));
|
|
4221
4687
|
}
|
|
4222
|
-
function ingestSuccess$
|
|
4688
|
+
function ingestSuccess$4(luvio, resourceParams, response, snapshotRefresh) {
|
|
4223
4689
|
const { body } = response;
|
|
4224
4690
|
const key = keyBuilder$5(luvio, resourceParams);
|
|
4225
4691
|
luvio.storeIngest(key, ingest$2, body);
|
|
4226
4692
|
const snapshot = luvio.storeLookup({
|
|
4227
4693
|
recordId: key,
|
|
4228
|
-
node: select$
|
|
4694
|
+
node: select$6(),
|
|
4229
4695
|
variables: {},
|
|
4230
4696
|
}, snapshotRefresh);
|
|
4231
4697
|
if (process.env.NODE_ENV !== 'production') {
|
|
@@ -4248,7 +4714,7 @@ function ingestError$2(luvio, params, error, snapshotRefresh) {
|
|
|
4248
4714
|
luvio.storeIngestError(key, errorSnapshot, storeMetadataParams);
|
|
4249
4715
|
return errorSnapshot;
|
|
4250
4716
|
}
|
|
4251
|
-
function createResourceRequest$
|
|
4717
|
+
function createResourceRequest$4(config) {
|
|
4252
4718
|
const headers = {};
|
|
4253
4719
|
return {
|
|
4254
4720
|
baseUri: '/services/data/v65.0',
|
|
@@ -4262,62 +4728,62 @@ function createResourceRequest$3(config) {
|
|
|
4262
4728
|
};
|
|
4263
4729
|
}
|
|
4264
4730
|
|
|
4265
|
-
const adapterName$
|
|
4731
|
+
const adapterName$4 = 'getOutputLanguages';
|
|
4266
4732
|
const getOutputLanguages_ConfigPropertyMetadata = [
|
|
4267
4733
|
generateParamConfigMetadata('promptTemplateDevName', true, 0 /* UrlParameter */, 0 /* String */),
|
|
4268
4734
|
generateParamConfigMetadata('useStandardVersion', false, 1 /* QueryParameter */, 1 /* Boolean */),
|
|
4269
4735
|
generateParamConfigMetadata('versionId', false, 1 /* QueryParameter */, 0 /* String */),
|
|
4270
4736
|
];
|
|
4271
|
-
const getOutputLanguages_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$
|
|
4272
|
-
const createResourceParams$
|
|
4737
|
+
const getOutputLanguages_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$4, getOutputLanguages_ConfigPropertyMetadata);
|
|
4738
|
+
const createResourceParams$4 = /*#__PURE__*/ createResourceParams$d(getOutputLanguages_ConfigPropertyMetadata);
|
|
4273
4739
|
function keyBuilder$4(luvio, config) {
|
|
4274
|
-
const resourceParams = createResourceParams$
|
|
4740
|
+
const resourceParams = createResourceParams$4(config);
|
|
4275
4741
|
return keyBuilder$5(luvio, resourceParams);
|
|
4276
4742
|
}
|
|
4277
|
-
function typeCheckConfig$
|
|
4743
|
+
function typeCheckConfig$4(untrustedConfig) {
|
|
4278
4744
|
const config = {};
|
|
4279
|
-
typeCheckConfig$
|
|
4745
|
+
typeCheckConfig$d(untrustedConfig, config, getOutputLanguages_ConfigPropertyMetadata);
|
|
4280
4746
|
return config;
|
|
4281
4747
|
}
|
|
4282
|
-
function validateAdapterConfig$
|
|
4748
|
+
function validateAdapterConfig$4(untrustedConfig, configPropertyNames) {
|
|
4283
4749
|
if (!untrustedIsObject(untrustedConfig)) {
|
|
4284
4750
|
return null;
|
|
4285
4751
|
}
|
|
4286
4752
|
if (process.env.NODE_ENV !== 'production') {
|
|
4287
4753
|
validateConfig(untrustedConfig, configPropertyNames);
|
|
4288
4754
|
}
|
|
4289
|
-
const config = typeCheckConfig$
|
|
4755
|
+
const config = typeCheckConfig$4(untrustedConfig);
|
|
4290
4756
|
if (!areRequiredParametersPresent(config, configPropertyNames)) {
|
|
4291
4757
|
return null;
|
|
4292
4758
|
}
|
|
4293
4759
|
return config;
|
|
4294
4760
|
}
|
|
4295
4761
|
function adapterFragment$2(luvio, config) {
|
|
4296
|
-
createResourceParams$
|
|
4297
|
-
return select$
|
|
4762
|
+
createResourceParams$4(config);
|
|
4763
|
+
return select$6();
|
|
4298
4764
|
}
|
|
4299
4765
|
function onFetchResponseSuccess$2(luvio, config, resourceParams, response) {
|
|
4300
|
-
const snapshot = ingestSuccess$
|
|
4766
|
+
const snapshot = ingestSuccess$4(luvio, resourceParams, response, {
|
|
4301
4767
|
config,
|
|
4302
|
-
resolve: () => buildNetworkSnapshot$
|
|
4768
|
+
resolve: () => buildNetworkSnapshot$4(luvio, config, snapshotRefreshOptions)
|
|
4303
4769
|
});
|
|
4304
4770
|
return luvio.storeBroadcast().then(() => snapshot);
|
|
4305
4771
|
}
|
|
4306
4772
|
function onFetchResponseError$2(luvio, config, resourceParams, response) {
|
|
4307
4773
|
const snapshot = ingestError$2(luvio, resourceParams, response, {
|
|
4308
4774
|
config,
|
|
4309
|
-
resolve: () => buildNetworkSnapshot$
|
|
4775
|
+
resolve: () => buildNetworkSnapshot$4(luvio, config, snapshotRefreshOptions)
|
|
4310
4776
|
});
|
|
4311
4777
|
return luvio.storeBroadcast().then(() => snapshot);
|
|
4312
4778
|
}
|
|
4313
|
-
function buildNetworkSnapshot$
|
|
4314
|
-
const resourceParams = createResourceParams$
|
|
4315
|
-
const request = createResourceRequest$
|
|
4779
|
+
function buildNetworkSnapshot$4(luvio, config, options) {
|
|
4780
|
+
const resourceParams = createResourceParams$4(config);
|
|
4781
|
+
const request = createResourceRequest$4(resourceParams);
|
|
4316
4782
|
return luvio.dispatchResourceRequest(request, options)
|
|
4317
4783
|
.then((response) => {
|
|
4318
4784
|
return luvio.handleSuccessResponse(() => onFetchResponseSuccess$2(luvio, config, resourceParams, response), () => {
|
|
4319
4785
|
const cache = new StoreKeyMap();
|
|
4320
|
-
getResponseCacheKeys$
|
|
4786
|
+
getResponseCacheKeys$4(cache, luvio, resourceParams, response.body);
|
|
4321
4787
|
return cache;
|
|
4322
4788
|
});
|
|
4323
4789
|
}, (response) => {
|
|
@@ -4325,7 +4791,7 @@ function buildNetworkSnapshot$3(luvio, config, options) {
|
|
|
4325
4791
|
});
|
|
4326
4792
|
}
|
|
4327
4793
|
function buildNetworkSnapshotCachePolicy$2(context, coercedAdapterRequestContext) {
|
|
4328
|
-
return buildNetworkSnapshotCachePolicy$
|
|
4794
|
+
return buildNetworkSnapshotCachePolicy$6(context, coercedAdapterRequestContext, buildNetworkSnapshot$4, undefined, false);
|
|
4329
4795
|
}
|
|
4330
4796
|
function buildCachedSnapshotCachePolicy$2(context, storeLookup) {
|
|
4331
4797
|
const { luvio, config } = context;
|
|
@@ -4336,12 +4802,12 @@ function buildCachedSnapshotCachePolicy$2(context, storeLookup) {
|
|
|
4336
4802
|
};
|
|
4337
4803
|
const cacheSnapshot = storeLookup(selector, {
|
|
4338
4804
|
config,
|
|
4339
|
-
resolve: () => buildNetworkSnapshot$
|
|
4805
|
+
resolve: () => buildNetworkSnapshot$4(luvio, config, snapshotRefreshOptions)
|
|
4340
4806
|
});
|
|
4341
4807
|
return cacheSnapshot;
|
|
4342
4808
|
}
|
|
4343
4809
|
const getOutputLanguagesAdapterFactory = (luvio) => function EinsteinLLM__getOutputLanguages(untrustedConfig, requestContext) {
|
|
4344
|
-
const config = validateAdapterConfig$
|
|
4810
|
+
const config = validateAdapterConfig$4(untrustedConfig, getOutputLanguages_ConfigPropertyNames);
|
|
4345
4811
|
// Invalid or incomplete config
|
|
4346
4812
|
if (config === null) {
|
|
4347
4813
|
return null;
|
|
@@ -4483,7 +4949,7 @@ const RepresentationType$1 = 'EinsteinPromptRecordRepresentation';
|
|
|
4483
4949
|
function normalize$1(input, existing, path, luvio, store, timestamp) {
|
|
4484
4950
|
return input;
|
|
4485
4951
|
}
|
|
4486
|
-
const select$
|
|
4952
|
+
const select$5 = function EinsteinPromptRecordRepresentationSelect() {
|
|
4487
4953
|
return {
|
|
4488
4954
|
kind: 'Fragment',
|
|
4489
4955
|
version: VERSION$1,
|
|
@@ -4519,22 +4985,22 @@ function getTypeCacheKeys$1(rootKeySet, luvio, input, fullPathFactory) {
|
|
|
4519
4985
|
});
|
|
4520
4986
|
}
|
|
4521
4987
|
|
|
4522
|
-
function select$
|
|
4523
|
-
return select$
|
|
4988
|
+
function select$4(luvio, params) {
|
|
4989
|
+
return select$5();
|
|
4524
4990
|
}
|
|
4525
4991
|
function keyBuilder$3(luvio, params) {
|
|
4526
4992
|
return keyPrefix + '::EinsteinPromptRecordRepresentation:(' + 'versionId:' + params.queryParams.versionId + ',' + 'promptTemplateDevName:' + params.urlParams.promptTemplateDevName + ')';
|
|
4527
4993
|
}
|
|
4528
|
-
function getResponseCacheKeys$
|
|
4994
|
+
function getResponseCacheKeys$3(storeKeyMap, luvio, resourceParams, response) {
|
|
4529
4995
|
getTypeCacheKeys$1(storeKeyMap, luvio, response, () => keyBuilder$3(luvio, resourceParams));
|
|
4530
4996
|
}
|
|
4531
|
-
function ingestSuccess$
|
|
4997
|
+
function ingestSuccess$3(luvio, resourceParams, response, snapshotRefresh) {
|
|
4532
4998
|
const { body } = response;
|
|
4533
4999
|
const key = keyBuilder$3(luvio, resourceParams);
|
|
4534
5000
|
luvio.storeIngest(key, ingest$1, body);
|
|
4535
5001
|
const snapshot = luvio.storeLookup({
|
|
4536
5002
|
recordId: key,
|
|
4537
|
-
node: select$
|
|
5003
|
+
node: select$4(),
|
|
4538
5004
|
variables: {},
|
|
4539
5005
|
}, snapshotRefresh);
|
|
4540
5006
|
if (process.env.NODE_ENV !== 'production') {
|
|
@@ -4557,7 +5023,7 @@ function ingestError$1(luvio, params, error, snapshotRefresh) {
|
|
|
4557
5023
|
luvio.storeIngestError(key, errorSnapshot, storeMetadataParams);
|
|
4558
5024
|
return errorSnapshot;
|
|
4559
5025
|
}
|
|
4560
|
-
function createResourceRequest$
|
|
5026
|
+
function createResourceRequest$3(config) {
|
|
4561
5027
|
const headers = {};
|
|
4562
5028
|
return {
|
|
4563
5029
|
baseUri: '/services/data/v65.0',
|
|
@@ -4571,61 +5037,61 @@ function createResourceRequest$2(config) {
|
|
|
4571
5037
|
};
|
|
4572
5038
|
}
|
|
4573
5039
|
|
|
4574
|
-
const adapterName$
|
|
5040
|
+
const adapterName$3 = 'getPromptTemplate';
|
|
4575
5041
|
const getPromptTemplate_ConfigPropertyMetadata = [
|
|
4576
5042
|
generateParamConfigMetadata('promptTemplateDevName', true, 0 /* UrlParameter */, 0 /* String */),
|
|
4577
5043
|
generateParamConfigMetadata('versionId', false, 1 /* QueryParameter */, 0 /* String */),
|
|
4578
5044
|
];
|
|
4579
|
-
const getPromptTemplate_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$
|
|
4580
|
-
const createResourceParams$
|
|
5045
|
+
const getPromptTemplate_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$3, getPromptTemplate_ConfigPropertyMetadata);
|
|
5046
|
+
const createResourceParams$3 = /*#__PURE__*/ createResourceParams$d(getPromptTemplate_ConfigPropertyMetadata);
|
|
4581
5047
|
function keyBuilder$2(luvio, config) {
|
|
4582
|
-
const resourceParams = createResourceParams$
|
|
5048
|
+
const resourceParams = createResourceParams$3(config);
|
|
4583
5049
|
return keyBuilder$3(luvio, resourceParams);
|
|
4584
5050
|
}
|
|
4585
|
-
function typeCheckConfig$
|
|
5051
|
+
function typeCheckConfig$3(untrustedConfig) {
|
|
4586
5052
|
const config = {};
|
|
4587
|
-
typeCheckConfig$
|
|
5053
|
+
typeCheckConfig$d(untrustedConfig, config, getPromptTemplate_ConfigPropertyMetadata);
|
|
4588
5054
|
return config;
|
|
4589
5055
|
}
|
|
4590
|
-
function validateAdapterConfig$
|
|
5056
|
+
function validateAdapterConfig$3(untrustedConfig, configPropertyNames) {
|
|
4591
5057
|
if (!untrustedIsObject(untrustedConfig)) {
|
|
4592
5058
|
return null;
|
|
4593
5059
|
}
|
|
4594
5060
|
if (process.env.NODE_ENV !== 'production') {
|
|
4595
5061
|
validateConfig(untrustedConfig, configPropertyNames);
|
|
4596
5062
|
}
|
|
4597
|
-
const config = typeCheckConfig$
|
|
5063
|
+
const config = typeCheckConfig$3(untrustedConfig);
|
|
4598
5064
|
if (!areRequiredParametersPresent(config, configPropertyNames)) {
|
|
4599
5065
|
return null;
|
|
4600
5066
|
}
|
|
4601
5067
|
return config;
|
|
4602
5068
|
}
|
|
4603
5069
|
function adapterFragment$1(luvio, config) {
|
|
4604
|
-
createResourceParams$
|
|
4605
|
-
return select$
|
|
5070
|
+
createResourceParams$3(config);
|
|
5071
|
+
return select$4();
|
|
4606
5072
|
}
|
|
4607
5073
|
function onFetchResponseSuccess$1(luvio, config, resourceParams, response) {
|
|
4608
|
-
const snapshot = ingestSuccess$
|
|
5074
|
+
const snapshot = ingestSuccess$3(luvio, resourceParams, response, {
|
|
4609
5075
|
config,
|
|
4610
|
-
resolve: () => buildNetworkSnapshot$
|
|
5076
|
+
resolve: () => buildNetworkSnapshot$3(luvio, config, snapshotRefreshOptions)
|
|
4611
5077
|
});
|
|
4612
5078
|
return luvio.storeBroadcast().then(() => snapshot);
|
|
4613
5079
|
}
|
|
4614
5080
|
function onFetchResponseError$1(luvio, config, resourceParams, response) {
|
|
4615
5081
|
const snapshot = ingestError$1(luvio, resourceParams, response, {
|
|
4616
5082
|
config,
|
|
4617
|
-
resolve: () => buildNetworkSnapshot$
|
|
5083
|
+
resolve: () => buildNetworkSnapshot$3(luvio, config, snapshotRefreshOptions)
|
|
4618
5084
|
});
|
|
4619
5085
|
return luvio.storeBroadcast().then(() => snapshot);
|
|
4620
5086
|
}
|
|
4621
|
-
function buildNetworkSnapshot$
|
|
4622
|
-
const resourceParams = createResourceParams$
|
|
4623
|
-
const request = createResourceRequest$
|
|
5087
|
+
function buildNetworkSnapshot$3(luvio, config, options) {
|
|
5088
|
+
const resourceParams = createResourceParams$3(config);
|
|
5089
|
+
const request = createResourceRequest$3(resourceParams);
|
|
4624
5090
|
return luvio.dispatchResourceRequest(request, options)
|
|
4625
5091
|
.then((response) => {
|
|
4626
5092
|
return luvio.handleSuccessResponse(() => onFetchResponseSuccess$1(luvio, config, resourceParams, response), () => {
|
|
4627
5093
|
const cache = new StoreKeyMap();
|
|
4628
|
-
getResponseCacheKeys$
|
|
5094
|
+
getResponseCacheKeys$3(cache, luvio, resourceParams, response.body);
|
|
4629
5095
|
return cache;
|
|
4630
5096
|
});
|
|
4631
5097
|
}, (response) => {
|
|
@@ -4633,7 +5099,7 @@ function buildNetworkSnapshot$2(luvio, config, options) {
|
|
|
4633
5099
|
});
|
|
4634
5100
|
}
|
|
4635
5101
|
function buildNetworkSnapshotCachePolicy$1(context, coercedAdapterRequestContext) {
|
|
4636
|
-
return buildNetworkSnapshotCachePolicy$
|
|
5102
|
+
return buildNetworkSnapshotCachePolicy$6(context, coercedAdapterRequestContext, buildNetworkSnapshot$3, undefined, false);
|
|
4637
5103
|
}
|
|
4638
5104
|
function buildCachedSnapshotCachePolicy$1(context, storeLookup) {
|
|
4639
5105
|
const { luvio, config } = context;
|
|
@@ -4644,12 +5110,12 @@ function buildCachedSnapshotCachePolicy$1(context, storeLookup) {
|
|
|
4644
5110
|
};
|
|
4645
5111
|
const cacheSnapshot = storeLookup(selector, {
|
|
4646
5112
|
config,
|
|
4647
|
-
resolve: () => buildNetworkSnapshot$
|
|
5113
|
+
resolve: () => buildNetworkSnapshot$3(luvio, config, snapshotRefreshOptions)
|
|
4648
5114
|
});
|
|
4649
5115
|
return cacheSnapshot;
|
|
4650
5116
|
}
|
|
4651
5117
|
const getPromptTemplateAdapterFactory = (luvio) => function EinsteinLLM__getPromptTemplate(untrustedConfig, requestContext) {
|
|
4652
|
-
const config = validateAdapterConfig$
|
|
5118
|
+
const config = validateAdapterConfig$3(untrustedConfig, getPromptTemplate_ConfigPropertyNames);
|
|
4653
5119
|
// Invalid or incomplete config
|
|
4654
5120
|
if (config === null) {
|
|
4655
5121
|
return null;
|
|
@@ -4699,7 +5165,7 @@ const RepresentationType = 'EinsteinPromptRecordCollectionOutputRepresentation';
|
|
|
4699
5165
|
function normalize(input, existing, path, luvio, store, timestamp) {
|
|
4700
5166
|
return input;
|
|
4701
5167
|
}
|
|
4702
|
-
const select$
|
|
5168
|
+
const select$3 = function EinsteinPromptRecordCollectionOutputRepresentationSelect() {
|
|
4703
5169
|
return {
|
|
4704
5170
|
kind: 'Fragment',
|
|
4705
5171
|
version: VERSION,
|
|
@@ -4735,22 +5201,22 @@ function getTypeCacheKeys(rootKeySet, luvio, input, fullPathFactory) {
|
|
|
4735
5201
|
});
|
|
4736
5202
|
}
|
|
4737
5203
|
|
|
4738
|
-
function select$
|
|
4739
|
-
return select$
|
|
5204
|
+
function select$2(luvio, params) {
|
|
5205
|
+
return select$3();
|
|
4740
5206
|
}
|
|
4741
5207
|
function keyBuilder$1(luvio, params) {
|
|
4742
5208
|
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 + ')';
|
|
4743
5209
|
}
|
|
4744
|
-
function getResponseCacheKeys$
|
|
5210
|
+
function getResponseCacheKeys$2(storeKeyMap, luvio, resourceParams, response) {
|
|
4745
5211
|
getTypeCacheKeys(storeKeyMap, luvio, response, () => keyBuilder$1(luvio, resourceParams));
|
|
4746
5212
|
}
|
|
4747
|
-
function ingestSuccess$
|
|
5213
|
+
function ingestSuccess$2(luvio, resourceParams, response, snapshotRefresh) {
|
|
4748
5214
|
const { body } = response;
|
|
4749
5215
|
const key = keyBuilder$1(luvio, resourceParams);
|
|
4750
5216
|
luvio.storeIngest(key, ingest, body);
|
|
4751
5217
|
const snapshot = luvio.storeLookup({
|
|
4752
5218
|
recordId: key,
|
|
4753
|
-
node: select$
|
|
5219
|
+
node: select$2(),
|
|
4754
5220
|
variables: {},
|
|
4755
5221
|
}, snapshotRefresh);
|
|
4756
5222
|
if (process.env.NODE_ENV !== 'production') {
|
|
@@ -4773,7 +5239,7 @@ function ingestError(luvio, params, error, snapshotRefresh) {
|
|
|
4773
5239
|
luvio.storeIngestError(key, errorSnapshot, storeMetadataParams);
|
|
4774
5240
|
return errorSnapshot;
|
|
4775
5241
|
}
|
|
4776
|
-
function createResourceRequest$
|
|
5242
|
+
function createResourceRequest$2(config) {
|
|
4777
5243
|
const headers = {};
|
|
4778
5244
|
return {
|
|
4779
5245
|
baseUri: '/services/data/v65.0',
|
|
@@ -4787,7 +5253,7 @@ function createResourceRequest$1(config) {
|
|
|
4787
5253
|
};
|
|
4788
5254
|
}
|
|
4789
5255
|
|
|
4790
|
-
const adapterName$
|
|
5256
|
+
const adapterName$2 = 'getPromptTemplates';
|
|
4791
5257
|
const getPromptTemplates_ConfigPropertyMetadata = [
|
|
4792
5258
|
generateParamConfigMetadata('isActive', false, 1 /* QueryParameter */, 1 /* Boolean */),
|
|
4793
5259
|
generateParamConfigMetadata('fields', false, 1 /* QueryParameter */, 0 /* String */, true),
|
|
@@ -4798,56 +5264,56 @@ const getPromptTemplates_ConfigPropertyMetadata = [
|
|
|
4798
5264
|
generateParamConfigMetadata('query', false, 1 /* QueryParameter */, 0 /* String */),
|
|
4799
5265
|
generateParamConfigMetadata('sortBy', false, 1 /* QueryParameter */, 0 /* String */),
|
|
4800
5266
|
];
|
|
4801
|
-
const getPromptTemplates_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$
|
|
4802
|
-
const createResourceParams$
|
|
5267
|
+
const getPromptTemplates_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$2, getPromptTemplates_ConfigPropertyMetadata);
|
|
5268
|
+
const createResourceParams$2 = /*#__PURE__*/ createResourceParams$d(getPromptTemplates_ConfigPropertyMetadata);
|
|
4803
5269
|
function keyBuilder(luvio, config) {
|
|
4804
|
-
const resourceParams = createResourceParams$
|
|
5270
|
+
const resourceParams = createResourceParams$2(config);
|
|
4805
5271
|
return keyBuilder$1(luvio, resourceParams);
|
|
4806
5272
|
}
|
|
4807
|
-
function typeCheckConfig$
|
|
5273
|
+
function typeCheckConfig$2(untrustedConfig) {
|
|
4808
5274
|
const config = {};
|
|
4809
|
-
typeCheckConfig$
|
|
5275
|
+
typeCheckConfig$d(untrustedConfig, config, getPromptTemplates_ConfigPropertyMetadata);
|
|
4810
5276
|
return config;
|
|
4811
5277
|
}
|
|
4812
|
-
function validateAdapterConfig$
|
|
5278
|
+
function validateAdapterConfig$2(untrustedConfig, configPropertyNames) {
|
|
4813
5279
|
if (!untrustedIsObject(untrustedConfig)) {
|
|
4814
5280
|
return null;
|
|
4815
5281
|
}
|
|
4816
5282
|
if (process.env.NODE_ENV !== 'production') {
|
|
4817
5283
|
validateConfig(untrustedConfig, configPropertyNames);
|
|
4818
5284
|
}
|
|
4819
|
-
const config = typeCheckConfig$
|
|
5285
|
+
const config = typeCheckConfig$2(untrustedConfig);
|
|
4820
5286
|
if (!areRequiredParametersPresent(config, configPropertyNames)) {
|
|
4821
5287
|
return null;
|
|
4822
5288
|
}
|
|
4823
5289
|
return config;
|
|
4824
5290
|
}
|
|
4825
5291
|
function adapterFragment(luvio, config) {
|
|
4826
|
-
createResourceParams$
|
|
4827
|
-
return select$
|
|
5292
|
+
createResourceParams$2(config);
|
|
5293
|
+
return select$2();
|
|
4828
5294
|
}
|
|
4829
5295
|
function onFetchResponseSuccess(luvio, config, resourceParams, response) {
|
|
4830
|
-
const snapshot = ingestSuccess$
|
|
5296
|
+
const snapshot = ingestSuccess$2(luvio, resourceParams, response, {
|
|
4831
5297
|
config,
|
|
4832
|
-
resolve: () => buildNetworkSnapshot$
|
|
5298
|
+
resolve: () => buildNetworkSnapshot$2(luvio, config, snapshotRefreshOptions)
|
|
4833
5299
|
});
|
|
4834
5300
|
return luvio.storeBroadcast().then(() => snapshot);
|
|
4835
5301
|
}
|
|
4836
5302
|
function onFetchResponseError(luvio, config, resourceParams, response) {
|
|
4837
5303
|
const snapshot = ingestError(luvio, resourceParams, response, {
|
|
4838
5304
|
config,
|
|
4839
|
-
resolve: () => buildNetworkSnapshot$
|
|
5305
|
+
resolve: () => buildNetworkSnapshot$2(luvio, config, snapshotRefreshOptions)
|
|
4840
5306
|
});
|
|
4841
5307
|
return luvio.storeBroadcast().then(() => snapshot);
|
|
4842
5308
|
}
|
|
4843
|
-
function buildNetworkSnapshot$
|
|
4844
|
-
const resourceParams = createResourceParams$
|
|
4845
|
-
const request = createResourceRequest$
|
|
5309
|
+
function buildNetworkSnapshot$2(luvio, config, options) {
|
|
5310
|
+
const resourceParams = createResourceParams$2(config);
|
|
5311
|
+
const request = createResourceRequest$2(resourceParams);
|
|
4846
5312
|
return luvio.dispatchResourceRequest(request, options)
|
|
4847
5313
|
.then((response) => {
|
|
4848
5314
|
return luvio.handleSuccessResponse(() => onFetchResponseSuccess(luvio, config, resourceParams, response), () => {
|
|
4849
5315
|
const cache = new StoreKeyMap();
|
|
4850
|
-
getResponseCacheKeys$
|
|
5316
|
+
getResponseCacheKeys$2(cache, luvio, resourceParams, response.body);
|
|
4851
5317
|
return cache;
|
|
4852
5318
|
});
|
|
4853
5319
|
}, (response) => {
|
|
@@ -4855,7 +5321,7 @@ function buildNetworkSnapshot$1(luvio, config, options) {
|
|
|
4855
5321
|
});
|
|
4856
5322
|
}
|
|
4857
5323
|
function buildNetworkSnapshotCachePolicy(context, coercedAdapterRequestContext) {
|
|
4858
|
-
return buildNetworkSnapshotCachePolicy$
|
|
5324
|
+
return buildNetworkSnapshotCachePolicy$6(context, coercedAdapterRequestContext, buildNetworkSnapshot$2, undefined, false);
|
|
4859
5325
|
}
|
|
4860
5326
|
function buildCachedSnapshotCachePolicy(context, storeLookup) {
|
|
4861
5327
|
const { luvio, config } = context;
|
|
@@ -4866,12 +5332,12 @@ function buildCachedSnapshotCachePolicy(context, storeLookup) {
|
|
|
4866
5332
|
};
|
|
4867
5333
|
const cacheSnapshot = storeLookup(selector, {
|
|
4868
5334
|
config,
|
|
4869
|
-
resolve: () => buildNetworkSnapshot$
|
|
5335
|
+
resolve: () => buildNetworkSnapshot$2(luvio, config, snapshotRefreshOptions)
|
|
4870
5336
|
});
|
|
4871
5337
|
return cacheSnapshot;
|
|
4872
5338
|
}
|
|
4873
5339
|
const getPromptTemplatesAdapterFactory = (luvio) => function EinsteinLLM__getPromptTemplates(untrustedConfig, requestContext) {
|
|
4874
|
-
const config = validateAdapterConfig$
|
|
5340
|
+
const config = validateAdapterConfig$2(untrustedConfig, getPromptTemplates_ConfigPropertyNames);
|
|
4875
5341
|
// Invalid or incomplete config
|
|
4876
5342
|
if (config === null) {
|
|
4877
5343
|
return null;
|
|
@@ -4880,16 +5346,109 @@ const getPromptTemplatesAdapterFactory = (luvio) => function EinsteinLLM__getPro
|
|
|
4880
5346
|
buildCachedSnapshotCachePolicy, buildNetworkSnapshotCachePolicy);
|
|
4881
5347
|
};
|
|
4882
5348
|
|
|
5349
|
+
function select$1(luvio, params) {
|
|
5350
|
+
return select$g();
|
|
5351
|
+
}
|
|
5352
|
+
function getResponseCacheKeys$1(storeKeyMap, luvio, resourceParams, response) {
|
|
5353
|
+
getTypeCacheKeys$5(storeKeyMap, luvio, response);
|
|
5354
|
+
}
|
|
5355
|
+
function ingestSuccess$1(luvio, resourceParams, response) {
|
|
5356
|
+
const { body } = response;
|
|
5357
|
+
const key = keyBuilderFromType(luvio, body);
|
|
5358
|
+
luvio.storeIngest(key, ingest$5, body);
|
|
5359
|
+
const snapshot = luvio.storeLookup({
|
|
5360
|
+
recordId: key,
|
|
5361
|
+
node: select$1(),
|
|
5362
|
+
variables: {},
|
|
5363
|
+
});
|
|
5364
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
5365
|
+
if (snapshot.state !== 'Fulfilled') {
|
|
5366
|
+
throw new Error('Invalid network response. Expected resource response to result in Fulfilled snapshot');
|
|
5367
|
+
}
|
|
5368
|
+
}
|
|
5369
|
+
deepFreeze(snapshot.data);
|
|
5370
|
+
return snapshot;
|
|
5371
|
+
}
|
|
5372
|
+
function createResourceRequest$1(config) {
|
|
5373
|
+
const headers = {};
|
|
5374
|
+
return {
|
|
5375
|
+
baseUri: '/services/data/v65.0',
|
|
5376
|
+
basePath: '/einstein/prompt-templates/' + config.urlParams.promptTemplateDevName + '/versions/' + config.urlParams.versionId + '/status',
|
|
5377
|
+
method: 'put',
|
|
5378
|
+
body: null,
|
|
5379
|
+
urlParams: config.urlParams,
|
|
5380
|
+
queryParams: config.queryParams,
|
|
5381
|
+
headers,
|
|
5382
|
+
priority: 'normal',
|
|
5383
|
+
};
|
|
5384
|
+
}
|
|
5385
|
+
|
|
5386
|
+
const adapterName$1 = 'putEinsteinPromptTemplateVersionStatus';
|
|
5387
|
+
const putEinsteinPromptTemplateVersionStatus_ConfigPropertyMetadata = [
|
|
5388
|
+
generateParamConfigMetadata('promptTemplateDevName', true, 0 /* UrlParameter */, 0 /* String */),
|
|
5389
|
+
generateParamConfigMetadata('versionId', true, 0 /* UrlParameter */, 0 /* String */),
|
|
5390
|
+
generateParamConfigMetadata('action', false, 1 /* QueryParameter */, 0 /* String */),
|
|
5391
|
+
generateParamConfigMetadata('ignoreWarnings', false, 1 /* QueryParameter */, 1 /* Boolean */),
|
|
5392
|
+
];
|
|
5393
|
+
const putEinsteinPromptTemplateVersionStatus_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$1, putEinsteinPromptTemplateVersionStatus_ConfigPropertyMetadata);
|
|
5394
|
+
const createResourceParams$1 = /*#__PURE__*/ createResourceParams$d(putEinsteinPromptTemplateVersionStatus_ConfigPropertyMetadata);
|
|
5395
|
+
function typeCheckConfig$1(untrustedConfig) {
|
|
5396
|
+
const config = {};
|
|
5397
|
+
typeCheckConfig$d(untrustedConfig, config, putEinsteinPromptTemplateVersionStatus_ConfigPropertyMetadata);
|
|
5398
|
+
return config;
|
|
5399
|
+
}
|
|
5400
|
+
function validateAdapterConfig$1(untrustedConfig, configPropertyNames) {
|
|
5401
|
+
if (!untrustedIsObject(untrustedConfig)) {
|
|
5402
|
+
return null;
|
|
5403
|
+
}
|
|
5404
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
5405
|
+
validateConfig(untrustedConfig, configPropertyNames);
|
|
5406
|
+
}
|
|
5407
|
+
const config = typeCheckConfig$1(untrustedConfig);
|
|
5408
|
+
if (!areRequiredParametersPresent(config, configPropertyNames)) {
|
|
5409
|
+
return null;
|
|
5410
|
+
}
|
|
5411
|
+
return config;
|
|
5412
|
+
}
|
|
5413
|
+
function buildNetworkSnapshot$1(luvio, config, options) {
|
|
5414
|
+
const resourceParams = createResourceParams$1(config);
|
|
5415
|
+
const request = createResourceRequest$1(resourceParams);
|
|
5416
|
+
return luvio.dispatchResourceRequest(request, options)
|
|
5417
|
+
.then((response) => {
|
|
5418
|
+
return luvio.handleSuccessResponse(() => {
|
|
5419
|
+
const snapshot = ingestSuccess$1(luvio, resourceParams, response);
|
|
5420
|
+
return luvio.storeBroadcast().then(() => snapshot);
|
|
5421
|
+
}, () => {
|
|
5422
|
+
const cache = new StoreKeyMap();
|
|
5423
|
+
getResponseCacheKeys$1(cache, luvio, resourceParams, response.body);
|
|
5424
|
+
return cache;
|
|
5425
|
+
});
|
|
5426
|
+
}, (response) => {
|
|
5427
|
+
deepFreeze(response);
|
|
5428
|
+
throw response;
|
|
5429
|
+
});
|
|
5430
|
+
}
|
|
5431
|
+
const putEinsteinPromptTemplateVersionStatusAdapterFactory = (luvio) => {
|
|
5432
|
+
return function putEinsteinPromptTemplateVersionStatus(untrustedConfig) {
|
|
5433
|
+
const config = validateAdapterConfig$1(untrustedConfig, putEinsteinPromptTemplateVersionStatus_ConfigPropertyNames);
|
|
5434
|
+
// Invalid or incomplete config
|
|
5435
|
+
if (config === null) {
|
|
5436
|
+
throw new Error('Invalid config for "putEinsteinPromptTemplateVersionStatus"');
|
|
5437
|
+
}
|
|
5438
|
+
return buildNetworkSnapshot$1(luvio, config);
|
|
5439
|
+
};
|
|
5440
|
+
};
|
|
5441
|
+
|
|
4883
5442
|
function select(luvio, params) {
|
|
4884
|
-
return select$
|
|
5443
|
+
return select$g();
|
|
4885
5444
|
}
|
|
4886
5445
|
function getResponseCacheKeys(storeKeyMap, luvio, resourceParams, response) {
|
|
4887
|
-
getTypeCacheKeys$
|
|
5446
|
+
getTypeCacheKeys$5(storeKeyMap, luvio, response);
|
|
4888
5447
|
}
|
|
4889
5448
|
function ingestSuccess(luvio, resourceParams, response) {
|
|
4890
5449
|
const { body } = response;
|
|
4891
5450
|
const key = keyBuilderFromType(luvio, body);
|
|
4892
|
-
luvio.storeIngest(key, ingest$
|
|
5451
|
+
luvio.storeIngest(key, ingest$5, body);
|
|
4893
5452
|
const snapshot = luvio.storeLookup({
|
|
4894
5453
|
recordId: key,
|
|
4895
5454
|
node: select(),
|
|
@@ -4928,10 +5487,10 @@ const updatePromptTemplateVersion_ConfigPropertyMetadata = [
|
|
|
4928
5487
|
generateParamConfigMetadata('isStandard', true, 2 /* Body */, 1 /* Boolean */),
|
|
4929
5488
|
];
|
|
4930
5489
|
const updatePromptTemplateVersion_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName, updatePromptTemplateVersion_ConfigPropertyMetadata);
|
|
4931
|
-
const createResourceParams = /*#__PURE__*/ createResourceParams$
|
|
5490
|
+
const createResourceParams = /*#__PURE__*/ createResourceParams$d(updatePromptTemplateVersion_ConfigPropertyMetadata);
|
|
4932
5491
|
function typeCheckConfig(untrustedConfig) {
|
|
4933
5492
|
const config = {};
|
|
4934
|
-
typeCheckConfig$
|
|
5493
|
+
typeCheckConfig$d(untrustedConfig, config, updatePromptTemplateVersion_ConfigPropertyMetadata);
|
|
4935
5494
|
const untrustedConfig_childRelationships = untrustedConfig.childRelationships;
|
|
4936
5495
|
if (untrustedIsObject(untrustedConfig_childRelationships)) {
|
|
4937
5496
|
const untrustedConfig_childRelationships_object = {};
|
|
@@ -5019,19 +5578,27 @@ let createGenerations;
|
|
|
5019
5578
|
let createGenerationsForPromptTemplate;
|
|
5020
5579
|
let createPromptTemplate;
|
|
5021
5580
|
let createPromptTemplateVersion;
|
|
5581
|
+
let getDataProviderInstanceConfig;
|
|
5022
5582
|
let getInputMappedDataProviders;
|
|
5023
5583
|
let getOutputLanguages;
|
|
5024
5584
|
let getPromptTemplate;
|
|
5025
5585
|
let getPromptTemplates;
|
|
5586
|
+
let putEinsteinPromptTemplateVersionStatus;
|
|
5026
5587
|
let updatePromptTemplateVersion;
|
|
5027
5588
|
// Imperative GET Adapters
|
|
5028
5589
|
let createEmbeddings_imperative;
|
|
5590
|
+
let getDataProviderInstanceConfig_imperative;
|
|
5029
5591
|
let getInputMappedDataProviders_imperative;
|
|
5030
5592
|
let getOutputLanguages_imperative;
|
|
5031
5593
|
let getPromptTemplate_imperative;
|
|
5032
5594
|
let getPromptTemplates_imperative;
|
|
5033
5595
|
// Adapter Metadata
|
|
5034
5596
|
const createEmbeddingsMetadata = { apiFamily: 'EinsteinLLM', name: 'createEmbeddings', ttl: 100 };
|
|
5597
|
+
const getDataProviderInstanceConfigMetadata = {
|
|
5598
|
+
apiFamily: 'EinsteinLLM',
|
|
5599
|
+
name: 'getDataProviderInstanceConfig',
|
|
5600
|
+
ttl: 300,
|
|
5601
|
+
};
|
|
5035
5602
|
const getInputMappedDataProvidersMetadata = {
|
|
5036
5603
|
apiFamily: 'EinsteinLLM',
|
|
5037
5604
|
name: 'getInputMappedDataProviders',
|
|
@@ -5052,6 +5619,7 @@ const getPromptTemplatesMetadata = {
|
|
|
5052
5619
|
function bindExportsTo(luvio) {
|
|
5053
5620
|
// LDS Adapters
|
|
5054
5621
|
const createEmbeddings_ldsAdapter = createInstrumentedAdapter(createLDSAdapter(luvio, 'createEmbeddings', createEmbeddingsAdapterFactory), createEmbeddingsMetadata);
|
|
5622
|
+
const getDataProviderInstanceConfig_ldsAdapter = createInstrumentedAdapter(createLDSAdapter(luvio, 'getDataProviderInstanceConfig', getDataProviderInstanceConfigAdapterFactory), getDataProviderInstanceConfigMetadata);
|
|
5055
5623
|
const getInputMappedDataProviders_ldsAdapter = createInstrumentedAdapter(createLDSAdapter(luvio, 'getInputMappedDataProviders', getInputMappedDataProvidersAdapterFactory), getInputMappedDataProvidersMetadata);
|
|
5056
5624
|
const getOutputLanguages_ldsAdapter = createInstrumentedAdapter(createLDSAdapter(luvio, 'getOutputLanguages', getOutputLanguagesAdapterFactory), getOutputLanguagesMetadata);
|
|
5057
5625
|
const getPromptTemplate_ldsAdapter = createInstrumentedAdapter(createLDSAdapter(luvio, 'getPromptTemplate', getPromptTemplateAdapterFactory), getPromptTemplateMetadata);
|
|
@@ -5067,13 +5635,16 @@ function bindExportsTo(luvio) {
|
|
|
5067
5635
|
createGenerationsForPromptTemplate: unwrapSnapshotData(createGenerationsForPromptTemplateAdapterFactory),
|
|
5068
5636
|
createPromptTemplate: unwrapSnapshotData(createPromptTemplateAdapterFactory),
|
|
5069
5637
|
createPromptTemplateVersion: unwrapSnapshotData(createPromptTemplateVersionAdapterFactory),
|
|
5638
|
+
getDataProviderInstanceConfig: createWireAdapterConstructor(luvio, getDataProviderInstanceConfig_ldsAdapter, getDataProviderInstanceConfigMetadata),
|
|
5070
5639
|
getInputMappedDataProviders: createWireAdapterConstructor(luvio, getInputMappedDataProviders_ldsAdapter, getInputMappedDataProvidersMetadata),
|
|
5071
5640
|
getOutputLanguages: createWireAdapterConstructor(luvio, getOutputLanguages_ldsAdapter, getOutputLanguagesMetadata),
|
|
5072
5641
|
getPromptTemplate: createWireAdapterConstructor(luvio, getPromptTemplate_ldsAdapter, getPromptTemplateMetadata),
|
|
5073
5642
|
getPromptTemplates: createWireAdapterConstructor(luvio, getPromptTemplates_ldsAdapter, getPromptTemplatesMetadata),
|
|
5643
|
+
putEinsteinPromptTemplateVersionStatus: unwrapSnapshotData(putEinsteinPromptTemplateVersionStatusAdapterFactory),
|
|
5074
5644
|
updatePromptTemplateVersion: unwrapSnapshotData(updatePromptTemplateVersionAdapterFactory),
|
|
5075
5645
|
// Imperative GET Adapters
|
|
5076
5646
|
createEmbeddings_imperative: createImperativeAdapter(luvio, createEmbeddings_ldsAdapter, createEmbeddingsMetadata),
|
|
5647
|
+
getDataProviderInstanceConfig_imperative: createImperativeAdapter(luvio, getDataProviderInstanceConfig_ldsAdapter, getDataProviderInstanceConfigMetadata),
|
|
5077
5648
|
getInputMappedDataProviders_imperative: createImperativeAdapter(luvio, getInputMappedDataProviders_ldsAdapter, getInputMappedDataProvidersMetadata),
|
|
5078
5649
|
getOutputLanguages_imperative: createImperativeAdapter(luvio, getOutputLanguages_ldsAdapter, getOutputLanguagesMetadata),
|
|
5079
5650
|
getPromptTemplate_imperative: createImperativeAdapter(luvio, getPromptTemplate_ldsAdapter, getPromptTemplateMetadata),
|
|
@@ -5089,12 +5660,15 @@ withDefaultLuvio((luvio) => {
|
|
|
5089
5660
|
createGenerationsForPromptTemplate,
|
|
5090
5661
|
createPromptTemplate,
|
|
5091
5662
|
createPromptTemplateVersion,
|
|
5663
|
+
getDataProviderInstanceConfig,
|
|
5092
5664
|
getInputMappedDataProviders,
|
|
5093
5665
|
getOutputLanguages,
|
|
5094
5666
|
getPromptTemplate,
|
|
5095
5667
|
getPromptTemplates,
|
|
5668
|
+
putEinsteinPromptTemplateVersionStatus,
|
|
5096
5669
|
updatePromptTemplateVersion,
|
|
5097
5670
|
createEmbeddings_imperative,
|
|
5671
|
+
getDataProviderInstanceConfig_imperative,
|
|
5098
5672
|
getInputMappedDataProviders_imperative,
|
|
5099
5673
|
getOutputLanguages_imperative,
|
|
5100
5674
|
getPromptTemplate_imperative,
|
|
@@ -5102,5 +5676,5 @@ withDefaultLuvio((luvio) => {
|
|
|
5102
5676
|
} = bindExportsTo(luvio));
|
|
5103
5677
|
});
|
|
5104
5678
|
|
|
5105
|
-
export { createEmbeddings, createEmbeddings_imperative, createFeedback, createGenerations, createGenerationsForPromptTemplate, createPromptTemplate, createPromptTemplateVersion, getInputMappedDataProviders, getInputMappedDataProviders_imperative, getOutputLanguages, getOutputLanguages_imperative, getPromptTemplate, getPromptTemplate_imperative, getPromptTemplates, getPromptTemplates_imperative, updatePromptTemplateVersion };
|
|
5106
|
-
// version: 1.
|
|
5679
|
+
export { createEmbeddings, createEmbeddings_imperative, createFeedback, createGenerations, createGenerationsForPromptTemplate, createPromptTemplate, createPromptTemplateVersion, getDataProviderInstanceConfig, getDataProviderInstanceConfig_imperative, getInputMappedDataProviders, getInputMappedDataProviders_imperative, getOutputLanguages, getOutputLanguages_imperative, getPromptTemplate, getPromptTemplate_imperative, getPromptTemplates, getPromptTemplates_imperative, putEinsteinPromptTemplateVersionStatus, updatePromptTemplateVersion };
|
|
5680
|
+
// version: 1.384.0-835fd13f44
|