@salesforce/lds-adapters-service-einsteinllm 1.332.0-dev10 → 1.332.0-dev12
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 +523 -260
- package/dist/es/es2018/types/src/generated/adapters/getPromptTemplate.d.ts +28 -0
- package/dist/es/es2018/types/src/generated/artifacts/main.d.ts +1 -0
- package/dist/es/es2018/types/src/generated/artifacts/sfdc.d.ts +3 -1
- package/dist/es/es2018/types/src/generated/resources/getEinsteinPromptTemplatesByPromptTemplateDevName.d.ts +18 -0
- package/dist/es/es2018/types/src/generated/types/EinsteinPromptRecordCollectionOutputRepresentation.d.ts +3 -3
- package/dist/es/es2018/types/src/generated/types/EinsteinPromptRecordRepresentation.d.ts +5 -4
- package/dist/es/es2018/types/src/generated/types/EinsteinPromptTemplateAttachmentRepresentation.d.ts +37 -0
- package/dist/es/es2018/types/src/generated/types/EinsteinPromptTemplateGenerationsRepresentation.d.ts +4 -3
- package/package.json +4 -4
- package/sfdc/index.js +632 -361
- package/src/raml/api.raml +37 -3
- package/src/raml/luvio.raml +8 -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$4, StoreKeyMap, createResourceParams as createResourceParams$7, typeCheckConfig as typeCheckConfig$7 } 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$r(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$q(obj, path = 'EinsteinLlmEmbeddingsAdditionalConfigInputRepre
|
|
|
222
222
|
return v_error === undefined ? null : v_error;
|
|
223
223
|
}
|
|
224
224
|
|
|
225
|
-
function validate$
|
|
225
|
+
function validate$q(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$p(obj, path = 'WrappedListString') {
|
|
|
243
243
|
return v_error === undefined ? null : v_error;
|
|
244
244
|
}
|
|
245
245
|
|
|
246
|
-
function validate$
|
|
246
|
+
function validate$p(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$r(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$o(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$q(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$o(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$i = "5ed5ccc6fa6f15691ec0fc1080e41fe6";
|
|
279
|
+
function validate$o(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$n(obj, path = 'EinsteinLlmEmbeddingItemRepresentation') {
|
|
|
297
297
|
})();
|
|
298
298
|
return v_error === undefined ? null : v_error;
|
|
299
299
|
}
|
|
300
|
-
const select$
|
|
300
|
+
const select$p = function EinsteinLlmEmbeddingItemRepresentationSelect() {
|
|
301
301
|
return {
|
|
302
302
|
kind: 'Fragment',
|
|
303
|
-
version: VERSION$
|
|
303
|
+
version: VERSION$i,
|
|
304
304
|
private: [],
|
|
305
305
|
selections: [
|
|
306
306
|
{
|
|
@@ -315,7 +315,7 @@ const select$m = function EinsteinLlmEmbeddingItemRepresentationSelect() {
|
|
|
315
315
|
]
|
|
316
316
|
};
|
|
317
317
|
};
|
|
318
|
-
function equals$
|
|
318
|
+
function equals$i(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$g(existing, incoming) {
|
|
|
334
334
|
return true;
|
|
335
335
|
}
|
|
336
336
|
|
|
337
|
-
const TTL$
|
|
338
|
-
const VERSION$
|
|
339
|
-
function validate$
|
|
337
|
+
const TTL$6 = 100;
|
|
338
|
+
const VERSION$h = "d9873651f09d29764ef4d4231eb653d7";
|
|
339
|
+
function validate$n(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$m(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$o(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$m(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$6 = 'EinsteinLlmEmbeddingsRepresentation';
|
|
377
|
+
function normalize$6(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$o = function EinsteinLlmEmbeddingsRepresentationSelect() {
|
|
381
|
+
const { selections: EinsteinLlmEmbeddingItemRepresentation__selections, opaque: EinsteinLlmEmbeddingItemRepresentation__opaque, } = select$p();
|
|
382
382
|
return {
|
|
383
383
|
kind: 'Fragment',
|
|
384
|
-
version: VERSION$
|
|
384
|
+
version: VERSION$h,
|
|
385
385
|
private: [],
|
|
386
386
|
selections: [
|
|
387
387
|
{
|
|
@@ -398,11 +398,11 @@ const select$l = function EinsteinLlmEmbeddingsRepresentationSelect() {
|
|
|
398
398
|
]
|
|
399
399
|
};
|
|
400
400
|
};
|
|
401
|
-
function equals$
|
|
401
|
+
function equals$h(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$i(existing_embeddings_item, incoming_embeddings_item))) {
|
|
406
406
|
return false;
|
|
407
407
|
}
|
|
408
408
|
});
|
|
@@ -421,44 +421,44 @@ function equals$f(existing, incoming) {
|
|
|
421
421
|
}
|
|
422
422
|
return true;
|
|
423
423
|
}
|
|
424
|
-
const ingest$
|
|
424
|
+
const ingest$6 = function EinsteinLlmEmbeddingsRepresentationIngest(input, path, luvio, store, timestamp) {
|
|
425
425
|
if (process.env.NODE_ENV !== 'production') {
|
|
426
|
-
const validateError = validate$
|
|
426
|
+
const validateError = validate$n(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$6;
|
|
433
|
+
ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize$6, "EinsteinLLM", VERSION$h, RepresentationType$6, equals$h);
|
|
434
434
|
return createLink(key);
|
|
435
435
|
};
|
|
436
|
-
function getTypeCacheKeys$
|
|
436
|
+
function getTypeCacheKeys$6(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$6,
|
|
442
442
|
mergeable: false
|
|
443
443
|
});
|
|
444
444
|
}
|
|
445
445
|
|
|
446
|
-
function select$
|
|
447
|
-
return select$
|
|
446
|
+
function select$n(luvio, params) {
|
|
447
|
+
return select$o();
|
|
448
448
|
}
|
|
449
|
-
function keyBuilder$
|
|
449
|
+
function keyBuilder$a(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$6(storeKeyMap, luvio, resourceParams, response) {
|
|
453
|
+
getTypeCacheKeys$6(storeKeyMap, luvio, response, () => keyBuilder$a(luvio, resourceParams));
|
|
454
454
|
}
|
|
455
|
-
function ingestSuccess$
|
|
455
|
+
function ingestSuccess$6(luvio, resourceParams, response, snapshotRefresh) {
|
|
456
456
|
const { body } = response;
|
|
457
|
-
const key = keyBuilder$
|
|
458
|
-
luvio.storeIngest(key, ingest$
|
|
457
|
+
const key = keyBuilder$a(luvio, resourceParams);
|
|
458
|
+
luvio.storeIngest(key, ingest$6, body);
|
|
459
459
|
const snapshot = luvio.storeLookup({
|
|
460
460
|
recordId: key,
|
|
461
|
-
node: select$
|
|
461
|
+
node: select$n(),
|
|
462
462
|
variables: {},
|
|
463
463
|
}, snapshotRefresh);
|
|
464
464
|
if (process.env.NODE_ENV !== 'production') {
|
|
@@ -469,19 +469,19 @@ function ingestSuccess$5(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$3(luvio, params, error, snapshotRefresh) {
|
|
473
|
+
const key = keyBuilder$a(luvio, params);
|
|
474
474
|
const errorSnapshot = luvio.errorSnapshot(error, snapshotRefresh);
|
|
475
475
|
const storeMetadataParams = {
|
|
476
|
-
ttl: TTL$
|
|
476
|
+
ttl: TTL$6,
|
|
477
477
|
namespace: keyPrefix,
|
|
478
|
-
version: VERSION$
|
|
479
|
-
representationName: RepresentationType$
|
|
478
|
+
version: VERSION$h,
|
|
479
|
+
representationName: RepresentationType$6
|
|
480
480
|
};
|
|
481
481
|
luvio.storeIngestError(key, errorSnapshot, storeMetadataParams);
|
|
482
482
|
return errorSnapshot;
|
|
483
483
|
}
|
|
484
|
-
function createResourceRequest$
|
|
484
|
+
function createResourceRequest$6(config) {
|
|
485
485
|
const headers = {};
|
|
486
486
|
return {
|
|
487
487
|
baseUri: '/services/data/v63.0',
|
|
@@ -495,97 +495,97 @@ function createResourceRequest$5(config) {
|
|
|
495
495
|
};
|
|
496
496
|
}
|
|
497
497
|
|
|
498
|
-
const adapterName$
|
|
498
|
+
const adapterName$6 = '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$6, createEmbeddings_ConfigPropertyMetadata);
|
|
503
|
+
const createResourceParams$6 = /*#__PURE__*/ createResourceParams$7(createEmbeddings_ConfigPropertyMetadata);
|
|
504
|
+
function keyBuilder$9(luvio, config) {
|
|
505
|
+
const resourceParams = createResourceParams$6(config);
|
|
506
|
+
return keyBuilder$a(luvio, resourceParams);
|
|
507
507
|
}
|
|
508
|
-
function typeCheckConfig$
|
|
508
|
+
function typeCheckConfig$6(untrustedConfig) {
|
|
509
509
|
const config = {};
|
|
510
510
|
const untrustedConfig_embeddingsInput = untrustedConfig.embeddingsInput;
|
|
511
|
-
const referenceEinsteinLlmEmbeddingsInputRepresentationValidationError = validate$
|
|
511
|
+
const referenceEinsteinLlmEmbeddingsInputRepresentationValidationError = validate$p(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$6(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$6(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$3(luvio, config) {
|
|
531
|
+
createResourceParams$6(config);
|
|
532
|
+
return select$n();
|
|
533
533
|
}
|
|
534
|
-
function onFetchResponseSuccess$
|
|
535
|
-
const snapshot = ingestSuccess$
|
|
534
|
+
function onFetchResponseSuccess$3(luvio, config, resourceParams, response) {
|
|
535
|
+
const snapshot = ingestSuccess$6(luvio, resourceParams, response, {
|
|
536
536
|
config,
|
|
537
|
-
resolve: () => buildNetworkSnapshot$
|
|
537
|
+
resolve: () => buildNetworkSnapshot$6(luvio, config, snapshotRefreshOptions)
|
|
538
538
|
});
|
|
539
539
|
return luvio.storeBroadcast().then(() => snapshot);
|
|
540
540
|
}
|
|
541
|
-
function onFetchResponseError$
|
|
542
|
-
const snapshot = ingestError$
|
|
541
|
+
function onFetchResponseError$3(luvio, config, resourceParams, response) {
|
|
542
|
+
const snapshot = ingestError$3(luvio, resourceParams, response, {
|
|
543
543
|
config,
|
|
544
|
-
resolve: () => buildNetworkSnapshot$
|
|
544
|
+
resolve: () => buildNetworkSnapshot$6(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$6(luvio, config, options) {
|
|
549
|
+
const resourceParams = createResourceParams$6(config);
|
|
550
|
+
const request = createResourceRequest$6(resourceParams);
|
|
551
551
|
return luvio.dispatchResourceRequest(request, options)
|
|
552
552
|
.then((response) => {
|
|
553
|
-
return luvio.handleSuccessResponse(() => onFetchResponseSuccess$
|
|
553
|
+
return luvio.handleSuccessResponse(() => onFetchResponseSuccess$3(luvio, config, resourceParams, response), () => {
|
|
554
554
|
const cache = new StoreKeyMap();
|
|
555
|
-
getResponseCacheKeys$
|
|
555
|
+
getResponseCacheKeys$6(cache, luvio, resourceParams, response.body);
|
|
556
556
|
return cache;
|
|
557
557
|
});
|
|
558
558
|
}, (response) => {
|
|
559
|
-
return luvio.handleErrorResponse(() => onFetchResponseError$
|
|
559
|
+
return luvio.handleErrorResponse(() => onFetchResponseError$3(luvio, config, resourceParams, response));
|
|
560
560
|
});
|
|
561
561
|
}
|
|
562
|
-
function buildNetworkSnapshotCachePolicy$
|
|
563
|
-
return buildNetworkSnapshotCachePolicy$
|
|
562
|
+
function buildNetworkSnapshotCachePolicy$3(context, coercedAdapterRequestContext) {
|
|
563
|
+
return buildNetworkSnapshotCachePolicy$4(context, coercedAdapterRequestContext, buildNetworkSnapshot$6, 'get', false);
|
|
564
564
|
}
|
|
565
|
-
function buildCachedSnapshotCachePolicy$
|
|
565
|
+
function buildCachedSnapshotCachePolicy$3(context, storeLookup) {
|
|
566
566
|
const { luvio, config } = context;
|
|
567
567
|
const selector = {
|
|
568
|
-
recordId: keyBuilder$
|
|
569
|
-
node: adapterFragment$
|
|
568
|
+
recordId: keyBuilder$9(luvio, config),
|
|
569
|
+
node: adapterFragment$3(luvio, config),
|
|
570
570
|
variables: {},
|
|
571
571
|
};
|
|
572
572
|
const cacheSnapshot = storeLookup(selector, {
|
|
573
573
|
config,
|
|
574
|
-
resolve: () => buildNetworkSnapshot$
|
|
574
|
+
resolve: () => buildNetworkSnapshot$6(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$6(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$3, buildNetworkSnapshotCachePolicy$3);
|
|
586
586
|
};
|
|
587
587
|
|
|
588
|
-
function validate$
|
|
588
|
+
function validate$m(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$l(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$5 = 100;
|
|
636
|
+
const VERSION$g = "4033328f65865dd5d80c68a7573a4522";
|
|
637
|
+
function validate$l(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$k(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$5 = 'EinsteinLlmFeedbackRepresentation';
|
|
651
|
+
function keyBuilder$8(luvio, config) {
|
|
652
|
+
return keyPrefix + '::' + RepresentationType$5 + ':' + config.message;
|
|
653
653
|
}
|
|
654
654
|
function keyBuilderFromType$2(luvio, object) {
|
|
655
655
|
const keyParams = {
|
|
656
656
|
message: object.message
|
|
657
657
|
};
|
|
658
|
-
return keyBuilder$
|
|
658
|
+
return keyBuilder$8(luvio, keyParams);
|
|
659
659
|
}
|
|
660
|
-
function normalize$
|
|
660
|
+
function normalize$5(input, existing, path, luvio, store, timestamp) {
|
|
661
661
|
return input;
|
|
662
662
|
}
|
|
663
|
-
const select$
|
|
663
|
+
const select$m = function EinsteinLlmFeedbackRepresentationSelect() {
|
|
664
664
|
return {
|
|
665
665
|
kind: 'Fragment',
|
|
666
|
-
version: VERSION$
|
|
666
|
+
version: VERSION$g,
|
|
667
667
|
private: [],
|
|
668
668
|
selections: [
|
|
669
669
|
{
|
|
@@ -673,7 +673,7 @@ const select$j = function EinsteinLlmFeedbackRepresentationSelect() {
|
|
|
673
673
|
]
|
|
674
674
|
};
|
|
675
675
|
};
|
|
676
|
-
function equals$
|
|
676
|
+
function equals$g(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$e(existing, incoming) {
|
|
|
681
681
|
}
|
|
682
682
|
return true;
|
|
683
683
|
}
|
|
684
|
-
const ingest$
|
|
684
|
+
const ingest$5 = function EinsteinLlmFeedbackRepresentationIngest(input, path, luvio, store, timestamp) {
|
|
685
685
|
if (process.env.NODE_ENV !== 'production') {
|
|
686
|
-
const validateError = validate$
|
|
686
|
+
const validateError = validate$l(input);
|
|
687
687
|
if (validateError !== null) {
|
|
688
688
|
throw validateError;
|
|
689
689
|
}
|
|
690
690
|
}
|
|
691
691
|
const key = keyBuilderFromType$2(luvio, input);
|
|
692
|
-
const ttlToUse = TTL$
|
|
693
|
-
ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize$
|
|
692
|
+
const ttlToUse = TTL$5;
|
|
693
|
+
ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize$5, "EinsteinLLM", VERSION$g, RepresentationType$5, equals$g);
|
|
694
694
|
return createLink(key);
|
|
695
695
|
};
|
|
696
|
-
function getTypeCacheKeys$
|
|
696
|
+
function getTypeCacheKeys$5(rootKeySet, luvio, input, fullPathFactory) {
|
|
697
697
|
// root cache key (uses fullPathFactory if keyBuilderFromType isn't defined)
|
|
698
698
|
const rootKey = keyBuilderFromType$2(luvio, input);
|
|
699
699
|
rootKeySet.set(rootKey, {
|
|
700
700
|
namespace: keyPrefix,
|
|
701
|
-
representationName: RepresentationType$
|
|
701
|
+
representationName: RepresentationType$5,
|
|
702
702
|
mergeable: false
|
|
703
703
|
});
|
|
704
704
|
}
|
|
705
705
|
|
|
706
|
-
function select$
|
|
707
|
-
return select$
|
|
706
|
+
function select$l(luvio, params) {
|
|
707
|
+
return select$m();
|
|
708
708
|
}
|
|
709
|
-
function getResponseCacheKeys$
|
|
710
|
-
getTypeCacheKeys$
|
|
709
|
+
function getResponseCacheKeys$5(storeKeyMap, luvio, resourceParams, response) {
|
|
710
|
+
getTypeCacheKeys$5(storeKeyMap, luvio, response);
|
|
711
711
|
}
|
|
712
|
-
function ingestSuccess$
|
|
712
|
+
function ingestSuccess$5(luvio, resourceParams, response) {
|
|
713
713
|
const { body } = response;
|
|
714
714
|
const key = keyBuilderFromType$2(luvio, body);
|
|
715
|
-
luvio.storeIngest(key, ingest$
|
|
715
|
+
luvio.storeIngest(key, ingest$5, body);
|
|
716
716
|
const snapshot = luvio.storeLookup({
|
|
717
717
|
recordId: key,
|
|
718
|
-
node: select$
|
|
718
|
+
node: select$l(),
|
|
719
719
|
variables: {},
|
|
720
720
|
});
|
|
721
721
|
if (process.env.NODE_ENV !== 'production') {
|
|
@@ -726,7 +726,7 @@ function ingestSuccess$4(luvio, resourceParams, response) {
|
|
|
726
726
|
deepFreeze(snapshot.data);
|
|
727
727
|
return snapshot;
|
|
728
728
|
}
|
|
729
|
-
function createResourceRequest$
|
|
729
|
+
function createResourceRequest$5(config) {
|
|
730
730
|
const headers = {};
|
|
731
731
|
return {
|
|
732
732
|
baseUri: '/services/data/v63.0',
|
|
@@ -740,45 +740,45 @@ function createResourceRequest$4(config) {
|
|
|
740
740
|
};
|
|
741
741
|
}
|
|
742
742
|
|
|
743
|
-
const adapterName$
|
|
743
|
+
const adapterName$5 = '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$5, createFeedback_ConfigPropertyMetadata);
|
|
748
|
+
const createResourceParams$5 = /*#__PURE__*/ createResourceParams$7(createFeedback_ConfigPropertyMetadata);
|
|
749
|
+
function typeCheckConfig$5(untrustedConfig) {
|
|
750
750
|
const config = {};
|
|
751
751
|
const untrustedConfig_feedbackInput = untrustedConfig.feedbackInput;
|
|
752
|
-
const referenceEinsteinLlmFeedbackInputRepresentationValidationError = validate$
|
|
752
|
+
const referenceEinsteinLlmFeedbackInputRepresentationValidationError = validate$m(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$5(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$5(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$5(luvio, config, options) {
|
|
772
|
+
const resourceParams = createResourceParams$5(config);
|
|
773
|
+
const request = createResourceRequest$5(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$5(luvio, resourceParams, response);
|
|
778
778
|
return luvio.storeBroadcast().then(() => snapshot);
|
|
779
779
|
}, () => {
|
|
780
780
|
const cache = new StoreKeyMap();
|
|
781
|
-
getResponseCacheKeys$
|
|
781
|
+
getResponseCacheKeys$5(cache, luvio, resourceParams, response.body);
|
|
782
782
|
return cache;
|
|
783
783
|
});
|
|
784
784
|
}, (response) => {
|
|
@@ -788,16 +788,16 @@ function buildNetworkSnapshot$4(luvio, config, options) {
|
|
|
788
788
|
}
|
|
789
789
|
const createFeedbackAdapterFactory = (luvio) => {
|
|
790
790
|
return function createFeedback(untrustedConfig) {
|
|
791
|
-
const config = validateAdapterConfig$
|
|
791
|
+
const config = validateAdapterConfig$5(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$5(luvio, config);
|
|
797
797
|
};
|
|
798
798
|
};
|
|
799
799
|
|
|
800
|
-
function validate$
|
|
800
|
+
function validate$k(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$j(obj, path = 'EinsteinLlmAdditionalConfigInputRepresentation'
|
|
|
880
880
|
return v_error === undefined ? null : v_error;
|
|
881
881
|
}
|
|
882
882
|
|
|
883
|
-
function validate$
|
|
883
|
+
function validate$j(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$i(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$k(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$i(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$f = "9ebac74e6f964c363d5fd1913df363af";
|
|
915
|
+
function validate$i(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$h(obj, path = 'EinsteinLlmGenerationsContentQualityRepresentat
|
|
|
948
948
|
})();
|
|
949
949
|
return v_error === undefined ? null : v_error;
|
|
950
950
|
}
|
|
951
|
-
const select$
|
|
951
|
+
const select$k = function EinsteinLlmGenerationsContentQualityRepresentationSelect() {
|
|
952
952
|
return {
|
|
953
953
|
kind: 'Fragment',
|
|
954
|
-
version: VERSION$
|
|
954
|
+
version: VERSION$f,
|
|
955
955
|
private: [],
|
|
956
956
|
selections: [
|
|
957
957
|
{
|
|
@@ -962,7 +962,7 @@ const select$h = function EinsteinLlmGenerationsContentQualityRepresentationSele
|
|
|
962
962
|
]
|
|
963
963
|
};
|
|
964
964
|
};
|
|
965
|
-
function equals$
|
|
965
|
+
function equals$f(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$d(existing, incoming) {
|
|
|
979
979
|
return true;
|
|
980
980
|
}
|
|
981
981
|
|
|
982
|
-
const VERSION$
|
|
983
|
-
function validate$
|
|
982
|
+
const VERSION$e = "77af44a252cb5b45b4d9a8101368d2aa";
|
|
983
|
+
function validate$h(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$g(obj, path = 'EinsteinLlmGenerationsSafetyScoreRepresentation
|
|
|
1184
1184
|
})();
|
|
1185
1185
|
return v_error === undefined ? null : v_error;
|
|
1186
1186
|
}
|
|
1187
|
-
const select$
|
|
1187
|
+
const select$j = function EinsteinLlmGenerationsSafetyScoreRepresentationSelect() {
|
|
1188
1188
|
return {
|
|
1189
1189
|
kind: 'Fragment',
|
|
1190
|
-
version: VERSION$
|
|
1190
|
+
version: VERSION$e,
|
|
1191
1191
|
private: [],
|
|
1192
1192
|
selections: [
|
|
1193
1193
|
{
|
|
@@ -1228,7 +1228,7 @@ const select$g = function EinsteinLlmGenerationsSafetyScoreRepresentationSelect(
|
|
|
1228
1228
|
]
|
|
1229
1229
|
};
|
|
1230
1230
|
};
|
|
1231
|
-
function equals$
|
|
1231
|
+
function equals$e(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$c(existing, incoming) {
|
|
|
1323
1323
|
return true;
|
|
1324
1324
|
}
|
|
1325
1325
|
|
|
1326
|
-
const VERSION$
|
|
1327
|
-
function validate$
|
|
1326
|
+
const VERSION$d = "4a07778ff6c595d91c575188146647a1";
|
|
1327
|
+
function validate$g(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$f(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$i(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$f(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$h(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$f(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$i = function EinsteinLlmGenerationItemRepresentationSelect() {
|
|
1420
|
+
const { selections: EinsteinLlmGenerationsContentQualityRepresentation__selections, opaque: EinsteinLlmGenerationsContentQualityRepresentation__opaque, } = select$k();
|
|
1421
|
+
const { selections: EinsteinLlmGenerationsSafetyScoreRepresentation__selections, opaque: EinsteinLlmGenerationsSafetyScoreRepresentation__opaque, } = select$j();
|
|
1422
1422
|
return {
|
|
1423
1423
|
kind: 'Fragment',
|
|
1424
|
-
version: VERSION$
|
|
1424
|
+
version: VERSION$d,
|
|
1425
1425
|
private: [],
|
|
1426
1426
|
selections: [
|
|
1427
1427
|
{
|
|
@@ -1458,7 +1458,7 @@ const select$f = function EinsteinLlmGenerationItemRepresentationSelect() {
|
|
|
1458
1458
|
]
|
|
1459
1459
|
};
|
|
1460
1460
|
};
|
|
1461
|
-
function equals$
|
|
1461
|
+
function equals$d(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$b(existing, incoming) {
|
|
|
1499
1499
|
if (!(existing_contentQualityRepresentation === incoming_contentQualityRepresentation
|
|
1500
1500
|
|| (existing_contentQualityRepresentation != null &&
|
|
1501
1501
|
incoming_contentQualityRepresentation != null &&
|
|
1502
|
-
equals$
|
|
1502
|
+
equals$f(existing_contentQualityRepresentation, incoming_contentQualityRepresentation)))) {
|
|
1503
1503
|
return false;
|
|
1504
1504
|
}
|
|
1505
1505
|
}
|
|
@@ -1515,15 +1515,15 @@ function equals$b(existing, incoming) {
|
|
|
1515
1515
|
if (!(existing_safetyScoreRepresentation === incoming_safetyScoreRepresentation
|
|
1516
1516
|
|| (existing_safetyScoreRepresentation != null &&
|
|
1517
1517
|
incoming_safetyScoreRepresentation != null &&
|
|
1518
|
-
equals$
|
|
1518
|
+
equals$e(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$c = "4656c961c9d093a9e206c1db7d4de0b0";
|
|
1526
|
+
function validate$f(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$e(obj, path = 'WrappedMap') {
|
|
|
1545
1545
|
})();
|
|
1546
1546
|
return v_error === undefined ? null : v_error;
|
|
1547
1547
|
}
|
|
1548
|
-
const select$
|
|
1548
|
+
const select$h = function WrappedMapSelect() {
|
|
1549
1549
|
return {
|
|
1550
1550
|
kind: 'Fragment',
|
|
1551
|
-
version: VERSION$
|
|
1551
|
+
version: VERSION$c,
|
|
1552
1552
|
private: [],
|
|
1553
1553
|
selections: []
|
|
1554
1554
|
};
|
|
1555
1555
|
};
|
|
1556
|
-
function equals$
|
|
1556
|
+
function equals$c(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$a(existing, incoming) {
|
|
|
1564
1564
|
return true;
|
|
1565
1565
|
}
|
|
1566
1566
|
|
|
1567
|
-
const TTL$
|
|
1568
|
-
const VERSION$
|
|
1569
|
-
function validate$
|
|
1567
|
+
const TTL$4 = 100;
|
|
1568
|
+
const VERSION$b = "d8abd72a42e842b253da1c38954dafbc";
|
|
1569
|
+
function validate$e(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$d(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$g(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$d(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$f(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$d(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$4 = 'EinsteinLlmGenerationsRepresentation';
|
|
1653
|
+
function keyBuilder$7(luvio, config) {
|
|
1654
|
+
return keyPrefix + '::' + RepresentationType$4 + ':' + config.requestId;
|
|
1655
1655
|
}
|
|
1656
1656
|
function keyBuilderFromType$1(luvio, object) {
|
|
1657
1657
|
const keyParams = {
|
|
1658
1658
|
requestId: object.requestId
|
|
1659
1659
|
};
|
|
1660
|
-
return keyBuilder$
|
|
1660
|
+
return keyBuilder$7(luvio, keyParams);
|
|
1661
1661
|
}
|
|
1662
|
-
function normalize$
|
|
1662
|
+
function normalize$4(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$g = function EinsteinLlmGenerationsRepresentationSelect() {
|
|
1666
|
+
const { selections: EinsteinLlmGenerationItemRepresentation__selections, opaque: EinsteinLlmGenerationItemRepresentation__opaque, } = select$i();
|
|
1667
|
+
const { selections: WrappedMap__selections, opaque: WrappedMap__opaque, } = select$h();
|
|
1668
1668
|
return {
|
|
1669
1669
|
kind: 'Fragment',
|
|
1670
|
-
version: VERSION$
|
|
1670
|
+
version: VERSION$b,
|
|
1671
1671
|
private: [],
|
|
1672
1672
|
selections: [
|
|
1673
1673
|
{
|
|
@@ -1693,7 +1693,7 @@ const select$d = function EinsteinLlmGenerationsRepresentationSelect() {
|
|
|
1693
1693
|
]
|
|
1694
1694
|
};
|
|
1695
1695
|
};
|
|
1696
|
-
function equals$
|
|
1696
|
+
function equals$b(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$9(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$d(existing_generations_item, incoming_generations_item))) {
|
|
1706
1706
|
return false;
|
|
1707
1707
|
}
|
|
1708
1708
|
});
|
|
@@ -1714,7 +1714,7 @@ function equals$9(existing, incoming) {
|
|
|
1714
1714
|
if (!(existing_parameters === incoming_parameters
|
|
1715
1715
|
|| (existing_parameters != null &&
|
|
1716
1716
|
incoming_parameters != null &&
|
|
1717
|
-
equals$
|
|
1717
|
+
equals$c(existing_parameters, incoming_parameters)))) {
|
|
1718
1718
|
return false;
|
|
1719
1719
|
}
|
|
1720
1720
|
const existing_prompt = existing.prompt;
|
|
@@ -1724,41 +1724,41 @@ function equals$9(existing, incoming) {
|
|
|
1724
1724
|
}
|
|
1725
1725
|
return true;
|
|
1726
1726
|
}
|
|
1727
|
-
const ingest$
|
|
1727
|
+
const ingest$4 = function EinsteinLlmGenerationsRepresentationIngest(input, path, luvio, store, timestamp) {
|
|
1728
1728
|
if (process.env.NODE_ENV !== 'production') {
|
|
1729
|
-
const validateError = validate$
|
|
1729
|
+
const validateError = validate$e(input);
|
|
1730
1730
|
if (validateError !== null) {
|
|
1731
1731
|
throw validateError;
|
|
1732
1732
|
}
|
|
1733
1733
|
}
|
|
1734
1734
|
const key = keyBuilderFromType$1(luvio, input);
|
|
1735
|
-
const ttlToUse = TTL$
|
|
1736
|
-
ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize$
|
|
1735
|
+
const ttlToUse = TTL$4;
|
|
1736
|
+
ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize$4, "EinsteinLLM", VERSION$b, RepresentationType$4, equals$b);
|
|
1737
1737
|
return createLink(key);
|
|
1738
1738
|
};
|
|
1739
|
-
function getTypeCacheKeys$
|
|
1739
|
+
function getTypeCacheKeys$4(rootKeySet, luvio, input, fullPathFactory) {
|
|
1740
1740
|
// root cache key (uses fullPathFactory if keyBuilderFromType isn't defined)
|
|
1741
1741
|
const rootKey = keyBuilderFromType$1(luvio, input);
|
|
1742
1742
|
rootKeySet.set(rootKey, {
|
|
1743
1743
|
namespace: keyPrefix,
|
|
1744
|
-
representationName: RepresentationType$
|
|
1744
|
+
representationName: RepresentationType$4,
|
|
1745
1745
|
mergeable: false
|
|
1746
1746
|
});
|
|
1747
1747
|
}
|
|
1748
1748
|
|
|
1749
|
-
function select$
|
|
1750
|
-
return select$
|
|
1749
|
+
function select$f(luvio, params) {
|
|
1750
|
+
return select$g();
|
|
1751
1751
|
}
|
|
1752
|
-
function getResponseCacheKeys$
|
|
1753
|
-
getTypeCacheKeys$
|
|
1752
|
+
function getResponseCacheKeys$4(storeKeyMap, luvio, resourceParams, response) {
|
|
1753
|
+
getTypeCacheKeys$4(storeKeyMap, luvio, response);
|
|
1754
1754
|
}
|
|
1755
|
-
function ingestSuccess$
|
|
1755
|
+
function ingestSuccess$4(luvio, resourceParams, response) {
|
|
1756
1756
|
const { body } = response;
|
|
1757
1757
|
const key = keyBuilderFromType$1(luvio, body);
|
|
1758
|
-
luvio.storeIngest(key, ingest$
|
|
1758
|
+
luvio.storeIngest(key, ingest$4, body);
|
|
1759
1759
|
const snapshot = luvio.storeLookup({
|
|
1760
1760
|
recordId: key,
|
|
1761
|
-
node: select$
|
|
1761
|
+
node: select$f(),
|
|
1762
1762
|
variables: {},
|
|
1763
1763
|
});
|
|
1764
1764
|
if (process.env.NODE_ENV !== 'production') {
|
|
@@ -1769,7 +1769,7 @@ function ingestSuccess$3(luvio, resourceParams, response) {
|
|
|
1769
1769
|
deepFreeze(snapshot.data);
|
|
1770
1770
|
return snapshot;
|
|
1771
1771
|
}
|
|
1772
|
-
function createResourceRequest$
|
|
1772
|
+
function createResourceRequest$4(config) {
|
|
1773
1773
|
const headers = {};
|
|
1774
1774
|
return {
|
|
1775
1775
|
baseUri: '/services/data/v63.0',
|
|
@@ -1783,45 +1783,45 @@ function createResourceRequest$3(config) {
|
|
|
1783
1783
|
};
|
|
1784
1784
|
}
|
|
1785
1785
|
|
|
1786
|
-
const adapterName$
|
|
1786
|
+
const adapterName$4 = '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$4, createGenerations_ConfigPropertyMetadata);
|
|
1791
|
+
const createResourceParams$4 = /*#__PURE__*/ createResourceParams$7(createGenerations_ConfigPropertyMetadata);
|
|
1792
|
+
function typeCheckConfig$4(untrustedConfig) {
|
|
1793
1793
|
const config = {};
|
|
1794
1794
|
const untrustedConfig_generationsInput = untrustedConfig.generationsInput;
|
|
1795
|
-
const referenceEinsteinLlmGenerationsInputRepresentationValidationError = validate$
|
|
1795
|
+
const referenceEinsteinLlmGenerationsInputRepresentationValidationError = validate$j(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$4(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$4(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$4(luvio, config, options) {
|
|
1815
|
+
const resourceParams = createResourceParams$4(config);
|
|
1816
|
+
const request = createResourceRequest$4(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$4(luvio, resourceParams, response);
|
|
1821
1821
|
return luvio.storeBroadcast().then(() => snapshot);
|
|
1822
1822
|
}, () => {
|
|
1823
1823
|
const cache = new StoreKeyMap();
|
|
1824
|
-
getResponseCacheKeys$
|
|
1824
|
+
getResponseCacheKeys$4(cache, luvio, resourceParams, response.body);
|
|
1825
1825
|
return cache;
|
|
1826
1826
|
});
|
|
1827
1827
|
}, (response) => {
|
|
@@ -1831,16 +1831,16 @@ function buildNetworkSnapshot$3(luvio, config, options) {
|
|
|
1831
1831
|
}
|
|
1832
1832
|
const createGenerationsAdapterFactory = (luvio) => {
|
|
1833
1833
|
return function createGenerations(untrustedConfig) {
|
|
1834
|
-
const config = validateAdapterConfig$
|
|
1834
|
+
const config = validateAdapterConfig$4(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$4(luvio, config);
|
|
1840
1840
|
};
|
|
1841
1841
|
};
|
|
1842
1842
|
|
|
1843
|
-
function validate$
|
|
1843
|
+
function validate$d(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$c(obj, path = 'WrappedValueMap') {
|
|
|
1863
1863
|
return v_error === undefined ? null : v_error;
|
|
1864
1864
|
}
|
|
1865
1865
|
|
|
1866
|
-
function validate$
|
|
1866
|
+
function validate$c(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$b(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$k(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$b(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$d(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');
|
|
@@ -1909,7 +1909,85 @@ function validate$b(obj, path = 'EinsteinPromptTemplateGenerationsInputRepresent
|
|
|
1909
1909
|
return v_error === undefined ? null : v_error;
|
|
1910
1910
|
}
|
|
1911
1911
|
|
|
1912
|
-
const VERSION$
|
|
1912
|
+
const VERSION$a = "70b3261d05a4bf7da95cd5cabe9bd785";
|
|
1913
|
+
function validate$b(obj, path = 'EinsteinPromptTemplateAttachmentRepresentation') {
|
|
1914
|
+
const v_error = (() => {
|
|
1915
|
+
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
1916
|
+
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
1917
|
+
}
|
|
1918
|
+
const obj_fileExtension = obj.fileExtension;
|
|
1919
|
+
const path_fileExtension = path + '.fileExtension';
|
|
1920
|
+
if (typeof obj_fileExtension !== 'string') {
|
|
1921
|
+
return new TypeError('Expected "string" but received "' + typeof obj_fileExtension + '" (at "' + path_fileExtension + '")');
|
|
1922
|
+
}
|
|
1923
|
+
const obj_id = obj.id;
|
|
1924
|
+
const path_id = path + '.id';
|
|
1925
|
+
if (typeof obj_id !== 'string') {
|
|
1926
|
+
return new TypeError('Expected "string" but received "' + typeof obj_id + '" (at "' + path_id + '")');
|
|
1927
|
+
}
|
|
1928
|
+
const obj_latestPublishedVersion = obj.latestPublishedVersion;
|
|
1929
|
+
const path_latestPublishedVersion = path + '.latestPublishedVersion';
|
|
1930
|
+
if (typeof obj_latestPublishedVersion !== 'string') {
|
|
1931
|
+
return new TypeError('Expected "string" but received "' + typeof obj_latestPublishedVersion + '" (at "' + path_latestPublishedVersion + '")');
|
|
1932
|
+
}
|
|
1933
|
+
const obj_title = obj.title;
|
|
1934
|
+
const path_title = path + '.title';
|
|
1935
|
+
if (typeof obj_title !== 'string') {
|
|
1936
|
+
return new TypeError('Expected "string" but received "' + typeof obj_title + '" (at "' + path_title + '")');
|
|
1937
|
+
}
|
|
1938
|
+
})();
|
|
1939
|
+
return v_error === undefined ? null : v_error;
|
|
1940
|
+
}
|
|
1941
|
+
const select$e = function EinsteinPromptTemplateAttachmentRepresentationSelect() {
|
|
1942
|
+
return {
|
|
1943
|
+
kind: 'Fragment',
|
|
1944
|
+
version: VERSION$a,
|
|
1945
|
+
private: [],
|
|
1946
|
+
selections: [
|
|
1947
|
+
{
|
|
1948
|
+
name: 'fileExtension',
|
|
1949
|
+
kind: 'Scalar'
|
|
1950
|
+
},
|
|
1951
|
+
{
|
|
1952
|
+
name: 'id',
|
|
1953
|
+
kind: 'Scalar'
|
|
1954
|
+
},
|
|
1955
|
+
{
|
|
1956
|
+
name: 'latestPublishedVersion',
|
|
1957
|
+
kind: 'Scalar'
|
|
1958
|
+
},
|
|
1959
|
+
{
|
|
1960
|
+
name: 'title',
|
|
1961
|
+
kind: 'Scalar'
|
|
1962
|
+
}
|
|
1963
|
+
]
|
|
1964
|
+
};
|
|
1965
|
+
};
|
|
1966
|
+
function equals$a(existing, incoming) {
|
|
1967
|
+
const existing_fileExtension = existing.fileExtension;
|
|
1968
|
+
const incoming_fileExtension = incoming.fileExtension;
|
|
1969
|
+
if (!(existing_fileExtension === incoming_fileExtension)) {
|
|
1970
|
+
return false;
|
|
1971
|
+
}
|
|
1972
|
+
const existing_id = existing.id;
|
|
1973
|
+
const incoming_id = incoming.id;
|
|
1974
|
+
if (!(existing_id === incoming_id)) {
|
|
1975
|
+
return false;
|
|
1976
|
+
}
|
|
1977
|
+
const existing_latestPublishedVersion = existing.latestPublishedVersion;
|
|
1978
|
+
const incoming_latestPublishedVersion = incoming.latestPublishedVersion;
|
|
1979
|
+
if (!(existing_latestPublishedVersion === incoming_latestPublishedVersion)) {
|
|
1980
|
+
return false;
|
|
1981
|
+
}
|
|
1982
|
+
const existing_title = existing.title;
|
|
1983
|
+
const incoming_title = incoming.title;
|
|
1984
|
+
if (!(existing_title === incoming_title)) {
|
|
1985
|
+
return false;
|
|
1986
|
+
}
|
|
1987
|
+
return true;
|
|
1988
|
+
}
|
|
1989
|
+
|
|
1990
|
+
const VERSION$9 = "6458d624e5a1691821c764b6de0badb3";
|
|
1913
1991
|
function validate$a(obj, path = 'EinsteinPromptTemplateGenerationsErrorRepresentation') {
|
|
1914
1992
|
const v_error = (() => {
|
|
1915
1993
|
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
@@ -1940,10 +2018,10 @@ function validate$a(obj, path = 'EinsteinPromptTemplateGenerationsErrorRepresent
|
|
|
1940
2018
|
})();
|
|
1941
2019
|
return v_error === undefined ? null : v_error;
|
|
1942
2020
|
}
|
|
1943
|
-
const select$
|
|
2021
|
+
const select$d = function EinsteinPromptTemplateGenerationsErrorRepresentationSelect() {
|
|
1944
2022
|
return {
|
|
1945
2023
|
kind: 'Fragment',
|
|
1946
|
-
version: VERSION$
|
|
2024
|
+
version: VERSION$9,
|
|
1947
2025
|
private: [],
|
|
1948
2026
|
selections: [
|
|
1949
2027
|
{
|
|
@@ -1966,7 +2044,7 @@ const select$b = function EinsteinPromptTemplateGenerationsErrorRepresentationSe
|
|
|
1966
2044
|
]
|
|
1967
2045
|
};
|
|
1968
2046
|
};
|
|
1969
|
-
function equals$
|
|
2047
|
+
function equals$9(existing, incoming) {
|
|
1970
2048
|
const existing_errorMessage = existing.errorMessage;
|
|
1971
2049
|
const incoming_errorMessage = incoming.errorMessage;
|
|
1972
2050
|
if (!(existing_errorMessage === incoming_errorMessage)) {
|
|
@@ -1998,7 +2076,7 @@ function equals$8(existing, incoming) {
|
|
|
1998
2076
|
return true;
|
|
1999
2077
|
}
|
|
2000
2078
|
|
|
2001
|
-
const VERSION$
|
|
2079
|
+
const VERSION$8 = "7c417ce44e4bc05dfcc454e6825590e8";
|
|
2002
2080
|
function validate$9(obj, path = 'EinsteinPromptTemplateMaskSettingsRepresentation') {
|
|
2003
2081
|
const v_error = (() => {
|
|
2004
2082
|
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
@@ -2012,10 +2090,10 @@ function validate$9(obj, path = 'EinsteinPromptTemplateMaskSettingsRepresentatio
|
|
|
2012
2090
|
})();
|
|
2013
2091
|
return v_error === undefined ? null : v_error;
|
|
2014
2092
|
}
|
|
2015
|
-
const select$
|
|
2093
|
+
const select$c = function EinsteinPromptTemplateMaskSettingsRepresentationSelect() {
|
|
2016
2094
|
return {
|
|
2017
2095
|
kind: 'Fragment',
|
|
2018
|
-
version: VERSION$
|
|
2096
|
+
version: VERSION$8,
|
|
2019
2097
|
private: [],
|
|
2020
2098
|
selections: [
|
|
2021
2099
|
{
|
|
@@ -2025,7 +2103,7 @@ const select$a = function EinsteinPromptTemplateMaskSettingsRepresentationSelect
|
|
|
2025
2103
|
]
|
|
2026
2104
|
};
|
|
2027
2105
|
};
|
|
2028
|
-
function equals$
|
|
2106
|
+
function equals$8(existing, incoming) {
|
|
2029
2107
|
const existing_enableModeration = existing.enableModeration;
|
|
2030
2108
|
const incoming_enableModeration = incoming.enableModeration;
|
|
2031
2109
|
if (!(existing_enableModeration === incoming_enableModeration)) {
|
|
@@ -2034,7 +2112,7 @@ function equals$7(existing, incoming) {
|
|
|
2034
2112
|
return true;
|
|
2035
2113
|
}
|
|
2036
2114
|
|
|
2037
|
-
const VERSION$
|
|
2115
|
+
const VERSION$7 = "92ad1abd0e2a60bc36941409cadda7e2";
|
|
2038
2116
|
function validate$8(obj, path = 'EinsteinPromptTemplateMaskContentRepresentation') {
|
|
2039
2117
|
const v_error = (() => {
|
|
2040
2118
|
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
@@ -2086,11 +2164,11 @@ function validate$8(obj, path = 'EinsteinPromptTemplateMaskContentRepresentation
|
|
|
2086
2164
|
})();
|
|
2087
2165
|
return v_error === undefined ? null : v_error;
|
|
2088
2166
|
}
|
|
2089
|
-
const select$
|
|
2090
|
-
const { selections: EinsteinPromptTemplateMaskSettingsRepresentation__selections, opaque: EinsteinPromptTemplateMaskSettingsRepresentation__opaque, } = select$
|
|
2167
|
+
const select$b = function EinsteinPromptTemplateMaskContentRepresentationSelect() {
|
|
2168
|
+
const { selections: EinsteinPromptTemplateMaskSettingsRepresentation__selections, opaque: EinsteinPromptTemplateMaskSettingsRepresentation__opaque, } = select$c();
|
|
2091
2169
|
return {
|
|
2092
2170
|
kind: 'Fragment',
|
|
2093
|
-
version: VERSION$
|
|
2171
|
+
version: VERSION$7,
|
|
2094
2172
|
private: [],
|
|
2095
2173
|
selections: [
|
|
2096
2174
|
{
|
|
@@ -2112,7 +2190,7 @@ const select$9 = function EinsteinPromptTemplateMaskContentRepresentationSelect(
|
|
|
2112
2190
|
]
|
|
2113
2191
|
};
|
|
2114
2192
|
};
|
|
2115
|
-
function equals$
|
|
2193
|
+
function equals$7(existing, incoming) {
|
|
2116
2194
|
const existing_content = existing.content;
|
|
2117
2195
|
const incoming_content = incoming.content;
|
|
2118
2196
|
if (!(existing_content === incoming_content)) {
|
|
@@ -2143,14 +2221,14 @@ function equals$6(existing, incoming) {
|
|
|
2143
2221
|
if (!(existing_moderationSettings === incoming_moderationSettings
|
|
2144
2222
|
|| (existing_moderationSettings != null &&
|
|
2145
2223
|
incoming_moderationSettings != null &&
|
|
2146
|
-
equals$
|
|
2224
|
+
equals$8(existing_moderationSettings, incoming_moderationSettings)))) {
|
|
2147
2225
|
return false;
|
|
2148
2226
|
}
|
|
2149
2227
|
}
|
|
2150
2228
|
return true;
|
|
2151
2229
|
}
|
|
2152
2230
|
|
|
2153
|
-
const VERSION$
|
|
2231
|
+
const VERSION$6 = "507a815605f8d30ae9b52b0ec513d25e";
|
|
2154
2232
|
function validate$7(obj, path = 'EinsteinPromptTemplateMaskDataRepresentation') {
|
|
2155
2233
|
const v_error = (() => {
|
|
2156
2234
|
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
@@ -2181,10 +2259,10 @@ function validate$7(obj, path = 'EinsteinPromptTemplateMaskDataRepresentation')
|
|
|
2181
2259
|
})();
|
|
2182
2260
|
return v_error === undefined ? null : v_error;
|
|
2183
2261
|
}
|
|
2184
|
-
const select$
|
|
2262
|
+
const select$a = function EinsteinPromptTemplateMaskDataRepresentationSelect() {
|
|
2185
2263
|
return {
|
|
2186
2264
|
kind: 'Fragment',
|
|
2187
|
-
version: VERSION$
|
|
2265
|
+
version: VERSION$6,
|
|
2188
2266
|
private: [],
|
|
2189
2267
|
selections: [
|
|
2190
2268
|
{
|
|
@@ -2203,7 +2281,7 @@ const select$8 = function EinsteinPromptTemplateMaskDataRepresentationSelect() {
|
|
|
2203
2281
|
]
|
|
2204
2282
|
};
|
|
2205
2283
|
};
|
|
2206
|
-
function equals$
|
|
2284
|
+
function equals$6(existing, incoming) {
|
|
2207
2285
|
const existing_originalValue = existing.originalValue;
|
|
2208
2286
|
const incoming_originalValue = incoming.originalValue;
|
|
2209
2287
|
if (!(existing_originalValue === incoming_originalValue)) {
|
|
@@ -2227,24 +2305,27 @@ function equals$5(existing, incoming) {
|
|
|
2227
2305
|
return true;
|
|
2228
2306
|
}
|
|
2229
2307
|
|
|
2230
|
-
const TTL$
|
|
2231
|
-
const VERSION$
|
|
2308
|
+
const TTL$3 = 100;
|
|
2309
|
+
const VERSION$5 = "1beba5cc950346499a8f4810c77e2b03";
|
|
2232
2310
|
function validate$6(obj, path = 'EinsteinPromptTemplateGenerationsRepresentation') {
|
|
2233
2311
|
const v_error = (() => {
|
|
2234
2312
|
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
2235
2313
|
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
2236
2314
|
}
|
|
2237
|
-
if (obj.
|
|
2238
|
-
const
|
|
2239
|
-
const
|
|
2240
|
-
if (!ArrayIsArray(
|
|
2241
|
-
return new TypeError('Expected "array" but received "' + typeof
|
|
2242
|
-
}
|
|
2243
|
-
for (let i = 0; i <
|
|
2244
|
-
const
|
|
2245
|
-
const
|
|
2246
|
-
|
|
2247
|
-
|
|
2315
|
+
if (obj.fileData !== undefined) {
|
|
2316
|
+
const obj_fileData = obj.fileData;
|
|
2317
|
+
const path_fileData = path + '.fileData';
|
|
2318
|
+
if (!ArrayIsArray(obj_fileData)) {
|
|
2319
|
+
return new TypeError('Expected "array" but received "' + typeof obj_fileData + '" (at "' + path_fileData + '")');
|
|
2320
|
+
}
|
|
2321
|
+
for (let i = 0; i < obj_fileData.length; i++) {
|
|
2322
|
+
const obj_fileData_item = obj_fileData[i];
|
|
2323
|
+
const path_fileData_item = path_fileData + '[' + i + ']';
|
|
2324
|
+
const referencepath_fileData_itemValidationError = validate$b(obj_fileData_item, path_fileData_item);
|
|
2325
|
+
if (referencepath_fileData_itemValidationError !== null) {
|
|
2326
|
+
let message = 'Object doesn\'t match EinsteinPromptTemplateAttachmentRepresentation (at "' + path_fileData_item + '")\n';
|
|
2327
|
+
message += referencepath_fileData_itemValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
2328
|
+
return new TypeError(message);
|
|
2248
2329
|
}
|
|
2249
2330
|
}
|
|
2250
2331
|
}
|
|
@@ -2273,7 +2354,7 @@ function validate$6(obj, path = 'EinsteinPromptTemplateGenerationsRepresentation
|
|
|
2273
2354
|
for (let i = 0; i < obj_generations.length; i++) {
|
|
2274
2355
|
const obj_generations_item = obj_generations[i];
|
|
2275
2356
|
const path_generations_item = path_generations + '[' + i + ']';
|
|
2276
|
-
const referencepath_generations_itemValidationError = validate$
|
|
2357
|
+
const referencepath_generations_itemValidationError = validate$g(obj_generations_item, path_generations_item);
|
|
2277
2358
|
if (referencepath_generations_itemValidationError !== null) {
|
|
2278
2359
|
let message = 'Object doesn\'t match EinsteinLlmGenerationItemRepresentation (at "' + path_generations_item + '")\n';
|
|
2279
2360
|
message += referencepath_generations_itemValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
@@ -2284,7 +2365,7 @@ function validate$6(obj, path = 'EinsteinPromptTemplateGenerationsRepresentation
|
|
|
2284
2365
|
const path_parameters = path + '.parameters';
|
|
2285
2366
|
let obj_parameters_union0 = null;
|
|
2286
2367
|
const obj_parameters_union0_error = (() => {
|
|
2287
|
-
const referencepath_parametersValidationError = validate$
|
|
2368
|
+
const referencepath_parametersValidationError = validate$f(obj_parameters, path_parameters);
|
|
2288
2369
|
if (referencepath_parametersValidationError !== null) {
|
|
2289
2370
|
let message = 'Object doesn\'t match WrappedMap (at "' + path_parameters + '")\n';
|
|
2290
2371
|
message += referencepath_parametersValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
@@ -2399,34 +2480,36 @@ function validate$6(obj, path = 'EinsteinPromptTemplateGenerationsRepresentation
|
|
|
2399
2480
|
})();
|
|
2400
2481
|
return v_error === undefined ? null : v_error;
|
|
2401
2482
|
}
|
|
2402
|
-
const RepresentationType$
|
|
2403
|
-
function keyBuilder$
|
|
2404
|
-
return keyPrefix + '::' + RepresentationType$
|
|
2483
|
+
const RepresentationType$3 = 'EinsteinPromptTemplateGenerationsRepresentation';
|
|
2484
|
+
function keyBuilder$6(luvio, config) {
|
|
2485
|
+
return keyPrefix + '::' + RepresentationType$3 + ':' + config.requestId;
|
|
2405
2486
|
}
|
|
2406
2487
|
function keyBuilderFromType(luvio, object) {
|
|
2407
2488
|
const keyParams = {
|
|
2408
2489
|
requestId: object.requestId
|
|
2409
2490
|
};
|
|
2410
|
-
return keyBuilder$
|
|
2491
|
+
return keyBuilder$6(luvio, keyParams);
|
|
2411
2492
|
}
|
|
2412
|
-
function normalize$
|
|
2493
|
+
function normalize$3(input, existing, path, luvio, store, timestamp) {
|
|
2413
2494
|
return input;
|
|
2414
2495
|
}
|
|
2415
|
-
const select$
|
|
2416
|
-
const { selections:
|
|
2417
|
-
const { selections:
|
|
2418
|
-
const { selections:
|
|
2419
|
-
const { selections:
|
|
2420
|
-
const { selections:
|
|
2496
|
+
const select$9 = function EinsteinPromptTemplateGenerationsRepresentationSelect() {
|
|
2497
|
+
const { selections: EinsteinPromptTemplateAttachmentRepresentation__selections, opaque: EinsteinPromptTemplateAttachmentRepresentation__opaque, } = select$e();
|
|
2498
|
+
const { selections: EinsteinPromptTemplateGenerationsErrorRepresentation__selections, opaque: EinsteinPromptTemplateGenerationsErrorRepresentation__opaque, } = select$d();
|
|
2499
|
+
const { selections: EinsteinLlmGenerationItemRepresentation__selections, opaque: EinsteinLlmGenerationItemRepresentation__opaque, } = select$i();
|
|
2500
|
+
const { selections: WrappedMap__selections, opaque: WrappedMap__opaque, } = select$h();
|
|
2501
|
+
const { selections: EinsteinPromptTemplateMaskContentRepresentation__selections, opaque: EinsteinPromptTemplateMaskContentRepresentation__opaque, } = select$b();
|
|
2502
|
+
const { selections: EinsteinPromptTemplateMaskDataRepresentation__selections, opaque: EinsteinPromptTemplateMaskDataRepresentation__opaque, } = select$a();
|
|
2421
2503
|
return {
|
|
2422
2504
|
kind: 'Fragment',
|
|
2423
|
-
version: VERSION$
|
|
2505
|
+
version: VERSION$5,
|
|
2424
2506
|
private: [],
|
|
2425
2507
|
selections: [
|
|
2426
2508
|
{
|
|
2427
|
-
name: '
|
|
2428
|
-
kind: '
|
|
2509
|
+
name: 'fileData',
|
|
2510
|
+
kind: 'Object',
|
|
2429
2511
|
plural: true,
|
|
2512
|
+
selections: EinsteinPromptTemplateAttachmentRepresentation__selections,
|
|
2430
2513
|
required: false
|
|
2431
2514
|
},
|
|
2432
2515
|
{
|
|
@@ -2484,7 +2567,7 @@ const select$7 = function EinsteinPromptTemplateGenerationsRepresentationSelect(
|
|
|
2484
2567
|
]
|
|
2485
2568
|
};
|
|
2486
2569
|
};
|
|
2487
|
-
function equals$
|
|
2570
|
+
function equals$5(existing, incoming) {
|
|
2488
2571
|
const existing_promptTemplateDevName = existing.promptTemplateDevName;
|
|
2489
2572
|
const incoming_promptTemplateDevName = incoming.promptTemplateDevName;
|
|
2490
2573
|
if (!(existing_promptTemplateDevName === incoming_promptTemplateDevName)) {
|
|
@@ -2495,21 +2578,21 @@ function equals$4(existing, incoming) {
|
|
|
2495
2578
|
if (!(existing_requestId === incoming_requestId)) {
|
|
2496
2579
|
return false;
|
|
2497
2580
|
}
|
|
2498
|
-
const
|
|
2499
|
-
const
|
|
2581
|
+
const existing_fileData = existing.fileData;
|
|
2582
|
+
const incoming_fileData = incoming.fileData;
|
|
2500
2583
|
// if at least one of these optionals is defined
|
|
2501
|
-
if (
|
|
2584
|
+
if (existing_fileData !== undefined || incoming_fileData !== undefined) {
|
|
2502
2585
|
// if one of these is not defined we know the other is defined and therefore
|
|
2503
2586
|
// not equal
|
|
2504
|
-
if (
|
|
2587
|
+
if (existing_fileData === undefined || incoming_fileData === undefined) {
|
|
2505
2588
|
return false;
|
|
2506
2589
|
}
|
|
2507
|
-
const
|
|
2508
|
-
if (!(
|
|
2590
|
+
const equals_fileData_items = equalsArray(existing_fileData, incoming_fileData, (existing_fileData_item, incoming_fileData_item) => {
|
|
2591
|
+
if (!(equals$a(existing_fileData_item, incoming_fileData_item))) {
|
|
2509
2592
|
return false;
|
|
2510
2593
|
}
|
|
2511
2594
|
});
|
|
2512
|
-
if (
|
|
2595
|
+
if (equals_fileData_items === false) {
|
|
2513
2596
|
return false;
|
|
2514
2597
|
}
|
|
2515
2598
|
}
|
|
@@ -2523,7 +2606,7 @@ function equals$4(existing, incoming) {
|
|
|
2523
2606
|
return false;
|
|
2524
2607
|
}
|
|
2525
2608
|
const equals_generationErrors_items = equalsArray(existing_generationErrors, incoming_generationErrors, (existing_generationErrors_item, incoming_generationErrors_item) => {
|
|
2526
|
-
if (!(equals$
|
|
2609
|
+
if (!(equals$9(existing_generationErrors_item, incoming_generationErrors_item))) {
|
|
2527
2610
|
return false;
|
|
2528
2611
|
}
|
|
2529
2612
|
});
|
|
@@ -2534,7 +2617,7 @@ function equals$4(existing, incoming) {
|
|
|
2534
2617
|
const existing_generations = existing.generations;
|
|
2535
2618
|
const incoming_generations = incoming.generations;
|
|
2536
2619
|
const equals_generations_items = equalsArray(existing_generations, incoming_generations, (existing_generations_item, incoming_generations_item) => {
|
|
2537
|
-
if (!(equals$
|
|
2620
|
+
if (!(equals$d(existing_generations_item, incoming_generations_item))) {
|
|
2538
2621
|
return false;
|
|
2539
2622
|
}
|
|
2540
2623
|
});
|
|
@@ -2546,7 +2629,7 @@ function equals$4(existing, incoming) {
|
|
|
2546
2629
|
if (!(existing_parameters === incoming_parameters
|
|
2547
2630
|
|| (existing_parameters != null &&
|
|
2548
2631
|
incoming_parameters != null &&
|
|
2549
|
-
equals$
|
|
2632
|
+
equals$c(existing_parameters, incoming_parameters)))) {
|
|
2550
2633
|
return false;
|
|
2551
2634
|
}
|
|
2552
2635
|
const existing_prompt = existing.prompt;
|
|
@@ -2564,7 +2647,7 @@ function equals$4(existing, incoming) {
|
|
|
2564
2647
|
return false;
|
|
2565
2648
|
}
|
|
2566
2649
|
const equals_requestMessages_items = equalsArray(existing_requestMessages, incoming_requestMessages, (existing_requestMessages_item, incoming_requestMessages_item) => {
|
|
2567
|
-
if (!(equals$
|
|
2650
|
+
if (!(equals$7(existing_requestMessages_item, incoming_requestMessages_item))) {
|
|
2568
2651
|
return false;
|
|
2569
2652
|
}
|
|
2570
2653
|
});
|
|
@@ -2582,7 +2665,7 @@ function equals$4(existing, incoming) {
|
|
|
2582
2665
|
return false;
|
|
2583
2666
|
}
|
|
2584
2667
|
const equals_responseMessages_items = equalsArray(existing_responseMessages, incoming_responseMessages, (existing_responseMessages_item, incoming_responseMessages_item) => {
|
|
2585
|
-
if (!(equals$
|
|
2668
|
+
if (!(equals$7(existing_responseMessages_item, incoming_responseMessages_item))) {
|
|
2586
2669
|
return false;
|
|
2587
2670
|
}
|
|
2588
2671
|
});
|
|
@@ -2600,7 +2683,7 @@ function equals$4(existing, incoming) {
|
|
|
2600
2683
|
return false;
|
|
2601
2684
|
}
|
|
2602
2685
|
const equals_slotsMaskingInformation_items = equalsArray(existing_slotsMaskingInformation, incoming_slotsMaskingInformation, (existing_slotsMaskingInformation_item, incoming_slotsMaskingInformation_item) => {
|
|
2603
|
-
if (!(equals$
|
|
2686
|
+
if (!(equals$6(existing_slotsMaskingInformation_item, incoming_slotsMaskingInformation_item))) {
|
|
2604
2687
|
return false;
|
|
2605
2688
|
}
|
|
2606
2689
|
});
|
|
@@ -2610,7 +2693,7 @@ function equals$4(existing, incoming) {
|
|
|
2610
2693
|
}
|
|
2611
2694
|
return true;
|
|
2612
2695
|
}
|
|
2613
|
-
const ingest$
|
|
2696
|
+
const ingest$3 = function EinsteinPromptTemplateGenerationsRepresentationIngest(input, path, luvio, store, timestamp) {
|
|
2614
2697
|
if (process.env.NODE_ENV !== 'production') {
|
|
2615
2698
|
const validateError = validate$6(input);
|
|
2616
2699
|
if (validateError !== null) {
|
|
@@ -2618,33 +2701,33 @@ const ingest$2 = function EinsteinPromptTemplateGenerationsRepresentationIngest(
|
|
|
2618
2701
|
}
|
|
2619
2702
|
}
|
|
2620
2703
|
const key = keyBuilderFromType(luvio, input);
|
|
2621
|
-
const ttlToUse = TTL$
|
|
2622
|
-
ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize$
|
|
2704
|
+
const ttlToUse = TTL$3;
|
|
2705
|
+
ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize$3, "EinsteinLLM", VERSION$5, RepresentationType$3, equals$5);
|
|
2623
2706
|
return createLink(key);
|
|
2624
2707
|
};
|
|
2625
|
-
function getTypeCacheKeys$
|
|
2708
|
+
function getTypeCacheKeys$3(rootKeySet, luvio, input, fullPathFactory) {
|
|
2626
2709
|
// root cache key (uses fullPathFactory if keyBuilderFromType isn't defined)
|
|
2627
2710
|
const rootKey = keyBuilderFromType(luvio, input);
|
|
2628
2711
|
rootKeySet.set(rootKey, {
|
|
2629
2712
|
namespace: keyPrefix,
|
|
2630
|
-
representationName: RepresentationType$
|
|
2713
|
+
representationName: RepresentationType$3,
|
|
2631
2714
|
mergeable: false
|
|
2632
2715
|
});
|
|
2633
2716
|
}
|
|
2634
2717
|
|
|
2635
|
-
function select$
|
|
2636
|
-
return select$
|
|
2718
|
+
function select$8(luvio, params) {
|
|
2719
|
+
return select$9();
|
|
2637
2720
|
}
|
|
2638
|
-
function getResponseCacheKeys$
|
|
2639
|
-
getTypeCacheKeys$
|
|
2721
|
+
function getResponseCacheKeys$3(storeKeyMap, luvio, resourceParams, response) {
|
|
2722
|
+
getTypeCacheKeys$3(storeKeyMap, luvio, response);
|
|
2640
2723
|
}
|
|
2641
|
-
function ingestSuccess$
|
|
2724
|
+
function ingestSuccess$3(luvio, resourceParams, response) {
|
|
2642
2725
|
const { body } = response;
|
|
2643
2726
|
const key = keyBuilderFromType(luvio, body);
|
|
2644
|
-
luvio.storeIngest(key, ingest$
|
|
2727
|
+
luvio.storeIngest(key, ingest$3, body);
|
|
2645
2728
|
const snapshot = luvio.storeLookup({
|
|
2646
2729
|
recordId: key,
|
|
2647
|
-
node: select$
|
|
2730
|
+
node: select$8(),
|
|
2648
2731
|
variables: {},
|
|
2649
2732
|
});
|
|
2650
2733
|
if (process.env.NODE_ENV !== 'production') {
|
|
@@ -2655,7 +2738,7 @@ function ingestSuccess$2(luvio, resourceParams, response) {
|
|
|
2655
2738
|
deepFreeze(snapshot.data);
|
|
2656
2739
|
return snapshot;
|
|
2657
2740
|
}
|
|
2658
|
-
function createResourceRequest$
|
|
2741
|
+
function createResourceRequest$3(config) {
|
|
2659
2742
|
const headers = {};
|
|
2660
2743
|
return {
|
|
2661
2744
|
baseUri: '/services/data/v63.0',
|
|
@@ -2669,48 +2752,48 @@ function createResourceRequest$2(config) {
|
|
|
2669
2752
|
};
|
|
2670
2753
|
}
|
|
2671
2754
|
|
|
2672
|
-
const adapterName$
|
|
2755
|
+
const adapterName$3 = 'createGenerationsForPromptTemplate';
|
|
2673
2756
|
const createGenerationsForPromptTemplate_ConfigPropertyMetadata = [
|
|
2674
2757
|
generateParamConfigMetadata('promptTemplateDevName', true, 0 /* UrlParameter */, 0 /* String */),
|
|
2675
2758
|
generateParamConfigMetadata('versionId', false, 1 /* QueryParameter */, 0 /* String */),
|
|
2676
2759
|
generateParamConfigMetadata('promptTemplateGenerationsInput', true, 2 /* Body */, 4 /* Unsupported */),
|
|
2677
2760
|
];
|
|
2678
|
-
const createGenerationsForPromptTemplate_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$
|
|
2679
|
-
const createResourceParams$
|
|
2680
|
-
function typeCheckConfig$
|
|
2761
|
+
const createGenerationsForPromptTemplate_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$3, createGenerationsForPromptTemplate_ConfigPropertyMetadata);
|
|
2762
|
+
const createResourceParams$3 = /*#__PURE__*/ createResourceParams$7(createGenerationsForPromptTemplate_ConfigPropertyMetadata);
|
|
2763
|
+
function typeCheckConfig$3(untrustedConfig) {
|
|
2681
2764
|
const config = {};
|
|
2682
|
-
typeCheckConfig$
|
|
2765
|
+
typeCheckConfig$7(untrustedConfig, config, createGenerationsForPromptTemplate_ConfigPropertyMetadata);
|
|
2683
2766
|
const untrustedConfig_promptTemplateGenerationsInput = untrustedConfig.promptTemplateGenerationsInput;
|
|
2684
|
-
const referenceEinsteinPromptTemplateGenerationsInputRepresentationValidationError = validate$
|
|
2767
|
+
const referenceEinsteinPromptTemplateGenerationsInputRepresentationValidationError = validate$c(untrustedConfig_promptTemplateGenerationsInput);
|
|
2685
2768
|
if (referenceEinsteinPromptTemplateGenerationsInputRepresentationValidationError === null) {
|
|
2686
2769
|
config.promptTemplateGenerationsInput = untrustedConfig_promptTemplateGenerationsInput;
|
|
2687
2770
|
}
|
|
2688
2771
|
return config;
|
|
2689
2772
|
}
|
|
2690
|
-
function validateAdapterConfig$
|
|
2773
|
+
function validateAdapterConfig$3(untrustedConfig, configPropertyNames) {
|
|
2691
2774
|
if (!untrustedIsObject(untrustedConfig)) {
|
|
2692
2775
|
return null;
|
|
2693
2776
|
}
|
|
2694
2777
|
if (process.env.NODE_ENV !== 'production') {
|
|
2695
2778
|
validateConfig(untrustedConfig, configPropertyNames);
|
|
2696
2779
|
}
|
|
2697
|
-
const config = typeCheckConfig$
|
|
2780
|
+
const config = typeCheckConfig$3(untrustedConfig);
|
|
2698
2781
|
if (!areRequiredParametersPresent(config, configPropertyNames)) {
|
|
2699
2782
|
return null;
|
|
2700
2783
|
}
|
|
2701
2784
|
return config;
|
|
2702
2785
|
}
|
|
2703
|
-
function buildNetworkSnapshot$
|
|
2704
|
-
const resourceParams = createResourceParams$
|
|
2705
|
-
const request = createResourceRequest$
|
|
2786
|
+
function buildNetworkSnapshot$3(luvio, config, options) {
|
|
2787
|
+
const resourceParams = createResourceParams$3(config);
|
|
2788
|
+
const request = createResourceRequest$3(resourceParams);
|
|
2706
2789
|
return luvio.dispatchResourceRequest(request, options)
|
|
2707
2790
|
.then((response) => {
|
|
2708
2791
|
return luvio.handleSuccessResponse(() => {
|
|
2709
|
-
const snapshot = ingestSuccess$
|
|
2792
|
+
const snapshot = ingestSuccess$3(luvio, resourceParams, response);
|
|
2710
2793
|
return luvio.storeBroadcast().then(() => snapshot);
|
|
2711
2794
|
}, () => {
|
|
2712
2795
|
const cache = new StoreKeyMap();
|
|
2713
|
-
getResponseCacheKeys$
|
|
2796
|
+
getResponseCacheKeys$3(cache, luvio, resourceParams, response.body);
|
|
2714
2797
|
return cache;
|
|
2715
2798
|
});
|
|
2716
2799
|
}, (response) => {
|
|
@@ -2720,16 +2803,16 @@ function buildNetworkSnapshot$2(luvio, config, options) {
|
|
|
2720
2803
|
}
|
|
2721
2804
|
const createGenerationsForPromptTemplateAdapterFactory = (luvio) => {
|
|
2722
2805
|
return function createGenerationsForPromptTemplate(untrustedConfig) {
|
|
2723
|
-
const config = validateAdapterConfig$
|
|
2806
|
+
const config = validateAdapterConfig$3(untrustedConfig, createGenerationsForPromptTemplate_ConfigPropertyNames);
|
|
2724
2807
|
// Invalid or incomplete config
|
|
2725
2808
|
if (config === null) {
|
|
2726
2809
|
throw new Error('Invalid config for "createGenerationsForPromptTemplate"');
|
|
2727
2810
|
}
|
|
2728
|
-
return buildNetworkSnapshot$
|
|
2811
|
+
return buildNetworkSnapshot$3(luvio, config);
|
|
2729
2812
|
};
|
|
2730
2813
|
};
|
|
2731
2814
|
|
|
2732
|
-
const VERSION$
|
|
2815
|
+
const VERSION$4 = "b513bbac1672327d8eaaf120660e94b5";
|
|
2733
2816
|
function validate$5(obj, path = 'EinsteinPromptTemplateSupportedLanguageErrorRepresentation') {
|
|
2734
2817
|
const v_error = (() => {
|
|
2735
2818
|
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
@@ -2748,10 +2831,10 @@ function validate$5(obj, path = 'EinsteinPromptTemplateSupportedLanguageErrorRep
|
|
|
2748
2831
|
})();
|
|
2749
2832
|
return v_error === undefined ? null : v_error;
|
|
2750
2833
|
}
|
|
2751
|
-
const select$
|
|
2834
|
+
const select$7 = function EinsteinPromptTemplateSupportedLanguageErrorRepresentationSelect() {
|
|
2752
2835
|
return {
|
|
2753
2836
|
kind: 'Fragment',
|
|
2754
|
-
version: VERSION$
|
|
2837
|
+
version: VERSION$4,
|
|
2755
2838
|
private: [],
|
|
2756
2839
|
selections: [
|
|
2757
2840
|
{
|
|
@@ -2765,7 +2848,7 @@ const select$5 = function EinsteinPromptTemplateSupportedLanguageErrorRepresenta
|
|
|
2765
2848
|
]
|
|
2766
2849
|
};
|
|
2767
2850
|
};
|
|
2768
|
-
function equals$
|
|
2851
|
+
function equals$4(existing, incoming) {
|
|
2769
2852
|
const existing_errorMessage = existing.errorMessage;
|
|
2770
2853
|
const incoming_errorMessage = incoming.errorMessage;
|
|
2771
2854
|
if (!(existing_errorMessage === incoming_errorMessage)) {
|
|
@@ -2779,7 +2862,7 @@ function equals$3(existing, incoming) {
|
|
|
2779
2862
|
return true;
|
|
2780
2863
|
}
|
|
2781
2864
|
|
|
2782
|
-
const VERSION$
|
|
2865
|
+
const VERSION$3 = "65a17d345c28eeca91872a73d8ffe9fd";
|
|
2783
2866
|
function validate$4(obj, path = 'EinsteinPromptTemplateSupportedLanguageRepresentation') {
|
|
2784
2867
|
const v_error = (() => {
|
|
2785
2868
|
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
@@ -2798,10 +2881,10 @@ function validate$4(obj, path = 'EinsteinPromptTemplateSupportedLanguageRepresen
|
|
|
2798
2881
|
})();
|
|
2799
2882
|
return v_error === undefined ? null : v_error;
|
|
2800
2883
|
}
|
|
2801
|
-
const select$
|
|
2884
|
+
const select$6 = function EinsteinPromptTemplateSupportedLanguageRepresentationSelect() {
|
|
2802
2885
|
return {
|
|
2803
2886
|
kind: 'Fragment',
|
|
2804
|
-
version: VERSION$
|
|
2887
|
+
version: VERSION$3,
|
|
2805
2888
|
private: [],
|
|
2806
2889
|
selections: [
|
|
2807
2890
|
{
|
|
@@ -2815,7 +2898,7 @@ const select$4 = function EinsteinPromptTemplateSupportedLanguageRepresentationS
|
|
|
2815
2898
|
]
|
|
2816
2899
|
};
|
|
2817
2900
|
};
|
|
2818
|
-
function equals$
|
|
2901
|
+
function equals$3(existing, incoming) {
|
|
2819
2902
|
const existing_languageCode = existing.languageCode;
|
|
2820
2903
|
const incoming_languageCode = incoming.languageCode;
|
|
2821
2904
|
if (!(existing_languageCode === incoming_languageCode)) {
|
|
@@ -2829,8 +2912,8 @@ function equals$2(existing, incoming) {
|
|
|
2829
2912
|
return true;
|
|
2830
2913
|
}
|
|
2831
2914
|
|
|
2832
|
-
const TTL$
|
|
2833
|
-
const VERSION$
|
|
2915
|
+
const TTL$2 = 100;
|
|
2916
|
+
const VERSION$2 = "c635f260bce9a11f7c3bf31d60f42b53";
|
|
2834
2917
|
function validate$3(obj, path = 'EinsteinPromptTemplateVersionOutputLanguagesRepresentation') {
|
|
2835
2918
|
const v_error = (() => {
|
|
2836
2919
|
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
@@ -2884,16 +2967,16 @@ function validate$3(obj, path = 'EinsteinPromptTemplateVersionOutputLanguagesRep
|
|
|
2884
2967
|
})();
|
|
2885
2968
|
return v_error === undefined ? null : v_error;
|
|
2886
2969
|
}
|
|
2887
|
-
const RepresentationType$
|
|
2888
|
-
function normalize$
|
|
2970
|
+
const RepresentationType$2 = 'EinsteinPromptTemplateVersionOutputLanguagesRepresentation';
|
|
2971
|
+
function normalize$2(input, existing, path, luvio, store, timestamp) {
|
|
2889
2972
|
return input;
|
|
2890
2973
|
}
|
|
2891
|
-
const select$
|
|
2892
|
-
const { selections: EinsteinPromptTemplateSupportedLanguageErrorRepresentation__selections, opaque: EinsteinPromptTemplateSupportedLanguageErrorRepresentation__opaque, } = select$
|
|
2893
|
-
const { selections: EinsteinPromptTemplateSupportedLanguageRepresentation__selections, opaque: EinsteinPromptTemplateSupportedLanguageRepresentation__opaque, } = select$
|
|
2974
|
+
const select$5 = function EinsteinPromptTemplateVersionOutputLanguagesRepresentationSelect() {
|
|
2975
|
+
const { selections: EinsteinPromptTemplateSupportedLanguageErrorRepresentation__selections, opaque: EinsteinPromptTemplateSupportedLanguageErrorRepresentation__opaque, } = select$7();
|
|
2976
|
+
const { selections: EinsteinPromptTemplateSupportedLanguageRepresentation__selections, opaque: EinsteinPromptTemplateSupportedLanguageRepresentation__opaque, } = select$6();
|
|
2894
2977
|
return {
|
|
2895
2978
|
kind: 'Fragment',
|
|
2896
|
-
version: VERSION$
|
|
2979
|
+
version: VERSION$2,
|
|
2897
2980
|
private: [],
|
|
2898
2981
|
selections: [
|
|
2899
2982
|
{
|
|
@@ -2923,7 +3006,7 @@ const select$3 = function EinsteinPromptTemplateVersionOutputLanguagesRepresenta
|
|
|
2923
3006
|
]
|
|
2924
3007
|
};
|
|
2925
3008
|
};
|
|
2926
|
-
function equals$
|
|
3009
|
+
function equals$2(existing, incoming) {
|
|
2927
3010
|
const existing_isSuccess = existing.isSuccess;
|
|
2928
3011
|
const incoming_isSuccess = incoming.isSuccess;
|
|
2929
3012
|
if (!(existing_isSuccess === incoming_isSuccess)) {
|
|
@@ -2942,7 +3025,7 @@ function equals$1(existing, incoming) {
|
|
|
2942
3025
|
const existing_errors = existing.errors;
|
|
2943
3026
|
const incoming_errors = incoming.errors;
|
|
2944
3027
|
const equals_errors_items = equalsArray(existing_errors, incoming_errors, (existing_errors_item, incoming_errors_item) => {
|
|
2945
|
-
if (!(equals$
|
|
3028
|
+
if (!(equals$4(existing_errors_item, incoming_errors_item))) {
|
|
2946
3029
|
return false;
|
|
2947
3030
|
}
|
|
2948
3031
|
});
|
|
@@ -2952,7 +3035,7 @@ function equals$1(existing, incoming) {
|
|
|
2952
3035
|
const existing_supportedLanguages = existing.supportedLanguages;
|
|
2953
3036
|
const incoming_supportedLanguages = incoming.supportedLanguages;
|
|
2954
3037
|
const equals_supportedLanguages_items = equalsArray(existing_supportedLanguages, incoming_supportedLanguages, (existing_supportedLanguages_item, incoming_supportedLanguages_item) => {
|
|
2955
|
-
if (!(equals$
|
|
3038
|
+
if (!(equals$3(existing_supportedLanguages_item, incoming_supportedLanguages_item))) {
|
|
2956
3039
|
return false;
|
|
2957
3040
|
}
|
|
2958
3041
|
});
|
|
@@ -2961,7 +3044,7 @@ function equals$1(existing, incoming) {
|
|
|
2961
3044
|
}
|
|
2962
3045
|
return true;
|
|
2963
3046
|
}
|
|
2964
|
-
const ingest$
|
|
3047
|
+
const ingest$2 = function EinsteinPromptTemplateVersionOutputLanguagesRepresentationIngest(input, path, luvio, store, timestamp) {
|
|
2965
3048
|
if (process.env.NODE_ENV !== 'production') {
|
|
2966
3049
|
const validateError = validate$3(input);
|
|
2967
3050
|
if (validateError !== null) {
|
|
@@ -2969,36 +3052,36 @@ const ingest$1 = function EinsteinPromptTemplateVersionOutputLanguagesRepresenta
|
|
|
2969
3052
|
}
|
|
2970
3053
|
}
|
|
2971
3054
|
const key = path.fullPath;
|
|
2972
|
-
const ttlToUse = TTL$
|
|
2973
|
-
ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize$
|
|
3055
|
+
const ttlToUse = TTL$2;
|
|
3056
|
+
ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize$2, "EinsteinLLM", VERSION$2, RepresentationType$2, equals$2);
|
|
2974
3057
|
return createLink(key);
|
|
2975
3058
|
};
|
|
2976
|
-
function getTypeCacheKeys$
|
|
3059
|
+
function getTypeCacheKeys$2(rootKeySet, luvio, input, fullPathFactory) {
|
|
2977
3060
|
// root cache key (uses fullPathFactory if keyBuilderFromType isn't defined)
|
|
2978
3061
|
const rootKey = fullPathFactory();
|
|
2979
3062
|
rootKeySet.set(rootKey, {
|
|
2980
3063
|
namespace: keyPrefix,
|
|
2981
|
-
representationName: RepresentationType$
|
|
3064
|
+
representationName: RepresentationType$2,
|
|
2982
3065
|
mergeable: false
|
|
2983
3066
|
});
|
|
2984
3067
|
}
|
|
2985
3068
|
|
|
2986
|
-
function select$
|
|
2987
|
-
return select$
|
|
3069
|
+
function select$4(luvio, params) {
|
|
3070
|
+
return select$5();
|
|
2988
3071
|
}
|
|
2989
|
-
function keyBuilder$
|
|
3072
|
+
function keyBuilder$5(luvio, params) {
|
|
2990
3073
|
return keyPrefix + '::EinsteinPromptTemplateVersionOutputLanguagesRepresentation:(' + 'useStandardVersion:' + params.queryParams.useStandardVersion + ',' + 'versionId:' + params.queryParams.versionId + ',' + 'promptTemplateDevName:' + params.urlParams.promptTemplateDevName + ')';
|
|
2991
3074
|
}
|
|
2992
|
-
function getResponseCacheKeys$
|
|
2993
|
-
getTypeCacheKeys$
|
|
3075
|
+
function getResponseCacheKeys$2(storeKeyMap, luvio, resourceParams, response) {
|
|
3076
|
+
getTypeCacheKeys$2(storeKeyMap, luvio, response, () => keyBuilder$5(luvio, resourceParams));
|
|
2994
3077
|
}
|
|
2995
|
-
function ingestSuccess$
|
|
3078
|
+
function ingestSuccess$2(luvio, resourceParams, response, snapshotRefresh) {
|
|
2996
3079
|
const { body } = response;
|
|
2997
|
-
const key = keyBuilder$
|
|
2998
|
-
luvio.storeIngest(key, ingest$
|
|
3080
|
+
const key = keyBuilder$5(luvio, resourceParams);
|
|
3081
|
+
luvio.storeIngest(key, ingest$2, body);
|
|
2999
3082
|
const snapshot = luvio.storeLookup({
|
|
3000
3083
|
recordId: key,
|
|
3001
|
-
node: select$
|
|
3084
|
+
node: select$4(),
|
|
3002
3085
|
variables: {},
|
|
3003
3086
|
}, snapshotRefresh);
|
|
3004
3087
|
if (process.env.NODE_ENV !== 'production') {
|
|
@@ -3009,19 +3092,19 @@ function ingestSuccess$1(luvio, resourceParams, response, snapshotRefresh) {
|
|
|
3009
3092
|
deepFreeze(snapshot.data);
|
|
3010
3093
|
return snapshot;
|
|
3011
3094
|
}
|
|
3012
|
-
function ingestError$
|
|
3013
|
-
const key = keyBuilder$
|
|
3095
|
+
function ingestError$2(luvio, params, error, snapshotRefresh) {
|
|
3096
|
+
const key = keyBuilder$5(luvio, params);
|
|
3014
3097
|
const errorSnapshot = luvio.errorSnapshot(error, snapshotRefresh);
|
|
3015
3098
|
const storeMetadataParams = {
|
|
3016
|
-
ttl: TTL$
|
|
3099
|
+
ttl: TTL$2,
|
|
3017
3100
|
namespace: keyPrefix,
|
|
3018
|
-
version: VERSION$
|
|
3019
|
-
representationName: RepresentationType$
|
|
3101
|
+
version: VERSION$2,
|
|
3102
|
+
representationName: RepresentationType$2
|
|
3020
3103
|
};
|
|
3021
3104
|
luvio.storeIngestError(key, errorSnapshot, storeMetadataParams);
|
|
3022
3105
|
return errorSnapshot;
|
|
3023
3106
|
}
|
|
3024
|
-
function createResourceRequest$
|
|
3107
|
+
function createResourceRequest$2(config) {
|
|
3025
3108
|
const headers = {};
|
|
3026
3109
|
return {
|
|
3027
3110
|
baseUri: '/services/data/v63.0',
|
|
@@ -3035,92 +3118,92 @@ function createResourceRequest$1(config) {
|
|
|
3035
3118
|
};
|
|
3036
3119
|
}
|
|
3037
3120
|
|
|
3038
|
-
const adapterName$
|
|
3121
|
+
const adapterName$2 = 'getOutputLanguages';
|
|
3039
3122
|
const getOutputLanguages_ConfigPropertyMetadata = [
|
|
3040
3123
|
generateParamConfigMetadata('promptTemplateDevName', true, 0 /* UrlParameter */, 0 /* String */),
|
|
3041
3124
|
generateParamConfigMetadata('useStandardVersion', false, 1 /* QueryParameter */, 1 /* Boolean */),
|
|
3042
3125
|
generateParamConfigMetadata('versionId', false, 1 /* QueryParameter */, 0 /* String */),
|
|
3043
3126
|
];
|
|
3044
|
-
const getOutputLanguages_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$
|
|
3045
|
-
const createResourceParams$
|
|
3046
|
-
function keyBuilder$
|
|
3047
|
-
const resourceParams = createResourceParams$
|
|
3048
|
-
return keyBuilder$
|
|
3127
|
+
const getOutputLanguages_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$2, getOutputLanguages_ConfigPropertyMetadata);
|
|
3128
|
+
const createResourceParams$2 = /*#__PURE__*/ createResourceParams$7(getOutputLanguages_ConfigPropertyMetadata);
|
|
3129
|
+
function keyBuilder$4(luvio, config) {
|
|
3130
|
+
const resourceParams = createResourceParams$2(config);
|
|
3131
|
+
return keyBuilder$5(luvio, resourceParams);
|
|
3049
3132
|
}
|
|
3050
|
-
function typeCheckConfig$
|
|
3133
|
+
function typeCheckConfig$2(untrustedConfig) {
|
|
3051
3134
|
const config = {};
|
|
3052
|
-
typeCheckConfig$
|
|
3135
|
+
typeCheckConfig$7(untrustedConfig, config, getOutputLanguages_ConfigPropertyMetadata);
|
|
3053
3136
|
return config;
|
|
3054
3137
|
}
|
|
3055
|
-
function validateAdapterConfig$
|
|
3138
|
+
function validateAdapterConfig$2(untrustedConfig, configPropertyNames) {
|
|
3056
3139
|
if (!untrustedIsObject(untrustedConfig)) {
|
|
3057
3140
|
return null;
|
|
3058
3141
|
}
|
|
3059
3142
|
if (process.env.NODE_ENV !== 'production') {
|
|
3060
3143
|
validateConfig(untrustedConfig, configPropertyNames);
|
|
3061
3144
|
}
|
|
3062
|
-
const config = typeCheckConfig$
|
|
3145
|
+
const config = typeCheckConfig$2(untrustedConfig);
|
|
3063
3146
|
if (!areRequiredParametersPresent(config, configPropertyNames)) {
|
|
3064
3147
|
return null;
|
|
3065
3148
|
}
|
|
3066
3149
|
return config;
|
|
3067
3150
|
}
|
|
3068
|
-
function adapterFragment$
|
|
3069
|
-
createResourceParams$
|
|
3070
|
-
return select$
|
|
3151
|
+
function adapterFragment$2(luvio, config) {
|
|
3152
|
+
createResourceParams$2(config);
|
|
3153
|
+
return select$4();
|
|
3071
3154
|
}
|
|
3072
|
-
function onFetchResponseSuccess$
|
|
3073
|
-
const snapshot = ingestSuccess$
|
|
3155
|
+
function onFetchResponseSuccess$2(luvio, config, resourceParams, response) {
|
|
3156
|
+
const snapshot = ingestSuccess$2(luvio, resourceParams, response, {
|
|
3074
3157
|
config,
|
|
3075
|
-
resolve: () => buildNetworkSnapshot$
|
|
3158
|
+
resolve: () => buildNetworkSnapshot$2(luvio, config, snapshotRefreshOptions)
|
|
3076
3159
|
});
|
|
3077
3160
|
return luvio.storeBroadcast().then(() => snapshot);
|
|
3078
3161
|
}
|
|
3079
|
-
function onFetchResponseError$
|
|
3080
|
-
const snapshot = ingestError$
|
|
3162
|
+
function onFetchResponseError$2(luvio, config, resourceParams, response) {
|
|
3163
|
+
const snapshot = ingestError$2(luvio, resourceParams, response, {
|
|
3081
3164
|
config,
|
|
3082
|
-
resolve: () => buildNetworkSnapshot$
|
|
3165
|
+
resolve: () => buildNetworkSnapshot$2(luvio, config, snapshotRefreshOptions)
|
|
3083
3166
|
});
|
|
3084
3167
|
return luvio.storeBroadcast().then(() => snapshot);
|
|
3085
3168
|
}
|
|
3086
|
-
function buildNetworkSnapshot$
|
|
3087
|
-
const resourceParams = createResourceParams$
|
|
3088
|
-
const request = createResourceRequest$
|
|
3169
|
+
function buildNetworkSnapshot$2(luvio, config, options) {
|
|
3170
|
+
const resourceParams = createResourceParams$2(config);
|
|
3171
|
+
const request = createResourceRequest$2(resourceParams);
|
|
3089
3172
|
return luvio.dispatchResourceRequest(request, options)
|
|
3090
3173
|
.then((response) => {
|
|
3091
|
-
return luvio.handleSuccessResponse(() => onFetchResponseSuccess$
|
|
3174
|
+
return luvio.handleSuccessResponse(() => onFetchResponseSuccess$2(luvio, config, resourceParams, response), () => {
|
|
3092
3175
|
const cache = new StoreKeyMap();
|
|
3093
|
-
getResponseCacheKeys$
|
|
3176
|
+
getResponseCacheKeys$2(cache, luvio, resourceParams, response.body);
|
|
3094
3177
|
return cache;
|
|
3095
3178
|
});
|
|
3096
3179
|
}, (response) => {
|
|
3097
|
-
return luvio.handleErrorResponse(() => onFetchResponseError$
|
|
3180
|
+
return luvio.handleErrorResponse(() => onFetchResponseError$2(luvio, config, resourceParams, response));
|
|
3098
3181
|
});
|
|
3099
3182
|
}
|
|
3100
|
-
function buildNetworkSnapshotCachePolicy$
|
|
3101
|
-
return buildNetworkSnapshotCachePolicy$
|
|
3183
|
+
function buildNetworkSnapshotCachePolicy$2(context, coercedAdapterRequestContext) {
|
|
3184
|
+
return buildNetworkSnapshotCachePolicy$4(context, coercedAdapterRequestContext, buildNetworkSnapshot$2, undefined, false);
|
|
3102
3185
|
}
|
|
3103
|
-
function buildCachedSnapshotCachePolicy$
|
|
3186
|
+
function buildCachedSnapshotCachePolicy$2(context, storeLookup) {
|
|
3104
3187
|
const { luvio, config } = context;
|
|
3105
3188
|
const selector = {
|
|
3106
|
-
recordId: keyBuilder$
|
|
3107
|
-
node: adapterFragment$
|
|
3189
|
+
recordId: keyBuilder$4(luvio, config),
|
|
3190
|
+
node: adapterFragment$2(luvio, config),
|
|
3108
3191
|
variables: {},
|
|
3109
3192
|
};
|
|
3110
3193
|
const cacheSnapshot = storeLookup(selector, {
|
|
3111
3194
|
config,
|
|
3112
|
-
resolve: () => buildNetworkSnapshot$
|
|
3195
|
+
resolve: () => buildNetworkSnapshot$2(luvio, config, snapshotRefreshOptions)
|
|
3113
3196
|
});
|
|
3114
3197
|
return cacheSnapshot;
|
|
3115
3198
|
}
|
|
3116
3199
|
const getOutputLanguagesAdapterFactory = (luvio) => function EinsteinLLM__getOutputLanguages(untrustedConfig, requestContext) {
|
|
3117
|
-
const config = validateAdapterConfig$
|
|
3200
|
+
const config = validateAdapterConfig$2(untrustedConfig, getOutputLanguages_ConfigPropertyNames);
|
|
3118
3201
|
// Invalid or incomplete config
|
|
3119
3202
|
if (config === null) {
|
|
3120
3203
|
return null;
|
|
3121
3204
|
}
|
|
3122
3205
|
return luvio.applyCachePolicy((requestContext || {}), { config, luvio }, // BuildSnapshotContext
|
|
3123
|
-
buildCachedSnapshotCachePolicy$
|
|
3206
|
+
buildCachedSnapshotCachePolicy$2, buildNetworkSnapshotCachePolicy$2);
|
|
3124
3207
|
};
|
|
3125
3208
|
|
|
3126
3209
|
function validate$2(obj, path = 'EinsteinPromptRecordFieldRepresentation') {
|
|
@@ -3183,6 +3266,8 @@ function validate$2(obj, path = 'EinsteinPromptRecordFieldRepresentation') {
|
|
|
3183
3266
|
return v_error === undefined ? null : v_error;
|
|
3184
3267
|
}
|
|
3185
3268
|
|
|
3269
|
+
const TTL$1 = 100;
|
|
3270
|
+
const VERSION$1 = "ade243411889bb9f3753d7f300fa3657";
|
|
3186
3271
|
function validate$1(obj, path = 'EinsteinPromptRecordRepresentation') {
|
|
3187
3272
|
const v_error = (() => {
|
|
3188
3273
|
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
@@ -3243,9 +3328,187 @@ function validate$1(obj, path = 'EinsteinPromptRecordRepresentation') {
|
|
|
3243
3328
|
})();
|
|
3244
3329
|
return v_error === undefined ? null : v_error;
|
|
3245
3330
|
}
|
|
3331
|
+
const RepresentationType$1 = 'EinsteinPromptRecordRepresentation';
|
|
3332
|
+
function normalize$1(input, existing, path, luvio, store, timestamp) {
|
|
3333
|
+
return input;
|
|
3334
|
+
}
|
|
3335
|
+
const select$3 = function EinsteinPromptRecordRepresentationSelect() {
|
|
3336
|
+
return {
|
|
3337
|
+
kind: 'Fragment',
|
|
3338
|
+
version: VERSION$1,
|
|
3339
|
+
private: [],
|
|
3340
|
+
opaque: true
|
|
3341
|
+
};
|
|
3342
|
+
};
|
|
3343
|
+
function equals$1(existing, incoming) {
|
|
3344
|
+
if (JSONStringify(incoming) !== JSONStringify(existing)) {
|
|
3345
|
+
return false;
|
|
3346
|
+
}
|
|
3347
|
+
return true;
|
|
3348
|
+
}
|
|
3349
|
+
const ingest$1 = function EinsteinPromptRecordRepresentationIngest(input, path, luvio, store, timestamp) {
|
|
3350
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
3351
|
+
const validateError = validate$1(input);
|
|
3352
|
+
if (validateError !== null) {
|
|
3353
|
+
throw validateError;
|
|
3354
|
+
}
|
|
3355
|
+
}
|
|
3356
|
+
const key = path.fullPath;
|
|
3357
|
+
const ttlToUse = TTL$1;
|
|
3358
|
+
ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize$1, "EinsteinLLM", VERSION$1, RepresentationType$1, equals$1);
|
|
3359
|
+
return createLink(key);
|
|
3360
|
+
};
|
|
3361
|
+
function getTypeCacheKeys$1(rootKeySet, luvio, input, fullPathFactory) {
|
|
3362
|
+
// root cache key (uses fullPathFactory if keyBuilderFromType isn't defined)
|
|
3363
|
+
const rootKey = fullPathFactory();
|
|
3364
|
+
rootKeySet.set(rootKey, {
|
|
3365
|
+
namespace: keyPrefix,
|
|
3366
|
+
representationName: RepresentationType$1,
|
|
3367
|
+
mergeable: false
|
|
3368
|
+
});
|
|
3369
|
+
}
|
|
3370
|
+
|
|
3371
|
+
function select$2(luvio, params) {
|
|
3372
|
+
return select$3();
|
|
3373
|
+
}
|
|
3374
|
+
function keyBuilder$3(luvio, params) {
|
|
3375
|
+
return keyPrefix + '::EinsteinPromptRecordRepresentation:(' + 'versionId:' + params.queryParams.versionId + ',' + 'promptTemplateDevName:' + params.urlParams.promptTemplateDevName + ')';
|
|
3376
|
+
}
|
|
3377
|
+
function getResponseCacheKeys$1(storeKeyMap, luvio, resourceParams, response) {
|
|
3378
|
+
getTypeCacheKeys$1(storeKeyMap, luvio, response, () => keyBuilder$3(luvio, resourceParams));
|
|
3379
|
+
}
|
|
3380
|
+
function ingestSuccess$1(luvio, resourceParams, response, snapshotRefresh) {
|
|
3381
|
+
const { body } = response;
|
|
3382
|
+
const key = keyBuilder$3(luvio, resourceParams);
|
|
3383
|
+
luvio.storeIngest(key, ingest$1, body);
|
|
3384
|
+
const snapshot = luvio.storeLookup({
|
|
3385
|
+
recordId: key,
|
|
3386
|
+
node: select$2(),
|
|
3387
|
+
variables: {},
|
|
3388
|
+
}, snapshotRefresh);
|
|
3389
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
3390
|
+
if (snapshot.state !== 'Fulfilled') {
|
|
3391
|
+
throw new Error('Invalid network response. Expected resource response to result in Fulfilled snapshot');
|
|
3392
|
+
}
|
|
3393
|
+
}
|
|
3394
|
+
deepFreeze(snapshot.data);
|
|
3395
|
+
return snapshot;
|
|
3396
|
+
}
|
|
3397
|
+
function ingestError$1(luvio, params, error, snapshotRefresh) {
|
|
3398
|
+
const key = keyBuilder$3(luvio, params);
|
|
3399
|
+
const errorSnapshot = luvio.errorSnapshot(error, snapshotRefresh);
|
|
3400
|
+
const storeMetadataParams = {
|
|
3401
|
+
ttl: TTL$1,
|
|
3402
|
+
namespace: keyPrefix,
|
|
3403
|
+
version: VERSION$1,
|
|
3404
|
+
representationName: RepresentationType$1
|
|
3405
|
+
};
|
|
3406
|
+
luvio.storeIngestError(key, errorSnapshot, storeMetadataParams);
|
|
3407
|
+
return errorSnapshot;
|
|
3408
|
+
}
|
|
3409
|
+
function createResourceRequest$1(config) {
|
|
3410
|
+
const headers = {};
|
|
3411
|
+
return {
|
|
3412
|
+
baseUri: '/services/data/v63.0',
|
|
3413
|
+
basePath: '/einstein/prompt-templates/' + config.urlParams.promptTemplateDevName + '',
|
|
3414
|
+
method: 'get',
|
|
3415
|
+
body: null,
|
|
3416
|
+
urlParams: config.urlParams,
|
|
3417
|
+
queryParams: config.queryParams,
|
|
3418
|
+
headers,
|
|
3419
|
+
priority: 'normal',
|
|
3420
|
+
};
|
|
3421
|
+
}
|
|
3422
|
+
|
|
3423
|
+
const adapterName$1 = 'getPromptTemplate';
|
|
3424
|
+
const getPromptTemplate_ConfigPropertyMetadata = [
|
|
3425
|
+
generateParamConfigMetadata('promptTemplateDevName', true, 0 /* UrlParameter */, 0 /* String */),
|
|
3426
|
+
generateParamConfigMetadata('versionId', false, 1 /* QueryParameter */, 0 /* String */),
|
|
3427
|
+
];
|
|
3428
|
+
const getPromptTemplate_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$1, getPromptTemplate_ConfigPropertyMetadata);
|
|
3429
|
+
const createResourceParams$1 = /*#__PURE__*/ createResourceParams$7(getPromptTemplate_ConfigPropertyMetadata);
|
|
3430
|
+
function keyBuilder$2(luvio, config) {
|
|
3431
|
+
const resourceParams = createResourceParams$1(config);
|
|
3432
|
+
return keyBuilder$3(luvio, resourceParams);
|
|
3433
|
+
}
|
|
3434
|
+
function typeCheckConfig$1(untrustedConfig) {
|
|
3435
|
+
const config = {};
|
|
3436
|
+
typeCheckConfig$7(untrustedConfig, config, getPromptTemplate_ConfigPropertyMetadata);
|
|
3437
|
+
return config;
|
|
3438
|
+
}
|
|
3439
|
+
function validateAdapterConfig$1(untrustedConfig, configPropertyNames) {
|
|
3440
|
+
if (!untrustedIsObject(untrustedConfig)) {
|
|
3441
|
+
return null;
|
|
3442
|
+
}
|
|
3443
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
3444
|
+
validateConfig(untrustedConfig, configPropertyNames);
|
|
3445
|
+
}
|
|
3446
|
+
const config = typeCheckConfig$1(untrustedConfig);
|
|
3447
|
+
if (!areRequiredParametersPresent(config, configPropertyNames)) {
|
|
3448
|
+
return null;
|
|
3449
|
+
}
|
|
3450
|
+
return config;
|
|
3451
|
+
}
|
|
3452
|
+
function adapterFragment$1(luvio, config) {
|
|
3453
|
+
createResourceParams$1(config);
|
|
3454
|
+
return select$2();
|
|
3455
|
+
}
|
|
3456
|
+
function onFetchResponseSuccess$1(luvio, config, resourceParams, response) {
|
|
3457
|
+
const snapshot = ingestSuccess$1(luvio, resourceParams, response, {
|
|
3458
|
+
config,
|
|
3459
|
+
resolve: () => buildNetworkSnapshot$1(luvio, config, snapshotRefreshOptions)
|
|
3460
|
+
});
|
|
3461
|
+
return luvio.storeBroadcast().then(() => snapshot);
|
|
3462
|
+
}
|
|
3463
|
+
function onFetchResponseError$1(luvio, config, resourceParams, response) {
|
|
3464
|
+
const snapshot = ingestError$1(luvio, resourceParams, response, {
|
|
3465
|
+
config,
|
|
3466
|
+
resolve: () => buildNetworkSnapshot$1(luvio, config, snapshotRefreshOptions)
|
|
3467
|
+
});
|
|
3468
|
+
return luvio.storeBroadcast().then(() => snapshot);
|
|
3469
|
+
}
|
|
3470
|
+
function buildNetworkSnapshot$1(luvio, config, options) {
|
|
3471
|
+
const resourceParams = createResourceParams$1(config);
|
|
3472
|
+
const request = createResourceRequest$1(resourceParams);
|
|
3473
|
+
return luvio.dispatchResourceRequest(request, options)
|
|
3474
|
+
.then((response) => {
|
|
3475
|
+
return luvio.handleSuccessResponse(() => onFetchResponseSuccess$1(luvio, config, resourceParams, response), () => {
|
|
3476
|
+
const cache = new StoreKeyMap();
|
|
3477
|
+
getResponseCacheKeys$1(cache, luvio, resourceParams, response.body);
|
|
3478
|
+
return cache;
|
|
3479
|
+
});
|
|
3480
|
+
}, (response) => {
|
|
3481
|
+
return luvio.handleErrorResponse(() => onFetchResponseError$1(luvio, config, resourceParams, response));
|
|
3482
|
+
});
|
|
3483
|
+
}
|
|
3484
|
+
function buildNetworkSnapshotCachePolicy$1(context, coercedAdapterRequestContext) {
|
|
3485
|
+
return buildNetworkSnapshotCachePolicy$4(context, coercedAdapterRequestContext, buildNetworkSnapshot$1, undefined, false);
|
|
3486
|
+
}
|
|
3487
|
+
function buildCachedSnapshotCachePolicy$1(context, storeLookup) {
|
|
3488
|
+
const { luvio, config } = context;
|
|
3489
|
+
const selector = {
|
|
3490
|
+
recordId: keyBuilder$2(luvio, config),
|
|
3491
|
+
node: adapterFragment$1(luvio, config),
|
|
3492
|
+
variables: {},
|
|
3493
|
+
};
|
|
3494
|
+
const cacheSnapshot = storeLookup(selector, {
|
|
3495
|
+
config,
|
|
3496
|
+
resolve: () => buildNetworkSnapshot$1(luvio, config, snapshotRefreshOptions)
|
|
3497
|
+
});
|
|
3498
|
+
return cacheSnapshot;
|
|
3499
|
+
}
|
|
3500
|
+
const getPromptTemplateAdapterFactory = (luvio) => function EinsteinLLM__getPromptTemplate(untrustedConfig, requestContext) {
|
|
3501
|
+
const config = validateAdapterConfig$1(untrustedConfig, getPromptTemplate_ConfigPropertyNames);
|
|
3502
|
+
// Invalid or incomplete config
|
|
3503
|
+
if (config === null) {
|
|
3504
|
+
return null;
|
|
3505
|
+
}
|
|
3506
|
+
return luvio.applyCachePolicy((requestContext || {}), { config, luvio }, // BuildSnapshotContext
|
|
3507
|
+
buildCachedSnapshotCachePolicy$1, buildNetworkSnapshotCachePolicy$1);
|
|
3508
|
+
};
|
|
3246
3509
|
|
|
3247
3510
|
const TTL = 100;
|
|
3248
|
-
const VERSION = "
|
|
3511
|
+
const VERSION = "5fd7b8a03d155ba601bcb4ee725e0893";
|
|
3249
3512
|
function validate(obj, path = 'EinsteinPromptRecordCollectionOutputRepresentation') {
|
|
3250
3513
|
const v_error = (() => {
|
|
3251
3514
|
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
@@ -3385,14 +3648,14 @@ const getPromptTemplates_ConfigPropertyMetadata = [
|
|
|
3385
3648
|
generateParamConfigMetadata('sortBy', false, 1 /* QueryParameter */, 0 /* String */),
|
|
3386
3649
|
];
|
|
3387
3650
|
const getPromptTemplates_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName, getPromptTemplates_ConfigPropertyMetadata);
|
|
3388
|
-
const createResourceParams = /*#__PURE__*/ createResourceParams$
|
|
3651
|
+
const createResourceParams = /*#__PURE__*/ createResourceParams$7(getPromptTemplates_ConfigPropertyMetadata);
|
|
3389
3652
|
function keyBuilder(luvio, config) {
|
|
3390
3653
|
const resourceParams = createResourceParams(config);
|
|
3391
3654
|
return keyBuilder$1(luvio, resourceParams);
|
|
3392
3655
|
}
|
|
3393
3656
|
function typeCheckConfig(untrustedConfig) {
|
|
3394
3657
|
const config = {};
|
|
3395
|
-
typeCheckConfig$
|
|
3658
|
+
typeCheckConfig$7(untrustedConfig, config, getPromptTemplates_ConfigPropertyMetadata);
|
|
3396
3659
|
return config;
|
|
3397
3660
|
}
|
|
3398
3661
|
function validateAdapterConfig(untrustedConfig, configPropertyNames) {
|
|
@@ -3441,7 +3704,7 @@ function buildNetworkSnapshot(luvio, config, options) {
|
|
|
3441
3704
|
});
|
|
3442
3705
|
}
|
|
3443
3706
|
function buildNetworkSnapshotCachePolicy(context, coercedAdapterRequestContext) {
|
|
3444
|
-
return buildNetworkSnapshotCachePolicy$
|
|
3707
|
+
return buildNetworkSnapshotCachePolicy$4(context, coercedAdapterRequestContext, buildNetworkSnapshot, undefined, false);
|
|
3445
3708
|
}
|
|
3446
3709
|
function buildCachedSnapshotCachePolicy(context, storeLookup) {
|
|
3447
3710
|
const { luvio, config } = context;
|
|
@@ -3471,10 +3734,12 @@ let createFeedback;
|
|
|
3471
3734
|
let createGenerations;
|
|
3472
3735
|
let createGenerationsForPromptTemplate;
|
|
3473
3736
|
let getOutputLanguages;
|
|
3737
|
+
let getPromptTemplate;
|
|
3474
3738
|
let getPromptTemplates;
|
|
3475
3739
|
// Imperative GET Adapters
|
|
3476
3740
|
let createEmbeddings_imperative;
|
|
3477
3741
|
let getOutputLanguages_imperative;
|
|
3742
|
+
let getPromptTemplate_imperative;
|
|
3478
3743
|
let getPromptTemplates_imperative;
|
|
3479
3744
|
// Adapter Metadata
|
|
3480
3745
|
const createEmbeddingsMetadata = { apiFamily: 'EinsteinLLM', name: 'createEmbeddings', ttl: 100 };
|
|
@@ -3483,6 +3748,7 @@ const getOutputLanguagesMetadata = {
|
|
|
3483
3748
|
name: 'getOutputLanguages',
|
|
3484
3749
|
ttl: 100,
|
|
3485
3750
|
};
|
|
3751
|
+
const getPromptTemplateMetadata = { apiFamily: 'EinsteinLLM', name: 'getPromptTemplate', ttl: 100 };
|
|
3486
3752
|
const getPromptTemplatesMetadata = {
|
|
3487
3753
|
apiFamily: 'EinsteinLLM',
|
|
3488
3754
|
name: 'getPromptTemplates',
|
|
@@ -3493,6 +3759,7 @@ function bindExportsTo(luvio) {
|
|
|
3493
3759
|
// LDS Adapters
|
|
3494
3760
|
const createEmbeddings_ldsAdapter = createInstrumentedAdapter(createLDSAdapter(luvio, 'createEmbeddings', createEmbeddingsAdapterFactory), createEmbeddingsMetadata);
|
|
3495
3761
|
const getOutputLanguages_ldsAdapter = createInstrumentedAdapter(createLDSAdapter(luvio, 'getOutputLanguages', getOutputLanguagesAdapterFactory), getOutputLanguagesMetadata);
|
|
3762
|
+
const getPromptTemplate_ldsAdapter = createInstrumentedAdapter(createLDSAdapter(luvio, 'getPromptTemplate', getPromptTemplateAdapterFactory), getPromptTemplateMetadata);
|
|
3496
3763
|
const getPromptTemplates_ldsAdapter = createInstrumentedAdapter(createLDSAdapter(luvio, 'getPromptTemplates', getPromptTemplatesAdapterFactory), getPromptTemplatesMetadata);
|
|
3497
3764
|
function unwrapSnapshotData(factory) {
|
|
3498
3765
|
const adapter = factory(luvio);
|
|
@@ -3504,10 +3771,12 @@ function bindExportsTo(luvio) {
|
|
|
3504
3771
|
createGenerations: unwrapSnapshotData(createGenerationsAdapterFactory),
|
|
3505
3772
|
createGenerationsForPromptTemplate: unwrapSnapshotData(createGenerationsForPromptTemplateAdapterFactory),
|
|
3506
3773
|
getOutputLanguages: createWireAdapterConstructor(luvio, getOutputLanguages_ldsAdapter, getOutputLanguagesMetadata),
|
|
3774
|
+
getPromptTemplate: createWireAdapterConstructor(luvio, getPromptTemplate_ldsAdapter, getPromptTemplateMetadata),
|
|
3507
3775
|
getPromptTemplates: createWireAdapterConstructor(luvio, getPromptTemplates_ldsAdapter, getPromptTemplatesMetadata),
|
|
3508
3776
|
// Imperative GET Adapters
|
|
3509
3777
|
createEmbeddings_imperative: createImperativeAdapter(luvio, createEmbeddings_ldsAdapter, createEmbeddingsMetadata),
|
|
3510
3778
|
getOutputLanguages_imperative: createImperativeAdapter(luvio, getOutputLanguages_ldsAdapter, getOutputLanguagesMetadata),
|
|
3779
|
+
getPromptTemplate_imperative: createImperativeAdapter(luvio, getPromptTemplate_ldsAdapter, getPromptTemplateMetadata),
|
|
3511
3780
|
getPromptTemplates_imperative: createImperativeAdapter(luvio, getPromptTemplates_ldsAdapter, getPromptTemplatesMetadata),
|
|
3512
3781
|
// Notify Update Availables
|
|
3513
3782
|
};
|
|
@@ -3519,12 +3788,14 @@ withDefaultLuvio((luvio) => {
|
|
|
3519
3788
|
createGenerations,
|
|
3520
3789
|
createGenerationsForPromptTemplate,
|
|
3521
3790
|
getOutputLanguages,
|
|
3791
|
+
getPromptTemplate,
|
|
3522
3792
|
getPromptTemplates,
|
|
3523
3793
|
createEmbeddings_imperative,
|
|
3524
3794
|
getOutputLanguages_imperative,
|
|
3795
|
+
getPromptTemplate_imperative,
|
|
3525
3796
|
getPromptTemplates_imperative,
|
|
3526
3797
|
} = bindExportsTo(luvio));
|
|
3527
3798
|
});
|
|
3528
3799
|
|
|
3529
|
-
export { createEmbeddings, createEmbeddings_imperative, createFeedback, createGenerations, createGenerationsForPromptTemplate, getOutputLanguages, getOutputLanguages_imperative, getPromptTemplates, getPromptTemplates_imperative };
|
|
3530
|
-
// version: 1.332.0-
|
|
3800
|
+
export { createEmbeddings, createEmbeddings_imperative, createFeedback, createGenerations, createGenerationsForPromptTemplate, getOutputLanguages, getOutputLanguages_imperative, getPromptTemplate, getPromptTemplate_imperative, getPromptTemplates, getPromptTemplates_imperative };
|
|
3801
|
+
// version: 1.332.0-dev12-919b322e8a
|