@salesforce/lds-adapters-service-einsteinllm 1.383.0 → 1.385.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 +1505 -553
- package/dist/es/es2018/types/src/generated/adapters/getDataProviderInstanceConfig.d.ts +31 -0
- package/dist/es/es2018/types/src/generated/adapters/getDataProviderTypeConfigs.d.ts +27 -0
- package/dist/es/es2018/types/src/generated/adapters/getDataProviders.d.ts +29 -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 +4 -0
- package/dist/es/es2018/types/src/generated/artifacts/sfdc.d.ts +8 -1
- package/dist/es/es2018/types/src/generated/resources/getEinsteinPromptTemplatesDataProviderTypesByTemplateType.d.ts +15 -0
- package/dist/es/es2018/types/src/generated/resources/getEinsteinPromptTemplatesDataProvidersByTemplateType.d.ts +19 -0
- 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/dist/es/es2018/types/src/generated/types/PromptTemplateDataProviderTypeConfigCollectionRepresentation.d.ts +30 -0
- package/dist/es/es2018/types/src/generated/types/PromptTemplateDataProviderTypeConfigRepresentation.d.ts +46 -0
- package/package.json +4 -4
- package/sfdc/index.js +1579 -592
- package/src/raml/api.raml +174 -8
- package/src/raml/luvio.raml +28 -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$8, StoreKeyMap, createResourceParams as createResourceParams$f, typeCheckConfig as typeCheckConfig$f } 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$B(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$A(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$z(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$B(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$A(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$p = "5ed5ccc6fa6f15691ec0fc1080e41fe6";
|
|
279
|
+
function validate$y(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$E = function EinsteinLlmEmbeddingItemRepresentationSelect() {
|
|
301
301
|
return {
|
|
302
302
|
kind: 'Fragment',
|
|
303
|
-
version: VERSION$
|
|
303
|
+
version: VERSION$p,
|
|
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$p(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$a = 100;
|
|
338
|
+
const VERSION$o = "d9873651f09d29764ef4d4231eb653d7";
|
|
339
|
+
function validate$x(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$y(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$a = 'EinsteinLlmEmbeddingsRepresentation';
|
|
377
|
+
function normalize$a(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$D = function EinsteinLlmEmbeddingsRepresentationSelect() {
|
|
381
|
+
const { selections: EinsteinLlmEmbeddingItemRepresentation__selections, opaque: EinsteinLlmEmbeddingItemRepresentation__opaque, } = select$E();
|
|
382
382
|
return {
|
|
383
383
|
kind: 'Fragment',
|
|
384
|
-
version: VERSION$
|
|
384
|
+
version: VERSION$o,
|
|
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$o(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$p(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$a = function EinsteinLlmEmbeddingsRepresentationIngest(input, path, luvio, store, timestamp) {
|
|
425
425
|
if (process.env.NODE_ENV !== 'production') {
|
|
426
|
-
const validateError = validate$
|
|
426
|
+
const validateError = validate$x(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$a;
|
|
433
|
+
ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize$a, "EinsteinLLM", VERSION$o, RepresentationType$a, equals$o);
|
|
434
434
|
return createLink(key);
|
|
435
435
|
};
|
|
436
|
-
function getTypeCacheKeys$
|
|
436
|
+
function getTypeCacheKeys$a(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$a,
|
|
442
442
|
mergeable: false
|
|
443
443
|
});
|
|
444
444
|
}
|
|
445
445
|
|
|
446
|
-
function select$
|
|
447
|
-
return select$
|
|
446
|
+
function select$C(luvio, params) {
|
|
447
|
+
return select$D();
|
|
448
448
|
}
|
|
449
|
-
function keyBuilder$
|
|
449
|
+
function keyBuilder$j(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$e(storeKeyMap, luvio, resourceParams, response) {
|
|
453
|
+
getTypeCacheKeys$a(storeKeyMap, luvio, response, () => keyBuilder$j(luvio, resourceParams));
|
|
454
454
|
}
|
|
455
|
-
function ingestSuccess$
|
|
455
|
+
function ingestSuccess$e(luvio, resourceParams, response, snapshotRefresh) {
|
|
456
456
|
const { body } = response;
|
|
457
|
-
const key = keyBuilder$
|
|
458
|
-
luvio.storeIngest(key, ingest$
|
|
457
|
+
const key = keyBuilder$j(luvio, resourceParams);
|
|
458
|
+
luvio.storeIngest(key, ingest$a, body);
|
|
459
459
|
const snapshot = luvio.storeLookup({
|
|
460
460
|
recordId: key,
|
|
461
|
-
node: select$
|
|
461
|
+
node: select$C(),
|
|
462
462
|
variables: {},
|
|
463
463
|
}, snapshotRefresh);
|
|
464
464
|
if (process.env.NODE_ENV !== 'production') {
|
|
@@ -469,22 +469,22 @@ 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$7(luvio, params, error, snapshotRefresh) {
|
|
473
|
+
const key = keyBuilder$j(luvio, params);
|
|
474
474
|
const errorSnapshot = luvio.errorSnapshot(error, snapshotRefresh);
|
|
475
475
|
const storeMetadataParams = {
|
|
476
|
-
ttl: TTL$
|
|
476
|
+
ttl: TTL$a,
|
|
477
477
|
namespace: keyPrefix,
|
|
478
|
-
version: VERSION$
|
|
479
|
-
representationName: RepresentationType$
|
|
478
|
+
version: VERSION$o,
|
|
479
|
+
representationName: RepresentationType$a
|
|
480
480
|
};
|
|
481
481
|
luvio.storeIngestError(key, errorSnapshot, storeMetadataParams);
|
|
482
482
|
return errorSnapshot;
|
|
483
483
|
}
|
|
484
|
-
function createResourceRequest$
|
|
484
|
+
function createResourceRequest$e(config) {
|
|
485
485
|
const headers = {};
|
|
486
486
|
return {
|
|
487
|
-
baseUri: '/services/data/
|
|
487
|
+
baseUri: '/services/data/v66.0',
|
|
488
488
|
basePath: '/einstein/llm/embeddings',
|
|
489
489
|
method: 'post',
|
|
490
490
|
body: config.body,
|
|
@@ -495,97 +495,97 @@ function createResourceRequest$a(config) {
|
|
|
495
495
|
};
|
|
496
496
|
}
|
|
497
497
|
|
|
498
|
-
const adapterName$
|
|
498
|
+
const adapterName$e = '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$e, createEmbeddings_ConfigPropertyMetadata);
|
|
503
|
+
const createResourceParams$e = /*#__PURE__*/ createResourceParams$f(createEmbeddings_ConfigPropertyMetadata);
|
|
504
|
+
function keyBuilder$i(luvio, config) {
|
|
505
|
+
const resourceParams = createResourceParams$e(config);
|
|
506
|
+
return keyBuilder$j(luvio, resourceParams);
|
|
507
507
|
}
|
|
508
|
-
function typeCheckConfig$
|
|
508
|
+
function typeCheckConfig$e(untrustedConfig) {
|
|
509
509
|
const config = {};
|
|
510
510
|
const untrustedConfig_embeddingsInput = untrustedConfig.embeddingsInput;
|
|
511
|
-
const referenceEinsteinLlmEmbeddingsInputRepresentationValidationError = validate$
|
|
511
|
+
const referenceEinsteinLlmEmbeddingsInputRepresentationValidationError = validate$z(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$e(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$e(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$7(luvio, config) {
|
|
531
|
+
createResourceParams$e(config);
|
|
532
|
+
return select$C();
|
|
533
533
|
}
|
|
534
|
-
function onFetchResponseSuccess$
|
|
535
|
-
const snapshot = ingestSuccess$
|
|
534
|
+
function onFetchResponseSuccess$7(luvio, config, resourceParams, response) {
|
|
535
|
+
const snapshot = ingestSuccess$e(luvio, resourceParams, response, {
|
|
536
536
|
config,
|
|
537
|
-
resolve: () => buildNetworkSnapshot$
|
|
537
|
+
resolve: () => buildNetworkSnapshot$e(luvio, config, snapshotRefreshOptions)
|
|
538
538
|
});
|
|
539
539
|
return luvio.storeBroadcast().then(() => snapshot);
|
|
540
540
|
}
|
|
541
|
-
function onFetchResponseError$
|
|
542
|
-
const snapshot = ingestError$
|
|
541
|
+
function onFetchResponseError$7(luvio, config, resourceParams, response) {
|
|
542
|
+
const snapshot = ingestError$7(luvio, resourceParams, response, {
|
|
543
543
|
config,
|
|
544
|
-
resolve: () => buildNetworkSnapshot$
|
|
544
|
+
resolve: () => buildNetworkSnapshot$e(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$e(luvio, config, options) {
|
|
549
|
+
const resourceParams = createResourceParams$e(config);
|
|
550
|
+
const request = createResourceRequest$e(resourceParams);
|
|
551
551
|
return luvio.dispatchResourceRequest(request, options)
|
|
552
552
|
.then((response) => {
|
|
553
|
-
return luvio.handleSuccessResponse(() => onFetchResponseSuccess$
|
|
553
|
+
return luvio.handleSuccessResponse(() => onFetchResponseSuccess$7(luvio, config, resourceParams, response), () => {
|
|
554
554
|
const cache = new StoreKeyMap();
|
|
555
|
-
getResponseCacheKeys$
|
|
555
|
+
getResponseCacheKeys$e(cache, luvio, resourceParams, response.body);
|
|
556
556
|
return cache;
|
|
557
557
|
});
|
|
558
558
|
}, (response) => {
|
|
559
|
-
return luvio.handleErrorResponse(() => onFetchResponseError$
|
|
559
|
+
return luvio.handleErrorResponse(() => onFetchResponseError$7(luvio, config, resourceParams, response));
|
|
560
560
|
});
|
|
561
561
|
}
|
|
562
|
-
function buildNetworkSnapshotCachePolicy$
|
|
563
|
-
return buildNetworkSnapshotCachePolicy$
|
|
562
|
+
function buildNetworkSnapshotCachePolicy$7(context, coercedAdapterRequestContext) {
|
|
563
|
+
return buildNetworkSnapshotCachePolicy$8(context, coercedAdapterRequestContext, buildNetworkSnapshot$e, 'get', false);
|
|
564
564
|
}
|
|
565
|
-
function buildCachedSnapshotCachePolicy$
|
|
565
|
+
function buildCachedSnapshotCachePolicy$7(context, storeLookup) {
|
|
566
566
|
const { luvio, config } = context;
|
|
567
567
|
const selector = {
|
|
568
|
-
recordId: keyBuilder$
|
|
569
|
-
node: adapterFragment$
|
|
568
|
+
recordId: keyBuilder$i(luvio, config),
|
|
569
|
+
node: adapterFragment$7(luvio, config),
|
|
570
570
|
variables: {},
|
|
571
571
|
};
|
|
572
572
|
const cacheSnapshot = storeLookup(selector, {
|
|
573
573
|
config,
|
|
574
|
-
resolve: () => buildNetworkSnapshot$
|
|
574
|
+
resolve: () => buildNetworkSnapshot$e(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$e(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$7, buildNetworkSnapshotCachePolicy$7);
|
|
586
586
|
};
|
|
587
587
|
|
|
588
|
-
function validate$
|
|
588
|
+
function validate$w(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$9 = 100;
|
|
636
|
+
const VERSION$n = "4033328f65865dd5d80c68a7573a4522";
|
|
637
|
+
function validate$v(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$9 = 'EinsteinLlmFeedbackRepresentation';
|
|
651
|
+
function keyBuilder$h(luvio, config) {
|
|
652
|
+
return keyPrefix + '::' + RepresentationType$9 + ':' + 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$h(luvio, keyParams);
|
|
659
659
|
}
|
|
660
|
-
function normalize$
|
|
660
|
+
function normalize$9(input, existing, path, luvio, store, timestamp) {
|
|
661
661
|
return input;
|
|
662
662
|
}
|
|
663
|
-
const select$
|
|
663
|
+
const select$B = function EinsteinLlmFeedbackRepresentationSelect() {
|
|
664
664
|
return {
|
|
665
665
|
kind: 'Fragment',
|
|
666
|
-
version: VERSION$
|
|
666
|
+
version: VERSION$n,
|
|
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$n(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$9 = function EinsteinLlmFeedbackRepresentationIngest(input, path, luvio, store, timestamp) {
|
|
685
685
|
if (process.env.NODE_ENV !== 'production') {
|
|
686
|
-
const validateError = validate$
|
|
686
|
+
const validateError = validate$v(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$9;
|
|
693
|
+
ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize$9, "EinsteinLLM", VERSION$n, RepresentationType$9, equals$n);
|
|
694
694
|
return createLink(key);
|
|
695
695
|
};
|
|
696
|
-
function getTypeCacheKeys$
|
|
696
|
+
function getTypeCacheKeys$9(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$9,
|
|
702
702
|
mergeable: false
|
|
703
703
|
});
|
|
704
704
|
}
|
|
705
705
|
|
|
706
|
-
function select$
|
|
707
|
-
return select$
|
|
706
|
+
function select$A(luvio, params) {
|
|
707
|
+
return select$B();
|
|
708
708
|
}
|
|
709
|
-
function getResponseCacheKeys$
|
|
710
|
-
getTypeCacheKeys$
|
|
709
|
+
function getResponseCacheKeys$d(storeKeyMap, luvio, resourceParams, response) {
|
|
710
|
+
getTypeCacheKeys$9(storeKeyMap, luvio, response);
|
|
711
711
|
}
|
|
712
|
-
function ingestSuccess$
|
|
712
|
+
function ingestSuccess$d(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$9, body);
|
|
716
716
|
const snapshot = luvio.storeLookup({
|
|
717
717
|
recordId: key,
|
|
718
|
-
node: select$
|
|
718
|
+
node: select$A(),
|
|
719
719
|
variables: {},
|
|
720
720
|
});
|
|
721
721
|
if (process.env.NODE_ENV !== 'production') {
|
|
@@ -726,10 +726,10 @@ function ingestSuccess$9(luvio, resourceParams, response) {
|
|
|
726
726
|
deepFreeze(snapshot.data);
|
|
727
727
|
return snapshot;
|
|
728
728
|
}
|
|
729
|
-
function createResourceRequest$
|
|
729
|
+
function createResourceRequest$d(config) {
|
|
730
730
|
const headers = {};
|
|
731
731
|
return {
|
|
732
|
-
baseUri: '/services/data/
|
|
732
|
+
baseUri: '/services/data/v66.0',
|
|
733
733
|
basePath: '/einstein/llm/feedback',
|
|
734
734
|
method: 'post',
|
|
735
735
|
body: config.body,
|
|
@@ -740,45 +740,45 @@ function createResourceRequest$9(config) {
|
|
|
740
740
|
};
|
|
741
741
|
}
|
|
742
742
|
|
|
743
|
-
const adapterName$
|
|
743
|
+
const adapterName$d = '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$d, createFeedback_ConfigPropertyMetadata);
|
|
748
|
+
const createResourceParams$d = /*#__PURE__*/ createResourceParams$f(createFeedback_ConfigPropertyMetadata);
|
|
749
|
+
function typeCheckConfig$d(untrustedConfig) {
|
|
750
750
|
const config = {};
|
|
751
751
|
const untrustedConfig_feedbackInput = untrustedConfig.feedbackInput;
|
|
752
|
-
const referenceEinsteinLlmFeedbackInputRepresentationValidationError = validate$
|
|
752
|
+
const referenceEinsteinLlmFeedbackInputRepresentationValidationError = validate$w(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$d(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$d(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$d(luvio, config, options) {
|
|
772
|
+
const resourceParams = createResourceParams$d(config);
|
|
773
|
+
const request = createResourceRequest$d(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$d(luvio, resourceParams, response);
|
|
778
778
|
return luvio.storeBroadcast().then(() => snapshot);
|
|
779
779
|
}, () => {
|
|
780
780
|
const cache = new StoreKeyMap();
|
|
781
|
-
getResponseCacheKeys$
|
|
781
|
+
getResponseCacheKeys$d(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$d(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$d(luvio, config);
|
|
797
797
|
};
|
|
798
798
|
};
|
|
799
799
|
|
|
800
|
-
function validate$
|
|
800
|
+
function validate$u(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$t(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$u(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$m = "9ebac74e6f964c363d5fd1913df363af";
|
|
915
|
+
function validate$s(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$z = function EinsteinLlmGenerationsContentQualityRepresentationSelect() {
|
|
952
952
|
return {
|
|
953
953
|
kind: 'Fragment',
|
|
954
|
-
version: VERSION$
|
|
954
|
+
version: VERSION$m,
|
|
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$m(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$l = "77af44a252cb5b45b4d9a8101368d2aa";
|
|
983
|
+
function validate$r(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$y = function EinsteinLlmGenerationsSafetyScoreRepresentationSelect() {
|
|
1188
1188
|
return {
|
|
1189
1189
|
kind: 'Fragment',
|
|
1190
|
-
version: VERSION$
|
|
1190
|
+
version: VERSION$l,
|
|
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$l(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$k = "4a07778ff6c595d91c575188146647a1";
|
|
1327
|
+
function validate$q(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$s(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$r(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$x = function EinsteinLlmGenerationItemRepresentationSelect() {
|
|
1420
|
+
const { selections: EinsteinLlmGenerationsContentQualityRepresentation__selections, opaque: EinsteinLlmGenerationsContentQualityRepresentation__opaque, } = select$z();
|
|
1421
|
+
const { selections: EinsteinLlmGenerationsSafetyScoreRepresentation__selections, opaque: EinsteinLlmGenerationsSafetyScoreRepresentation__opaque, } = select$y();
|
|
1422
1422
|
return {
|
|
1423
1423
|
kind: 'Fragment',
|
|
1424
|
-
version: VERSION$
|
|
1424
|
+
version: VERSION$k,
|
|
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$k(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$m(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$l(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$j = "4656c961c9d093a9e206c1db7d4de0b0";
|
|
1526
|
+
function validate$p(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$w = function WrappedMapSelect() {
|
|
1549
1549
|
return {
|
|
1550
1550
|
kind: 'Fragment',
|
|
1551
|
-
version: VERSION$
|
|
1551
|
+
version: VERSION$j,
|
|
1552
1552
|
private: [],
|
|
1553
1553
|
selections: []
|
|
1554
1554
|
};
|
|
1555
1555
|
};
|
|
1556
|
-
function equals$
|
|
1556
|
+
function equals$j(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$8 = 100;
|
|
1568
|
+
const VERSION$i = "d8abd72a42e842b253da1c38954dafbc";
|
|
1569
|
+
function validate$o(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$q(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$p(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$8 = 'EinsteinLlmGenerationsRepresentation';
|
|
1653
|
+
function keyBuilder$g(luvio, config) {
|
|
1654
|
+
return keyPrefix + '::' + RepresentationType$8 + ':' + 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$g(luvio, keyParams);
|
|
1661
1661
|
}
|
|
1662
|
-
function normalize$
|
|
1662
|
+
function normalize$8(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$v = function EinsteinLlmGenerationsRepresentationSelect() {
|
|
1666
|
+
const { selections: EinsteinLlmGenerationItemRepresentation__selections, opaque: EinsteinLlmGenerationItemRepresentation__opaque, } = select$x();
|
|
1667
|
+
const { selections: WrappedMap__selections, opaque: WrappedMap__opaque, } = select$w();
|
|
1668
1668
|
return {
|
|
1669
1669
|
kind: 'Fragment',
|
|
1670
|
-
version: VERSION$
|
|
1670
|
+
version: VERSION$i,
|
|
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$i(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$k(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$j(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$8 = function EinsteinLlmGenerationsRepresentationIngest(input, path, luvio, store, timestamp) {
|
|
1728
1728
|
if (process.env.NODE_ENV !== 'production') {
|
|
1729
|
-
const validateError = validate$
|
|
1729
|
+
const validateError = validate$o(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$8;
|
|
1736
|
+
ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize$8, "EinsteinLLM", VERSION$i, RepresentationType$8, equals$i);
|
|
1737
1737
|
return createLink(key);
|
|
1738
1738
|
};
|
|
1739
|
-
function getTypeCacheKeys$
|
|
1739
|
+
function getTypeCacheKeys$8(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$8,
|
|
1745
1745
|
mergeable: false
|
|
1746
1746
|
});
|
|
1747
1747
|
}
|
|
1748
1748
|
|
|
1749
|
-
function select$
|
|
1750
|
-
return select$
|
|
1749
|
+
function select$u(luvio, params) {
|
|
1750
|
+
return select$v();
|
|
1751
1751
|
}
|
|
1752
|
-
function getResponseCacheKeys$
|
|
1753
|
-
getTypeCacheKeys$
|
|
1752
|
+
function getResponseCacheKeys$c(storeKeyMap, luvio, resourceParams, response) {
|
|
1753
|
+
getTypeCacheKeys$8(storeKeyMap, luvio, response);
|
|
1754
1754
|
}
|
|
1755
|
-
function ingestSuccess$
|
|
1755
|
+
function ingestSuccess$c(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$8, body);
|
|
1759
1759
|
const snapshot = luvio.storeLookup({
|
|
1760
1760
|
recordId: key,
|
|
1761
|
-
node: select$
|
|
1761
|
+
node: select$u(),
|
|
1762
1762
|
variables: {},
|
|
1763
1763
|
});
|
|
1764
1764
|
if (process.env.NODE_ENV !== 'production') {
|
|
@@ -1769,10 +1769,10 @@ function ingestSuccess$8(luvio, resourceParams, response) {
|
|
|
1769
1769
|
deepFreeze(snapshot.data);
|
|
1770
1770
|
return snapshot;
|
|
1771
1771
|
}
|
|
1772
|
-
function createResourceRequest$
|
|
1772
|
+
function createResourceRequest$c(config) {
|
|
1773
1773
|
const headers = {};
|
|
1774
1774
|
return {
|
|
1775
|
-
baseUri: '/services/data/
|
|
1775
|
+
baseUri: '/services/data/v66.0',
|
|
1776
1776
|
basePath: '/einstein/llm/prompt/generations',
|
|
1777
1777
|
method: 'post',
|
|
1778
1778
|
body: config.body,
|
|
@@ -1783,45 +1783,45 @@ function createResourceRequest$8(config) {
|
|
|
1783
1783
|
};
|
|
1784
1784
|
}
|
|
1785
1785
|
|
|
1786
|
-
const adapterName$
|
|
1786
|
+
const adapterName$c = '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$c, createGenerations_ConfigPropertyMetadata);
|
|
1791
|
+
const createResourceParams$c = /*#__PURE__*/ createResourceParams$f(createGenerations_ConfigPropertyMetadata);
|
|
1792
|
+
function typeCheckConfig$c(untrustedConfig) {
|
|
1793
1793
|
const config = {};
|
|
1794
1794
|
const untrustedConfig_generationsInput = untrustedConfig.generationsInput;
|
|
1795
|
-
const referenceEinsteinLlmGenerationsInputRepresentationValidationError = validate$
|
|
1795
|
+
const referenceEinsteinLlmGenerationsInputRepresentationValidationError = validate$t(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$c(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$c(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$c(luvio, config, options) {
|
|
1815
|
+
const resourceParams = createResourceParams$c(config);
|
|
1816
|
+
const request = createResourceRequest$c(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$c(luvio, resourceParams, response);
|
|
1821
1821
|
return luvio.storeBroadcast().then(() => snapshot);
|
|
1822
1822
|
}, () => {
|
|
1823
1823
|
const cache = new StoreKeyMap();
|
|
1824
|
-
getResponseCacheKeys$
|
|
1824
|
+
getResponseCacheKeys$c(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$c(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$c(luvio, config);
|
|
1840
1840
|
};
|
|
1841
1841
|
};
|
|
1842
1842
|
|
|
1843
|
-
function validate$
|
|
1843
|
+
function validate$n(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$m(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$u(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$n(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,8 +1916,246 @@ 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$h = "63584d83290e21bdff26b1bef3db119c";
|
|
1920
|
+
function validate$l(obj, path = 'EinsteinLlmGenerationGenAiCitedReferenceRepresentation') {
|
|
1921
|
+
const v_error = (() => {
|
|
1922
|
+
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
1923
|
+
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
1924
|
+
}
|
|
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
|
+
}
|
|
1937
|
+
}
|
|
1938
|
+
}
|
|
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
|
+
}
|
|
1951
|
+
}
|
|
1952
|
+
}
|
|
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
|
+
}
|
|
1959
|
+
}
|
|
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 + '")');
|
|
1965
|
+
}
|
|
1966
|
+
}
|
|
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
|
+
}
|
|
1973
|
+
}
|
|
1974
|
+
})();
|
|
1975
|
+
return v_error === undefined ? null : v_error;
|
|
1976
|
+
}
|
|
1977
|
+
const select$t = function EinsteinLlmGenerationGenAiCitedReferenceRepresentationSelect() {
|
|
1978
|
+
return {
|
|
1979
|
+
kind: 'Fragment',
|
|
1980
|
+
version: VERSION$h,
|
|
1981
|
+
private: [],
|
|
1982
|
+
selections: [
|
|
1983
|
+
{
|
|
1984
|
+
name: 'citationLocations',
|
|
1985
|
+
kind: 'Scalar',
|
|
1986
|
+
plural: true,
|
|
1987
|
+
required: false
|
|
1988
|
+
},
|
|
1989
|
+
{
|
|
1990
|
+
name: 'claims',
|
|
1991
|
+
kind: 'Scalar',
|
|
1992
|
+
plural: true,
|
|
1993
|
+
required: false
|
|
1994
|
+
},
|
|
1995
|
+
{
|
|
1996
|
+
name: 'link',
|
|
1997
|
+
kind: 'Scalar',
|
|
1998
|
+
required: false
|
|
1999
|
+
},
|
|
2000
|
+
{
|
|
2001
|
+
name: 'sourceObjectApiName',
|
|
2002
|
+
kind: 'Scalar',
|
|
2003
|
+
required: false
|
|
2004
|
+
},
|
|
2005
|
+
{
|
|
2006
|
+
name: 'sourceObjectRecordId',
|
|
2007
|
+
kind: 'Scalar',
|
|
2008
|
+
required: false
|
|
2009
|
+
}
|
|
2010
|
+
]
|
|
2011
|
+
};
|
|
2012
|
+
};
|
|
2013
|
+
function equals$h(existing, incoming) {
|
|
2014
|
+
const existing_link = existing.link;
|
|
2015
|
+
const incoming_link = incoming.link;
|
|
2016
|
+
// if at least one of these optionals is defined
|
|
2017
|
+
if (existing_link !== undefined || incoming_link !== undefined) {
|
|
2018
|
+
// if one of these is not defined we know the other is defined and therefore
|
|
2019
|
+
// not equal
|
|
2020
|
+
if (existing_link === undefined || incoming_link === undefined) {
|
|
2021
|
+
return false;
|
|
2022
|
+
}
|
|
2023
|
+
if (!(existing_link === incoming_link)) {
|
|
2024
|
+
return false;
|
|
2025
|
+
}
|
|
2026
|
+
}
|
|
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$g = "bcc0ea08323732f4187dd2b9f70fea6c";
|
|
2093
|
+
function validate$k(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$l(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$s = function EinsteinLlmGenerationCitationRepresentationSelect() {
|
|
2119
|
+
const { selections: EinsteinLlmGenerationGenAiCitedReferenceRepresentation__selections, opaque: EinsteinLlmGenerationGenAiCitedReferenceRepresentation__opaque, } = select$t();
|
|
2120
|
+
return {
|
|
2121
|
+
kind: 'Fragment',
|
|
2122
|
+
version: VERSION$g,
|
|
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$g(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$h(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$f = "f62ac44b024b123f079b57f349e05230";
|
|
2158
|
+
function validate$j(obj, path = 'EinsteinPromptTemplateAttachmentExclusionInfoRepresentation') {
|
|
1921
2159
|
const v_error = (() => {
|
|
1922
2160
|
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
1923
2161
|
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
@@ -1935,10 +2173,10 @@ function validate$h(obj, path = 'EinsteinPromptTemplateAttachmentExclusionInfoRe
|
|
|
1935
2173
|
})();
|
|
1936
2174
|
return v_error === undefined ? null : v_error;
|
|
1937
2175
|
}
|
|
1938
|
-
const select$
|
|
2176
|
+
const select$r = function EinsteinPromptTemplateAttachmentExclusionInfoRepresentationSelect() {
|
|
1939
2177
|
return {
|
|
1940
2178
|
kind: 'Fragment',
|
|
1941
|
-
version: VERSION$
|
|
2179
|
+
version: VERSION$f,
|
|
1942
2180
|
private: [],
|
|
1943
2181
|
selections: [
|
|
1944
2182
|
{
|
|
@@ -1952,7 +2190,7 @@ const select$l = function EinsteinPromptTemplateAttachmentExclusionInfoRepresent
|
|
|
1952
2190
|
]
|
|
1953
2191
|
};
|
|
1954
2192
|
};
|
|
1955
|
-
function equals$
|
|
2193
|
+
function equals$f(existing, incoming) {
|
|
1956
2194
|
const existing_isExcluded = existing.isExcluded;
|
|
1957
2195
|
const incoming_isExcluded = incoming.isExcluded;
|
|
1958
2196
|
if (!(existing_isExcluded === incoming_isExcluded)) {
|
|
@@ -1966,8 +2204,8 @@ function equals$d(existing, incoming) {
|
|
|
1966
2204
|
return true;
|
|
1967
2205
|
}
|
|
1968
2206
|
|
|
1969
|
-
const VERSION$
|
|
1970
|
-
function validate$
|
|
2207
|
+
const VERSION$e = "b85a5621c60125d9f1644af130f67680";
|
|
2208
|
+
function validate$i(obj, path = 'EinsteinPromptTemplateAttachmentRepresentation') {
|
|
1971
2209
|
const v_error = (() => {
|
|
1972
2210
|
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
1973
2211
|
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
@@ -1975,7 +2213,7 @@ function validate$g(obj, path = 'EinsteinPromptTemplateAttachmentRepresentation'
|
|
|
1975
2213
|
if (obj.exclusionInfo !== undefined) {
|
|
1976
2214
|
const obj_exclusionInfo = obj.exclusionInfo;
|
|
1977
2215
|
const path_exclusionInfo = path + '.exclusionInfo';
|
|
1978
|
-
const referencepath_exclusionInfoValidationError = validate$
|
|
2216
|
+
const referencepath_exclusionInfoValidationError = validate$j(obj_exclusionInfo, path_exclusionInfo);
|
|
1979
2217
|
if (referencepath_exclusionInfoValidationError !== null) {
|
|
1980
2218
|
let message = 'Object doesn\'t match EinsteinPromptTemplateAttachmentExclusionInfoRepresentation (at "' + path_exclusionInfo + '")\n';
|
|
1981
2219
|
message += referencepath_exclusionInfoValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
@@ -2012,11 +2250,11 @@ function validate$g(obj, path = 'EinsteinPromptTemplateAttachmentRepresentation'
|
|
|
2012
2250
|
})();
|
|
2013
2251
|
return v_error === undefined ? null : v_error;
|
|
2014
2252
|
}
|
|
2015
|
-
const select$
|
|
2016
|
-
const { selections: EinsteinPromptTemplateAttachmentExclusionInfoRepresentation__selections, opaque: EinsteinPromptTemplateAttachmentExclusionInfoRepresentation__opaque, } = select$
|
|
2253
|
+
const select$q = function EinsteinPromptTemplateAttachmentRepresentationSelect() {
|
|
2254
|
+
const { selections: EinsteinPromptTemplateAttachmentExclusionInfoRepresentation__selections, opaque: EinsteinPromptTemplateAttachmentExclusionInfoRepresentation__opaque, } = select$r();
|
|
2017
2255
|
return {
|
|
2018
2256
|
kind: 'Fragment',
|
|
2019
|
-
version: VERSION$
|
|
2257
|
+
version: VERSION$e,
|
|
2020
2258
|
private: [],
|
|
2021
2259
|
selections: [
|
|
2022
2260
|
{
|
|
@@ -2049,7 +2287,7 @@ const select$k = function EinsteinPromptTemplateAttachmentRepresentationSelect()
|
|
|
2049
2287
|
]
|
|
2050
2288
|
};
|
|
2051
2289
|
};
|
|
2052
|
-
function equals$
|
|
2290
|
+
function equals$e(existing, incoming) {
|
|
2053
2291
|
const existing_fileExtension = existing.fileExtension;
|
|
2054
2292
|
const incoming_fileExtension = incoming.fileExtension;
|
|
2055
2293
|
if (!(existing_fileExtension === incoming_fileExtension)) {
|
|
@@ -2092,15 +2330,15 @@ 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$f(existing_exclusionInfo, incoming_exclusionInfo))) {
|
|
2096
2334
|
return false;
|
|
2097
2335
|
}
|
|
2098
2336
|
}
|
|
2099
2337
|
return true;
|
|
2100
2338
|
}
|
|
2101
2339
|
|
|
2102
|
-
const VERSION$
|
|
2103
|
-
function validate$
|
|
2340
|
+
const VERSION$d = "6458d624e5a1691821c764b6de0badb3";
|
|
2341
|
+
function validate$h(obj, path = 'EinsteinPromptTemplateGenerationsErrorRepresentation') {
|
|
2104
2342
|
const v_error = (() => {
|
|
2105
2343
|
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
2106
2344
|
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
@@ -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$p = function EinsteinPromptTemplateGenerationsErrorRepresentationSelect() {
|
|
2134
2372
|
return {
|
|
2135
2373
|
kind: 'Fragment',
|
|
2136
|
-
version: VERSION$
|
|
2374
|
+
version: VERSION$d,
|
|
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$d(existing, incoming) {
|
|
2160
2398
|
const existing_errorMessage = existing.errorMessage;
|
|
2161
2399
|
const incoming_errorMessage = incoming.errorMessage;
|
|
2162
2400
|
if (!(existing_errorMessage === incoming_errorMessage)) {
|
|
@@ -2188,8 +2426,8 @@ function equals$b(existing, incoming) {
|
|
|
2188
2426
|
return true;
|
|
2189
2427
|
}
|
|
2190
2428
|
|
|
2191
|
-
const VERSION$
|
|
2192
|
-
function validate$
|
|
2429
|
+
const VERSION$c = "7c417ce44e4bc05dfcc454e6825590e8";
|
|
2430
|
+
function validate$g(obj, path = 'EinsteinPromptTemplateMaskSettingsRepresentation') {
|
|
2193
2431
|
const v_error = (() => {
|
|
2194
2432
|
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
2195
2433
|
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
@@ -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$o = function EinsteinPromptTemplateMaskSettingsRepresentationSelect() {
|
|
2206
2444
|
return {
|
|
2207
2445
|
kind: 'Fragment',
|
|
2208
|
-
version: VERSION$
|
|
2446
|
+
version: VERSION$c,
|
|
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$c(existing, incoming) {
|
|
2219
2457
|
const existing_enableModeration = existing.enableModeration;
|
|
2220
2458
|
const incoming_enableModeration = incoming.enableModeration;
|
|
2221
2459
|
if (!(existing_enableModeration === incoming_enableModeration)) {
|
|
@@ -2224,8 +2462,8 @@ function equals$a(existing, incoming) {
|
|
|
2224
2462
|
return true;
|
|
2225
2463
|
}
|
|
2226
2464
|
|
|
2227
|
-
const VERSION$
|
|
2228
|
-
function validate$
|
|
2465
|
+
const VERSION$b = "92ad1abd0e2a60bc36941409cadda7e2";
|
|
2466
|
+
function validate$f(obj, path = 'EinsteinPromptTemplateMaskContentRepresentation') {
|
|
2229
2467
|
const v_error = (() => {
|
|
2230
2468
|
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
2231
2469
|
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
@@ -2240,7 +2478,7 @@ function validate$d(obj, path = 'EinsteinPromptTemplateMaskContentRepresentation
|
|
|
2240
2478
|
const path_moderationSettings = path + '.moderationSettings';
|
|
2241
2479
|
let obj_moderationSettings_union0 = null;
|
|
2242
2480
|
const obj_moderationSettings_union0_error = (() => {
|
|
2243
|
-
const referencepath_moderationSettingsValidationError = validate$
|
|
2481
|
+
const referencepath_moderationSettingsValidationError = validate$g(obj_moderationSettings, path_moderationSettings);
|
|
2244
2482
|
if (referencepath_moderationSettingsValidationError !== null) {
|
|
2245
2483
|
let message = 'Object doesn\'t match EinsteinPromptTemplateMaskSettingsRepresentation (at "' + path_moderationSettings + '")\n';
|
|
2246
2484
|
message += referencepath_moderationSettingsValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
@@ -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$n = function EinsteinPromptTemplateMaskContentRepresentationSelect() {
|
|
2518
|
+
const { selections: EinsteinPromptTemplateMaskSettingsRepresentation__selections, opaque: EinsteinPromptTemplateMaskSettingsRepresentation__opaque, } = select$o();
|
|
2281
2519
|
return {
|
|
2282
2520
|
kind: 'Fragment',
|
|
2283
|
-
version: VERSION$
|
|
2521
|
+
version: VERSION$b,
|
|
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$b(existing, incoming) {
|
|
2306
2544
|
const existing_content = existing.content;
|
|
2307
2545
|
const incoming_content = incoming.content;
|
|
2308
2546
|
if (!(existing_content === incoming_content)) {
|
|
@@ -2333,15 +2571,15 @@ 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$c(existing_moderationSettings, incoming_moderationSettings)))) {
|
|
2337
2575
|
return false;
|
|
2338
2576
|
}
|
|
2339
2577
|
}
|
|
2340
2578
|
return true;
|
|
2341
2579
|
}
|
|
2342
2580
|
|
|
2343
|
-
const VERSION$
|
|
2344
|
-
function validate$
|
|
2581
|
+
const VERSION$a = "507a815605f8d30ae9b52b0ec513d25e";
|
|
2582
|
+
function validate$e(obj, path = 'EinsteinPromptTemplateMaskDataRepresentation') {
|
|
2345
2583
|
const v_error = (() => {
|
|
2346
2584
|
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
2347
2585
|
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
@@ -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$m = function EinsteinPromptTemplateMaskDataRepresentationSelect() {
|
|
2375
2613
|
return {
|
|
2376
2614
|
kind: 'Fragment',
|
|
2377
|
-
version: VERSION$
|
|
2615
|
+
version: VERSION$a,
|
|
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$a(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$
|
|
2422
|
-
function validate$
|
|
2658
|
+
const TTL$7 = 100;
|
|
2659
|
+
const VERSION$9 = "25461f267931be0754b36e2788461191";
|
|
2660
|
+
function validate$d(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$k(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';
|
|
@@ -2433,7 +2681,7 @@ function validate$b(obj, path = 'EinsteinPromptTemplateGenerationsRepresentation
|
|
|
2433
2681
|
for (let i = 0; i < obj_fileData.length; i++) {
|
|
2434
2682
|
const obj_fileData_item = obj_fileData[i];
|
|
2435
2683
|
const path_fileData_item = path_fileData + '[' + i + ']';
|
|
2436
|
-
const referencepath_fileData_itemValidationError = validate$
|
|
2684
|
+
const referencepath_fileData_itemValidationError = validate$i(obj_fileData_item, path_fileData_item);
|
|
2437
2685
|
if (referencepath_fileData_itemValidationError !== null) {
|
|
2438
2686
|
let message = 'Object doesn\'t match EinsteinPromptTemplateAttachmentRepresentation (at "' + path_fileData_item + '")\n';
|
|
2439
2687
|
message += referencepath_fileData_itemValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
@@ -2450,7 +2698,7 @@ function validate$b(obj, path = 'EinsteinPromptTemplateGenerationsRepresentation
|
|
|
2450
2698
|
for (let i = 0; i < obj_generationErrors.length; i++) {
|
|
2451
2699
|
const obj_generationErrors_item = obj_generationErrors[i];
|
|
2452
2700
|
const path_generationErrors_item = path_generationErrors + '[' + i + ']';
|
|
2453
|
-
const referencepath_generationErrors_itemValidationError = validate$
|
|
2701
|
+
const referencepath_generationErrors_itemValidationError = validate$h(obj_generationErrors_item, path_generationErrors_item);
|
|
2454
2702
|
if (referencepath_generationErrors_itemValidationError !== null) {
|
|
2455
2703
|
let message = 'Object doesn\'t match EinsteinPromptTemplateGenerationsErrorRepresentation (at "' + path_generationErrors_item + '")\n';
|
|
2456
2704
|
message += referencepath_generationErrors_itemValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
@@ -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$q(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$p(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');
|
|
@@ -2563,7 +2811,7 @@ function validate$b(obj, path = 'EinsteinPromptTemplateGenerationsRepresentation
|
|
|
2563
2811
|
for (let i = 0; i < obj_requestMessages.length; i++) {
|
|
2564
2812
|
const obj_requestMessages_item = obj_requestMessages[i];
|
|
2565
2813
|
const path_requestMessages_item = path_requestMessages + '[' + i + ']';
|
|
2566
|
-
const referencepath_requestMessages_itemValidationError = validate$
|
|
2814
|
+
const referencepath_requestMessages_itemValidationError = validate$f(obj_requestMessages_item, path_requestMessages_item);
|
|
2567
2815
|
if (referencepath_requestMessages_itemValidationError !== null) {
|
|
2568
2816
|
let message = 'Object doesn\'t match EinsteinPromptTemplateMaskContentRepresentation (at "' + path_requestMessages_item + '")\n';
|
|
2569
2817
|
message += referencepath_requestMessages_itemValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
@@ -2580,7 +2828,7 @@ function validate$b(obj, path = 'EinsteinPromptTemplateGenerationsRepresentation
|
|
|
2580
2828
|
for (let i = 0; i < obj_responseMessages.length; i++) {
|
|
2581
2829
|
const obj_responseMessages_item = obj_responseMessages[i];
|
|
2582
2830
|
const path_responseMessages_item = path_responseMessages + '[' + i + ']';
|
|
2583
|
-
const referencepath_responseMessages_itemValidationError = validate$
|
|
2831
|
+
const referencepath_responseMessages_itemValidationError = validate$f(obj_responseMessages_item, path_responseMessages_item);
|
|
2584
2832
|
if (referencepath_responseMessages_itemValidationError !== null) {
|
|
2585
2833
|
let message = 'Object doesn\'t match EinsteinPromptTemplateMaskContentRepresentation (at "' + path_responseMessages_item + '")\n';
|
|
2586
2834
|
message += referencepath_responseMessages_itemValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
@@ -2597,7 +2845,7 @@ function validate$b(obj, path = 'EinsteinPromptTemplateGenerationsRepresentation
|
|
|
2597
2845
|
for (let i = 0; i < obj_slotsMaskingInformation.length; i++) {
|
|
2598
2846
|
const obj_slotsMaskingInformation_item = obj_slotsMaskingInformation[i];
|
|
2599
2847
|
const path_slotsMaskingInformation_item = path_slotsMaskingInformation + '[' + i + ']';
|
|
2600
|
-
const referencepath_slotsMaskingInformation_itemValidationError = validate$
|
|
2848
|
+
const referencepath_slotsMaskingInformation_itemValidationError = validate$e(obj_slotsMaskingInformation_item, path_slotsMaskingInformation_item);
|
|
2601
2849
|
if (referencepath_slotsMaskingInformation_itemValidationError !== null) {
|
|
2602
2850
|
let message = 'Object doesn\'t match EinsteinPromptTemplateMaskDataRepresentation (at "' + path_slotsMaskingInformation_item + '")\n';
|
|
2603
2851
|
message += referencepath_slotsMaskingInformation_itemValidationError.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$7 = 'EinsteinPromptTemplateGenerationsRepresentation';
|
|
2860
|
+
function keyBuilder$f(luvio, config) {
|
|
2861
|
+
return keyPrefix + '::' + RepresentationType$7 + ':' + 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$f(luvio, keyParams);
|
|
2620
2868
|
}
|
|
2621
|
-
function normalize$
|
|
2869
|
+
function normalize$7(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$l = function EinsteinPromptTemplateGenerationsRepresentationSelect() {
|
|
2873
|
+
const { selections: EinsteinLlmGenerationCitationRepresentation__selections, opaque: EinsteinLlmGenerationCitationRepresentation__opaque, } = select$s();
|
|
2874
|
+
const { selections: EinsteinPromptTemplateAttachmentRepresentation__selections, opaque: EinsteinPromptTemplateAttachmentRepresentation__opaque, } = select$q();
|
|
2875
|
+
const { selections: EinsteinPromptTemplateGenerationsErrorRepresentation__selections, opaque: EinsteinPromptTemplateGenerationsErrorRepresentation__opaque, } = select$p();
|
|
2876
|
+
const { selections: EinsteinLlmGenerationItemRepresentation__selections, opaque: EinsteinLlmGenerationItemRepresentation__opaque, } = select$x();
|
|
2877
|
+
const { selections: WrappedMap__selections, opaque: WrappedMap__opaque, } = select$w();
|
|
2878
|
+
const { selections: EinsteinPromptTemplateMaskContentRepresentation__selections, opaque: EinsteinPromptTemplateMaskContentRepresentation__opaque, } = select$n();
|
|
2879
|
+
const { selections: EinsteinPromptTemplateMaskDataRepresentation__selections, opaque: EinsteinPromptTemplateMaskDataRepresentation__opaque, } = select$m();
|
|
2631
2880
|
return {
|
|
2632
2881
|
kind: 'Fragment',
|
|
2633
|
-
version: VERSION$
|
|
2882
|
+
version: VERSION$9,
|
|
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$9(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$g(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$e(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$d(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$k(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$j(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$b(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$b(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$a(existing_slotsMaskingInformation_item, incoming_slotsMaskingInformation_item))) {
|
|
2838
3106
|
return false;
|
|
2839
3107
|
}
|
|
2840
3108
|
});
|
|
@@ -2844,41 +3112,41 @@ function equals$7(existing, incoming) {
|
|
|
2844
3112
|
}
|
|
2845
3113
|
return true;
|
|
2846
3114
|
}
|
|
2847
|
-
const ingest$
|
|
3115
|
+
const ingest$7 = function EinsteinPromptTemplateGenerationsRepresentationIngest(input, path, luvio, store, timestamp) {
|
|
2848
3116
|
if (process.env.NODE_ENV !== 'production') {
|
|
2849
|
-
const validateError = validate$
|
|
3117
|
+
const validateError = validate$d(input);
|
|
2850
3118
|
if (validateError !== null) {
|
|
2851
3119
|
throw validateError;
|
|
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$7;
|
|
3124
|
+
ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize$7, "EinsteinLLM", VERSION$9, RepresentationType$7, equals$9);
|
|
2857
3125
|
return createLink(key);
|
|
2858
3126
|
};
|
|
2859
|
-
function getTypeCacheKeys$
|
|
3127
|
+
function getTypeCacheKeys$7(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$7,
|
|
2865
3133
|
mergeable: false
|
|
2866
3134
|
});
|
|
2867
3135
|
}
|
|
2868
3136
|
|
|
2869
|
-
function select$
|
|
2870
|
-
return select$
|
|
3137
|
+
function select$k(luvio, params) {
|
|
3138
|
+
return select$l();
|
|
2871
3139
|
}
|
|
2872
|
-
function getResponseCacheKeys$
|
|
2873
|
-
getTypeCacheKeys$
|
|
3140
|
+
function getResponseCacheKeys$b(storeKeyMap, luvio, resourceParams, response) {
|
|
3141
|
+
getTypeCacheKeys$7(storeKeyMap, luvio, response);
|
|
2874
3142
|
}
|
|
2875
|
-
function ingestSuccess$
|
|
3143
|
+
function ingestSuccess$b(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$7, body);
|
|
2879
3147
|
const snapshot = luvio.storeLookup({
|
|
2880
3148
|
recordId: key,
|
|
2881
|
-
node: select$
|
|
3149
|
+
node: select$k(),
|
|
2882
3150
|
variables: {},
|
|
2883
3151
|
});
|
|
2884
3152
|
if (process.env.NODE_ENV !== 'production') {
|
|
@@ -2889,10 +3157,10 @@ function ingestSuccess$7(luvio, resourceParams, response) {
|
|
|
2889
3157
|
deepFreeze(snapshot.data);
|
|
2890
3158
|
return snapshot;
|
|
2891
3159
|
}
|
|
2892
|
-
function createResourceRequest$
|
|
3160
|
+
function createResourceRequest$b(config) {
|
|
2893
3161
|
const headers = {};
|
|
2894
3162
|
return {
|
|
2895
|
-
baseUri: '/services/data/
|
|
3163
|
+
baseUri: '/services/data/v66.0',
|
|
2896
3164
|
basePath: '/einstein/prompt-templates/' + config.urlParams.promptTemplateDevName + '/generations',
|
|
2897
3165
|
method: 'post',
|
|
2898
3166
|
body: config.body,
|
|
@@ -2903,48 +3171,48 @@ function createResourceRequest$7(config) {
|
|
|
2903
3171
|
};
|
|
2904
3172
|
}
|
|
2905
3173
|
|
|
2906
|
-
const adapterName$
|
|
3174
|
+
const adapterName$b = '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$b, createGenerationsForPromptTemplate_ConfigPropertyMetadata);
|
|
3181
|
+
const createResourceParams$b = /*#__PURE__*/ createResourceParams$f(createGenerationsForPromptTemplate_ConfigPropertyMetadata);
|
|
3182
|
+
function typeCheckConfig$b(untrustedConfig) {
|
|
2915
3183
|
const config = {};
|
|
2916
|
-
typeCheckConfig$
|
|
3184
|
+
typeCheckConfig$f(untrustedConfig, config, createGenerationsForPromptTemplate_ConfigPropertyMetadata);
|
|
2917
3185
|
const untrustedConfig_promptTemplateGenerationsInput = untrustedConfig.promptTemplateGenerationsInput;
|
|
2918
|
-
const referenceEinsteinPromptTemplateGenerationsInputRepresentationValidationError = validate$
|
|
3186
|
+
const referenceEinsteinPromptTemplateGenerationsInputRepresentationValidationError = validate$m(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$b(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$b(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$b(luvio, config, options) {
|
|
3206
|
+
const resourceParams = createResourceParams$b(config);
|
|
3207
|
+
const request = createResourceRequest$b(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$b(luvio, resourceParams, response);
|
|
2944
3212
|
return luvio.storeBroadcast().then(() => snapshot);
|
|
2945
3213
|
}, () => {
|
|
2946
3214
|
const cache = new StoreKeyMap();
|
|
2947
|
-
getResponseCacheKeys$
|
|
3215
|
+
getResponseCacheKeys$b(cache, luvio, resourceParams, response.body);
|
|
2948
3216
|
return cache;
|
|
2949
3217
|
});
|
|
2950
3218
|
}, (response) => {
|
|
@@ -2954,18 +3222,18 @@ 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$b(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$b(luvio, config);
|
|
2963
3231
|
};
|
|
2964
3232
|
};
|
|
2965
3233
|
|
|
2966
|
-
const TTL$
|
|
2967
|
-
const VERSION$
|
|
2968
|
-
function validate$
|
|
3234
|
+
const TTL$6 = 100;
|
|
3235
|
+
const VERSION$8 = "a90a51578e2fdd7a9741d310bed22b1d";
|
|
3236
|
+
function validate$c(obj, path = 'EinsteinPromptTemplateRepresentation') {
|
|
2969
3237
|
const v_error = (() => {
|
|
2970
3238
|
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
2971
3239
|
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
@@ -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$p(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$6 = 'EinsteinPromptTemplateRepresentation';
|
|
3313
|
+
function keyBuilder$e(luvio, config) {
|
|
3314
|
+
return keyPrefix + '::' + RepresentationType$6 + ':' + 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$e(luvio, keyParams);
|
|
3053
3321
|
}
|
|
3054
|
-
function normalize$
|
|
3322
|
+
function normalize$6(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$j = function EinsteinPromptTemplateRepresentationSelect() {
|
|
3326
|
+
const { selections: WrappedMap__selections, opaque: WrappedMap__opaque, } = select$w();
|
|
3059
3327
|
return {
|
|
3060
3328
|
kind: 'Fragment',
|
|
3061
|
-
version: VERSION$
|
|
3329
|
+
version: VERSION$8,
|
|
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$8(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$j(existing_additionalData, incoming_additionalData))) {
|
|
3166
3434
|
return false;
|
|
3167
3435
|
}
|
|
3168
3436
|
}
|
|
@@ -3188,41 +3456,41 @@ function equals$6(existing, incoming) {
|
|
|
3188
3456
|
}
|
|
3189
3457
|
return true;
|
|
3190
3458
|
}
|
|
3191
|
-
const ingest$
|
|
3459
|
+
const ingest$6 = function EinsteinPromptTemplateRepresentationIngest(input, path, luvio, store, timestamp) {
|
|
3192
3460
|
if (process.env.NODE_ENV !== 'production') {
|
|
3193
|
-
const validateError = validate$
|
|
3461
|
+
const validateError = validate$c(input);
|
|
3194
3462
|
if (validateError !== null) {
|
|
3195
3463
|
throw validateError;
|
|
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$6;
|
|
3468
|
+
ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize$6, "EinsteinLLM", VERSION$8, RepresentationType$6, equals$8);
|
|
3201
3469
|
return createLink(key);
|
|
3202
3470
|
};
|
|
3203
|
-
function getTypeCacheKeys$
|
|
3471
|
+
function getTypeCacheKeys$6(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$6,
|
|
3209
3477
|
mergeable: false
|
|
3210
3478
|
});
|
|
3211
3479
|
}
|
|
3212
3480
|
|
|
3213
|
-
function select$
|
|
3214
|
-
return select$
|
|
3481
|
+
function select$i(luvio, params) {
|
|
3482
|
+
return select$j();
|
|
3215
3483
|
}
|
|
3216
|
-
function getResponseCacheKeys$
|
|
3217
|
-
getTypeCacheKeys$
|
|
3484
|
+
function getResponseCacheKeys$a(storeKeyMap, luvio, resourceParams, response) {
|
|
3485
|
+
getTypeCacheKeys$6(storeKeyMap, luvio, response);
|
|
3218
3486
|
}
|
|
3219
|
-
function ingestSuccess$
|
|
3487
|
+
function ingestSuccess$a(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$6, body);
|
|
3223
3491
|
const snapshot = luvio.storeLookup({
|
|
3224
3492
|
recordId: key,
|
|
3225
|
-
node: select$
|
|
3493
|
+
node: select$i(),
|
|
3226
3494
|
variables: {},
|
|
3227
3495
|
});
|
|
3228
3496
|
if (process.env.NODE_ENV !== 'production') {
|
|
@@ -3233,10 +3501,10 @@ function ingestSuccess$6(luvio, resourceParams, response) {
|
|
|
3233
3501
|
deepFreeze(snapshot.data);
|
|
3234
3502
|
return snapshot;
|
|
3235
3503
|
}
|
|
3236
|
-
function createResourceRequest$
|
|
3504
|
+
function createResourceRequest$a(config) {
|
|
3237
3505
|
const headers = {};
|
|
3238
3506
|
return {
|
|
3239
|
-
baseUri: '/services/data/
|
|
3507
|
+
baseUri: '/services/data/v66.0',
|
|
3240
3508
|
basePath: '/einstein/prompt-templates',
|
|
3241
3509
|
method: 'post',
|
|
3242
3510
|
body: config.body,
|
|
@@ -3247,7 +3515,7 @@ function createResourceRequest$6(config) {
|
|
|
3247
3515
|
};
|
|
3248
3516
|
}
|
|
3249
3517
|
|
|
3250
|
-
const adapterName$
|
|
3518
|
+
const adapterName$a = '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$a, createPromptTemplate_ConfigPropertyMetadata);
|
|
3527
|
+
const createResourceParams$a = /*#__PURE__*/ createResourceParams$f(createPromptTemplate_ConfigPropertyMetadata);
|
|
3528
|
+
function typeCheckConfig$a(untrustedConfig) {
|
|
3261
3529
|
const config = {};
|
|
3262
|
-
typeCheckConfig$
|
|
3530
|
+
typeCheckConfig$f(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$a(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$a(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$a(luvio, config, options) {
|
|
3584
|
+
const resourceParams = createResourceParams$a(config);
|
|
3585
|
+
const request = createResourceRequest$a(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$a(luvio, resourceParams, response);
|
|
3322
3590
|
return luvio.storeBroadcast().then(() => snapshot);
|
|
3323
3591
|
}, () => {
|
|
3324
3592
|
const cache = new StoreKeyMap();
|
|
3325
|
-
getResponseCacheKeys$
|
|
3593
|
+
getResponseCacheKeys$a(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$a(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$a(luvio, config);
|
|
3341
3609
|
};
|
|
3342
3610
|
};
|
|
3343
3611
|
|
|
3344
|
-
function select$
|
|
3345
|
-
return select$
|
|
3612
|
+
function select$h(luvio, params) {
|
|
3613
|
+
return select$j();
|
|
3346
3614
|
}
|
|
3347
|
-
function getResponseCacheKeys$
|
|
3348
|
-
getTypeCacheKeys$
|
|
3615
|
+
function getResponseCacheKeys$9(storeKeyMap, luvio, resourceParams, response) {
|
|
3616
|
+
getTypeCacheKeys$6(storeKeyMap, luvio, response);
|
|
3349
3617
|
}
|
|
3350
|
-
function ingestSuccess$
|
|
3618
|
+
function ingestSuccess$9(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$6, body);
|
|
3354
3622
|
const snapshot = luvio.storeLookup({
|
|
3355
3623
|
recordId: key,
|
|
3356
|
-
node: select$
|
|
3624
|
+
node: select$h(),
|
|
3357
3625
|
variables: {},
|
|
3358
3626
|
});
|
|
3359
3627
|
if (process.env.NODE_ENV !== 'production') {
|
|
@@ -3364,10 +3632,10 @@ function ingestSuccess$5(luvio, resourceParams, response) {
|
|
|
3364
3632
|
deepFreeze(snapshot.data);
|
|
3365
3633
|
return snapshot;
|
|
3366
3634
|
}
|
|
3367
|
-
function createResourceRequest$
|
|
3635
|
+
function createResourceRequest$9(config) {
|
|
3368
3636
|
const headers = {};
|
|
3369
3637
|
return {
|
|
3370
|
-
baseUri: '/services/data/
|
|
3638
|
+
baseUri: '/services/data/v66.0',
|
|
3371
3639
|
basePath: '/einstein/prompt-templates/' + config.urlParams.promptTemplateDevName + '/versions',
|
|
3372
3640
|
method: 'post',
|
|
3373
3641
|
body: config.body,
|
|
@@ -3378,7 +3646,7 @@ function createResourceRequest$5(config) {
|
|
|
3378
3646
|
};
|
|
3379
3647
|
}
|
|
3380
3648
|
|
|
3381
|
-
const adapterName$
|
|
3649
|
+
const adapterName$9 = '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$9, createPromptTemplateVersion_ConfigPropertyMetadata);
|
|
3659
|
+
const createResourceParams$9 = /*#__PURE__*/ createResourceParams$f(createPromptTemplateVersion_ConfigPropertyMetadata);
|
|
3660
|
+
function typeCheckConfig$9(untrustedConfig) {
|
|
3393
3661
|
const config = {};
|
|
3394
|
-
typeCheckConfig$
|
|
3662
|
+
typeCheckConfig$f(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$9(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$9(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$9(luvio, config, options) {
|
|
3716
|
+
const resourceParams = createResourceParams$9(config);
|
|
3717
|
+
const request = createResourceRequest$9(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$9(luvio, resourceParams, response);
|
|
3454
3722
|
return luvio.storeBroadcast().then(() => snapshot);
|
|
3455
3723
|
}, () => {
|
|
3456
3724
|
const cache = new StoreKeyMap();
|
|
3457
|
-
getResponseCacheKeys$
|
|
3725
|
+
getResponseCacheKeys$9(cache, luvio, resourceParams, response.body);
|
|
3458
3726
|
return cache;
|
|
3459
3727
|
});
|
|
3460
3728
|
}, (response) => {
|
|
@@ -3464,16 +3732,16 @@ 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$9(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$9(luvio, config);
|
|
3473
3741
|
};
|
|
3474
3742
|
};
|
|
3475
3743
|
|
|
3476
|
-
function validate$
|
|
3744
|
+
function validate$b(obj, path = 'PromptTemplateDataProviderOutputParamRepresentation') {
|
|
3477
3745
|
const v_error = (() => {
|
|
3478
3746
|
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
3479
3747
|
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
@@ -3492,7 +3760,7 @@ function validate$9(obj, path = 'PromptTemplateDataProviderOutputParamRepresenta
|
|
|
3492
3760
|
return v_error === undefined ? null : v_error;
|
|
3493
3761
|
}
|
|
3494
3762
|
|
|
3495
|
-
function validate$
|
|
3763
|
+
function validate$a(obj, path = 'PromptTemplateDataProviderInputParamRepresentation') {
|
|
3496
3764
|
const v_error = (() => {
|
|
3497
3765
|
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
3498
3766
|
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
@@ -3521,7 +3789,9 @@ function validate$8(obj, path = 'PromptTemplateDataProviderInputParamRepresentat
|
|
|
3521
3789
|
return v_error === undefined ? null : v_error;
|
|
3522
3790
|
}
|
|
3523
3791
|
|
|
3524
|
-
|
|
3792
|
+
const TTL$5 = 300;
|
|
3793
|
+
const VERSION$7 = "d4824d8c6e7848df0de89295e6d9d434";
|
|
3794
|
+
function validate$9(obj, path = 'PromptTemplateDataProviderInstanceConfigRepresentation') {
|
|
3525
3795
|
const v_error = (() => {
|
|
3526
3796
|
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
3527
3797
|
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
@@ -3550,7 +3820,7 @@ function validate$7(obj, path = 'PromptTemplateDataProviderInstanceConfigReprese
|
|
|
3550
3820
|
if (obj.defaultOutputParam !== undefined) {
|
|
3551
3821
|
const obj_defaultOutputParam = obj.defaultOutputParam;
|
|
3552
3822
|
const path_defaultOutputParam = path + '.defaultOutputParam';
|
|
3553
|
-
const referencepath_defaultOutputParamValidationError = validate$
|
|
3823
|
+
const referencepath_defaultOutputParamValidationError = validate$b(obj_defaultOutputParam, path_defaultOutputParam);
|
|
3554
3824
|
if (referencepath_defaultOutputParamValidationError !== null) {
|
|
3555
3825
|
let message = 'Object doesn\'t match PromptTemplateDataProviderOutputParamRepresentation (at "' + path_defaultOutputParam + '")\n';
|
|
3556
3826
|
message += referencepath_defaultOutputParamValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
@@ -3604,7 +3874,7 @@ function validate$7(obj, path = 'PromptTemplateDataProviderInstanceConfigReprese
|
|
|
3604
3874
|
for (let i = 0; i < obj_inputParams.length; i++) {
|
|
3605
3875
|
const obj_inputParams_item = obj_inputParams[i];
|
|
3606
3876
|
const path_inputParams_item = path_inputParams + '[' + i + ']';
|
|
3607
|
-
const referencepath_inputParams_itemValidationError = validate$
|
|
3877
|
+
const referencepath_inputParams_itemValidationError = validate$a(obj_inputParams_item, path_inputParams_item);
|
|
3608
3878
|
if (referencepath_inputParams_itemValidationError !== null) {
|
|
3609
3879
|
let message = 'Object doesn\'t match PromptTemplateDataProviderInputParamRepresentation (at "' + path_inputParams_item + '")\n';
|
|
3610
3880
|
message += referencepath_inputParams_itemValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
@@ -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;
|
|
@@ -3668,7 +3940,7 @@ function validate$7(obj, path = 'PromptTemplateDataProviderInstanceConfigReprese
|
|
|
3668
3940
|
for (let i = 0; i < obj_outputParams.length; i++) {
|
|
3669
3941
|
const obj_outputParams_item = obj_outputParams[i];
|
|
3670
3942
|
const path_outputParams_item = path_outputParams + '[' + i + ']';
|
|
3671
|
-
const referencepath_outputParams_itemValidationError = validate$
|
|
3943
|
+
const referencepath_outputParams_itemValidationError = validate$b(obj_outputParams_item, path_outputParams_item);
|
|
3672
3944
|
if (referencepath_outputParams_itemValidationError !== null) {
|
|
3673
3945
|
let message = 'Object doesn\'t match PromptTemplateDataProviderOutputParamRepresentation (at "' + path_outputParams_item + '")\n';
|
|
3674
3946
|
message += referencepath_outputParams_itemValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
@@ -3740,88 +4012,62 @@ function validate$7(obj, path = 'PromptTemplateDataProviderInstanceConfigReprese
|
|
|
3740
4012
|
})();
|
|
3741
4013
|
return v_error === undefined ? null : v_error;
|
|
3742
4014
|
}
|
|
3743
|
-
|
|
3744
|
-
|
|
3745
|
-
const VERSION$5 = "f86b04aed156ed794e7502ef43bb4171";
|
|
3746
|
-
function validate$6(obj, path = 'PromptTemplateDataProviderInstanceConfigCollectionRepresentation') {
|
|
3747
|
-
const v_error = (() => {
|
|
3748
|
-
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
3749
|
-
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
3750
|
-
}
|
|
3751
|
-
const obj_dataProviderInstanceConfigs = obj.dataProviderInstanceConfigs;
|
|
3752
|
-
const path_dataProviderInstanceConfigs = path + '.dataProviderInstanceConfigs';
|
|
3753
|
-
if (!ArrayIsArray(obj_dataProviderInstanceConfigs)) {
|
|
3754
|
-
return new TypeError('Expected "array" but received "' + typeof obj_dataProviderInstanceConfigs + '" (at "' + path_dataProviderInstanceConfigs + '")');
|
|
3755
|
-
}
|
|
3756
|
-
for (let i = 0; i < obj_dataProviderInstanceConfigs.length; i++) {
|
|
3757
|
-
const obj_dataProviderInstanceConfigs_item = obj_dataProviderInstanceConfigs[i];
|
|
3758
|
-
const path_dataProviderInstanceConfigs_item = path_dataProviderInstanceConfigs + '[' + i + ']';
|
|
3759
|
-
const referencepath_dataProviderInstanceConfigs_itemValidationError = validate$7(obj_dataProviderInstanceConfigs_item, path_dataProviderInstanceConfigs_item);
|
|
3760
|
-
if (referencepath_dataProviderInstanceConfigs_itemValidationError !== null) {
|
|
3761
|
-
let message = 'Object doesn\'t match PromptTemplateDataProviderInstanceConfigRepresentation (at "' + path_dataProviderInstanceConfigs_item + '")\n';
|
|
3762
|
-
message += referencepath_dataProviderInstanceConfigs_itemValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
3763
|
-
return new TypeError(message);
|
|
3764
|
-
}
|
|
3765
|
-
}
|
|
3766
|
-
})();
|
|
3767
|
-
return v_error === undefined ? null : v_error;
|
|
3768
|
-
}
|
|
3769
|
-
const RepresentationType$3 = 'PromptTemplateDataProviderInstanceConfigCollectionRepresentation';
|
|
3770
|
-
function normalize$3(input, existing, path, luvio, store, timestamp) {
|
|
4015
|
+
const RepresentationType$5 = 'PromptTemplateDataProviderInstanceConfigRepresentation';
|
|
4016
|
+
function normalize$5(input, existing, path, luvio, store, timestamp) {
|
|
3771
4017
|
return input;
|
|
3772
4018
|
}
|
|
3773
|
-
const select$
|
|
4019
|
+
const select$g = function PromptTemplateDataProviderInstanceConfigRepresentationSelect() {
|
|
3774
4020
|
return {
|
|
3775
4021
|
kind: 'Fragment',
|
|
3776
|
-
version: VERSION$
|
|
4022
|
+
version: VERSION$7,
|
|
3777
4023
|
private: [],
|
|
3778
4024
|
opaque: true
|
|
3779
4025
|
};
|
|
3780
4026
|
};
|
|
3781
|
-
function equals$
|
|
4027
|
+
function equals$7(existing, incoming) {
|
|
3782
4028
|
if (JSONStringify(incoming) !== JSONStringify(existing)) {
|
|
3783
4029
|
return false;
|
|
3784
4030
|
}
|
|
3785
4031
|
return true;
|
|
3786
4032
|
}
|
|
3787
|
-
const ingest$
|
|
4033
|
+
const ingest$5 = function PromptTemplateDataProviderInstanceConfigRepresentationIngest(input, path, luvio, store, timestamp) {
|
|
3788
4034
|
if (process.env.NODE_ENV !== 'production') {
|
|
3789
|
-
const validateError = validate$
|
|
4035
|
+
const validateError = validate$9(input);
|
|
3790
4036
|
if (validateError !== null) {
|
|
3791
4037
|
throw validateError;
|
|
3792
4038
|
}
|
|
3793
4039
|
}
|
|
3794
4040
|
const key = path.fullPath;
|
|
3795
|
-
const ttlToUse = TTL$
|
|
3796
|
-
ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize$
|
|
4041
|
+
const ttlToUse = TTL$5;
|
|
4042
|
+
ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize$5, "EinsteinLLM", VERSION$7, RepresentationType$5, equals$7);
|
|
3797
4043
|
return createLink(key);
|
|
3798
4044
|
};
|
|
3799
|
-
function getTypeCacheKeys$
|
|
4045
|
+
function getTypeCacheKeys$5(rootKeySet, luvio, input, fullPathFactory) {
|
|
3800
4046
|
// root cache key (uses fullPathFactory if keyBuilderFromType isn't defined)
|
|
3801
4047
|
const rootKey = fullPathFactory();
|
|
3802
4048
|
rootKeySet.set(rootKey, {
|
|
3803
4049
|
namespace: keyPrefix,
|
|
3804
|
-
representationName: RepresentationType$
|
|
4050
|
+
representationName: RepresentationType$5,
|
|
3805
4051
|
mergeable: false
|
|
3806
4052
|
});
|
|
3807
4053
|
}
|
|
3808
4054
|
|
|
3809
|
-
function select$
|
|
3810
|
-
return select$
|
|
4055
|
+
function select$f(luvio, params) {
|
|
4056
|
+
return select$g();
|
|
3811
4057
|
}
|
|
3812
|
-
function keyBuilder$
|
|
3813
|
-
return keyPrefix + '::
|
|
4058
|
+
function keyBuilder$d(luvio, params) {
|
|
4059
|
+
return keyPrefix + '::PromptTemplateDataProviderInstanceConfigRepresentation:(' + stableJSONStringify(params.body.additionalParam) + '::' + 'definition:' + params.body.definition + '::' + 'groupName:' + params.body.groupName + ')';
|
|
3814
4060
|
}
|
|
3815
|
-
function getResponseCacheKeys$
|
|
3816
|
-
getTypeCacheKeys$
|
|
4061
|
+
function getResponseCacheKeys$8(storeKeyMap, luvio, resourceParams, response) {
|
|
4062
|
+
getTypeCacheKeys$5(storeKeyMap, luvio, response, () => keyBuilder$d(luvio, resourceParams));
|
|
3817
4063
|
}
|
|
3818
|
-
function ingestSuccess$
|
|
4064
|
+
function ingestSuccess$8(luvio, resourceParams, response, snapshotRefresh) {
|
|
3819
4065
|
const { body } = response;
|
|
3820
|
-
const key = keyBuilder$
|
|
3821
|
-
luvio.storeIngest(key, ingest$
|
|
4066
|
+
const key = keyBuilder$d(luvio, resourceParams);
|
|
4067
|
+
luvio.storeIngest(key, ingest$5, body);
|
|
3822
4068
|
const snapshot = luvio.storeLookup({
|
|
3823
4069
|
recordId: key,
|
|
3824
|
-
node: select$
|
|
4070
|
+
node: select$f(),
|
|
3825
4071
|
variables: {},
|
|
3826
4072
|
}, snapshotRefresh);
|
|
3827
4073
|
if (process.env.NODE_ENV !== 'production') {
|
|
@@ -3832,23 +4078,23 @@ function ingestSuccess$4(luvio, resourceParams, response, snapshotRefresh) {
|
|
|
3832
4078
|
deepFreeze(snapshot.data);
|
|
3833
4079
|
return snapshot;
|
|
3834
4080
|
}
|
|
3835
|
-
function ingestError$
|
|
3836
|
-
const key = keyBuilder$
|
|
4081
|
+
function ingestError$6(luvio, params, error, snapshotRefresh) {
|
|
4082
|
+
const key = keyBuilder$d(luvio, params);
|
|
3837
4083
|
const errorSnapshot = luvio.errorSnapshot(error, snapshotRefresh);
|
|
3838
4084
|
const storeMetadataParams = {
|
|
3839
|
-
ttl: TTL$
|
|
4085
|
+
ttl: TTL$5,
|
|
3840
4086
|
namespace: keyPrefix,
|
|
3841
|
-
version: VERSION$
|
|
3842
|
-
representationName: RepresentationType$
|
|
4087
|
+
version: VERSION$7,
|
|
4088
|
+
representationName: RepresentationType$5
|
|
3843
4089
|
};
|
|
3844
4090
|
luvio.storeIngestError(key, errorSnapshot, storeMetadataParams);
|
|
3845
4091
|
return errorSnapshot;
|
|
3846
4092
|
}
|
|
3847
|
-
function createResourceRequest$
|
|
4093
|
+
function createResourceRequest$8(config) {
|
|
3848
4094
|
const headers = {};
|
|
3849
4095
|
return {
|
|
3850
|
-
baseUri: '/services/data/
|
|
3851
|
-
basePath: '/einstein/prompt-templates/data-
|
|
4096
|
+
baseUri: '/services/data/v66.0',
|
|
4097
|
+
basePath: '/einstein/prompt-templates/data-provider/describe',
|
|
3852
4098
|
method: 'post',
|
|
3853
4099
|
body: config.body,
|
|
3854
4100
|
urlParams: {},
|
|
@@ -3858,114 +4104,727 @@ function createResourceRequest$4(config) {
|
|
|
3858
4104
|
};
|
|
3859
4105
|
}
|
|
3860
4106
|
|
|
3861
|
-
const adapterName$
|
|
3862
|
-
const
|
|
3863
|
-
generateParamConfigMetadata('
|
|
3864
|
-
generateParamConfigMetadata('
|
|
3865
|
-
generateParamConfigMetadata('
|
|
3866
|
-
generateParamConfigMetadata('templateTypeName', true, 2 /* Body */, 0 /* String */),
|
|
4107
|
+
const adapterName$8 = '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 */),
|
|
3867
4112
|
];
|
|
3868
|
-
const
|
|
3869
|
-
const createResourceParams$
|
|
3870
|
-
function keyBuilder$
|
|
3871
|
-
const resourceParams = createResourceParams$
|
|
3872
|
-
return keyBuilder$
|
|
4113
|
+
const getDataProviderInstanceConfig_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$8, getDataProviderInstanceConfig_ConfigPropertyMetadata);
|
|
4114
|
+
const createResourceParams$8 = /*#__PURE__*/ createResourceParams$f(getDataProviderInstanceConfig_ConfigPropertyMetadata);
|
|
4115
|
+
function keyBuilder$c(luvio, config) {
|
|
4116
|
+
const resourceParams = createResourceParams$8(config);
|
|
4117
|
+
return keyBuilder$d(luvio, resourceParams);
|
|
3873
4118
|
}
|
|
3874
|
-
function typeCheckConfig$
|
|
4119
|
+
function typeCheckConfig$8(untrustedConfig) {
|
|
3875
4120
|
const config = {};
|
|
3876
|
-
typeCheckConfig$
|
|
3877
|
-
const
|
|
3878
|
-
if (
|
|
3879
|
-
const
|
|
3880
|
-
|
|
3881
|
-
|
|
3882
|
-
|
|
4121
|
+
typeCheckConfig$f(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;
|
|
3883
4135
|
}
|
|
3884
|
-
config.templateInputs = untrustedConfig_templateInputs_array;
|
|
3885
4136
|
}
|
|
3886
4137
|
return config;
|
|
3887
4138
|
}
|
|
3888
|
-
function validateAdapterConfig$
|
|
4139
|
+
function validateAdapterConfig$8(untrustedConfig, configPropertyNames) {
|
|
3889
4140
|
if (!untrustedIsObject(untrustedConfig)) {
|
|
3890
4141
|
return null;
|
|
3891
4142
|
}
|
|
3892
4143
|
if (process.env.NODE_ENV !== 'production') {
|
|
3893
4144
|
validateConfig(untrustedConfig, configPropertyNames);
|
|
3894
4145
|
}
|
|
3895
|
-
const config = typeCheckConfig$
|
|
4146
|
+
const config = typeCheckConfig$8(untrustedConfig);
|
|
3896
4147
|
if (!areRequiredParametersPresent(config, configPropertyNames)) {
|
|
3897
4148
|
return null;
|
|
3898
4149
|
}
|
|
3899
4150
|
return config;
|
|
3900
4151
|
}
|
|
3901
|
-
function adapterFragment$
|
|
3902
|
-
createResourceParams$
|
|
3903
|
-
return select$
|
|
4152
|
+
function adapterFragment$6(luvio, config) {
|
|
4153
|
+
createResourceParams$8(config);
|
|
4154
|
+
return select$f();
|
|
3904
4155
|
}
|
|
3905
|
-
function onFetchResponseSuccess$
|
|
3906
|
-
const snapshot = ingestSuccess$
|
|
4156
|
+
function onFetchResponseSuccess$6(luvio, config, resourceParams, response) {
|
|
4157
|
+
const snapshot = ingestSuccess$8(luvio, resourceParams, response, {
|
|
3907
4158
|
config,
|
|
3908
|
-
resolve: () => buildNetworkSnapshot$
|
|
4159
|
+
resolve: () => buildNetworkSnapshot$8(luvio, config, snapshotRefreshOptions)
|
|
3909
4160
|
});
|
|
3910
4161
|
return luvio.storeBroadcast().then(() => snapshot);
|
|
3911
4162
|
}
|
|
3912
|
-
function onFetchResponseError$
|
|
3913
|
-
const snapshot = ingestError$
|
|
4163
|
+
function onFetchResponseError$6(luvio, config, resourceParams, response) {
|
|
4164
|
+
const snapshot = ingestError$6(luvio, resourceParams, response, {
|
|
3914
4165
|
config,
|
|
3915
|
-
resolve: () => buildNetworkSnapshot$
|
|
4166
|
+
resolve: () => buildNetworkSnapshot$8(luvio, config, snapshotRefreshOptions)
|
|
3916
4167
|
});
|
|
3917
4168
|
return luvio.storeBroadcast().then(() => snapshot);
|
|
3918
4169
|
}
|
|
3919
|
-
function buildNetworkSnapshot$
|
|
3920
|
-
const resourceParams = createResourceParams$
|
|
3921
|
-
const request = createResourceRequest$
|
|
4170
|
+
function buildNetworkSnapshot$8(luvio, config, options) {
|
|
4171
|
+
const resourceParams = createResourceParams$8(config);
|
|
4172
|
+
const request = createResourceRequest$8(resourceParams);
|
|
3922
4173
|
return luvio.dispatchResourceRequest(request, options)
|
|
3923
4174
|
.then((response) => {
|
|
3924
|
-
return luvio.handleSuccessResponse(() => onFetchResponseSuccess$
|
|
4175
|
+
return luvio.handleSuccessResponse(() => onFetchResponseSuccess$6(luvio, config, resourceParams, response), () => {
|
|
3925
4176
|
const cache = new StoreKeyMap();
|
|
3926
|
-
getResponseCacheKeys$
|
|
4177
|
+
getResponseCacheKeys$8(cache, luvio, resourceParams, response.body);
|
|
3927
4178
|
return cache;
|
|
3928
4179
|
});
|
|
3929
4180
|
}, (response) => {
|
|
3930
|
-
return luvio.handleErrorResponse(() => onFetchResponseError$
|
|
4181
|
+
return luvio.handleErrorResponse(() => onFetchResponseError$6(luvio, config, resourceParams, response));
|
|
3931
4182
|
});
|
|
3932
4183
|
}
|
|
3933
|
-
function buildNetworkSnapshotCachePolicy$
|
|
3934
|
-
return buildNetworkSnapshotCachePolicy$
|
|
4184
|
+
function buildNetworkSnapshotCachePolicy$6(context, coercedAdapterRequestContext) {
|
|
4185
|
+
return buildNetworkSnapshotCachePolicy$8(context, coercedAdapterRequestContext, buildNetworkSnapshot$8, 'get', false);
|
|
3935
4186
|
}
|
|
3936
|
-
function buildCachedSnapshotCachePolicy$
|
|
4187
|
+
function buildCachedSnapshotCachePolicy$6(context, storeLookup) {
|
|
3937
4188
|
const { luvio, config } = context;
|
|
3938
4189
|
const selector = {
|
|
3939
|
-
recordId: keyBuilder$
|
|
3940
|
-
node: adapterFragment$
|
|
4190
|
+
recordId: keyBuilder$c(luvio, config),
|
|
4191
|
+
node: adapterFragment$6(luvio, config),
|
|
3941
4192
|
variables: {},
|
|
3942
4193
|
};
|
|
3943
4194
|
const cacheSnapshot = storeLookup(selector, {
|
|
3944
4195
|
config,
|
|
3945
|
-
resolve: () => buildNetworkSnapshot$
|
|
4196
|
+
resolve: () => buildNetworkSnapshot$8(luvio, config, snapshotRefreshOptions)
|
|
3946
4197
|
});
|
|
3947
4198
|
return cacheSnapshot;
|
|
3948
4199
|
}
|
|
3949
|
-
const
|
|
3950
|
-
const config = validateAdapterConfig$
|
|
4200
|
+
const getDataProviderInstanceConfigAdapterFactory = (luvio) => function EinsteinLLM__getDataProviderInstanceConfig(untrustedConfig, requestContext) {
|
|
4201
|
+
const config = validateAdapterConfig$8(untrustedConfig, getDataProviderInstanceConfig_ConfigPropertyNames);
|
|
3951
4202
|
// Invalid or incomplete config
|
|
3952
4203
|
if (config === null) {
|
|
3953
4204
|
return null;
|
|
3954
4205
|
}
|
|
3955
4206
|
return luvio.applyCachePolicy((requestContext || {}), { config, luvio }, // BuildSnapshotContext
|
|
3956
|
-
buildCachedSnapshotCachePolicy$
|
|
4207
|
+
buildCachedSnapshotCachePolicy$6, buildNetworkSnapshotCachePolicy$6);
|
|
3957
4208
|
};
|
|
3958
4209
|
|
|
3959
|
-
|
|
3960
|
-
function validate$5(obj, path = 'EinsteinPromptTemplateSupportedLanguageErrorRepresentation') {
|
|
4210
|
+
function validate$8(obj, path = 'PromptTemplateDataProviderTypeConfigRepresentation') {
|
|
3961
4211
|
const v_error = (() => {
|
|
3962
4212
|
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
3963
4213
|
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
3964
4214
|
}
|
|
3965
|
-
|
|
3966
|
-
|
|
3967
|
-
|
|
3968
|
-
|
|
4215
|
+
if (obj.description !== undefined) {
|
|
4216
|
+
const obj_description = obj.description;
|
|
4217
|
+
const path_description = path + '.description';
|
|
4218
|
+
if (typeof obj_description !== 'string') {
|
|
4219
|
+
return new TypeError('Expected "string" but received "' + typeof obj_description + '" (at "' + path_description + '")');
|
|
4220
|
+
}
|
|
4221
|
+
}
|
|
4222
|
+
const obj_groupName = obj.groupName;
|
|
4223
|
+
const path_groupName = path + '.groupName';
|
|
4224
|
+
if (typeof obj_groupName !== 'string') {
|
|
4225
|
+
return new TypeError('Expected "string" but received "' + typeof obj_groupName + '" (at "' + path_groupName + '")');
|
|
4226
|
+
}
|
|
4227
|
+
const obj_icon = obj.icon;
|
|
4228
|
+
const path_icon = path + '.icon';
|
|
4229
|
+
if (typeof obj_icon !== 'string') {
|
|
4230
|
+
return new TypeError('Expected "string" but received "' + typeof obj_icon + '" (at "' + path_icon + '")');
|
|
4231
|
+
}
|
|
4232
|
+
const obj_isTopLevel = obj.isTopLevel;
|
|
4233
|
+
const path_isTopLevel = path + '.isTopLevel';
|
|
4234
|
+
if (typeof obj_isTopLevel !== 'boolean') {
|
|
4235
|
+
return new TypeError('Expected "boolean" but received "' + typeof obj_isTopLevel + '" (at "' + path_isTopLevel + '")');
|
|
4236
|
+
}
|
|
4237
|
+
const obj_label = obj.label;
|
|
4238
|
+
const path_label = path + '.label';
|
|
4239
|
+
if (typeof obj_label !== 'string') {
|
|
4240
|
+
return new TypeError('Expected "string" but received "' + typeof obj_label + '" (at "' + path_label + '")');
|
|
4241
|
+
}
|
|
4242
|
+
if (obj.parentNode !== undefined) {
|
|
4243
|
+
const obj_parentNode = obj.parentNode;
|
|
4244
|
+
const path_parentNode = path + '.parentNode';
|
|
4245
|
+
if (typeof obj_parentNode !== 'string') {
|
|
4246
|
+
return new TypeError('Expected "string" but received "' + typeof obj_parentNode + '" (at "' + path_parentNode + '")');
|
|
4247
|
+
}
|
|
4248
|
+
}
|
|
4249
|
+
if (obj.scope !== undefined) {
|
|
4250
|
+
const obj_scope = obj.scope;
|
|
4251
|
+
const path_scope = path + '.scope';
|
|
4252
|
+
if (obj_scope === undefined) {
|
|
4253
|
+
return new TypeError('Expected "defined" but received "' + typeof obj_scope + '" (at "' + path_scope + '")');
|
|
4254
|
+
}
|
|
4255
|
+
}
|
|
4256
|
+
})();
|
|
4257
|
+
return v_error === undefined ? null : v_error;
|
|
4258
|
+
}
|
|
4259
|
+
|
|
4260
|
+
const TTL$4 = 300;
|
|
4261
|
+
const VERSION$6 = "212332dac1decc071b476742df3440fb";
|
|
4262
|
+
function validate$7(obj, path = 'PromptTemplateDataProviderTypeConfigCollectionRepresentation') {
|
|
4263
|
+
const v_error = (() => {
|
|
4264
|
+
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
4265
|
+
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
4266
|
+
}
|
|
4267
|
+
const obj_dataProviderTypeConfigs = obj.dataProviderTypeConfigs;
|
|
4268
|
+
const path_dataProviderTypeConfigs = path + '.dataProviderTypeConfigs';
|
|
4269
|
+
if (!ArrayIsArray(obj_dataProviderTypeConfigs)) {
|
|
4270
|
+
return new TypeError('Expected "array" but received "' + typeof obj_dataProviderTypeConfigs + '" (at "' + path_dataProviderTypeConfigs + '")');
|
|
4271
|
+
}
|
|
4272
|
+
for (let i = 0; i < obj_dataProviderTypeConfigs.length; i++) {
|
|
4273
|
+
const obj_dataProviderTypeConfigs_item = obj_dataProviderTypeConfigs[i];
|
|
4274
|
+
const path_dataProviderTypeConfigs_item = path_dataProviderTypeConfigs + '[' + i + ']';
|
|
4275
|
+
const referencepath_dataProviderTypeConfigs_itemValidationError = validate$8(obj_dataProviderTypeConfigs_item, path_dataProviderTypeConfigs_item);
|
|
4276
|
+
if (referencepath_dataProviderTypeConfigs_itemValidationError !== null) {
|
|
4277
|
+
let message = 'Object doesn\'t match PromptTemplateDataProviderTypeConfigRepresentation (at "' + path_dataProviderTypeConfigs_item + '")\n';
|
|
4278
|
+
message += referencepath_dataProviderTypeConfigs_itemValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
4279
|
+
return new TypeError(message);
|
|
4280
|
+
}
|
|
4281
|
+
}
|
|
4282
|
+
})();
|
|
4283
|
+
return v_error === undefined ? null : v_error;
|
|
4284
|
+
}
|
|
4285
|
+
const RepresentationType$4 = 'PromptTemplateDataProviderTypeConfigCollectionRepresentation';
|
|
4286
|
+
function normalize$4(input, existing, path, luvio, store, timestamp) {
|
|
4287
|
+
return input;
|
|
4288
|
+
}
|
|
4289
|
+
const select$e = function PromptTemplateDataProviderTypeConfigCollectionRepresentationSelect() {
|
|
4290
|
+
return {
|
|
4291
|
+
kind: 'Fragment',
|
|
4292
|
+
version: VERSION$6,
|
|
4293
|
+
private: [],
|
|
4294
|
+
opaque: true
|
|
4295
|
+
};
|
|
4296
|
+
};
|
|
4297
|
+
function equals$6(existing, incoming) {
|
|
4298
|
+
if (JSONStringify(incoming) !== JSONStringify(existing)) {
|
|
4299
|
+
return false;
|
|
4300
|
+
}
|
|
4301
|
+
return true;
|
|
4302
|
+
}
|
|
4303
|
+
const ingest$4 = function PromptTemplateDataProviderTypeConfigCollectionRepresentationIngest(input, path, luvio, store, timestamp) {
|
|
4304
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
4305
|
+
const validateError = validate$7(input);
|
|
4306
|
+
if (validateError !== null) {
|
|
4307
|
+
throw validateError;
|
|
4308
|
+
}
|
|
4309
|
+
}
|
|
4310
|
+
const key = path.fullPath;
|
|
4311
|
+
const ttlToUse = TTL$4;
|
|
4312
|
+
ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize$4, "EinsteinLLM", VERSION$6, RepresentationType$4, equals$6);
|
|
4313
|
+
return createLink(key);
|
|
4314
|
+
};
|
|
4315
|
+
function getTypeCacheKeys$4(rootKeySet, luvio, input, fullPathFactory) {
|
|
4316
|
+
// root cache key (uses fullPathFactory if keyBuilderFromType isn't defined)
|
|
4317
|
+
const rootKey = fullPathFactory();
|
|
4318
|
+
rootKeySet.set(rootKey, {
|
|
4319
|
+
namespace: keyPrefix,
|
|
4320
|
+
representationName: RepresentationType$4,
|
|
4321
|
+
mergeable: false
|
|
4322
|
+
});
|
|
4323
|
+
}
|
|
4324
|
+
|
|
4325
|
+
function select$d(luvio, params) {
|
|
4326
|
+
return select$e();
|
|
4327
|
+
}
|
|
4328
|
+
function keyBuilder$b(luvio, params) {
|
|
4329
|
+
return keyPrefix + '::PromptTemplateDataProviderTypeConfigCollectionRepresentation:(' + 'templateType:' + params.urlParams.templateType + ')';
|
|
4330
|
+
}
|
|
4331
|
+
function getResponseCacheKeys$7(storeKeyMap, luvio, resourceParams, response) {
|
|
4332
|
+
getTypeCacheKeys$4(storeKeyMap, luvio, response, () => keyBuilder$b(luvio, resourceParams));
|
|
4333
|
+
}
|
|
4334
|
+
function ingestSuccess$7(luvio, resourceParams, response, snapshotRefresh) {
|
|
4335
|
+
const { body } = response;
|
|
4336
|
+
const key = keyBuilder$b(luvio, resourceParams);
|
|
4337
|
+
luvio.storeIngest(key, ingest$4, body);
|
|
4338
|
+
const snapshot = luvio.storeLookup({
|
|
4339
|
+
recordId: key,
|
|
4340
|
+
node: select$d(),
|
|
4341
|
+
variables: {},
|
|
4342
|
+
}, snapshotRefresh);
|
|
4343
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
4344
|
+
if (snapshot.state !== 'Fulfilled') {
|
|
4345
|
+
throw new Error('Invalid network response. Expected resource response to result in Fulfilled snapshot');
|
|
4346
|
+
}
|
|
4347
|
+
}
|
|
4348
|
+
deepFreeze(snapshot.data);
|
|
4349
|
+
return snapshot;
|
|
4350
|
+
}
|
|
4351
|
+
function ingestError$5(luvio, params, error, snapshotRefresh) {
|
|
4352
|
+
const key = keyBuilder$b(luvio, params);
|
|
4353
|
+
const errorSnapshot = luvio.errorSnapshot(error, snapshotRefresh);
|
|
4354
|
+
const storeMetadataParams = {
|
|
4355
|
+
ttl: TTL$4,
|
|
4356
|
+
namespace: keyPrefix,
|
|
4357
|
+
version: VERSION$6,
|
|
4358
|
+
representationName: RepresentationType$4
|
|
4359
|
+
};
|
|
4360
|
+
luvio.storeIngestError(key, errorSnapshot, storeMetadataParams);
|
|
4361
|
+
return errorSnapshot;
|
|
4362
|
+
}
|
|
4363
|
+
function createResourceRequest$7(config) {
|
|
4364
|
+
const headers = {};
|
|
4365
|
+
return {
|
|
4366
|
+
baseUri: '/services/data/v66.0',
|
|
4367
|
+
basePath: '/einstein/prompt-templates/data-provider-types/' + config.urlParams.templateType + '',
|
|
4368
|
+
method: 'get',
|
|
4369
|
+
body: null,
|
|
4370
|
+
urlParams: config.urlParams,
|
|
4371
|
+
queryParams: {},
|
|
4372
|
+
headers,
|
|
4373
|
+
priority: 'normal',
|
|
4374
|
+
};
|
|
4375
|
+
}
|
|
4376
|
+
|
|
4377
|
+
const adapterName$7 = 'getDataProviderTypeConfigs';
|
|
4378
|
+
const getDataProviderTypeConfigs_ConfigPropertyMetadata = [
|
|
4379
|
+
generateParamConfigMetadata('templateType', true, 0 /* UrlParameter */, 0 /* String */),
|
|
4380
|
+
];
|
|
4381
|
+
const getDataProviderTypeConfigs_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$7, getDataProviderTypeConfigs_ConfigPropertyMetadata);
|
|
4382
|
+
const createResourceParams$7 = /*#__PURE__*/ createResourceParams$f(getDataProviderTypeConfigs_ConfigPropertyMetadata);
|
|
4383
|
+
function keyBuilder$a(luvio, config) {
|
|
4384
|
+
const resourceParams = createResourceParams$7(config);
|
|
4385
|
+
return keyBuilder$b(luvio, resourceParams);
|
|
4386
|
+
}
|
|
4387
|
+
function typeCheckConfig$7(untrustedConfig) {
|
|
4388
|
+
const config = {};
|
|
4389
|
+
typeCheckConfig$f(untrustedConfig, config, getDataProviderTypeConfigs_ConfigPropertyMetadata);
|
|
4390
|
+
return config;
|
|
4391
|
+
}
|
|
4392
|
+
function validateAdapterConfig$7(untrustedConfig, configPropertyNames) {
|
|
4393
|
+
if (!untrustedIsObject(untrustedConfig)) {
|
|
4394
|
+
return null;
|
|
4395
|
+
}
|
|
4396
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
4397
|
+
validateConfig(untrustedConfig, configPropertyNames);
|
|
4398
|
+
}
|
|
4399
|
+
const config = typeCheckConfig$7(untrustedConfig);
|
|
4400
|
+
if (!areRequiredParametersPresent(config, configPropertyNames)) {
|
|
4401
|
+
return null;
|
|
4402
|
+
}
|
|
4403
|
+
return config;
|
|
4404
|
+
}
|
|
4405
|
+
function adapterFragment$5(luvio, config) {
|
|
4406
|
+
createResourceParams$7(config);
|
|
4407
|
+
return select$d();
|
|
4408
|
+
}
|
|
4409
|
+
function onFetchResponseSuccess$5(luvio, config, resourceParams, response) {
|
|
4410
|
+
const snapshot = ingestSuccess$7(luvio, resourceParams, response, {
|
|
4411
|
+
config,
|
|
4412
|
+
resolve: () => buildNetworkSnapshot$7(luvio, config, snapshotRefreshOptions)
|
|
4413
|
+
});
|
|
4414
|
+
return luvio.storeBroadcast().then(() => snapshot);
|
|
4415
|
+
}
|
|
4416
|
+
function onFetchResponseError$5(luvio, config, resourceParams, response) {
|
|
4417
|
+
const snapshot = ingestError$5(luvio, resourceParams, response, {
|
|
4418
|
+
config,
|
|
4419
|
+
resolve: () => buildNetworkSnapshot$7(luvio, config, snapshotRefreshOptions)
|
|
4420
|
+
});
|
|
4421
|
+
return luvio.storeBroadcast().then(() => snapshot);
|
|
4422
|
+
}
|
|
4423
|
+
function buildNetworkSnapshot$7(luvio, config, options) {
|
|
4424
|
+
const resourceParams = createResourceParams$7(config);
|
|
4425
|
+
const request = createResourceRequest$7(resourceParams);
|
|
4426
|
+
return luvio.dispatchResourceRequest(request, options)
|
|
4427
|
+
.then((response) => {
|
|
4428
|
+
return luvio.handleSuccessResponse(() => onFetchResponseSuccess$5(luvio, config, resourceParams, response), () => {
|
|
4429
|
+
const cache = new StoreKeyMap();
|
|
4430
|
+
getResponseCacheKeys$7(cache, luvio, resourceParams, response.body);
|
|
4431
|
+
return cache;
|
|
4432
|
+
});
|
|
4433
|
+
}, (response) => {
|
|
4434
|
+
return luvio.handleErrorResponse(() => onFetchResponseError$5(luvio, config, resourceParams, response));
|
|
4435
|
+
});
|
|
4436
|
+
}
|
|
4437
|
+
function buildNetworkSnapshotCachePolicy$5(context, coercedAdapterRequestContext) {
|
|
4438
|
+
return buildNetworkSnapshotCachePolicy$8(context, coercedAdapterRequestContext, buildNetworkSnapshot$7, undefined, false);
|
|
4439
|
+
}
|
|
4440
|
+
function buildCachedSnapshotCachePolicy$5(context, storeLookup) {
|
|
4441
|
+
const { luvio, config } = context;
|
|
4442
|
+
const selector = {
|
|
4443
|
+
recordId: keyBuilder$a(luvio, config),
|
|
4444
|
+
node: adapterFragment$5(luvio, config),
|
|
4445
|
+
variables: {},
|
|
4446
|
+
};
|
|
4447
|
+
const cacheSnapshot = storeLookup(selector, {
|
|
4448
|
+
config,
|
|
4449
|
+
resolve: () => buildNetworkSnapshot$7(luvio, config, snapshotRefreshOptions)
|
|
4450
|
+
});
|
|
4451
|
+
return cacheSnapshot;
|
|
4452
|
+
}
|
|
4453
|
+
const getDataProviderTypeConfigsAdapterFactory = (luvio) => function EinsteinLLM__getDataProviderTypeConfigs(untrustedConfig, requestContext) {
|
|
4454
|
+
const config = validateAdapterConfig$7(untrustedConfig, getDataProviderTypeConfigs_ConfigPropertyNames);
|
|
4455
|
+
// Invalid or incomplete config
|
|
4456
|
+
if (config === null) {
|
|
4457
|
+
return null;
|
|
4458
|
+
}
|
|
4459
|
+
return luvio.applyCachePolicy((requestContext || {}), { config, luvio }, // BuildSnapshotContext
|
|
4460
|
+
buildCachedSnapshotCachePolicy$5, buildNetworkSnapshotCachePolicy$5);
|
|
4461
|
+
};
|
|
4462
|
+
|
|
4463
|
+
const TTL$3 = 300;
|
|
4464
|
+
const VERSION$5 = "3a6ecdfe18eb2af8f8f6aaa1a30b194c";
|
|
4465
|
+
function validate$6(obj, path = 'PromptTemplateDataProviderInstanceConfigCollectionRepresentation') {
|
|
4466
|
+
const v_error = (() => {
|
|
4467
|
+
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
4468
|
+
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
4469
|
+
}
|
|
4470
|
+
const obj_dataProviderInstanceConfigs = obj.dataProviderInstanceConfigs;
|
|
4471
|
+
const path_dataProviderInstanceConfigs = path + '.dataProviderInstanceConfigs';
|
|
4472
|
+
if (!ArrayIsArray(obj_dataProviderInstanceConfigs)) {
|
|
4473
|
+
return new TypeError('Expected "array" but received "' + typeof obj_dataProviderInstanceConfigs + '" (at "' + path_dataProviderInstanceConfigs + '")');
|
|
4474
|
+
}
|
|
4475
|
+
for (let i = 0; i < obj_dataProviderInstanceConfigs.length; i++) {
|
|
4476
|
+
const obj_dataProviderInstanceConfigs_item = obj_dataProviderInstanceConfigs[i];
|
|
4477
|
+
const path_dataProviderInstanceConfigs_item = path_dataProviderInstanceConfigs + '[' + i + ']';
|
|
4478
|
+
const referencepath_dataProviderInstanceConfigs_itemValidationError = validate$9(obj_dataProviderInstanceConfigs_item, path_dataProviderInstanceConfigs_item);
|
|
4479
|
+
if (referencepath_dataProviderInstanceConfigs_itemValidationError !== null) {
|
|
4480
|
+
let message = 'Object doesn\'t match PromptTemplateDataProviderInstanceConfigRepresentation (at "' + path_dataProviderInstanceConfigs_item + '")\n';
|
|
4481
|
+
message += referencepath_dataProviderInstanceConfigs_itemValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
4482
|
+
return new TypeError(message);
|
|
4483
|
+
}
|
|
4484
|
+
}
|
|
4485
|
+
})();
|
|
4486
|
+
return v_error === undefined ? null : v_error;
|
|
4487
|
+
}
|
|
4488
|
+
const RepresentationType$3 = 'PromptTemplateDataProviderInstanceConfigCollectionRepresentation';
|
|
4489
|
+
function normalize$3(input, existing, path, luvio, store, timestamp) {
|
|
4490
|
+
return input;
|
|
4491
|
+
}
|
|
4492
|
+
const select$c = function PromptTemplateDataProviderInstanceConfigCollectionRepresentationSelect() {
|
|
4493
|
+
return {
|
|
4494
|
+
kind: 'Fragment',
|
|
4495
|
+
version: VERSION$5,
|
|
4496
|
+
private: [],
|
|
4497
|
+
opaque: true
|
|
4498
|
+
};
|
|
4499
|
+
};
|
|
4500
|
+
function equals$5(existing, incoming) {
|
|
4501
|
+
if (JSONStringify(incoming) !== JSONStringify(existing)) {
|
|
4502
|
+
return false;
|
|
4503
|
+
}
|
|
4504
|
+
return true;
|
|
4505
|
+
}
|
|
4506
|
+
const ingest$3 = function PromptTemplateDataProviderInstanceConfigCollectionRepresentationIngest(input, path, luvio, store, timestamp) {
|
|
4507
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
4508
|
+
const validateError = validate$6(input);
|
|
4509
|
+
if (validateError !== null) {
|
|
4510
|
+
throw validateError;
|
|
4511
|
+
}
|
|
4512
|
+
}
|
|
4513
|
+
const key = path.fullPath;
|
|
4514
|
+
const ttlToUse = TTL$3;
|
|
4515
|
+
ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize$3, "EinsteinLLM", VERSION$5, RepresentationType$3, equals$5);
|
|
4516
|
+
return createLink(key);
|
|
4517
|
+
};
|
|
4518
|
+
function getTypeCacheKeys$3(rootKeySet, luvio, input, fullPathFactory) {
|
|
4519
|
+
// root cache key (uses fullPathFactory if keyBuilderFromType isn't defined)
|
|
4520
|
+
const rootKey = fullPathFactory();
|
|
4521
|
+
rootKeySet.set(rootKey, {
|
|
4522
|
+
namespace: keyPrefix,
|
|
4523
|
+
representationName: RepresentationType$3,
|
|
4524
|
+
mergeable: false
|
|
4525
|
+
});
|
|
4526
|
+
}
|
|
4527
|
+
|
|
4528
|
+
function select$b(luvio, params) {
|
|
4529
|
+
return select$c();
|
|
4530
|
+
}
|
|
4531
|
+
function keyBuilder$9(luvio, params) {
|
|
4532
|
+
return keyPrefix + '::PromptTemplateDataProviderInstanceConfigCollectionRepresentation:(' + 'groupNames:' + params.queryParams.groupNames + ',' + 'targets:' + params.queryParams.targets + ',' + 'templateType:' + params.urlParams.templateType + ')';
|
|
4533
|
+
}
|
|
4534
|
+
function getResponseCacheKeys$6(storeKeyMap, luvio, resourceParams, response) {
|
|
4535
|
+
getTypeCacheKeys$3(storeKeyMap, luvio, response, () => keyBuilder$9(luvio, resourceParams));
|
|
4536
|
+
}
|
|
4537
|
+
function ingestSuccess$6(luvio, resourceParams, response, snapshotRefresh) {
|
|
4538
|
+
const { body } = response;
|
|
4539
|
+
const key = keyBuilder$9(luvio, resourceParams);
|
|
4540
|
+
luvio.storeIngest(key, ingest$3, body);
|
|
4541
|
+
const snapshot = luvio.storeLookup({
|
|
4542
|
+
recordId: key,
|
|
4543
|
+
node: select$b(),
|
|
4544
|
+
variables: {},
|
|
4545
|
+
}, snapshotRefresh);
|
|
4546
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
4547
|
+
if (snapshot.state !== 'Fulfilled') {
|
|
4548
|
+
throw new Error('Invalid network response. Expected resource response to result in Fulfilled snapshot');
|
|
4549
|
+
}
|
|
4550
|
+
}
|
|
4551
|
+
deepFreeze(snapshot.data);
|
|
4552
|
+
return snapshot;
|
|
4553
|
+
}
|
|
4554
|
+
function ingestError$4(luvio, params, error, snapshotRefresh) {
|
|
4555
|
+
const key = keyBuilder$9(luvio, params);
|
|
4556
|
+
const errorSnapshot = luvio.errorSnapshot(error, snapshotRefresh);
|
|
4557
|
+
const storeMetadataParams = {
|
|
4558
|
+
ttl: TTL$3,
|
|
4559
|
+
namespace: keyPrefix,
|
|
4560
|
+
version: VERSION$5,
|
|
4561
|
+
representationName: RepresentationType$3
|
|
4562
|
+
};
|
|
4563
|
+
luvio.storeIngestError(key, errorSnapshot, storeMetadataParams);
|
|
4564
|
+
return errorSnapshot;
|
|
4565
|
+
}
|
|
4566
|
+
function createResourceRequest$6(config) {
|
|
4567
|
+
const headers = {};
|
|
4568
|
+
return {
|
|
4569
|
+
baseUri: '/services/data/v66.0',
|
|
4570
|
+
basePath: '/einstein/prompt-templates/data-providers/' + config.urlParams.templateType + '',
|
|
4571
|
+
method: 'get',
|
|
4572
|
+
body: null,
|
|
4573
|
+
urlParams: config.urlParams,
|
|
4574
|
+
queryParams: config.queryParams,
|
|
4575
|
+
headers,
|
|
4576
|
+
priority: 'normal',
|
|
4577
|
+
};
|
|
4578
|
+
}
|
|
4579
|
+
|
|
4580
|
+
const adapterName$6 = 'getDataProviders';
|
|
4581
|
+
const getDataProviders_ConfigPropertyMetadata = [
|
|
4582
|
+
generateParamConfigMetadata('templateType', true, 0 /* UrlParameter */, 0 /* String */),
|
|
4583
|
+
generateParamConfigMetadata('groupNames', false, 1 /* QueryParameter */, 0 /* String */, true),
|
|
4584
|
+
generateParamConfigMetadata('targets', false, 1 /* QueryParameter */, 0 /* String */, true),
|
|
4585
|
+
];
|
|
4586
|
+
const getDataProviders_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$6, getDataProviders_ConfigPropertyMetadata);
|
|
4587
|
+
const createResourceParams$6 = /*#__PURE__*/ createResourceParams$f(getDataProviders_ConfigPropertyMetadata);
|
|
4588
|
+
function keyBuilder$8(luvio, config) {
|
|
4589
|
+
const resourceParams = createResourceParams$6(config);
|
|
4590
|
+
return keyBuilder$9(luvio, resourceParams);
|
|
4591
|
+
}
|
|
4592
|
+
function typeCheckConfig$6(untrustedConfig) {
|
|
4593
|
+
const config = {};
|
|
4594
|
+
typeCheckConfig$f(untrustedConfig, config, getDataProviders_ConfigPropertyMetadata);
|
|
4595
|
+
return config;
|
|
4596
|
+
}
|
|
4597
|
+
function validateAdapterConfig$6(untrustedConfig, configPropertyNames) {
|
|
4598
|
+
if (!untrustedIsObject(untrustedConfig)) {
|
|
4599
|
+
return null;
|
|
4600
|
+
}
|
|
4601
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
4602
|
+
validateConfig(untrustedConfig, configPropertyNames);
|
|
4603
|
+
}
|
|
4604
|
+
const config = typeCheckConfig$6(untrustedConfig);
|
|
4605
|
+
if (!areRequiredParametersPresent(config, configPropertyNames)) {
|
|
4606
|
+
return null;
|
|
4607
|
+
}
|
|
4608
|
+
return config;
|
|
4609
|
+
}
|
|
4610
|
+
function adapterFragment$4(luvio, config) {
|
|
4611
|
+
createResourceParams$6(config);
|
|
4612
|
+
return select$b();
|
|
4613
|
+
}
|
|
4614
|
+
function onFetchResponseSuccess$4(luvio, config, resourceParams, response) {
|
|
4615
|
+
const snapshot = ingestSuccess$6(luvio, resourceParams, response, {
|
|
4616
|
+
config,
|
|
4617
|
+
resolve: () => buildNetworkSnapshot$6(luvio, config, snapshotRefreshOptions)
|
|
4618
|
+
});
|
|
4619
|
+
return luvio.storeBroadcast().then(() => snapshot);
|
|
4620
|
+
}
|
|
4621
|
+
function onFetchResponseError$4(luvio, config, resourceParams, response) {
|
|
4622
|
+
const snapshot = ingestError$4(luvio, resourceParams, response, {
|
|
4623
|
+
config,
|
|
4624
|
+
resolve: () => buildNetworkSnapshot$6(luvio, config, snapshotRefreshOptions)
|
|
4625
|
+
});
|
|
4626
|
+
return luvio.storeBroadcast().then(() => snapshot);
|
|
4627
|
+
}
|
|
4628
|
+
function buildNetworkSnapshot$6(luvio, config, options) {
|
|
4629
|
+
const resourceParams = createResourceParams$6(config);
|
|
4630
|
+
const request = createResourceRequest$6(resourceParams);
|
|
4631
|
+
return luvio.dispatchResourceRequest(request, options)
|
|
4632
|
+
.then((response) => {
|
|
4633
|
+
return luvio.handleSuccessResponse(() => onFetchResponseSuccess$4(luvio, config, resourceParams, response), () => {
|
|
4634
|
+
const cache = new StoreKeyMap();
|
|
4635
|
+
getResponseCacheKeys$6(cache, luvio, resourceParams, response.body);
|
|
4636
|
+
return cache;
|
|
4637
|
+
});
|
|
4638
|
+
}, (response) => {
|
|
4639
|
+
return luvio.handleErrorResponse(() => onFetchResponseError$4(luvio, config, resourceParams, response));
|
|
4640
|
+
});
|
|
4641
|
+
}
|
|
4642
|
+
function buildNetworkSnapshotCachePolicy$4(context, coercedAdapterRequestContext) {
|
|
4643
|
+
return buildNetworkSnapshotCachePolicy$8(context, coercedAdapterRequestContext, buildNetworkSnapshot$6, undefined, false);
|
|
4644
|
+
}
|
|
4645
|
+
function buildCachedSnapshotCachePolicy$4(context, storeLookup) {
|
|
4646
|
+
const { luvio, config } = context;
|
|
4647
|
+
const selector = {
|
|
4648
|
+
recordId: keyBuilder$8(luvio, config),
|
|
4649
|
+
node: adapterFragment$4(luvio, config),
|
|
4650
|
+
variables: {},
|
|
4651
|
+
};
|
|
4652
|
+
const cacheSnapshot = storeLookup(selector, {
|
|
4653
|
+
config,
|
|
4654
|
+
resolve: () => buildNetworkSnapshot$6(luvio, config, snapshotRefreshOptions)
|
|
4655
|
+
});
|
|
4656
|
+
return cacheSnapshot;
|
|
4657
|
+
}
|
|
4658
|
+
const getDataProvidersAdapterFactory = (luvio) => function EinsteinLLM__getDataProviders(untrustedConfig, requestContext) {
|
|
4659
|
+
const config = validateAdapterConfig$6(untrustedConfig, getDataProviders_ConfigPropertyNames);
|
|
4660
|
+
// Invalid or incomplete config
|
|
4661
|
+
if (config === null) {
|
|
4662
|
+
return null;
|
|
4663
|
+
}
|
|
4664
|
+
return luvio.applyCachePolicy((requestContext || {}), { config, luvio }, // BuildSnapshotContext
|
|
4665
|
+
buildCachedSnapshotCachePolicy$4, buildNetworkSnapshotCachePolicy$4);
|
|
4666
|
+
};
|
|
4667
|
+
|
|
4668
|
+
function select$a(luvio, params) {
|
|
4669
|
+
return select$c();
|
|
4670
|
+
}
|
|
4671
|
+
function keyBuilder$7(luvio, params) {
|
|
4672
|
+
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 + ')';
|
|
4673
|
+
}
|
|
4674
|
+
function getResponseCacheKeys$5(storeKeyMap, luvio, resourceParams, response) {
|
|
4675
|
+
getTypeCacheKeys$3(storeKeyMap, luvio, response, () => keyBuilder$7(luvio, resourceParams));
|
|
4676
|
+
}
|
|
4677
|
+
function ingestSuccess$5(luvio, resourceParams, response, snapshotRefresh) {
|
|
4678
|
+
const { body } = response;
|
|
4679
|
+
const key = keyBuilder$7(luvio, resourceParams);
|
|
4680
|
+
luvio.storeIngest(key, ingest$3, body);
|
|
4681
|
+
const snapshot = luvio.storeLookup({
|
|
4682
|
+
recordId: key,
|
|
4683
|
+
node: select$a(),
|
|
4684
|
+
variables: {},
|
|
4685
|
+
}, snapshotRefresh);
|
|
4686
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
4687
|
+
if (snapshot.state !== 'Fulfilled') {
|
|
4688
|
+
throw new Error('Invalid network response. Expected resource response to result in Fulfilled snapshot');
|
|
4689
|
+
}
|
|
4690
|
+
}
|
|
4691
|
+
deepFreeze(snapshot.data);
|
|
4692
|
+
return snapshot;
|
|
4693
|
+
}
|
|
4694
|
+
function ingestError$3(luvio, params, error, snapshotRefresh) {
|
|
4695
|
+
const key = keyBuilder$7(luvio, params);
|
|
4696
|
+
const errorSnapshot = luvio.errorSnapshot(error, snapshotRefresh);
|
|
4697
|
+
const storeMetadataParams = {
|
|
4698
|
+
ttl: TTL$3,
|
|
4699
|
+
namespace: keyPrefix,
|
|
4700
|
+
version: VERSION$5,
|
|
4701
|
+
representationName: RepresentationType$3
|
|
4702
|
+
};
|
|
4703
|
+
luvio.storeIngestError(key, errorSnapshot, storeMetadataParams);
|
|
4704
|
+
return errorSnapshot;
|
|
4705
|
+
}
|
|
4706
|
+
function createResourceRequest$5(config) {
|
|
4707
|
+
const headers = {};
|
|
4708
|
+
return {
|
|
4709
|
+
baseUri: '/services/data/v66.0',
|
|
4710
|
+
basePath: '/einstein/prompt-templates/data-providers/mapped',
|
|
4711
|
+
method: 'post',
|
|
4712
|
+
body: config.body,
|
|
4713
|
+
urlParams: {},
|
|
4714
|
+
queryParams: {},
|
|
4715
|
+
headers,
|
|
4716
|
+
priority: 'normal',
|
|
4717
|
+
};
|
|
4718
|
+
}
|
|
4719
|
+
|
|
4720
|
+
const adapterName$5 = 'getInputMappedDataProviders';
|
|
4721
|
+
const getInputMappedDataProviders_ConfigPropertyMetadata = [
|
|
4722
|
+
generateParamConfigMetadata('groupName', false, 2 /* Body */, 0 /* String */),
|
|
4723
|
+
generateParamConfigMetadata('target', false, 2 /* Body */, 0 /* String */),
|
|
4724
|
+
generateParamConfigMetadata('templateInputs', true, 2 /* Body */, 4 /* Unsupported */, true),
|
|
4725
|
+
generateParamConfigMetadata('templateTypeName', true, 2 /* Body */, 0 /* String */),
|
|
4726
|
+
];
|
|
4727
|
+
const getInputMappedDataProviders_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$5, getInputMappedDataProviders_ConfigPropertyMetadata);
|
|
4728
|
+
const createResourceParams$5 = /*#__PURE__*/ createResourceParams$f(getInputMappedDataProviders_ConfigPropertyMetadata);
|
|
4729
|
+
function keyBuilder$6(luvio, config) {
|
|
4730
|
+
const resourceParams = createResourceParams$5(config);
|
|
4731
|
+
return keyBuilder$7(luvio, resourceParams);
|
|
4732
|
+
}
|
|
4733
|
+
function typeCheckConfig$5(untrustedConfig) {
|
|
4734
|
+
const config = {};
|
|
4735
|
+
typeCheckConfig$f(untrustedConfig, config, getInputMappedDataProviders_ConfigPropertyMetadata);
|
|
4736
|
+
const untrustedConfig_templateInputs = untrustedConfig.templateInputs;
|
|
4737
|
+
if (ArrayIsArray$1(untrustedConfig_templateInputs)) {
|
|
4738
|
+
const untrustedConfig_templateInputs_array = [];
|
|
4739
|
+
for (let i = 0, arrayLength = untrustedConfig_templateInputs.length; i < arrayLength; i++) {
|
|
4740
|
+
const untrustedConfig_templateInputs_item = untrustedConfig_templateInputs[i];
|
|
4741
|
+
untrustedConfig_templateInputs_array.push(untrustedConfig_templateInputs_item);
|
|
4742
|
+
}
|
|
4743
|
+
config.templateInputs = untrustedConfig_templateInputs_array;
|
|
4744
|
+
}
|
|
4745
|
+
return config;
|
|
4746
|
+
}
|
|
4747
|
+
function validateAdapterConfig$5(untrustedConfig, configPropertyNames) {
|
|
4748
|
+
if (!untrustedIsObject(untrustedConfig)) {
|
|
4749
|
+
return null;
|
|
4750
|
+
}
|
|
4751
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
4752
|
+
validateConfig(untrustedConfig, configPropertyNames);
|
|
4753
|
+
}
|
|
4754
|
+
const config = typeCheckConfig$5(untrustedConfig);
|
|
4755
|
+
if (!areRequiredParametersPresent(config, configPropertyNames)) {
|
|
4756
|
+
return null;
|
|
4757
|
+
}
|
|
4758
|
+
return config;
|
|
4759
|
+
}
|
|
4760
|
+
function adapterFragment$3(luvio, config) {
|
|
4761
|
+
createResourceParams$5(config);
|
|
4762
|
+
return select$a();
|
|
4763
|
+
}
|
|
4764
|
+
function onFetchResponseSuccess$3(luvio, config, resourceParams, response) {
|
|
4765
|
+
const snapshot = ingestSuccess$5(luvio, resourceParams, response, {
|
|
4766
|
+
config,
|
|
4767
|
+
resolve: () => buildNetworkSnapshot$5(luvio, config, snapshotRefreshOptions)
|
|
4768
|
+
});
|
|
4769
|
+
return luvio.storeBroadcast().then(() => snapshot);
|
|
4770
|
+
}
|
|
4771
|
+
function onFetchResponseError$3(luvio, config, resourceParams, response) {
|
|
4772
|
+
const snapshot = ingestError$3(luvio, resourceParams, response, {
|
|
4773
|
+
config,
|
|
4774
|
+
resolve: () => buildNetworkSnapshot$5(luvio, config, snapshotRefreshOptions)
|
|
4775
|
+
});
|
|
4776
|
+
return luvio.storeBroadcast().then(() => snapshot);
|
|
4777
|
+
}
|
|
4778
|
+
function buildNetworkSnapshot$5(luvio, config, options) {
|
|
4779
|
+
const resourceParams = createResourceParams$5(config);
|
|
4780
|
+
const request = createResourceRequest$5(resourceParams);
|
|
4781
|
+
return luvio.dispatchResourceRequest(request, options)
|
|
4782
|
+
.then((response) => {
|
|
4783
|
+
return luvio.handleSuccessResponse(() => onFetchResponseSuccess$3(luvio, config, resourceParams, response), () => {
|
|
4784
|
+
const cache = new StoreKeyMap();
|
|
4785
|
+
getResponseCacheKeys$5(cache, luvio, resourceParams, response.body);
|
|
4786
|
+
return cache;
|
|
4787
|
+
});
|
|
4788
|
+
}, (response) => {
|
|
4789
|
+
return luvio.handleErrorResponse(() => onFetchResponseError$3(luvio, config, resourceParams, response));
|
|
4790
|
+
});
|
|
4791
|
+
}
|
|
4792
|
+
function buildNetworkSnapshotCachePolicy$3(context, coercedAdapterRequestContext) {
|
|
4793
|
+
return buildNetworkSnapshotCachePolicy$8(context, coercedAdapterRequestContext, buildNetworkSnapshot$5, 'get', false);
|
|
4794
|
+
}
|
|
4795
|
+
function buildCachedSnapshotCachePolicy$3(context, storeLookup) {
|
|
4796
|
+
const { luvio, config } = context;
|
|
4797
|
+
const selector = {
|
|
4798
|
+
recordId: keyBuilder$6(luvio, config),
|
|
4799
|
+
node: adapterFragment$3(luvio, config),
|
|
4800
|
+
variables: {},
|
|
4801
|
+
};
|
|
4802
|
+
const cacheSnapshot = storeLookup(selector, {
|
|
4803
|
+
config,
|
|
4804
|
+
resolve: () => buildNetworkSnapshot$5(luvio, config, snapshotRefreshOptions)
|
|
4805
|
+
});
|
|
4806
|
+
return cacheSnapshot;
|
|
4807
|
+
}
|
|
4808
|
+
const getInputMappedDataProvidersAdapterFactory = (luvio) => function EinsteinLLM__getInputMappedDataProviders(untrustedConfig, requestContext) {
|
|
4809
|
+
const config = validateAdapterConfig$5(untrustedConfig, getInputMappedDataProviders_ConfigPropertyNames);
|
|
4810
|
+
// Invalid or incomplete config
|
|
4811
|
+
if (config === null) {
|
|
4812
|
+
return null;
|
|
4813
|
+
}
|
|
4814
|
+
return luvio.applyCachePolicy((requestContext || {}), { config, luvio }, // BuildSnapshotContext
|
|
4815
|
+
buildCachedSnapshotCachePolicy$3, buildNetworkSnapshotCachePolicy$3);
|
|
4816
|
+
};
|
|
4817
|
+
|
|
4818
|
+
const VERSION$4 = "b513bbac1672327d8eaaf120660e94b5";
|
|
4819
|
+
function validate$5(obj, path = 'EinsteinPromptTemplateSupportedLanguageErrorRepresentation') {
|
|
4820
|
+
const v_error = (() => {
|
|
4821
|
+
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
4822
|
+
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
4823
|
+
}
|
|
4824
|
+
const obj_errorMessage = obj.errorMessage;
|
|
4825
|
+
const path_errorMessage = path + '.errorMessage';
|
|
4826
|
+
if (typeof obj_errorMessage !== 'string') {
|
|
4827
|
+
return new TypeError('Expected "string" but received "' + typeof obj_errorMessage + '" (at "' + path_errorMessage + '")');
|
|
3969
4828
|
}
|
|
3970
4829
|
const obj_messageCode = obj.messageCode;
|
|
3971
4830
|
const path_messageCode = path + '.messageCode';
|
|
@@ -3975,7 +4834,7 @@ function validate$5(obj, path = 'EinsteinPromptTemplateSupportedLanguageErrorRep
|
|
|
3975
4834
|
})();
|
|
3976
4835
|
return v_error === undefined ? null : v_error;
|
|
3977
4836
|
}
|
|
3978
|
-
const select$
|
|
4837
|
+
const select$9 = function EinsteinPromptTemplateSupportedLanguageErrorRepresentationSelect() {
|
|
3979
4838
|
return {
|
|
3980
4839
|
kind: 'Fragment',
|
|
3981
4840
|
version: VERSION$4,
|
|
@@ -4025,7 +4884,7 @@ function validate$4(obj, path = 'EinsteinPromptTemplateSupportedLanguageRepresen
|
|
|
4025
4884
|
})();
|
|
4026
4885
|
return v_error === undefined ? null : v_error;
|
|
4027
4886
|
}
|
|
4028
|
-
const select$
|
|
4887
|
+
const select$8 = function EinsteinPromptTemplateSupportedLanguageRepresentationSelect() {
|
|
4029
4888
|
return {
|
|
4030
4889
|
kind: 'Fragment',
|
|
4031
4890
|
version: VERSION$3,
|
|
@@ -4115,9 +4974,9 @@ const RepresentationType$2 = 'EinsteinPromptTemplateVersionOutputLanguagesRepres
|
|
|
4115
4974
|
function normalize$2(input, existing, path, luvio, store, timestamp) {
|
|
4116
4975
|
return input;
|
|
4117
4976
|
}
|
|
4118
|
-
const select$
|
|
4119
|
-
const { selections: EinsteinPromptTemplateSupportedLanguageErrorRepresentation__selections, opaque: EinsteinPromptTemplateSupportedLanguageErrorRepresentation__opaque, } = select$
|
|
4120
|
-
const { selections: EinsteinPromptTemplateSupportedLanguageRepresentation__selections, opaque: EinsteinPromptTemplateSupportedLanguageRepresentation__opaque, } = select$
|
|
4977
|
+
const select$7 = function EinsteinPromptTemplateVersionOutputLanguagesRepresentationSelect() {
|
|
4978
|
+
const { selections: EinsteinPromptTemplateSupportedLanguageErrorRepresentation__selections, opaque: EinsteinPromptTemplateSupportedLanguageErrorRepresentation__opaque, } = select$9();
|
|
4979
|
+
const { selections: EinsteinPromptTemplateSupportedLanguageRepresentation__selections, opaque: EinsteinPromptTemplateSupportedLanguageRepresentation__opaque, } = select$8();
|
|
4121
4980
|
return {
|
|
4122
4981
|
kind: 'Fragment',
|
|
4123
4982
|
version: VERSION$2,
|
|
@@ -4210,22 +5069,22 @@ function getTypeCacheKeys$2(rootKeySet, luvio, input, fullPathFactory) {
|
|
|
4210
5069
|
});
|
|
4211
5070
|
}
|
|
4212
5071
|
|
|
4213
|
-
function select$
|
|
4214
|
-
return select$
|
|
5072
|
+
function select$6(luvio, params) {
|
|
5073
|
+
return select$7();
|
|
4215
5074
|
}
|
|
4216
5075
|
function keyBuilder$5(luvio, params) {
|
|
4217
5076
|
return keyPrefix + '::EinsteinPromptTemplateVersionOutputLanguagesRepresentation:(' + 'useStandardVersion:' + params.queryParams.useStandardVersion + ',' + 'versionId:' + params.queryParams.versionId + ',' + 'promptTemplateDevName:' + params.urlParams.promptTemplateDevName + ')';
|
|
4218
5077
|
}
|
|
4219
|
-
function getResponseCacheKeys$
|
|
5078
|
+
function getResponseCacheKeys$4(storeKeyMap, luvio, resourceParams, response) {
|
|
4220
5079
|
getTypeCacheKeys$2(storeKeyMap, luvio, response, () => keyBuilder$5(luvio, resourceParams));
|
|
4221
5080
|
}
|
|
4222
|
-
function ingestSuccess$
|
|
5081
|
+
function ingestSuccess$4(luvio, resourceParams, response, snapshotRefresh) {
|
|
4223
5082
|
const { body } = response;
|
|
4224
5083
|
const key = keyBuilder$5(luvio, resourceParams);
|
|
4225
5084
|
luvio.storeIngest(key, ingest$2, body);
|
|
4226
5085
|
const snapshot = luvio.storeLookup({
|
|
4227
5086
|
recordId: key,
|
|
4228
|
-
node: select$
|
|
5087
|
+
node: select$6(),
|
|
4229
5088
|
variables: {},
|
|
4230
5089
|
}, snapshotRefresh);
|
|
4231
5090
|
if (process.env.NODE_ENV !== 'production') {
|
|
@@ -4248,10 +5107,10 @@ function ingestError$2(luvio, params, error, snapshotRefresh) {
|
|
|
4248
5107
|
luvio.storeIngestError(key, errorSnapshot, storeMetadataParams);
|
|
4249
5108
|
return errorSnapshot;
|
|
4250
5109
|
}
|
|
4251
|
-
function createResourceRequest$
|
|
5110
|
+
function createResourceRequest$4(config) {
|
|
4252
5111
|
const headers = {};
|
|
4253
5112
|
return {
|
|
4254
|
-
baseUri: '/services/data/
|
|
5113
|
+
baseUri: '/services/data/v66.0',
|
|
4255
5114
|
basePath: '/einstein/prompt-template/' + config.urlParams.promptTemplateDevName + '/output-languages',
|
|
4256
5115
|
method: 'get',
|
|
4257
5116
|
body: null,
|
|
@@ -4262,62 +5121,62 @@ function createResourceRequest$3(config) {
|
|
|
4262
5121
|
};
|
|
4263
5122
|
}
|
|
4264
5123
|
|
|
4265
|
-
const adapterName$
|
|
5124
|
+
const adapterName$4 = 'getOutputLanguages';
|
|
4266
5125
|
const getOutputLanguages_ConfigPropertyMetadata = [
|
|
4267
5126
|
generateParamConfigMetadata('promptTemplateDevName', true, 0 /* UrlParameter */, 0 /* String */),
|
|
4268
5127
|
generateParamConfigMetadata('useStandardVersion', false, 1 /* QueryParameter */, 1 /* Boolean */),
|
|
4269
5128
|
generateParamConfigMetadata('versionId', false, 1 /* QueryParameter */, 0 /* String */),
|
|
4270
5129
|
];
|
|
4271
|
-
const getOutputLanguages_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$
|
|
4272
|
-
const createResourceParams$
|
|
5130
|
+
const getOutputLanguages_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$4, getOutputLanguages_ConfigPropertyMetadata);
|
|
5131
|
+
const createResourceParams$4 = /*#__PURE__*/ createResourceParams$f(getOutputLanguages_ConfigPropertyMetadata);
|
|
4273
5132
|
function keyBuilder$4(luvio, config) {
|
|
4274
|
-
const resourceParams = createResourceParams$
|
|
5133
|
+
const resourceParams = createResourceParams$4(config);
|
|
4275
5134
|
return keyBuilder$5(luvio, resourceParams);
|
|
4276
5135
|
}
|
|
4277
|
-
function typeCheckConfig$
|
|
5136
|
+
function typeCheckConfig$4(untrustedConfig) {
|
|
4278
5137
|
const config = {};
|
|
4279
|
-
typeCheckConfig$
|
|
5138
|
+
typeCheckConfig$f(untrustedConfig, config, getOutputLanguages_ConfigPropertyMetadata);
|
|
4280
5139
|
return config;
|
|
4281
5140
|
}
|
|
4282
|
-
function validateAdapterConfig$
|
|
5141
|
+
function validateAdapterConfig$4(untrustedConfig, configPropertyNames) {
|
|
4283
5142
|
if (!untrustedIsObject(untrustedConfig)) {
|
|
4284
5143
|
return null;
|
|
4285
5144
|
}
|
|
4286
5145
|
if (process.env.NODE_ENV !== 'production') {
|
|
4287
5146
|
validateConfig(untrustedConfig, configPropertyNames);
|
|
4288
5147
|
}
|
|
4289
|
-
const config = typeCheckConfig$
|
|
5148
|
+
const config = typeCheckConfig$4(untrustedConfig);
|
|
4290
5149
|
if (!areRequiredParametersPresent(config, configPropertyNames)) {
|
|
4291
5150
|
return null;
|
|
4292
5151
|
}
|
|
4293
5152
|
return config;
|
|
4294
5153
|
}
|
|
4295
5154
|
function adapterFragment$2(luvio, config) {
|
|
4296
|
-
createResourceParams$
|
|
4297
|
-
return select$
|
|
5155
|
+
createResourceParams$4(config);
|
|
5156
|
+
return select$6();
|
|
4298
5157
|
}
|
|
4299
5158
|
function onFetchResponseSuccess$2(luvio, config, resourceParams, response) {
|
|
4300
|
-
const snapshot = ingestSuccess$
|
|
5159
|
+
const snapshot = ingestSuccess$4(luvio, resourceParams, response, {
|
|
4301
5160
|
config,
|
|
4302
|
-
resolve: () => buildNetworkSnapshot$
|
|
5161
|
+
resolve: () => buildNetworkSnapshot$4(luvio, config, snapshotRefreshOptions)
|
|
4303
5162
|
});
|
|
4304
5163
|
return luvio.storeBroadcast().then(() => snapshot);
|
|
4305
5164
|
}
|
|
4306
5165
|
function onFetchResponseError$2(luvio, config, resourceParams, response) {
|
|
4307
5166
|
const snapshot = ingestError$2(luvio, resourceParams, response, {
|
|
4308
5167
|
config,
|
|
4309
|
-
resolve: () => buildNetworkSnapshot$
|
|
5168
|
+
resolve: () => buildNetworkSnapshot$4(luvio, config, snapshotRefreshOptions)
|
|
4310
5169
|
});
|
|
4311
5170
|
return luvio.storeBroadcast().then(() => snapshot);
|
|
4312
5171
|
}
|
|
4313
|
-
function buildNetworkSnapshot$
|
|
4314
|
-
const resourceParams = createResourceParams$
|
|
4315
|
-
const request = createResourceRequest$
|
|
5172
|
+
function buildNetworkSnapshot$4(luvio, config, options) {
|
|
5173
|
+
const resourceParams = createResourceParams$4(config);
|
|
5174
|
+
const request = createResourceRequest$4(resourceParams);
|
|
4316
5175
|
return luvio.dispatchResourceRequest(request, options)
|
|
4317
5176
|
.then((response) => {
|
|
4318
5177
|
return luvio.handleSuccessResponse(() => onFetchResponseSuccess$2(luvio, config, resourceParams, response), () => {
|
|
4319
5178
|
const cache = new StoreKeyMap();
|
|
4320
|
-
getResponseCacheKeys$
|
|
5179
|
+
getResponseCacheKeys$4(cache, luvio, resourceParams, response.body);
|
|
4321
5180
|
return cache;
|
|
4322
5181
|
});
|
|
4323
5182
|
}, (response) => {
|
|
@@ -4325,7 +5184,7 @@ function buildNetworkSnapshot$3(luvio, config, options) {
|
|
|
4325
5184
|
});
|
|
4326
5185
|
}
|
|
4327
5186
|
function buildNetworkSnapshotCachePolicy$2(context, coercedAdapterRequestContext) {
|
|
4328
|
-
return buildNetworkSnapshotCachePolicy$
|
|
5187
|
+
return buildNetworkSnapshotCachePolicy$8(context, coercedAdapterRequestContext, buildNetworkSnapshot$4, undefined, false);
|
|
4329
5188
|
}
|
|
4330
5189
|
function buildCachedSnapshotCachePolicy$2(context, storeLookup) {
|
|
4331
5190
|
const { luvio, config } = context;
|
|
@@ -4336,12 +5195,12 @@ function buildCachedSnapshotCachePolicy$2(context, storeLookup) {
|
|
|
4336
5195
|
};
|
|
4337
5196
|
const cacheSnapshot = storeLookup(selector, {
|
|
4338
5197
|
config,
|
|
4339
|
-
resolve: () => buildNetworkSnapshot$
|
|
5198
|
+
resolve: () => buildNetworkSnapshot$4(luvio, config, snapshotRefreshOptions)
|
|
4340
5199
|
});
|
|
4341
5200
|
return cacheSnapshot;
|
|
4342
5201
|
}
|
|
4343
5202
|
const getOutputLanguagesAdapterFactory = (luvio) => function EinsteinLLM__getOutputLanguages(untrustedConfig, requestContext) {
|
|
4344
|
-
const config = validateAdapterConfig$
|
|
5203
|
+
const config = validateAdapterConfig$4(untrustedConfig, getOutputLanguages_ConfigPropertyNames);
|
|
4345
5204
|
// Invalid or incomplete config
|
|
4346
5205
|
if (config === null) {
|
|
4347
5206
|
return null;
|
|
@@ -4483,7 +5342,7 @@ const RepresentationType$1 = 'EinsteinPromptRecordRepresentation';
|
|
|
4483
5342
|
function normalize$1(input, existing, path, luvio, store, timestamp) {
|
|
4484
5343
|
return input;
|
|
4485
5344
|
}
|
|
4486
|
-
const select$
|
|
5345
|
+
const select$5 = function EinsteinPromptRecordRepresentationSelect() {
|
|
4487
5346
|
return {
|
|
4488
5347
|
kind: 'Fragment',
|
|
4489
5348
|
version: VERSION$1,
|
|
@@ -4519,22 +5378,22 @@ function getTypeCacheKeys$1(rootKeySet, luvio, input, fullPathFactory) {
|
|
|
4519
5378
|
});
|
|
4520
5379
|
}
|
|
4521
5380
|
|
|
4522
|
-
function select$
|
|
4523
|
-
return select$
|
|
5381
|
+
function select$4(luvio, params) {
|
|
5382
|
+
return select$5();
|
|
4524
5383
|
}
|
|
4525
5384
|
function keyBuilder$3(luvio, params) {
|
|
4526
5385
|
return keyPrefix + '::EinsteinPromptRecordRepresentation:(' + 'versionId:' + params.queryParams.versionId + ',' + 'promptTemplateDevName:' + params.urlParams.promptTemplateDevName + ')';
|
|
4527
5386
|
}
|
|
4528
|
-
function getResponseCacheKeys$
|
|
5387
|
+
function getResponseCacheKeys$3(storeKeyMap, luvio, resourceParams, response) {
|
|
4529
5388
|
getTypeCacheKeys$1(storeKeyMap, luvio, response, () => keyBuilder$3(luvio, resourceParams));
|
|
4530
5389
|
}
|
|
4531
|
-
function ingestSuccess$
|
|
5390
|
+
function ingestSuccess$3(luvio, resourceParams, response, snapshotRefresh) {
|
|
4532
5391
|
const { body } = response;
|
|
4533
5392
|
const key = keyBuilder$3(luvio, resourceParams);
|
|
4534
5393
|
luvio.storeIngest(key, ingest$1, body);
|
|
4535
5394
|
const snapshot = luvio.storeLookup({
|
|
4536
5395
|
recordId: key,
|
|
4537
|
-
node: select$
|
|
5396
|
+
node: select$4(),
|
|
4538
5397
|
variables: {},
|
|
4539
5398
|
}, snapshotRefresh);
|
|
4540
5399
|
if (process.env.NODE_ENV !== 'production') {
|
|
@@ -4557,10 +5416,10 @@ function ingestError$1(luvio, params, error, snapshotRefresh) {
|
|
|
4557
5416
|
luvio.storeIngestError(key, errorSnapshot, storeMetadataParams);
|
|
4558
5417
|
return errorSnapshot;
|
|
4559
5418
|
}
|
|
4560
|
-
function createResourceRequest$
|
|
5419
|
+
function createResourceRequest$3(config) {
|
|
4561
5420
|
const headers = {};
|
|
4562
5421
|
return {
|
|
4563
|
-
baseUri: '/services/data/
|
|
5422
|
+
baseUri: '/services/data/v66.0',
|
|
4564
5423
|
basePath: '/einstein/prompt-templates/' + config.urlParams.promptTemplateDevName + '',
|
|
4565
5424
|
method: 'get',
|
|
4566
5425
|
body: null,
|
|
@@ -4571,61 +5430,61 @@ function createResourceRequest$2(config) {
|
|
|
4571
5430
|
};
|
|
4572
5431
|
}
|
|
4573
5432
|
|
|
4574
|
-
const adapterName$
|
|
5433
|
+
const adapterName$3 = 'getPromptTemplate';
|
|
4575
5434
|
const getPromptTemplate_ConfigPropertyMetadata = [
|
|
4576
5435
|
generateParamConfigMetadata('promptTemplateDevName', true, 0 /* UrlParameter */, 0 /* String */),
|
|
4577
5436
|
generateParamConfigMetadata('versionId', false, 1 /* QueryParameter */, 0 /* String */),
|
|
4578
5437
|
];
|
|
4579
|
-
const getPromptTemplate_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$
|
|
4580
|
-
const createResourceParams$
|
|
5438
|
+
const getPromptTemplate_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$3, getPromptTemplate_ConfigPropertyMetadata);
|
|
5439
|
+
const createResourceParams$3 = /*#__PURE__*/ createResourceParams$f(getPromptTemplate_ConfigPropertyMetadata);
|
|
4581
5440
|
function keyBuilder$2(luvio, config) {
|
|
4582
|
-
const resourceParams = createResourceParams$
|
|
5441
|
+
const resourceParams = createResourceParams$3(config);
|
|
4583
5442
|
return keyBuilder$3(luvio, resourceParams);
|
|
4584
5443
|
}
|
|
4585
|
-
function typeCheckConfig$
|
|
5444
|
+
function typeCheckConfig$3(untrustedConfig) {
|
|
4586
5445
|
const config = {};
|
|
4587
|
-
typeCheckConfig$
|
|
5446
|
+
typeCheckConfig$f(untrustedConfig, config, getPromptTemplate_ConfigPropertyMetadata);
|
|
4588
5447
|
return config;
|
|
4589
5448
|
}
|
|
4590
|
-
function validateAdapterConfig$
|
|
5449
|
+
function validateAdapterConfig$3(untrustedConfig, configPropertyNames) {
|
|
4591
5450
|
if (!untrustedIsObject(untrustedConfig)) {
|
|
4592
5451
|
return null;
|
|
4593
5452
|
}
|
|
4594
5453
|
if (process.env.NODE_ENV !== 'production') {
|
|
4595
5454
|
validateConfig(untrustedConfig, configPropertyNames);
|
|
4596
5455
|
}
|
|
4597
|
-
const config = typeCheckConfig$
|
|
5456
|
+
const config = typeCheckConfig$3(untrustedConfig);
|
|
4598
5457
|
if (!areRequiredParametersPresent(config, configPropertyNames)) {
|
|
4599
5458
|
return null;
|
|
4600
5459
|
}
|
|
4601
5460
|
return config;
|
|
4602
5461
|
}
|
|
4603
5462
|
function adapterFragment$1(luvio, config) {
|
|
4604
|
-
createResourceParams$
|
|
4605
|
-
return select$
|
|
5463
|
+
createResourceParams$3(config);
|
|
5464
|
+
return select$4();
|
|
4606
5465
|
}
|
|
4607
5466
|
function onFetchResponseSuccess$1(luvio, config, resourceParams, response) {
|
|
4608
|
-
const snapshot = ingestSuccess$
|
|
5467
|
+
const snapshot = ingestSuccess$3(luvio, resourceParams, response, {
|
|
4609
5468
|
config,
|
|
4610
|
-
resolve: () => buildNetworkSnapshot$
|
|
5469
|
+
resolve: () => buildNetworkSnapshot$3(luvio, config, snapshotRefreshOptions)
|
|
4611
5470
|
});
|
|
4612
5471
|
return luvio.storeBroadcast().then(() => snapshot);
|
|
4613
5472
|
}
|
|
4614
5473
|
function onFetchResponseError$1(luvio, config, resourceParams, response) {
|
|
4615
5474
|
const snapshot = ingestError$1(luvio, resourceParams, response, {
|
|
4616
5475
|
config,
|
|
4617
|
-
resolve: () => buildNetworkSnapshot$
|
|
5476
|
+
resolve: () => buildNetworkSnapshot$3(luvio, config, snapshotRefreshOptions)
|
|
4618
5477
|
});
|
|
4619
5478
|
return luvio.storeBroadcast().then(() => snapshot);
|
|
4620
5479
|
}
|
|
4621
|
-
function buildNetworkSnapshot$
|
|
4622
|
-
const resourceParams = createResourceParams$
|
|
4623
|
-
const request = createResourceRequest$
|
|
5480
|
+
function buildNetworkSnapshot$3(luvio, config, options) {
|
|
5481
|
+
const resourceParams = createResourceParams$3(config);
|
|
5482
|
+
const request = createResourceRequest$3(resourceParams);
|
|
4624
5483
|
return luvio.dispatchResourceRequest(request, options)
|
|
4625
5484
|
.then((response) => {
|
|
4626
5485
|
return luvio.handleSuccessResponse(() => onFetchResponseSuccess$1(luvio, config, resourceParams, response), () => {
|
|
4627
5486
|
const cache = new StoreKeyMap();
|
|
4628
|
-
getResponseCacheKeys$
|
|
5487
|
+
getResponseCacheKeys$3(cache, luvio, resourceParams, response.body);
|
|
4629
5488
|
return cache;
|
|
4630
5489
|
});
|
|
4631
5490
|
}, (response) => {
|
|
@@ -4633,7 +5492,7 @@ function buildNetworkSnapshot$2(luvio, config, options) {
|
|
|
4633
5492
|
});
|
|
4634
5493
|
}
|
|
4635
5494
|
function buildNetworkSnapshotCachePolicy$1(context, coercedAdapterRequestContext) {
|
|
4636
|
-
return buildNetworkSnapshotCachePolicy$
|
|
5495
|
+
return buildNetworkSnapshotCachePolicy$8(context, coercedAdapterRequestContext, buildNetworkSnapshot$3, undefined, false);
|
|
4637
5496
|
}
|
|
4638
5497
|
function buildCachedSnapshotCachePolicy$1(context, storeLookup) {
|
|
4639
5498
|
const { luvio, config } = context;
|
|
@@ -4644,12 +5503,12 @@ function buildCachedSnapshotCachePolicy$1(context, storeLookup) {
|
|
|
4644
5503
|
};
|
|
4645
5504
|
const cacheSnapshot = storeLookup(selector, {
|
|
4646
5505
|
config,
|
|
4647
|
-
resolve: () => buildNetworkSnapshot$
|
|
5506
|
+
resolve: () => buildNetworkSnapshot$3(luvio, config, snapshotRefreshOptions)
|
|
4648
5507
|
});
|
|
4649
5508
|
return cacheSnapshot;
|
|
4650
5509
|
}
|
|
4651
5510
|
const getPromptTemplateAdapterFactory = (luvio) => function EinsteinLLM__getPromptTemplate(untrustedConfig, requestContext) {
|
|
4652
|
-
const config = validateAdapterConfig$
|
|
5511
|
+
const config = validateAdapterConfig$3(untrustedConfig, getPromptTemplate_ConfigPropertyNames);
|
|
4653
5512
|
// Invalid or incomplete config
|
|
4654
5513
|
if (config === null) {
|
|
4655
5514
|
return null;
|
|
@@ -4699,7 +5558,7 @@ const RepresentationType = 'EinsteinPromptRecordCollectionOutputRepresentation';
|
|
|
4699
5558
|
function normalize(input, existing, path, luvio, store, timestamp) {
|
|
4700
5559
|
return input;
|
|
4701
5560
|
}
|
|
4702
|
-
const select$
|
|
5561
|
+
const select$3 = function EinsteinPromptRecordCollectionOutputRepresentationSelect() {
|
|
4703
5562
|
return {
|
|
4704
5563
|
kind: 'Fragment',
|
|
4705
5564
|
version: VERSION,
|
|
@@ -4735,22 +5594,22 @@ function getTypeCacheKeys(rootKeySet, luvio, input, fullPathFactory) {
|
|
|
4735
5594
|
});
|
|
4736
5595
|
}
|
|
4737
5596
|
|
|
4738
|
-
function select$
|
|
4739
|
-
return select$
|
|
5597
|
+
function select$2(luvio, params) {
|
|
5598
|
+
return select$3();
|
|
4740
5599
|
}
|
|
4741
5600
|
function keyBuilder$1(luvio, params) {
|
|
4742
5601
|
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
5602
|
}
|
|
4744
|
-
function getResponseCacheKeys$
|
|
5603
|
+
function getResponseCacheKeys$2(storeKeyMap, luvio, resourceParams, response) {
|
|
4745
5604
|
getTypeCacheKeys(storeKeyMap, luvio, response, () => keyBuilder$1(luvio, resourceParams));
|
|
4746
5605
|
}
|
|
4747
|
-
function ingestSuccess$
|
|
5606
|
+
function ingestSuccess$2(luvio, resourceParams, response, snapshotRefresh) {
|
|
4748
5607
|
const { body } = response;
|
|
4749
5608
|
const key = keyBuilder$1(luvio, resourceParams);
|
|
4750
5609
|
luvio.storeIngest(key, ingest, body);
|
|
4751
5610
|
const snapshot = luvio.storeLookup({
|
|
4752
5611
|
recordId: key,
|
|
4753
|
-
node: select$
|
|
5612
|
+
node: select$2(),
|
|
4754
5613
|
variables: {},
|
|
4755
5614
|
}, snapshotRefresh);
|
|
4756
5615
|
if (process.env.NODE_ENV !== 'production') {
|
|
@@ -4773,10 +5632,10 @@ function ingestError(luvio, params, error, snapshotRefresh) {
|
|
|
4773
5632
|
luvio.storeIngestError(key, errorSnapshot, storeMetadataParams);
|
|
4774
5633
|
return errorSnapshot;
|
|
4775
5634
|
}
|
|
4776
|
-
function createResourceRequest$
|
|
5635
|
+
function createResourceRequest$2(config) {
|
|
4777
5636
|
const headers = {};
|
|
4778
5637
|
return {
|
|
4779
|
-
baseUri: '/services/data/
|
|
5638
|
+
baseUri: '/services/data/v66.0',
|
|
4780
5639
|
basePath: '/einstein/prompt-templates',
|
|
4781
5640
|
method: 'get',
|
|
4782
5641
|
body: null,
|
|
@@ -4787,7 +5646,7 @@ function createResourceRequest$1(config) {
|
|
|
4787
5646
|
};
|
|
4788
5647
|
}
|
|
4789
5648
|
|
|
4790
|
-
const adapterName$
|
|
5649
|
+
const adapterName$2 = 'getPromptTemplates';
|
|
4791
5650
|
const getPromptTemplates_ConfigPropertyMetadata = [
|
|
4792
5651
|
generateParamConfigMetadata('isActive', false, 1 /* QueryParameter */, 1 /* Boolean */),
|
|
4793
5652
|
generateParamConfigMetadata('fields', false, 1 /* QueryParameter */, 0 /* String */, true),
|
|
@@ -4798,56 +5657,56 @@ const getPromptTemplates_ConfigPropertyMetadata = [
|
|
|
4798
5657
|
generateParamConfigMetadata('query', false, 1 /* QueryParameter */, 0 /* String */),
|
|
4799
5658
|
generateParamConfigMetadata('sortBy', false, 1 /* QueryParameter */, 0 /* String */),
|
|
4800
5659
|
];
|
|
4801
|
-
const getPromptTemplates_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$
|
|
4802
|
-
const createResourceParams$
|
|
5660
|
+
const getPromptTemplates_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$2, getPromptTemplates_ConfigPropertyMetadata);
|
|
5661
|
+
const createResourceParams$2 = /*#__PURE__*/ createResourceParams$f(getPromptTemplates_ConfigPropertyMetadata);
|
|
4803
5662
|
function keyBuilder(luvio, config) {
|
|
4804
|
-
const resourceParams = createResourceParams$
|
|
5663
|
+
const resourceParams = createResourceParams$2(config);
|
|
4805
5664
|
return keyBuilder$1(luvio, resourceParams);
|
|
4806
5665
|
}
|
|
4807
|
-
function typeCheckConfig$
|
|
5666
|
+
function typeCheckConfig$2(untrustedConfig) {
|
|
4808
5667
|
const config = {};
|
|
4809
|
-
typeCheckConfig$
|
|
5668
|
+
typeCheckConfig$f(untrustedConfig, config, getPromptTemplates_ConfigPropertyMetadata);
|
|
4810
5669
|
return config;
|
|
4811
5670
|
}
|
|
4812
|
-
function validateAdapterConfig$
|
|
5671
|
+
function validateAdapterConfig$2(untrustedConfig, configPropertyNames) {
|
|
4813
5672
|
if (!untrustedIsObject(untrustedConfig)) {
|
|
4814
5673
|
return null;
|
|
4815
5674
|
}
|
|
4816
5675
|
if (process.env.NODE_ENV !== 'production') {
|
|
4817
5676
|
validateConfig(untrustedConfig, configPropertyNames);
|
|
4818
5677
|
}
|
|
4819
|
-
const config = typeCheckConfig$
|
|
5678
|
+
const config = typeCheckConfig$2(untrustedConfig);
|
|
4820
5679
|
if (!areRequiredParametersPresent(config, configPropertyNames)) {
|
|
4821
5680
|
return null;
|
|
4822
5681
|
}
|
|
4823
5682
|
return config;
|
|
4824
5683
|
}
|
|
4825
5684
|
function adapterFragment(luvio, config) {
|
|
4826
|
-
createResourceParams$
|
|
4827
|
-
return select$
|
|
5685
|
+
createResourceParams$2(config);
|
|
5686
|
+
return select$2();
|
|
4828
5687
|
}
|
|
4829
5688
|
function onFetchResponseSuccess(luvio, config, resourceParams, response) {
|
|
4830
|
-
const snapshot = ingestSuccess$
|
|
5689
|
+
const snapshot = ingestSuccess$2(luvio, resourceParams, response, {
|
|
4831
5690
|
config,
|
|
4832
|
-
resolve: () => buildNetworkSnapshot$
|
|
5691
|
+
resolve: () => buildNetworkSnapshot$2(luvio, config, snapshotRefreshOptions)
|
|
4833
5692
|
});
|
|
4834
5693
|
return luvio.storeBroadcast().then(() => snapshot);
|
|
4835
5694
|
}
|
|
4836
5695
|
function onFetchResponseError(luvio, config, resourceParams, response) {
|
|
4837
5696
|
const snapshot = ingestError(luvio, resourceParams, response, {
|
|
4838
5697
|
config,
|
|
4839
|
-
resolve: () => buildNetworkSnapshot$
|
|
5698
|
+
resolve: () => buildNetworkSnapshot$2(luvio, config, snapshotRefreshOptions)
|
|
4840
5699
|
});
|
|
4841
5700
|
return luvio.storeBroadcast().then(() => snapshot);
|
|
4842
5701
|
}
|
|
4843
|
-
function buildNetworkSnapshot$
|
|
4844
|
-
const resourceParams = createResourceParams$
|
|
4845
|
-
const request = createResourceRequest$
|
|
5702
|
+
function buildNetworkSnapshot$2(luvio, config, options) {
|
|
5703
|
+
const resourceParams = createResourceParams$2(config);
|
|
5704
|
+
const request = createResourceRequest$2(resourceParams);
|
|
4846
5705
|
return luvio.dispatchResourceRequest(request, options)
|
|
4847
5706
|
.then((response) => {
|
|
4848
5707
|
return luvio.handleSuccessResponse(() => onFetchResponseSuccess(luvio, config, resourceParams, response), () => {
|
|
4849
5708
|
const cache = new StoreKeyMap();
|
|
4850
|
-
getResponseCacheKeys$
|
|
5709
|
+
getResponseCacheKeys$2(cache, luvio, resourceParams, response.body);
|
|
4851
5710
|
return cache;
|
|
4852
5711
|
});
|
|
4853
5712
|
}, (response) => {
|
|
@@ -4855,7 +5714,7 @@ function buildNetworkSnapshot$1(luvio, config, options) {
|
|
|
4855
5714
|
});
|
|
4856
5715
|
}
|
|
4857
5716
|
function buildNetworkSnapshotCachePolicy(context, coercedAdapterRequestContext) {
|
|
4858
|
-
return buildNetworkSnapshotCachePolicy$
|
|
5717
|
+
return buildNetworkSnapshotCachePolicy$8(context, coercedAdapterRequestContext, buildNetworkSnapshot$2, undefined, false);
|
|
4859
5718
|
}
|
|
4860
5719
|
function buildCachedSnapshotCachePolicy(context, storeLookup) {
|
|
4861
5720
|
const { luvio, config } = context;
|
|
@@ -4866,12 +5725,12 @@ function buildCachedSnapshotCachePolicy(context, storeLookup) {
|
|
|
4866
5725
|
};
|
|
4867
5726
|
const cacheSnapshot = storeLookup(selector, {
|
|
4868
5727
|
config,
|
|
4869
|
-
resolve: () => buildNetworkSnapshot$
|
|
5728
|
+
resolve: () => buildNetworkSnapshot$2(luvio, config, snapshotRefreshOptions)
|
|
4870
5729
|
});
|
|
4871
5730
|
return cacheSnapshot;
|
|
4872
5731
|
}
|
|
4873
5732
|
const getPromptTemplatesAdapterFactory = (luvio) => function EinsteinLLM__getPromptTemplates(untrustedConfig, requestContext) {
|
|
4874
|
-
const config = validateAdapterConfig$
|
|
5733
|
+
const config = validateAdapterConfig$2(untrustedConfig, getPromptTemplates_ConfigPropertyNames);
|
|
4875
5734
|
// Invalid or incomplete config
|
|
4876
5735
|
if (config === null) {
|
|
4877
5736
|
return null;
|
|
@@ -4880,16 +5739,109 @@ const getPromptTemplatesAdapterFactory = (luvio) => function EinsteinLLM__getPro
|
|
|
4880
5739
|
buildCachedSnapshotCachePolicy, buildNetworkSnapshotCachePolicy);
|
|
4881
5740
|
};
|
|
4882
5741
|
|
|
5742
|
+
function select$1(luvio, params) {
|
|
5743
|
+
return select$j();
|
|
5744
|
+
}
|
|
5745
|
+
function getResponseCacheKeys$1(storeKeyMap, luvio, resourceParams, response) {
|
|
5746
|
+
getTypeCacheKeys$6(storeKeyMap, luvio, response);
|
|
5747
|
+
}
|
|
5748
|
+
function ingestSuccess$1(luvio, resourceParams, response) {
|
|
5749
|
+
const { body } = response;
|
|
5750
|
+
const key = keyBuilderFromType(luvio, body);
|
|
5751
|
+
luvio.storeIngest(key, ingest$6, body);
|
|
5752
|
+
const snapshot = luvio.storeLookup({
|
|
5753
|
+
recordId: key,
|
|
5754
|
+
node: select$1(),
|
|
5755
|
+
variables: {},
|
|
5756
|
+
});
|
|
5757
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
5758
|
+
if (snapshot.state !== 'Fulfilled') {
|
|
5759
|
+
throw new Error('Invalid network response. Expected resource response to result in Fulfilled snapshot');
|
|
5760
|
+
}
|
|
5761
|
+
}
|
|
5762
|
+
deepFreeze(snapshot.data);
|
|
5763
|
+
return snapshot;
|
|
5764
|
+
}
|
|
5765
|
+
function createResourceRequest$1(config) {
|
|
5766
|
+
const headers = {};
|
|
5767
|
+
return {
|
|
5768
|
+
baseUri: '/services/data/v66.0',
|
|
5769
|
+
basePath: '/einstein/prompt-templates/' + config.urlParams.promptTemplateDevName + '/versions/' + config.urlParams.versionId + '/status',
|
|
5770
|
+
method: 'put',
|
|
5771
|
+
body: null,
|
|
5772
|
+
urlParams: config.urlParams,
|
|
5773
|
+
queryParams: config.queryParams,
|
|
5774
|
+
headers,
|
|
5775
|
+
priority: 'normal',
|
|
5776
|
+
};
|
|
5777
|
+
}
|
|
5778
|
+
|
|
5779
|
+
const adapterName$1 = 'putEinsteinPromptTemplateVersionStatus';
|
|
5780
|
+
const putEinsteinPromptTemplateVersionStatus_ConfigPropertyMetadata = [
|
|
5781
|
+
generateParamConfigMetadata('promptTemplateDevName', true, 0 /* UrlParameter */, 0 /* String */),
|
|
5782
|
+
generateParamConfigMetadata('versionId', true, 0 /* UrlParameter */, 0 /* String */),
|
|
5783
|
+
generateParamConfigMetadata('action', false, 1 /* QueryParameter */, 0 /* String */),
|
|
5784
|
+
generateParamConfigMetadata('ignoreWarnings', false, 1 /* QueryParameter */, 1 /* Boolean */),
|
|
5785
|
+
];
|
|
5786
|
+
const putEinsteinPromptTemplateVersionStatus_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$1, putEinsteinPromptTemplateVersionStatus_ConfigPropertyMetadata);
|
|
5787
|
+
const createResourceParams$1 = /*#__PURE__*/ createResourceParams$f(putEinsteinPromptTemplateVersionStatus_ConfigPropertyMetadata);
|
|
5788
|
+
function typeCheckConfig$1(untrustedConfig) {
|
|
5789
|
+
const config = {};
|
|
5790
|
+
typeCheckConfig$f(untrustedConfig, config, putEinsteinPromptTemplateVersionStatus_ConfigPropertyMetadata);
|
|
5791
|
+
return config;
|
|
5792
|
+
}
|
|
5793
|
+
function validateAdapterConfig$1(untrustedConfig, configPropertyNames) {
|
|
5794
|
+
if (!untrustedIsObject(untrustedConfig)) {
|
|
5795
|
+
return null;
|
|
5796
|
+
}
|
|
5797
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
5798
|
+
validateConfig(untrustedConfig, configPropertyNames);
|
|
5799
|
+
}
|
|
5800
|
+
const config = typeCheckConfig$1(untrustedConfig);
|
|
5801
|
+
if (!areRequiredParametersPresent(config, configPropertyNames)) {
|
|
5802
|
+
return null;
|
|
5803
|
+
}
|
|
5804
|
+
return config;
|
|
5805
|
+
}
|
|
5806
|
+
function buildNetworkSnapshot$1(luvio, config, options) {
|
|
5807
|
+
const resourceParams = createResourceParams$1(config);
|
|
5808
|
+
const request = createResourceRequest$1(resourceParams);
|
|
5809
|
+
return luvio.dispatchResourceRequest(request, options)
|
|
5810
|
+
.then((response) => {
|
|
5811
|
+
return luvio.handleSuccessResponse(() => {
|
|
5812
|
+
const snapshot = ingestSuccess$1(luvio, resourceParams, response);
|
|
5813
|
+
return luvio.storeBroadcast().then(() => snapshot);
|
|
5814
|
+
}, () => {
|
|
5815
|
+
const cache = new StoreKeyMap();
|
|
5816
|
+
getResponseCacheKeys$1(cache, luvio, resourceParams, response.body);
|
|
5817
|
+
return cache;
|
|
5818
|
+
});
|
|
5819
|
+
}, (response) => {
|
|
5820
|
+
deepFreeze(response);
|
|
5821
|
+
throw response;
|
|
5822
|
+
});
|
|
5823
|
+
}
|
|
5824
|
+
const putEinsteinPromptTemplateVersionStatusAdapterFactory = (luvio) => {
|
|
5825
|
+
return function putEinsteinPromptTemplateVersionStatus(untrustedConfig) {
|
|
5826
|
+
const config = validateAdapterConfig$1(untrustedConfig, putEinsteinPromptTemplateVersionStatus_ConfigPropertyNames);
|
|
5827
|
+
// Invalid or incomplete config
|
|
5828
|
+
if (config === null) {
|
|
5829
|
+
throw new Error('Invalid config for "putEinsteinPromptTemplateVersionStatus"');
|
|
5830
|
+
}
|
|
5831
|
+
return buildNetworkSnapshot$1(luvio, config);
|
|
5832
|
+
};
|
|
5833
|
+
};
|
|
5834
|
+
|
|
4883
5835
|
function select(luvio, params) {
|
|
4884
|
-
return select$
|
|
5836
|
+
return select$j();
|
|
4885
5837
|
}
|
|
4886
5838
|
function getResponseCacheKeys(storeKeyMap, luvio, resourceParams, response) {
|
|
4887
|
-
getTypeCacheKeys$
|
|
5839
|
+
getTypeCacheKeys$6(storeKeyMap, luvio, response);
|
|
4888
5840
|
}
|
|
4889
5841
|
function ingestSuccess(luvio, resourceParams, response) {
|
|
4890
5842
|
const { body } = response;
|
|
4891
5843
|
const key = keyBuilderFromType(luvio, body);
|
|
4892
|
-
luvio.storeIngest(key, ingest$
|
|
5844
|
+
luvio.storeIngest(key, ingest$6, body);
|
|
4893
5845
|
const snapshot = luvio.storeLookup({
|
|
4894
5846
|
recordId: key,
|
|
4895
5847
|
node: select(),
|
|
@@ -4906,7 +5858,7 @@ function ingestSuccess(luvio, resourceParams, response) {
|
|
|
4906
5858
|
function createResourceRequest(config) {
|
|
4907
5859
|
const headers = {};
|
|
4908
5860
|
return {
|
|
4909
|
-
baseUri: '/services/data/
|
|
5861
|
+
baseUri: '/services/data/v66.0',
|
|
4910
5862
|
basePath: '/einstein/prompt-templates/' + config.urlParams.promptTemplateDevName + '/versions/' + config.urlParams.versionId + '',
|
|
4911
5863
|
method: 'put',
|
|
4912
5864
|
body: config.body,
|
|
@@ -4928,10 +5880,10 @@ const updatePromptTemplateVersion_ConfigPropertyMetadata = [
|
|
|
4928
5880
|
generateParamConfigMetadata('isStandard', true, 2 /* Body */, 1 /* Boolean */),
|
|
4929
5881
|
];
|
|
4930
5882
|
const updatePromptTemplateVersion_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName, updatePromptTemplateVersion_ConfigPropertyMetadata);
|
|
4931
|
-
const createResourceParams = /*#__PURE__*/ createResourceParams$
|
|
5883
|
+
const createResourceParams = /*#__PURE__*/ createResourceParams$f(updatePromptTemplateVersion_ConfigPropertyMetadata);
|
|
4932
5884
|
function typeCheckConfig(untrustedConfig) {
|
|
4933
5885
|
const config = {};
|
|
4934
|
-
typeCheckConfig$
|
|
5886
|
+
typeCheckConfig$f(untrustedConfig, config, updatePromptTemplateVersion_ConfigPropertyMetadata);
|
|
4935
5887
|
const untrustedConfig_childRelationships = untrustedConfig.childRelationships;
|
|
4936
5888
|
if (untrustedIsObject(untrustedConfig_childRelationships)) {
|
|
4937
5889
|
const untrustedConfig_childRelationships_object = {};
|
|
@@ -5019,19 +5971,37 @@ let createGenerations;
|
|
|
5019
5971
|
let createGenerationsForPromptTemplate;
|
|
5020
5972
|
let createPromptTemplate;
|
|
5021
5973
|
let createPromptTemplateVersion;
|
|
5974
|
+
let getDataProviderInstanceConfig;
|
|
5975
|
+
let getDataProviderTypeConfigs;
|
|
5976
|
+
let getDataProviders;
|
|
5022
5977
|
let getInputMappedDataProviders;
|
|
5023
5978
|
let getOutputLanguages;
|
|
5024
5979
|
let getPromptTemplate;
|
|
5025
5980
|
let getPromptTemplates;
|
|
5981
|
+
let putEinsteinPromptTemplateVersionStatus;
|
|
5026
5982
|
let updatePromptTemplateVersion;
|
|
5027
5983
|
// Imperative GET Adapters
|
|
5028
5984
|
let createEmbeddings_imperative;
|
|
5985
|
+
let getDataProviderInstanceConfig_imperative;
|
|
5986
|
+
let getDataProviderTypeConfigs_imperative;
|
|
5987
|
+
let getDataProviders_imperative;
|
|
5029
5988
|
let getInputMappedDataProviders_imperative;
|
|
5030
5989
|
let getOutputLanguages_imperative;
|
|
5031
5990
|
let getPromptTemplate_imperative;
|
|
5032
5991
|
let getPromptTemplates_imperative;
|
|
5033
5992
|
// Adapter Metadata
|
|
5034
5993
|
const createEmbeddingsMetadata = { apiFamily: 'EinsteinLLM', name: 'createEmbeddings', ttl: 100 };
|
|
5994
|
+
const getDataProviderInstanceConfigMetadata = {
|
|
5995
|
+
apiFamily: 'EinsteinLLM',
|
|
5996
|
+
name: 'getDataProviderInstanceConfig',
|
|
5997
|
+
ttl: 300,
|
|
5998
|
+
};
|
|
5999
|
+
const getDataProviderTypeConfigsMetadata = {
|
|
6000
|
+
apiFamily: 'EinsteinLLM',
|
|
6001
|
+
name: 'getDataProviderTypeConfigs',
|
|
6002
|
+
ttl: 300,
|
|
6003
|
+
};
|
|
6004
|
+
const getDataProvidersMetadata = { apiFamily: 'EinsteinLLM', name: 'getDataProviders', ttl: 300 };
|
|
5035
6005
|
const getInputMappedDataProvidersMetadata = {
|
|
5036
6006
|
apiFamily: 'EinsteinLLM',
|
|
5037
6007
|
name: 'getInputMappedDataProviders',
|
|
@@ -5052,6 +6022,9 @@ const getPromptTemplatesMetadata = {
|
|
|
5052
6022
|
function bindExportsTo(luvio) {
|
|
5053
6023
|
// LDS Adapters
|
|
5054
6024
|
const createEmbeddings_ldsAdapter = createInstrumentedAdapter(createLDSAdapter(luvio, 'createEmbeddings', createEmbeddingsAdapterFactory), createEmbeddingsMetadata);
|
|
6025
|
+
const getDataProviderInstanceConfig_ldsAdapter = createInstrumentedAdapter(createLDSAdapter(luvio, 'getDataProviderInstanceConfig', getDataProviderInstanceConfigAdapterFactory), getDataProviderInstanceConfigMetadata);
|
|
6026
|
+
const getDataProviderTypeConfigs_ldsAdapter = createInstrumentedAdapter(createLDSAdapter(luvio, 'getDataProviderTypeConfigs', getDataProviderTypeConfigsAdapterFactory), getDataProviderTypeConfigsMetadata);
|
|
6027
|
+
const getDataProviders_ldsAdapter = createInstrumentedAdapter(createLDSAdapter(luvio, 'getDataProviders', getDataProvidersAdapterFactory), getDataProvidersMetadata);
|
|
5055
6028
|
const getInputMappedDataProviders_ldsAdapter = createInstrumentedAdapter(createLDSAdapter(luvio, 'getInputMappedDataProviders', getInputMappedDataProvidersAdapterFactory), getInputMappedDataProvidersMetadata);
|
|
5056
6029
|
const getOutputLanguages_ldsAdapter = createInstrumentedAdapter(createLDSAdapter(luvio, 'getOutputLanguages', getOutputLanguagesAdapterFactory), getOutputLanguagesMetadata);
|
|
5057
6030
|
const getPromptTemplate_ldsAdapter = createInstrumentedAdapter(createLDSAdapter(luvio, 'getPromptTemplate', getPromptTemplateAdapterFactory), getPromptTemplateMetadata);
|
|
@@ -5067,13 +6040,20 @@ function bindExportsTo(luvio) {
|
|
|
5067
6040
|
createGenerationsForPromptTemplate: unwrapSnapshotData(createGenerationsForPromptTemplateAdapterFactory),
|
|
5068
6041
|
createPromptTemplate: unwrapSnapshotData(createPromptTemplateAdapterFactory),
|
|
5069
6042
|
createPromptTemplateVersion: unwrapSnapshotData(createPromptTemplateVersionAdapterFactory),
|
|
6043
|
+
getDataProviderInstanceConfig: createWireAdapterConstructor(luvio, getDataProviderInstanceConfig_ldsAdapter, getDataProviderInstanceConfigMetadata),
|
|
6044
|
+
getDataProviderTypeConfigs: createWireAdapterConstructor(luvio, getDataProviderTypeConfigs_ldsAdapter, getDataProviderTypeConfigsMetadata),
|
|
6045
|
+
getDataProviders: createWireAdapterConstructor(luvio, getDataProviders_ldsAdapter, getDataProvidersMetadata),
|
|
5070
6046
|
getInputMappedDataProviders: createWireAdapterConstructor(luvio, getInputMappedDataProviders_ldsAdapter, getInputMappedDataProvidersMetadata),
|
|
5071
6047
|
getOutputLanguages: createWireAdapterConstructor(luvio, getOutputLanguages_ldsAdapter, getOutputLanguagesMetadata),
|
|
5072
6048
|
getPromptTemplate: createWireAdapterConstructor(luvio, getPromptTemplate_ldsAdapter, getPromptTemplateMetadata),
|
|
5073
6049
|
getPromptTemplates: createWireAdapterConstructor(luvio, getPromptTemplates_ldsAdapter, getPromptTemplatesMetadata),
|
|
6050
|
+
putEinsteinPromptTemplateVersionStatus: unwrapSnapshotData(putEinsteinPromptTemplateVersionStatusAdapterFactory),
|
|
5074
6051
|
updatePromptTemplateVersion: unwrapSnapshotData(updatePromptTemplateVersionAdapterFactory),
|
|
5075
6052
|
// Imperative GET Adapters
|
|
5076
6053
|
createEmbeddings_imperative: createImperativeAdapter(luvio, createEmbeddings_ldsAdapter, createEmbeddingsMetadata),
|
|
6054
|
+
getDataProviderInstanceConfig_imperative: createImperativeAdapter(luvio, getDataProviderInstanceConfig_ldsAdapter, getDataProviderInstanceConfigMetadata),
|
|
6055
|
+
getDataProviderTypeConfigs_imperative: createImperativeAdapter(luvio, getDataProviderTypeConfigs_ldsAdapter, getDataProviderTypeConfigsMetadata),
|
|
6056
|
+
getDataProviders_imperative: createImperativeAdapter(luvio, getDataProviders_ldsAdapter, getDataProvidersMetadata),
|
|
5077
6057
|
getInputMappedDataProviders_imperative: createImperativeAdapter(luvio, getInputMappedDataProviders_ldsAdapter, getInputMappedDataProvidersMetadata),
|
|
5078
6058
|
getOutputLanguages_imperative: createImperativeAdapter(luvio, getOutputLanguages_ldsAdapter, getOutputLanguagesMetadata),
|
|
5079
6059
|
getPromptTemplate_imperative: createImperativeAdapter(luvio, getPromptTemplate_ldsAdapter, getPromptTemplateMetadata),
|
|
@@ -5089,12 +6069,19 @@ withDefaultLuvio((luvio) => {
|
|
|
5089
6069
|
createGenerationsForPromptTemplate,
|
|
5090
6070
|
createPromptTemplate,
|
|
5091
6071
|
createPromptTemplateVersion,
|
|
6072
|
+
getDataProviderInstanceConfig,
|
|
6073
|
+
getDataProviderTypeConfigs,
|
|
6074
|
+
getDataProviders,
|
|
5092
6075
|
getInputMappedDataProviders,
|
|
5093
6076
|
getOutputLanguages,
|
|
5094
6077
|
getPromptTemplate,
|
|
5095
6078
|
getPromptTemplates,
|
|
6079
|
+
putEinsteinPromptTemplateVersionStatus,
|
|
5096
6080
|
updatePromptTemplateVersion,
|
|
5097
6081
|
createEmbeddings_imperative,
|
|
6082
|
+
getDataProviderInstanceConfig_imperative,
|
|
6083
|
+
getDataProviderTypeConfigs_imperative,
|
|
6084
|
+
getDataProviders_imperative,
|
|
5098
6085
|
getInputMappedDataProviders_imperative,
|
|
5099
6086
|
getOutputLanguages_imperative,
|
|
5100
6087
|
getPromptTemplate_imperative,
|
|
@@ -5102,5 +6089,5 @@ withDefaultLuvio((luvio) => {
|
|
|
5102
6089
|
} = bindExportsTo(luvio));
|
|
5103
6090
|
});
|
|
5104
6091
|
|
|
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.
|
|
6092
|
+
export { createEmbeddings, createEmbeddings_imperative, createFeedback, createGenerations, createGenerationsForPromptTemplate, createPromptTemplate, createPromptTemplateVersion, getDataProviderInstanceConfig, getDataProviderInstanceConfig_imperative, getDataProviderTypeConfigs, getDataProviderTypeConfigs_imperative, getDataProviders, getDataProviders_imperative, getInputMappedDataProviders, getInputMappedDataProviders_imperative, getOutputLanguages, getOutputLanguages_imperative, getPromptTemplate, getPromptTemplate_imperative, getPromptTemplates, getPromptTemplates_imperative, putEinsteinPromptTemplateVersionStatus, updatePromptTemplateVersion };
|
|
6093
|
+
// version: 1.385.0-c6070cc476
|