@salesforce/lds-adapters-service-einsteinllm 1.414.1 → 1.416.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/es/es2018/service-einsteinllm.js +1835 -856
- package/dist/es/es2018/types/src/generated/adapters/getEinsteinPromptTemplateReferences.d.ts +27 -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/getEinsteinPromptTemplatesReferencesByPromptTemplateDevName.d.ts +15 -0
- package/dist/es/es2018/types/src/generated/types/EinsteinPromptTemplateGenerationsInputRepresentation.d.ts +4 -1
- package/dist/es/es2018/types/src/generated/types/EinsteinPromptTemplateGenerationsRepresentation.d.ts +7 -1
- package/dist/es/es2018/types/src/generated/types/EinsteinPromptTemplateLatencyBreakdownItemRepresentation.d.ts +31 -0
- package/dist/es/es2018/types/src/generated/types/EinsteinPromptTemplateLatencyExecutionRepresentation.d.ts +38 -0
- package/dist/es/es2018/types/src/generated/types/EinsteinPromptTemplateLatencyRepresentation.d.ts +31 -0
- package/dist/es/es2018/types/src/generated/types/EinsteinPromptTemplateLatencyStepRepresentation.d.ts +33 -0
- package/dist/es/es2018/types/src/generated/types/EinsteinPromptTemplatePerformanceRepresentation.d.ts +31 -0
- package/dist/es/es2018/types/src/generated/types/EinsteinPromptTemplatePromptTokenUsageRepresentation.d.ts +32 -0
- package/dist/es/es2018/types/src/generated/types/EinsteinPromptTemplateReferencesRepresentation.d.ts +50 -0
- package/dist/es/es2018/types/src/generated/types/EinsteinPromptTemplateTokenBreakdownRepresentation.d.ts +37 -0
- package/dist/es/es2018/types/src/generated/types/EinsteinPromptTemplateTokenUsageRepresentation.d.ts +35 -0
- package/package.json +4 -4
- package/sfdc/index.js +1680 -689
- package/src/raml/api.raml +176 -0
- 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$c, StoreKeyMap, createResourceParams as createResourceParams$k, typeCheckConfig as typeCheckConfig$k } 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$O(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$F(obj, path = 'EinsteinLlmEmbeddingsAdditionalConfigInputRepre
|
|
|
222
222
|
return v_error === undefined ? null : v_error;
|
|
223
223
|
}
|
|
224
224
|
|
|
225
|
-
function validate$
|
|
225
|
+
function validate$N(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$E(obj, path = 'WrappedListString') {
|
|
|
243
243
|
return v_error === undefined ? null : v_error;
|
|
244
244
|
}
|
|
245
245
|
|
|
246
|
-
function validate$
|
|
246
|
+
function validate$M(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$O(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$D(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$N(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$D(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$C = "5ed5ccc6fa6f15691ec0fc1080e41fe6";
|
|
279
|
+
function validate$L(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$C(obj, path = 'EinsteinLlmEmbeddingItemRepresentation') {
|
|
|
297
297
|
})();
|
|
298
298
|
return v_error === undefined ? null : v_error;
|
|
299
299
|
}
|
|
300
|
-
const select$
|
|
300
|
+
const select$W = function EinsteinLlmEmbeddingItemRepresentationSelect() {
|
|
301
301
|
return {
|
|
302
302
|
kind: 'Fragment',
|
|
303
|
-
version: VERSION$
|
|
303
|
+
version: VERSION$C,
|
|
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$C(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$t(existing, incoming) {
|
|
|
334
334
|
return true;
|
|
335
335
|
}
|
|
336
336
|
|
|
337
|
-
const TTL$
|
|
338
|
-
const VERSION$
|
|
339
|
-
function validate$
|
|
337
|
+
const TTL$d = 100;
|
|
338
|
+
const VERSION$B = "d9873651f09d29764ef4d4231eb653d7";
|
|
339
|
+
function validate$K(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$B(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$L(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$B(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$d = 'EinsteinLlmEmbeddingsRepresentation';
|
|
377
|
+
function normalize$d(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$V = function EinsteinLlmEmbeddingsRepresentationSelect() {
|
|
381
|
+
const { selections: EinsteinLlmEmbeddingItemRepresentation__selections, opaque: EinsteinLlmEmbeddingItemRepresentation__opaque, } = select$W();
|
|
382
382
|
return {
|
|
383
383
|
kind: 'Fragment',
|
|
384
|
-
version: VERSION$
|
|
384
|
+
version: VERSION$B,
|
|
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$B(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$C(existing_embeddings_item, incoming_embeddings_item))) {
|
|
406
406
|
return false;
|
|
407
407
|
}
|
|
408
408
|
});
|
|
@@ -421,44 +421,44 @@ function equals$s(existing, incoming) {
|
|
|
421
421
|
}
|
|
422
422
|
return true;
|
|
423
423
|
}
|
|
424
|
-
const ingest$
|
|
424
|
+
const ingest$d = function EinsteinLlmEmbeddingsRepresentationIngest(input, path, luvio, store, timestamp) {
|
|
425
425
|
if (process.env.NODE_ENV !== 'production') {
|
|
426
|
-
const validateError = validate$
|
|
426
|
+
const validateError = validate$K(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$d;
|
|
433
|
+
ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize$d, "EinsteinLLM", VERSION$B, RepresentationType$d, equals$B);
|
|
434
434
|
return createLink(key);
|
|
435
435
|
};
|
|
436
|
-
function getTypeCacheKeys$
|
|
436
|
+
function getTypeCacheKeys$d(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$d,
|
|
442
442
|
mergeable: false
|
|
443
443
|
});
|
|
444
444
|
}
|
|
445
445
|
|
|
446
|
-
function select$
|
|
447
|
-
return select$
|
|
446
|
+
function select$U(luvio, params) {
|
|
447
|
+
return select$V();
|
|
448
448
|
}
|
|
449
|
-
function keyBuilder$
|
|
449
|
+
function keyBuilder$s(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$j(storeKeyMap, luvio, resourceParams, response) {
|
|
453
|
+
getTypeCacheKeys$d(storeKeyMap, luvio, response, () => keyBuilder$s(luvio, resourceParams));
|
|
454
454
|
}
|
|
455
|
-
function ingestSuccess$
|
|
455
|
+
function ingestSuccess$j(luvio, resourceParams, response, snapshotRefresh) {
|
|
456
456
|
const { body } = response;
|
|
457
|
-
const key = keyBuilder$
|
|
458
|
-
luvio.storeIngest(key, ingest$
|
|
457
|
+
const key = keyBuilder$s(luvio, resourceParams);
|
|
458
|
+
luvio.storeIngest(key, ingest$d, body);
|
|
459
459
|
const snapshot = luvio.storeLookup({
|
|
460
460
|
recordId: key,
|
|
461
|
-
node: select$
|
|
461
|
+
node: select$U(),
|
|
462
462
|
variables: {},
|
|
463
463
|
}, snapshotRefresh);
|
|
464
464
|
if (process.env.NODE_ENV !== 'production') {
|
|
@@ -469,19 +469,19 @@ function ingestSuccess$i(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$b(luvio, params, error, snapshotRefresh) {
|
|
473
|
+
const key = keyBuilder$s(luvio, params);
|
|
474
474
|
const errorSnapshot = luvio.errorSnapshot(error, snapshotRefresh);
|
|
475
475
|
const storeMetadataParams = {
|
|
476
|
-
ttl: TTL$
|
|
476
|
+
ttl: TTL$d,
|
|
477
477
|
namespace: keyPrefix,
|
|
478
|
-
version: VERSION$
|
|
479
|
-
representationName: RepresentationType$
|
|
478
|
+
version: VERSION$B,
|
|
479
|
+
representationName: RepresentationType$d
|
|
480
480
|
};
|
|
481
481
|
luvio.storeIngestError(key, errorSnapshot, storeMetadataParams);
|
|
482
482
|
return errorSnapshot;
|
|
483
483
|
}
|
|
484
|
-
function createResourceRequest$
|
|
484
|
+
function createResourceRequest$j(config) {
|
|
485
485
|
const headers = {};
|
|
486
486
|
return {
|
|
487
487
|
baseUri: '/services/data/v67.0',
|
|
@@ -495,97 +495,97 @@ function createResourceRequest$i(config) {
|
|
|
495
495
|
};
|
|
496
496
|
}
|
|
497
497
|
|
|
498
|
-
const adapterName$
|
|
498
|
+
const adapterName$j = '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$j, createEmbeddings_ConfigPropertyMetadata);
|
|
503
|
+
const createResourceParams$j = /*#__PURE__*/ createResourceParams$k(createEmbeddings_ConfigPropertyMetadata);
|
|
504
|
+
function keyBuilder$r(luvio, config) {
|
|
505
|
+
const resourceParams = createResourceParams$j(config);
|
|
506
|
+
return keyBuilder$s(luvio, resourceParams);
|
|
507
507
|
}
|
|
508
|
-
function typeCheckConfig$
|
|
508
|
+
function typeCheckConfig$j(untrustedConfig) {
|
|
509
509
|
const config = {};
|
|
510
510
|
const untrustedConfig_embeddingsInput = untrustedConfig.embeddingsInput;
|
|
511
|
-
const referenceEinsteinLlmEmbeddingsInputRepresentationValidationError = validate$
|
|
511
|
+
const referenceEinsteinLlmEmbeddingsInputRepresentationValidationError = validate$M(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$j(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$j(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$b(luvio, config) {
|
|
531
|
+
createResourceParams$j(config);
|
|
532
|
+
return select$U();
|
|
533
533
|
}
|
|
534
|
-
function onFetchResponseSuccess$
|
|
535
|
-
const snapshot = ingestSuccess$
|
|
534
|
+
function onFetchResponseSuccess$b(luvio, config, resourceParams, response) {
|
|
535
|
+
const snapshot = ingestSuccess$j(luvio, resourceParams, response, {
|
|
536
536
|
config,
|
|
537
|
-
resolve: () => buildNetworkSnapshot$
|
|
537
|
+
resolve: () => buildNetworkSnapshot$j(luvio, config, snapshotRefreshOptions)
|
|
538
538
|
});
|
|
539
539
|
return luvio.storeBroadcast().then(() => snapshot);
|
|
540
540
|
}
|
|
541
|
-
function onFetchResponseError$
|
|
542
|
-
const snapshot = ingestError$
|
|
541
|
+
function onFetchResponseError$b(luvio, config, resourceParams, response) {
|
|
542
|
+
const snapshot = ingestError$b(luvio, resourceParams, response, {
|
|
543
543
|
config,
|
|
544
|
-
resolve: () => buildNetworkSnapshot$
|
|
544
|
+
resolve: () => buildNetworkSnapshot$j(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$j(luvio, config, options) {
|
|
549
|
+
const resourceParams = createResourceParams$j(config);
|
|
550
|
+
const request = createResourceRequest$j(resourceParams);
|
|
551
551
|
return luvio.dispatchResourceRequest(request, options)
|
|
552
552
|
.then((response) => {
|
|
553
|
-
return luvio.handleSuccessResponse(() => onFetchResponseSuccess$
|
|
553
|
+
return luvio.handleSuccessResponse(() => onFetchResponseSuccess$b(luvio, config, resourceParams, response), () => {
|
|
554
554
|
const cache = new StoreKeyMap();
|
|
555
|
-
getResponseCacheKeys$
|
|
555
|
+
getResponseCacheKeys$j(cache, luvio, resourceParams, response.body);
|
|
556
556
|
return cache;
|
|
557
557
|
});
|
|
558
558
|
}, (response) => {
|
|
559
|
-
return luvio.handleErrorResponse(() => onFetchResponseError$
|
|
559
|
+
return luvio.handleErrorResponse(() => onFetchResponseError$b(luvio, config, resourceParams, response));
|
|
560
560
|
});
|
|
561
561
|
}
|
|
562
|
-
function buildNetworkSnapshotCachePolicy$
|
|
563
|
-
return buildNetworkSnapshotCachePolicy$
|
|
562
|
+
function buildNetworkSnapshotCachePolicy$b(context, coercedAdapterRequestContext) {
|
|
563
|
+
return buildNetworkSnapshotCachePolicy$c(context, coercedAdapterRequestContext, buildNetworkSnapshot$j, 'get', false);
|
|
564
564
|
}
|
|
565
|
-
function buildCachedSnapshotCachePolicy$
|
|
565
|
+
function buildCachedSnapshotCachePolicy$b(context, storeLookup) {
|
|
566
566
|
const { luvio, config } = context;
|
|
567
567
|
const selector = {
|
|
568
|
-
recordId: keyBuilder$
|
|
569
|
-
node: adapterFragment$
|
|
568
|
+
recordId: keyBuilder$r(luvio, config),
|
|
569
|
+
node: adapterFragment$b(luvio, config),
|
|
570
570
|
variables: {},
|
|
571
571
|
};
|
|
572
572
|
const cacheSnapshot = storeLookup(selector, {
|
|
573
573
|
config,
|
|
574
|
-
resolve: () => buildNetworkSnapshot$
|
|
574
|
+
resolve: () => buildNetworkSnapshot$j(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$j(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$b, buildNetworkSnapshotCachePolicy$b);
|
|
586
586
|
};
|
|
587
587
|
|
|
588
|
-
function validate$
|
|
588
|
+
function validate$J(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$A(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$c = 100;
|
|
636
|
+
const VERSION$A = "4033328f65865dd5d80c68a7573a4522";
|
|
637
|
+
function validate$I(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$z(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$c = 'EinsteinLlmFeedbackRepresentation';
|
|
651
|
+
function keyBuilder$q(luvio, config) {
|
|
652
|
+
return keyPrefix + '::' + RepresentationType$c + ':' + config.message;
|
|
653
653
|
}
|
|
654
654
|
function keyBuilderFromType$4(luvio, object) {
|
|
655
655
|
const keyParams = {
|
|
656
656
|
message: object.message
|
|
657
657
|
};
|
|
658
|
-
return keyBuilder$
|
|
658
|
+
return keyBuilder$q(luvio, keyParams);
|
|
659
659
|
}
|
|
660
|
-
function normalize$
|
|
660
|
+
function normalize$c(input, existing, path, luvio, store, timestamp) {
|
|
661
661
|
return input;
|
|
662
662
|
}
|
|
663
|
-
const select$
|
|
663
|
+
const select$T = function EinsteinLlmFeedbackRepresentationSelect() {
|
|
664
664
|
return {
|
|
665
665
|
kind: 'Fragment',
|
|
666
|
-
version: VERSION$
|
|
666
|
+
version: VERSION$A,
|
|
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$A(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$r(existing, incoming) {
|
|
|
681
681
|
}
|
|
682
682
|
return true;
|
|
683
683
|
}
|
|
684
|
-
const ingest$
|
|
684
|
+
const ingest$c = function EinsteinLlmFeedbackRepresentationIngest(input, path, luvio, store, timestamp) {
|
|
685
685
|
if (process.env.NODE_ENV !== 'production') {
|
|
686
|
-
const validateError = validate$
|
|
686
|
+
const validateError = validate$I(input);
|
|
687
687
|
if (validateError !== null) {
|
|
688
688
|
throw validateError;
|
|
689
689
|
}
|
|
690
690
|
}
|
|
691
691
|
const key = keyBuilderFromType$4(luvio, input);
|
|
692
|
-
const ttlToUse = TTL$
|
|
693
|
-
ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize$
|
|
692
|
+
const ttlToUse = TTL$c;
|
|
693
|
+
ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize$c, "EinsteinLLM", VERSION$A, RepresentationType$c, equals$A);
|
|
694
694
|
return createLink(key);
|
|
695
695
|
};
|
|
696
|
-
function getTypeCacheKeys$
|
|
696
|
+
function getTypeCacheKeys$c(rootKeySet, luvio, input, fullPathFactory) {
|
|
697
697
|
// root cache key (uses fullPathFactory if keyBuilderFromType isn't defined)
|
|
698
698
|
const rootKey = keyBuilderFromType$4(luvio, input);
|
|
699
699
|
rootKeySet.set(rootKey, {
|
|
700
700
|
namespace: keyPrefix,
|
|
701
|
-
representationName: RepresentationType$
|
|
701
|
+
representationName: RepresentationType$c,
|
|
702
702
|
mergeable: false
|
|
703
703
|
});
|
|
704
704
|
}
|
|
705
705
|
|
|
706
|
-
function select$
|
|
707
|
-
return select$
|
|
706
|
+
function select$S(luvio, params) {
|
|
707
|
+
return select$T();
|
|
708
708
|
}
|
|
709
|
-
function getResponseCacheKeys$
|
|
710
|
-
getTypeCacheKeys$
|
|
709
|
+
function getResponseCacheKeys$i(storeKeyMap, luvio, resourceParams, response) {
|
|
710
|
+
getTypeCacheKeys$c(storeKeyMap, luvio, response);
|
|
711
711
|
}
|
|
712
|
-
function ingestSuccess$
|
|
712
|
+
function ingestSuccess$i(luvio, resourceParams, response) {
|
|
713
713
|
const { body } = response;
|
|
714
714
|
const key = keyBuilderFromType$4(luvio, body);
|
|
715
|
-
luvio.storeIngest(key, ingest$
|
|
715
|
+
luvio.storeIngest(key, ingest$c, body);
|
|
716
716
|
const snapshot = luvio.storeLookup({
|
|
717
717
|
recordId: key,
|
|
718
|
-
node: select$
|
|
718
|
+
node: select$S(),
|
|
719
719
|
variables: {},
|
|
720
720
|
});
|
|
721
721
|
if (process.env.NODE_ENV !== 'production') {
|
|
@@ -726,7 +726,7 @@ function ingestSuccess$h(luvio, resourceParams, response) {
|
|
|
726
726
|
deepFreeze(snapshot.data);
|
|
727
727
|
return snapshot;
|
|
728
728
|
}
|
|
729
|
-
function createResourceRequest$
|
|
729
|
+
function createResourceRequest$i(config) {
|
|
730
730
|
const headers = {};
|
|
731
731
|
return {
|
|
732
732
|
baseUri: '/services/data/v67.0',
|
|
@@ -740,45 +740,45 @@ function createResourceRequest$h(config) {
|
|
|
740
740
|
};
|
|
741
741
|
}
|
|
742
742
|
|
|
743
|
-
const adapterName$
|
|
743
|
+
const adapterName$i = '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$i, createFeedback_ConfigPropertyMetadata);
|
|
748
|
+
const createResourceParams$i = /*#__PURE__*/ createResourceParams$k(createFeedback_ConfigPropertyMetadata);
|
|
749
|
+
function typeCheckConfig$i(untrustedConfig) {
|
|
750
750
|
const config = {};
|
|
751
751
|
const untrustedConfig_feedbackInput = untrustedConfig.feedbackInput;
|
|
752
|
-
const referenceEinsteinLlmFeedbackInputRepresentationValidationError = validate$
|
|
752
|
+
const referenceEinsteinLlmFeedbackInputRepresentationValidationError = validate$J(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$i(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$i(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$i(luvio, config, options) {
|
|
772
|
+
const resourceParams = createResourceParams$i(config);
|
|
773
|
+
const request = createResourceRequest$i(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$i(luvio, resourceParams, response);
|
|
778
778
|
return luvio.storeBroadcast().then(() => snapshot);
|
|
779
779
|
}, () => {
|
|
780
780
|
const cache = new StoreKeyMap();
|
|
781
|
-
getResponseCacheKeys$
|
|
781
|
+
getResponseCacheKeys$i(cache, luvio, resourceParams, response.body);
|
|
782
782
|
return cache;
|
|
783
783
|
});
|
|
784
784
|
}, (response) => {
|
|
@@ -788,16 +788,16 @@ function buildNetworkSnapshot$h(luvio, config, options) {
|
|
|
788
788
|
}
|
|
789
789
|
const createFeedbackAdapterFactory = (luvio) => {
|
|
790
790
|
return function createFeedback(untrustedConfig) {
|
|
791
|
-
const config = validateAdapterConfig$
|
|
791
|
+
const config = validateAdapterConfig$i(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$i(luvio, config);
|
|
797
797
|
};
|
|
798
798
|
};
|
|
799
799
|
|
|
800
|
-
function validate$
|
|
800
|
+
function validate$H(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$y(obj, path = 'EinsteinLlmAdditionalConfigInputRepresentation'
|
|
|
880
880
|
return v_error === undefined ? null : v_error;
|
|
881
881
|
}
|
|
882
882
|
|
|
883
|
-
function validate$
|
|
883
|
+
function validate$G(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$x(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$H(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$x(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$z = "9ebac74e6f964c363d5fd1913df363af";
|
|
915
|
+
function validate$F(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$w(obj, path = 'EinsteinLlmGenerationsContentQualityRepresentat
|
|
|
948
948
|
})();
|
|
949
949
|
return v_error === undefined ? null : v_error;
|
|
950
950
|
}
|
|
951
|
-
const select$
|
|
951
|
+
const select$R = function EinsteinLlmGenerationsContentQualityRepresentationSelect() {
|
|
952
952
|
return {
|
|
953
953
|
kind: 'Fragment',
|
|
954
|
-
version: VERSION$
|
|
954
|
+
version: VERSION$z,
|
|
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$z(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$q(existing, incoming) {
|
|
|
979
979
|
return true;
|
|
980
980
|
}
|
|
981
981
|
|
|
982
|
-
const VERSION$
|
|
983
|
-
function validate$
|
|
982
|
+
const VERSION$y = "77af44a252cb5b45b4d9a8101368d2aa";
|
|
983
|
+
function validate$E(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$v(obj, path = 'EinsteinLlmGenerationsSafetyScoreRepresentation
|
|
|
1184
1184
|
})();
|
|
1185
1185
|
return v_error === undefined ? null : v_error;
|
|
1186
1186
|
}
|
|
1187
|
-
const select$
|
|
1187
|
+
const select$Q = function EinsteinLlmGenerationsSafetyScoreRepresentationSelect() {
|
|
1188
1188
|
return {
|
|
1189
1189
|
kind: 'Fragment',
|
|
1190
|
-
version: VERSION$
|
|
1190
|
+
version: VERSION$y,
|
|
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$y(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$p(existing, incoming) {
|
|
|
1323
1323
|
return true;
|
|
1324
1324
|
}
|
|
1325
1325
|
|
|
1326
|
-
const VERSION$
|
|
1327
|
-
function validate$
|
|
1326
|
+
const VERSION$x = "4a07778ff6c595d91c575188146647a1";
|
|
1327
|
+
function validate$D(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$u(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$F(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$u(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$E(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$u(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$P = function EinsteinLlmGenerationItemRepresentationSelect() {
|
|
1420
|
+
const { selections: EinsteinLlmGenerationsContentQualityRepresentation__selections, opaque: EinsteinLlmGenerationsContentQualityRepresentation__opaque, } = select$R();
|
|
1421
|
+
const { selections: EinsteinLlmGenerationsSafetyScoreRepresentation__selections, opaque: EinsteinLlmGenerationsSafetyScoreRepresentation__opaque, } = select$Q();
|
|
1422
1422
|
return {
|
|
1423
1423
|
kind: 'Fragment',
|
|
1424
|
-
version: VERSION$
|
|
1424
|
+
version: VERSION$x,
|
|
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$x(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$o(existing, incoming) {
|
|
|
1499
1499
|
if (!(existing_contentQualityRepresentation === incoming_contentQualityRepresentation
|
|
1500
1500
|
|| (existing_contentQualityRepresentation != null &&
|
|
1501
1501
|
incoming_contentQualityRepresentation != null &&
|
|
1502
|
-
equals$
|
|
1502
|
+
equals$z(existing_contentQualityRepresentation, incoming_contentQualityRepresentation)))) {
|
|
1503
1503
|
return false;
|
|
1504
1504
|
}
|
|
1505
1505
|
}
|
|
@@ -1515,15 +1515,15 @@ function equals$o(existing, incoming) {
|
|
|
1515
1515
|
if (!(existing_safetyScoreRepresentation === incoming_safetyScoreRepresentation
|
|
1516
1516
|
|| (existing_safetyScoreRepresentation != null &&
|
|
1517
1517
|
incoming_safetyScoreRepresentation != null &&
|
|
1518
|
-
equals$
|
|
1518
|
+
equals$y(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$w = "379fd960d1a0118f506f458ab2c8dd7e";
|
|
1526
|
+
function validate$C(obj, path = 'WrappedMap') {
|
|
1527
1527
|
const v_error = (() => {
|
|
1528
1528
|
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
1529
1529
|
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
@@ -1545,10 +1545,10 @@ function validate$t(obj, path = 'WrappedMap') {
|
|
|
1545
1545
|
})();
|
|
1546
1546
|
return v_error === undefined ? null : v_error;
|
|
1547
1547
|
}
|
|
1548
|
-
const select$
|
|
1548
|
+
const select$O = function WrappedMapSelect() {
|
|
1549
1549
|
return {
|
|
1550
1550
|
kind: 'Fragment',
|
|
1551
|
-
version: VERSION$
|
|
1551
|
+
version: VERSION$w,
|
|
1552
1552
|
private: [],
|
|
1553
1553
|
selections: [
|
|
1554
1554
|
{
|
|
@@ -1559,7 +1559,7 @@ const select$E = function WrappedMapSelect() {
|
|
|
1559
1559
|
]
|
|
1560
1560
|
};
|
|
1561
1561
|
};
|
|
1562
|
-
function equals$
|
|
1562
|
+
function equals$w(existing, incoming) {
|
|
1563
1563
|
const existing_wrappedMap = existing.wrappedMap;
|
|
1564
1564
|
const incoming_wrappedMap = incoming.wrappedMap;
|
|
1565
1565
|
const equals_wrappedMap_props = equalsObject(existing_wrappedMap, incoming_wrappedMap, (existing_wrappedMap_prop, incoming_wrappedMap_prop) => {
|
|
@@ -1573,9 +1573,9 @@ function equals$n(existing, incoming) {
|
|
|
1573
1573
|
return true;
|
|
1574
1574
|
}
|
|
1575
1575
|
|
|
1576
|
-
const TTL$
|
|
1577
|
-
const VERSION$
|
|
1578
|
-
function validate$
|
|
1576
|
+
const TTL$b = 100;
|
|
1577
|
+
const VERSION$v = "d8abd72a42e842b253da1c38954dafbc";
|
|
1578
|
+
function validate$B(obj, path = 'EinsteinLlmGenerationsRepresentation') {
|
|
1579
1579
|
const v_error = (() => {
|
|
1580
1580
|
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
1581
1581
|
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
@@ -1588,7 +1588,7 @@ function validate$s(obj, path = 'EinsteinLlmGenerationsRepresentation') {
|
|
|
1588
1588
|
for (let i = 0; i < obj_generations.length; i++) {
|
|
1589
1589
|
const obj_generations_item = obj_generations[i];
|
|
1590
1590
|
const path_generations_item = path_generations + '[' + i + ']';
|
|
1591
|
-
const referencepath_generations_itemValidationError = validate$
|
|
1591
|
+
const referencepath_generations_itemValidationError = validate$D(obj_generations_item, path_generations_item);
|
|
1592
1592
|
if (referencepath_generations_itemValidationError !== null) {
|
|
1593
1593
|
let message = 'Object doesn\'t match EinsteinLlmGenerationItemRepresentation (at "' + path_generations_item + '")\n';
|
|
1594
1594
|
message += referencepath_generations_itemValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
@@ -1599,7 +1599,7 @@ function validate$s(obj, path = 'EinsteinLlmGenerationsRepresentation') {
|
|
|
1599
1599
|
const path_parameters = path + '.parameters';
|
|
1600
1600
|
let obj_parameters_union0 = null;
|
|
1601
1601
|
const obj_parameters_union0_error = (() => {
|
|
1602
|
-
const referencepath_parametersValidationError = validate$
|
|
1602
|
+
const referencepath_parametersValidationError = validate$C(obj_parameters, path_parameters);
|
|
1603
1603
|
if (referencepath_parametersValidationError !== null) {
|
|
1604
1604
|
let message = 'Object doesn\'t match WrappedMap (at "' + path_parameters + '")\n';
|
|
1605
1605
|
message += referencepath_parametersValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
@@ -1658,25 +1658,25 @@ function validate$s(obj, path = 'EinsteinLlmGenerationsRepresentation') {
|
|
|
1658
1658
|
})();
|
|
1659
1659
|
return v_error === undefined ? null : v_error;
|
|
1660
1660
|
}
|
|
1661
|
-
const RepresentationType$
|
|
1662
|
-
function keyBuilder$
|
|
1663
|
-
return keyPrefix + '::' + RepresentationType$
|
|
1661
|
+
const RepresentationType$b = 'EinsteinLlmGenerationsRepresentation';
|
|
1662
|
+
function keyBuilder$p(luvio, config) {
|
|
1663
|
+
return keyPrefix + '::' + RepresentationType$b + ':' + config.requestId;
|
|
1664
1664
|
}
|
|
1665
1665
|
function keyBuilderFromType$3(luvio, object) {
|
|
1666
1666
|
const keyParams = {
|
|
1667
1667
|
requestId: object.requestId
|
|
1668
1668
|
};
|
|
1669
|
-
return keyBuilder$
|
|
1669
|
+
return keyBuilder$p(luvio, keyParams);
|
|
1670
1670
|
}
|
|
1671
|
-
function normalize$
|
|
1671
|
+
function normalize$b(input, existing, path, luvio, store, timestamp) {
|
|
1672
1672
|
return input;
|
|
1673
1673
|
}
|
|
1674
|
-
const select$
|
|
1675
|
-
const { selections: EinsteinLlmGenerationItemRepresentation__selections, opaque: EinsteinLlmGenerationItemRepresentation__opaque, } = select$
|
|
1676
|
-
const { selections: WrappedMap__selections, opaque: WrappedMap__opaque, } = select$
|
|
1674
|
+
const select$N = function EinsteinLlmGenerationsRepresentationSelect() {
|
|
1675
|
+
const { selections: EinsteinLlmGenerationItemRepresentation__selections, opaque: EinsteinLlmGenerationItemRepresentation__opaque, } = select$P();
|
|
1676
|
+
const { selections: WrappedMap__selections, opaque: WrappedMap__opaque, } = select$O();
|
|
1677
1677
|
return {
|
|
1678
1678
|
kind: 'Fragment',
|
|
1679
|
-
version: VERSION$
|
|
1679
|
+
version: VERSION$v,
|
|
1680
1680
|
private: [],
|
|
1681
1681
|
selections: [
|
|
1682
1682
|
{
|
|
@@ -1702,7 +1702,7 @@ const select$D = function EinsteinLlmGenerationsRepresentationSelect() {
|
|
|
1702
1702
|
]
|
|
1703
1703
|
};
|
|
1704
1704
|
};
|
|
1705
|
-
function equals$
|
|
1705
|
+
function equals$v(existing, incoming) {
|
|
1706
1706
|
const existing_requestId = existing.requestId;
|
|
1707
1707
|
const incoming_requestId = incoming.requestId;
|
|
1708
1708
|
if (!(existing_requestId === incoming_requestId)) {
|
|
@@ -1711,7 +1711,7 @@ function equals$m(existing, incoming) {
|
|
|
1711
1711
|
const existing_generations = existing.generations;
|
|
1712
1712
|
const incoming_generations = incoming.generations;
|
|
1713
1713
|
const equals_generations_items = equalsArray(existing_generations, incoming_generations, (existing_generations_item, incoming_generations_item) => {
|
|
1714
|
-
if (!(equals$
|
|
1714
|
+
if (!(equals$x(existing_generations_item, incoming_generations_item))) {
|
|
1715
1715
|
return false;
|
|
1716
1716
|
}
|
|
1717
1717
|
});
|
|
@@ -1723,7 +1723,7 @@ function equals$m(existing, incoming) {
|
|
|
1723
1723
|
if (!(existing_parameters === incoming_parameters
|
|
1724
1724
|
|| (existing_parameters != null &&
|
|
1725
1725
|
incoming_parameters != null &&
|
|
1726
|
-
equals$
|
|
1726
|
+
equals$w(existing_parameters, incoming_parameters)))) {
|
|
1727
1727
|
return false;
|
|
1728
1728
|
}
|
|
1729
1729
|
const existing_prompt = existing.prompt;
|
|
@@ -1733,41 +1733,41 @@ function equals$m(existing, incoming) {
|
|
|
1733
1733
|
}
|
|
1734
1734
|
return true;
|
|
1735
1735
|
}
|
|
1736
|
-
const ingest$
|
|
1736
|
+
const ingest$b = function EinsteinLlmGenerationsRepresentationIngest(input, path, luvio, store, timestamp) {
|
|
1737
1737
|
if (process.env.NODE_ENV !== 'production') {
|
|
1738
|
-
const validateError = validate$
|
|
1738
|
+
const validateError = validate$B(input);
|
|
1739
1739
|
if (validateError !== null) {
|
|
1740
1740
|
throw validateError;
|
|
1741
1741
|
}
|
|
1742
1742
|
}
|
|
1743
1743
|
const key = keyBuilderFromType$3(luvio, input);
|
|
1744
|
-
const ttlToUse = TTL$
|
|
1745
|
-
ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize$
|
|
1744
|
+
const ttlToUse = TTL$b;
|
|
1745
|
+
ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize$b, "EinsteinLLM", VERSION$v, RepresentationType$b, equals$v);
|
|
1746
1746
|
return createLink(key);
|
|
1747
1747
|
};
|
|
1748
|
-
function getTypeCacheKeys$
|
|
1748
|
+
function getTypeCacheKeys$b(rootKeySet, luvio, input, fullPathFactory) {
|
|
1749
1749
|
// root cache key (uses fullPathFactory if keyBuilderFromType isn't defined)
|
|
1750
1750
|
const rootKey = keyBuilderFromType$3(luvio, input);
|
|
1751
1751
|
rootKeySet.set(rootKey, {
|
|
1752
1752
|
namespace: keyPrefix,
|
|
1753
|
-
representationName: RepresentationType$
|
|
1753
|
+
representationName: RepresentationType$b,
|
|
1754
1754
|
mergeable: false
|
|
1755
1755
|
});
|
|
1756
1756
|
}
|
|
1757
1757
|
|
|
1758
|
-
function select$
|
|
1759
|
-
return select$
|
|
1758
|
+
function select$M(luvio, params) {
|
|
1759
|
+
return select$N();
|
|
1760
1760
|
}
|
|
1761
|
-
function getResponseCacheKeys$
|
|
1762
|
-
getTypeCacheKeys$
|
|
1761
|
+
function getResponseCacheKeys$h(storeKeyMap, luvio, resourceParams, response) {
|
|
1762
|
+
getTypeCacheKeys$b(storeKeyMap, luvio, response);
|
|
1763
1763
|
}
|
|
1764
|
-
function ingestSuccess$
|
|
1764
|
+
function ingestSuccess$h(luvio, resourceParams, response) {
|
|
1765
1765
|
const { body } = response;
|
|
1766
1766
|
const key = keyBuilderFromType$3(luvio, body);
|
|
1767
|
-
luvio.storeIngest(key, ingest$
|
|
1767
|
+
luvio.storeIngest(key, ingest$b, body);
|
|
1768
1768
|
const snapshot = luvio.storeLookup({
|
|
1769
1769
|
recordId: key,
|
|
1770
|
-
node: select$
|
|
1770
|
+
node: select$M(),
|
|
1771
1771
|
variables: {},
|
|
1772
1772
|
});
|
|
1773
1773
|
if (process.env.NODE_ENV !== 'production') {
|
|
@@ -1778,7 +1778,7 @@ function ingestSuccess$g(luvio, resourceParams, response) {
|
|
|
1778
1778
|
deepFreeze(snapshot.data);
|
|
1779
1779
|
return snapshot;
|
|
1780
1780
|
}
|
|
1781
|
-
function createResourceRequest$
|
|
1781
|
+
function createResourceRequest$h(config) {
|
|
1782
1782
|
const headers = {};
|
|
1783
1783
|
return {
|
|
1784
1784
|
baseUri: '/services/data/v67.0',
|
|
@@ -1792,45 +1792,45 @@ function createResourceRequest$g(config) {
|
|
|
1792
1792
|
};
|
|
1793
1793
|
}
|
|
1794
1794
|
|
|
1795
|
-
const adapterName$
|
|
1795
|
+
const adapterName$h = 'createGenerations';
|
|
1796
1796
|
const createGenerations_ConfigPropertyMetadata = [
|
|
1797
1797
|
generateParamConfigMetadata('generationsInput', true, 2 /* Body */, 4 /* Unsupported */),
|
|
1798
1798
|
];
|
|
1799
|
-
const createGenerations_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$
|
|
1800
|
-
const createResourceParams$
|
|
1801
|
-
function typeCheckConfig$
|
|
1799
|
+
const createGenerations_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$h, createGenerations_ConfigPropertyMetadata);
|
|
1800
|
+
const createResourceParams$h = /*#__PURE__*/ createResourceParams$k(createGenerations_ConfigPropertyMetadata);
|
|
1801
|
+
function typeCheckConfig$h(untrustedConfig) {
|
|
1802
1802
|
const config = {};
|
|
1803
1803
|
const untrustedConfig_generationsInput = untrustedConfig.generationsInput;
|
|
1804
|
-
const referenceEinsteinLlmGenerationsInputRepresentationValidationError = validate$
|
|
1804
|
+
const referenceEinsteinLlmGenerationsInputRepresentationValidationError = validate$G(untrustedConfig_generationsInput);
|
|
1805
1805
|
if (referenceEinsteinLlmGenerationsInputRepresentationValidationError === null) {
|
|
1806
1806
|
config.generationsInput = untrustedConfig_generationsInput;
|
|
1807
1807
|
}
|
|
1808
1808
|
return config;
|
|
1809
1809
|
}
|
|
1810
|
-
function validateAdapterConfig$
|
|
1810
|
+
function validateAdapterConfig$h(untrustedConfig, configPropertyNames) {
|
|
1811
1811
|
if (!untrustedIsObject(untrustedConfig)) {
|
|
1812
1812
|
return null;
|
|
1813
1813
|
}
|
|
1814
1814
|
if (process.env.NODE_ENV !== 'production') {
|
|
1815
1815
|
validateConfig(untrustedConfig, configPropertyNames);
|
|
1816
1816
|
}
|
|
1817
|
-
const config = typeCheckConfig$
|
|
1817
|
+
const config = typeCheckConfig$h(untrustedConfig);
|
|
1818
1818
|
if (!areRequiredParametersPresent(config, configPropertyNames)) {
|
|
1819
1819
|
return null;
|
|
1820
1820
|
}
|
|
1821
1821
|
return config;
|
|
1822
1822
|
}
|
|
1823
|
-
function buildNetworkSnapshot$
|
|
1824
|
-
const resourceParams = createResourceParams$
|
|
1825
|
-
const request = createResourceRequest$
|
|
1823
|
+
function buildNetworkSnapshot$h(luvio, config, options) {
|
|
1824
|
+
const resourceParams = createResourceParams$h(config);
|
|
1825
|
+
const request = createResourceRequest$h(resourceParams);
|
|
1826
1826
|
return luvio.dispatchResourceRequest(request, options)
|
|
1827
1827
|
.then((response) => {
|
|
1828
1828
|
return luvio.handleSuccessResponse(() => {
|
|
1829
|
-
const snapshot = ingestSuccess$
|
|
1829
|
+
const snapshot = ingestSuccess$h(luvio, resourceParams, response);
|
|
1830
1830
|
return luvio.storeBroadcast().then(() => snapshot);
|
|
1831
1831
|
}, () => {
|
|
1832
1832
|
const cache = new StoreKeyMap();
|
|
1833
|
-
getResponseCacheKeys$
|
|
1833
|
+
getResponseCacheKeys$h(cache, luvio, resourceParams, response.body);
|
|
1834
1834
|
return cache;
|
|
1835
1835
|
});
|
|
1836
1836
|
}, (response) => {
|
|
@@ -1840,16 +1840,16 @@ function buildNetworkSnapshot$g(luvio, config, options) {
|
|
|
1840
1840
|
}
|
|
1841
1841
|
const createGenerationsAdapterFactory = (luvio) => {
|
|
1842
1842
|
return function createGenerations(untrustedConfig) {
|
|
1843
|
-
const config = validateAdapterConfig$
|
|
1843
|
+
const config = validateAdapterConfig$h(untrustedConfig, createGenerations_ConfigPropertyNames);
|
|
1844
1844
|
// Invalid or incomplete config
|
|
1845
1845
|
if (config === null) {
|
|
1846
1846
|
throw new Error('Invalid config for "createGenerations"');
|
|
1847
1847
|
}
|
|
1848
|
-
return buildNetworkSnapshot$
|
|
1848
|
+
return buildNetworkSnapshot$h(luvio, config);
|
|
1849
1849
|
};
|
|
1850
1850
|
};
|
|
1851
1851
|
|
|
1852
|
-
function validate$
|
|
1852
|
+
function validate$A(obj, path = 'WrappedValueMap') {
|
|
1853
1853
|
const v_error = (() => {
|
|
1854
1854
|
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
1855
1855
|
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
@@ -1872,7 +1872,7 @@ function validate$r(obj, path = 'WrappedValueMap') {
|
|
|
1872
1872
|
return v_error === undefined ? null : v_error;
|
|
1873
1873
|
}
|
|
1874
1874
|
|
|
1875
|
-
function validate$
|
|
1875
|
+
function validate$z(obj, path = 'EinsteinPromptTemplateGenerationsInputRepresentation') {
|
|
1876
1876
|
const v_error = (() => {
|
|
1877
1877
|
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
1878
1878
|
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
@@ -1880,16 +1880,23 @@ function validate$q(obj, path = 'EinsteinPromptTemplateGenerationsInputRepresent
|
|
|
1880
1880
|
if (obj.additionalConfig !== undefined) {
|
|
1881
1881
|
const obj_additionalConfig = obj.additionalConfig;
|
|
1882
1882
|
const path_additionalConfig = path + '.additionalConfig';
|
|
1883
|
-
const referencepath_additionalConfigValidationError = validate$
|
|
1883
|
+
const referencepath_additionalConfigValidationError = validate$H(obj_additionalConfig, path_additionalConfig);
|
|
1884
1884
|
if (referencepath_additionalConfigValidationError !== null) {
|
|
1885
1885
|
let message = 'Object doesn\'t match EinsteinLlmAdditionalConfigInputRepresentation (at "' + path_additionalConfig + '")\n';
|
|
1886
1886
|
message += referencepath_additionalConfigValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
1887
1887
|
return new TypeError(message);
|
|
1888
1888
|
}
|
|
1889
1889
|
}
|
|
1890
|
+
if (obj.includeMetrics !== undefined) {
|
|
1891
|
+
const obj_includeMetrics = obj.includeMetrics;
|
|
1892
|
+
const path_includeMetrics = path + '.includeMetrics';
|
|
1893
|
+
if (typeof obj_includeMetrics !== 'boolean') {
|
|
1894
|
+
return new TypeError('Expected "boolean" but received "' + typeof obj_includeMetrics + '" (at "' + path_includeMetrics + '")');
|
|
1895
|
+
}
|
|
1896
|
+
}
|
|
1890
1897
|
const obj_inputParams = obj.inputParams;
|
|
1891
1898
|
const path_inputParams = path + '.inputParams';
|
|
1892
|
-
const referencepath_inputParamsValidationError = validate$
|
|
1899
|
+
const referencepath_inputParamsValidationError = validate$A(obj_inputParams, path_inputParams);
|
|
1893
1900
|
if (referencepath_inputParamsValidationError !== null) {
|
|
1894
1901
|
let message = 'Object doesn\'t match WrappedValueMap (at "' + path_inputParams + '")\n';
|
|
1895
1902
|
message += referencepath_inputParamsValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
@@ -1925,8 +1932,8 @@ function validate$q(obj, path = 'EinsteinPromptTemplateGenerationsInputRepresent
|
|
|
1925
1932
|
return v_error === undefined ? null : v_error;
|
|
1926
1933
|
}
|
|
1927
1934
|
|
|
1928
|
-
const VERSION$
|
|
1929
|
-
function validate$
|
|
1935
|
+
const VERSION$u = "6a209d0b32d59e6e04155812fdf5c985";
|
|
1936
|
+
function validate$y(obj, path = 'EinsteinLlmGenerationGenAiCitedReferenceRepresentation') {
|
|
1930
1937
|
const v_error = (() => {
|
|
1931
1938
|
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
1932
1939
|
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
@@ -1990,10 +1997,10 @@ function validate$p(obj, path = 'EinsteinLlmGenerationGenAiCitedReferenceReprese
|
|
|
1990
1997
|
})();
|
|
1991
1998
|
return v_error === undefined ? null : v_error;
|
|
1992
1999
|
}
|
|
1993
|
-
const select$
|
|
2000
|
+
const select$L = function EinsteinLlmGenerationGenAiCitedReferenceRepresentationSelect() {
|
|
1994
2001
|
return {
|
|
1995
2002
|
kind: 'Fragment',
|
|
1996
|
-
version: VERSION$
|
|
2003
|
+
version: VERSION$u,
|
|
1997
2004
|
private: [],
|
|
1998
2005
|
selections: [
|
|
1999
2006
|
{
|
|
@@ -2031,7 +2038,7 @@ const select$B = function EinsteinLlmGenerationGenAiCitedReferenceRepresentation
|
|
|
2031
2038
|
]
|
|
2032
2039
|
};
|
|
2033
2040
|
};
|
|
2034
|
-
function equals$
|
|
2041
|
+
function equals$u(existing, incoming) {
|
|
2035
2042
|
const existing_label = existing.label;
|
|
2036
2043
|
const incoming_label = incoming.label;
|
|
2037
2044
|
// if at least one of these optionals is defined
|
|
@@ -2123,8 +2130,8 @@ function equals$l(existing, incoming) {
|
|
|
2123
2130
|
return true;
|
|
2124
2131
|
}
|
|
2125
2132
|
|
|
2126
|
-
const VERSION$
|
|
2127
|
-
function validate$
|
|
2133
|
+
const VERSION$t = "bcc0ea08323732f4187dd2b9f70fea6c";
|
|
2134
|
+
function validate$x(obj, path = 'EinsteinLlmGenerationCitationRepresentation') {
|
|
2128
2135
|
const v_error = (() => {
|
|
2129
2136
|
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
2130
2137
|
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
@@ -2138,7 +2145,7 @@ function validate$o(obj, path = 'EinsteinLlmGenerationCitationRepresentation') {
|
|
|
2138
2145
|
for (let i = 0; i < obj_citedReferences.length; i++) {
|
|
2139
2146
|
const obj_citedReferences_item = obj_citedReferences[i];
|
|
2140
2147
|
const path_citedReferences_item = path_citedReferences + '[' + i + ']';
|
|
2141
|
-
const referencepath_citedReferences_itemValidationError = validate$
|
|
2148
|
+
const referencepath_citedReferences_itemValidationError = validate$y(obj_citedReferences_item, path_citedReferences_item);
|
|
2142
2149
|
if (referencepath_citedReferences_itemValidationError !== null) {
|
|
2143
2150
|
let message = 'Object doesn\'t match EinsteinLlmGenerationGenAiCitedReferenceRepresentation (at "' + path_citedReferences_item + '")\n';
|
|
2144
2151
|
message += referencepath_citedReferences_itemValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
@@ -2149,11 +2156,11 @@ function validate$o(obj, path = 'EinsteinLlmGenerationCitationRepresentation') {
|
|
|
2149
2156
|
})();
|
|
2150
2157
|
return v_error === undefined ? null : v_error;
|
|
2151
2158
|
}
|
|
2152
|
-
const select$
|
|
2153
|
-
const { selections: EinsteinLlmGenerationGenAiCitedReferenceRepresentation__selections, opaque: EinsteinLlmGenerationGenAiCitedReferenceRepresentation__opaque, } = select$
|
|
2159
|
+
const select$K = function EinsteinLlmGenerationCitationRepresentationSelect() {
|
|
2160
|
+
const { selections: EinsteinLlmGenerationGenAiCitedReferenceRepresentation__selections, opaque: EinsteinLlmGenerationGenAiCitedReferenceRepresentation__opaque, } = select$L();
|
|
2154
2161
|
return {
|
|
2155
2162
|
kind: 'Fragment',
|
|
2156
|
-
version: VERSION$
|
|
2163
|
+
version: VERSION$t,
|
|
2157
2164
|
private: [],
|
|
2158
2165
|
selections: [
|
|
2159
2166
|
{
|
|
@@ -2166,7 +2173,7 @@ const select$A = function EinsteinLlmGenerationCitationRepresentationSelect() {
|
|
|
2166
2173
|
]
|
|
2167
2174
|
};
|
|
2168
2175
|
};
|
|
2169
|
-
function equals$
|
|
2176
|
+
function equals$t(existing, incoming) {
|
|
2170
2177
|
const existing_citedReferences = existing.citedReferences;
|
|
2171
2178
|
const incoming_citedReferences = incoming.citedReferences;
|
|
2172
2179
|
// if at least one of these optionals is defined
|
|
@@ -2177,7 +2184,7 @@ function equals$k(existing, incoming) {
|
|
|
2177
2184
|
return false;
|
|
2178
2185
|
}
|
|
2179
2186
|
const equals_citedReferences_items = equalsArray(existing_citedReferences, incoming_citedReferences, (existing_citedReferences_item, incoming_citedReferences_item) => {
|
|
2180
|
-
if (!(equals$
|
|
2187
|
+
if (!(equals$u(existing_citedReferences_item, incoming_citedReferences_item))) {
|
|
2181
2188
|
return false;
|
|
2182
2189
|
}
|
|
2183
2190
|
});
|
|
@@ -2188,8 +2195,8 @@ function equals$k(existing, incoming) {
|
|
|
2188
2195
|
return true;
|
|
2189
2196
|
}
|
|
2190
2197
|
|
|
2191
|
-
const VERSION$
|
|
2192
|
-
function validate$
|
|
2198
|
+
const VERSION$s = "f62ac44b024b123f079b57f349e05230";
|
|
2199
|
+
function validate$w(obj, path = 'EinsteinPromptTemplateAttachmentExclusionInfoRepresentation') {
|
|
2193
2200
|
const v_error = (() => {
|
|
2194
2201
|
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
2195
2202
|
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
@@ -2207,10 +2214,10 @@ function validate$n(obj, path = 'EinsteinPromptTemplateAttachmentExclusionInfoRe
|
|
|
2207
2214
|
})();
|
|
2208
2215
|
return v_error === undefined ? null : v_error;
|
|
2209
2216
|
}
|
|
2210
|
-
const select$
|
|
2217
|
+
const select$J = function EinsteinPromptTemplateAttachmentExclusionInfoRepresentationSelect() {
|
|
2211
2218
|
return {
|
|
2212
2219
|
kind: 'Fragment',
|
|
2213
|
-
version: VERSION$
|
|
2220
|
+
version: VERSION$s,
|
|
2214
2221
|
private: [],
|
|
2215
2222
|
selections: [
|
|
2216
2223
|
{
|
|
@@ -2224,7 +2231,7 @@ const select$z = function EinsteinPromptTemplateAttachmentExclusionInfoRepresent
|
|
|
2224
2231
|
]
|
|
2225
2232
|
};
|
|
2226
2233
|
};
|
|
2227
|
-
function equals$
|
|
2234
|
+
function equals$s(existing, incoming) {
|
|
2228
2235
|
const existing_isExcluded = existing.isExcluded;
|
|
2229
2236
|
const incoming_isExcluded = incoming.isExcluded;
|
|
2230
2237
|
if (!(existing_isExcluded === incoming_isExcluded)) {
|
|
@@ -2238,8 +2245,8 @@ function equals$j(existing, incoming) {
|
|
|
2238
2245
|
return true;
|
|
2239
2246
|
}
|
|
2240
2247
|
|
|
2241
|
-
const VERSION$
|
|
2242
|
-
function validate$
|
|
2248
|
+
const VERSION$r = "b85a5621c60125d9f1644af130f67680";
|
|
2249
|
+
function validate$v(obj, path = 'EinsteinPromptTemplateAttachmentRepresentation') {
|
|
2243
2250
|
const v_error = (() => {
|
|
2244
2251
|
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
2245
2252
|
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
@@ -2247,7 +2254,7 @@ function validate$m(obj, path = 'EinsteinPromptTemplateAttachmentRepresentation'
|
|
|
2247
2254
|
if (obj.exclusionInfo !== undefined) {
|
|
2248
2255
|
const obj_exclusionInfo = obj.exclusionInfo;
|
|
2249
2256
|
const path_exclusionInfo = path + '.exclusionInfo';
|
|
2250
|
-
const referencepath_exclusionInfoValidationError = validate$
|
|
2257
|
+
const referencepath_exclusionInfoValidationError = validate$w(obj_exclusionInfo, path_exclusionInfo);
|
|
2251
2258
|
if (referencepath_exclusionInfoValidationError !== null) {
|
|
2252
2259
|
let message = 'Object doesn\'t match EinsteinPromptTemplateAttachmentExclusionInfoRepresentation (at "' + path_exclusionInfo + '")\n';
|
|
2253
2260
|
message += referencepath_exclusionInfoValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
@@ -2284,11 +2291,11 @@ function validate$m(obj, path = 'EinsteinPromptTemplateAttachmentRepresentation'
|
|
|
2284
2291
|
})();
|
|
2285
2292
|
return v_error === undefined ? null : v_error;
|
|
2286
2293
|
}
|
|
2287
|
-
const select$
|
|
2288
|
-
const { selections: EinsteinPromptTemplateAttachmentExclusionInfoRepresentation__selections, opaque: EinsteinPromptTemplateAttachmentExclusionInfoRepresentation__opaque, } = select$
|
|
2294
|
+
const select$I = function EinsteinPromptTemplateAttachmentRepresentationSelect() {
|
|
2295
|
+
const { selections: EinsteinPromptTemplateAttachmentExclusionInfoRepresentation__selections, opaque: EinsteinPromptTemplateAttachmentExclusionInfoRepresentation__opaque, } = select$J();
|
|
2289
2296
|
return {
|
|
2290
2297
|
kind: 'Fragment',
|
|
2291
|
-
version: VERSION$
|
|
2298
|
+
version: VERSION$r,
|
|
2292
2299
|
private: [],
|
|
2293
2300
|
selections: [
|
|
2294
2301
|
{
|
|
@@ -2321,7 +2328,7 @@ const select$y = function EinsteinPromptTemplateAttachmentRepresentationSelect()
|
|
|
2321
2328
|
]
|
|
2322
2329
|
};
|
|
2323
2330
|
};
|
|
2324
|
-
function equals$
|
|
2331
|
+
function equals$r(existing, incoming) {
|
|
2325
2332
|
const existing_fileExtension = existing.fileExtension;
|
|
2326
2333
|
const incoming_fileExtension = incoming.fileExtension;
|
|
2327
2334
|
if (!(existing_fileExtension === incoming_fileExtension)) {
|
|
@@ -2364,15 +2371,15 @@ function equals$i(existing, incoming) {
|
|
|
2364
2371
|
if (existing_exclusionInfo === undefined || incoming_exclusionInfo === undefined) {
|
|
2365
2372
|
return false;
|
|
2366
2373
|
}
|
|
2367
|
-
if (!(equals$
|
|
2374
|
+
if (!(equals$s(existing_exclusionInfo, incoming_exclusionInfo))) {
|
|
2368
2375
|
return false;
|
|
2369
2376
|
}
|
|
2370
2377
|
}
|
|
2371
2378
|
return true;
|
|
2372
2379
|
}
|
|
2373
2380
|
|
|
2374
|
-
const VERSION$
|
|
2375
|
-
function validate$
|
|
2381
|
+
const VERSION$q = "6458d624e5a1691821c764b6de0badb3";
|
|
2382
|
+
function validate$u(obj, path = 'EinsteinPromptTemplateGenerationsErrorRepresentation') {
|
|
2376
2383
|
const v_error = (() => {
|
|
2377
2384
|
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
2378
2385
|
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
@@ -2402,10 +2409,10 @@ function validate$l(obj, path = 'EinsteinPromptTemplateGenerationsErrorRepresent
|
|
|
2402
2409
|
})();
|
|
2403
2410
|
return v_error === undefined ? null : v_error;
|
|
2404
2411
|
}
|
|
2405
|
-
const select$
|
|
2412
|
+
const select$H = function EinsteinPromptTemplateGenerationsErrorRepresentationSelect() {
|
|
2406
2413
|
return {
|
|
2407
2414
|
kind: 'Fragment',
|
|
2408
|
-
version: VERSION$
|
|
2415
|
+
version: VERSION$q,
|
|
2409
2416
|
private: [],
|
|
2410
2417
|
selections: [
|
|
2411
2418
|
{
|
|
@@ -2428,7 +2435,7 @@ const select$x = function EinsteinPromptTemplateGenerationsErrorRepresentationSe
|
|
|
2428
2435
|
]
|
|
2429
2436
|
};
|
|
2430
2437
|
};
|
|
2431
|
-
function equals$
|
|
2438
|
+
function equals$q(existing, incoming) {
|
|
2432
2439
|
const existing_errorMessage = existing.errorMessage;
|
|
2433
2440
|
const incoming_errorMessage = incoming.errorMessage;
|
|
2434
2441
|
if (!(existing_errorMessage === incoming_errorMessage)) {
|
|
@@ -2460,238 +2467,899 @@ function equals$h(existing, incoming) {
|
|
|
2460
2467
|
return true;
|
|
2461
2468
|
}
|
|
2462
2469
|
|
|
2463
|
-
const VERSION$
|
|
2464
|
-
function validate$
|
|
2470
|
+
const VERSION$p = "3ce695c87c874dcb5ac019766a3b64f0";
|
|
2471
|
+
function validate$t(obj, path = 'EinsteinPromptTemplateLatencyRepresentation') {
|
|
2465
2472
|
const v_error = (() => {
|
|
2466
2473
|
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
2467
2474
|
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
2468
2475
|
}
|
|
2469
|
-
const
|
|
2470
|
-
const
|
|
2471
|
-
if (typeof
|
|
2472
|
-
return new TypeError('Expected "
|
|
2476
|
+
const obj_duration = obj.duration;
|
|
2477
|
+
const path_duration = path + '.duration';
|
|
2478
|
+
if (typeof obj_duration !== 'number' || (typeof obj_duration === 'number' && Math.floor(obj_duration) !== obj_duration)) {
|
|
2479
|
+
return new TypeError('Expected "integer" but received "' + typeof obj_duration + '" (at "' + path_duration + '")');
|
|
2480
|
+
}
|
|
2481
|
+
const obj_startTime = obj.startTime;
|
|
2482
|
+
const path_startTime = path + '.startTime';
|
|
2483
|
+
if (typeof obj_startTime !== 'number' || (typeof obj_startTime === 'number' && Math.floor(obj_startTime) !== obj_startTime)) {
|
|
2484
|
+
return new TypeError('Expected "integer" but received "' + typeof obj_startTime + '" (at "' + path_startTime + '")');
|
|
2473
2485
|
}
|
|
2474
2486
|
})();
|
|
2475
2487
|
return v_error === undefined ? null : v_error;
|
|
2476
2488
|
}
|
|
2477
|
-
const select$
|
|
2489
|
+
const select$G = function EinsteinPromptTemplateLatencyRepresentationSelect() {
|
|
2478
2490
|
return {
|
|
2479
2491
|
kind: 'Fragment',
|
|
2480
|
-
version: VERSION$
|
|
2492
|
+
version: VERSION$p,
|
|
2481
2493
|
private: [],
|
|
2482
2494
|
selections: [
|
|
2483
2495
|
{
|
|
2484
|
-
name: '
|
|
2496
|
+
name: 'duration',
|
|
2497
|
+
kind: 'Scalar'
|
|
2498
|
+
},
|
|
2499
|
+
{
|
|
2500
|
+
name: 'startTime',
|
|
2485
2501
|
kind: 'Scalar'
|
|
2486
2502
|
}
|
|
2487
2503
|
]
|
|
2488
2504
|
};
|
|
2489
2505
|
};
|
|
2490
|
-
function equals$
|
|
2491
|
-
const
|
|
2492
|
-
const
|
|
2493
|
-
if (!(
|
|
2506
|
+
function equals$p(existing, incoming) {
|
|
2507
|
+
const existing_duration = existing.duration;
|
|
2508
|
+
const incoming_duration = incoming.duration;
|
|
2509
|
+
if (!(existing_duration === incoming_duration)) {
|
|
2510
|
+
return false;
|
|
2511
|
+
}
|
|
2512
|
+
const existing_startTime = existing.startTime;
|
|
2513
|
+
const incoming_startTime = incoming.startTime;
|
|
2514
|
+
if (!(existing_startTime === incoming_startTime)) {
|
|
2494
2515
|
return false;
|
|
2495
2516
|
}
|
|
2496
2517
|
return true;
|
|
2497
2518
|
}
|
|
2498
2519
|
|
|
2499
|
-
const VERSION$
|
|
2500
|
-
function validate$
|
|
2520
|
+
const VERSION$o = "9ef738d379a8db0dc8193d438d7995ad";
|
|
2521
|
+
function validate$s(obj, path = 'EinsteinPromptTemplateLatencyBreakdownItemRepresentation') {
|
|
2501
2522
|
const v_error = (() => {
|
|
2502
2523
|
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
2503
2524
|
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
2504
2525
|
}
|
|
2505
|
-
const
|
|
2506
|
-
const
|
|
2507
|
-
|
|
2508
|
-
|
|
2526
|
+
const obj_latency = obj.latency;
|
|
2527
|
+
const path_latency = path + '.latency';
|
|
2528
|
+
const referencepath_latencyValidationError = validate$t(obj_latency, path_latency);
|
|
2529
|
+
if (referencepath_latencyValidationError !== null) {
|
|
2530
|
+
let message = 'Object doesn\'t match EinsteinPromptTemplateLatencyRepresentation (at "' + path_latency + '")\n';
|
|
2531
|
+
message += referencepath_latencyValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
2532
|
+
return new TypeError(message);
|
|
2509
2533
|
}
|
|
2510
|
-
|
|
2511
|
-
|
|
2512
|
-
|
|
2513
|
-
|
|
2514
|
-
|
|
2515
|
-
|
|
2516
|
-
|
|
2517
|
-
|
|
2518
|
-
|
|
2519
|
-
|
|
2520
|
-
|
|
2521
|
-
|
|
2522
|
-
|
|
2523
|
-
|
|
2534
|
+
const obj_referenceName = obj.referenceName;
|
|
2535
|
+
const path_referenceName = path + '.referenceName';
|
|
2536
|
+
if (typeof obj_referenceName !== 'string') {
|
|
2537
|
+
return new TypeError('Expected "string" but received "' + typeof obj_referenceName + '" (at "' + path_referenceName + '")');
|
|
2538
|
+
}
|
|
2539
|
+
})();
|
|
2540
|
+
return v_error === undefined ? null : v_error;
|
|
2541
|
+
}
|
|
2542
|
+
const select$F = function EinsteinPromptTemplateLatencyBreakdownItemRepresentationSelect() {
|
|
2543
|
+
const { selections: EinsteinPromptTemplateLatencyRepresentation__selections, opaque: EinsteinPromptTemplateLatencyRepresentation__opaque, } = select$G();
|
|
2544
|
+
return {
|
|
2545
|
+
kind: 'Fragment',
|
|
2546
|
+
version: VERSION$o,
|
|
2547
|
+
private: [],
|
|
2548
|
+
selections: [
|
|
2549
|
+
{
|
|
2550
|
+
name: 'latency',
|
|
2551
|
+
kind: 'Object',
|
|
2552
|
+
selections: EinsteinPromptTemplateLatencyRepresentation__selections
|
|
2553
|
+
},
|
|
2554
|
+
{
|
|
2555
|
+
name: 'referenceName',
|
|
2556
|
+
kind: 'Scalar'
|
|
2524
2557
|
}
|
|
2525
|
-
|
|
2526
|
-
|
|
2527
|
-
|
|
2528
|
-
|
|
2558
|
+
]
|
|
2559
|
+
};
|
|
2560
|
+
};
|
|
2561
|
+
function equals$o(existing, incoming) {
|
|
2562
|
+
const existing_referenceName = existing.referenceName;
|
|
2563
|
+
const incoming_referenceName = incoming.referenceName;
|
|
2564
|
+
if (!(existing_referenceName === incoming_referenceName)) {
|
|
2565
|
+
return false;
|
|
2566
|
+
}
|
|
2567
|
+
const existing_latency = existing.latency;
|
|
2568
|
+
const incoming_latency = incoming.latency;
|
|
2569
|
+
if (!(equals$p(existing_latency, incoming_latency))) {
|
|
2570
|
+
return false;
|
|
2571
|
+
}
|
|
2572
|
+
return true;
|
|
2573
|
+
}
|
|
2574
|
+
|
|
2575
|
+
const VERSION$n = "4b1840167fa1759c2413bafa7708e137";
|
|
2576
|
+
function validate$r(obj, path = 'EinsteinPromptTemplateLatencyStepRepresentation') {
|
|
2577
|
+
const v_error = (() => {
|
|
2578
|
+
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
2579
|
+
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
2580
|
+
}
|
|
2581
|
+
if (obj.breakdown !== undefined) {
|
|
2582
|
+
const obj_breakdown = obj.breakdown;
|
|
2583
|
+
const path_breakdown = path + '.breakdown';
|
|
2584
|
+
if (!ArrayIsArray(obj_breakdown)) {
|
|
2585
|
+
return new TypeError('Expected "array" but received "' + typeof obj_breakdown + '" (at "' + path_breakdown + '")');
|
|
2586
|
+
}
|
|
2587
|
+
for (let i = 0; i < obj_breakdown.length; i++) {
|
|
2588
|
+
const obj_breakdown_item = obj_breakdown[i];
|
|
2589
|
+
const path_breakdown_item = path_breakdown + '[' + i + ']';
|
|
2590
|
+
const referencepath_breakdown_itemValidationError = validate$s(obj_breakdown_item, path_breakdown_item);
|
|
2591
|
+
if (referencepath_breakdown_itemValidationError !== null) {
|
|
2592
|
+
let message = 'Object doesn\'t match EinsteinPromptTemplateLatencyBreakdownItemRepresentation (at "' + path_breakdown_item + '")\n';
|
|
2593
|
+
message += referencepath_breakdown_itemValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
2594
|
+
return new TypeError(message);
|
|
2529
2595
|
}
|
|
2530
|
-
})();
|
|
2531
|
-
if (obj_moderationSettings_union1_error != null) {
|
|
2532
|
-
obj_moderationSettings_union1 = obj_moderationSettings_union1_error.message;
|
|
2533
|
-
}
|
|
2534
|
-
if (obj_moderationSettings_union0 && obj_moderationSettings_union1) {
|
|
2535
|
-
let message = 'Object doesn\'t match union (at "' + path_moderationSettings + '")';
|
|
2536
|
-
message += '\n' + obj_moderationSettings_union0.split('\n').map((line) => '\t' + line).join('\n');
|
|
2537
|
-
message += '\n' + obj_moderationSettings_union1.split('\n').map((line) => '\t' + line).join('\n');
|
|
2538
|
-
return new TypeError(message);
|
|
2539
2596
|
}
|
|
2540
2597
|
}
|
|
2541
|
-
|
|
2542
|
-
|
|
2543
|
-
|
|
2544
|
-
|
|
2545
|
-
|
|
2546
|
-
|
|
2598
|
+
const obj_latency = obj.latency;
|
|
2599
|
+
const path_latency = path + '.latency';
|
|
2600
|
+
const referencepath_latencyValidationError = validate$t(obj_latency, path_latency);
|
|
2601
|
+
if (referencepath_latencyValidationError !== null) {
|
|
2602
|
+
let message = 'Object doesn\'t match EinsteinPromptTemplateLatencyRepresentation (at "' + path_latency + '")\n';
|
|
2603
|
+
message += referencepath_latencyValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
2604
|
+
return new TypeError(message);
|
|
2547
2605
|
}
|
|
2548
2606
|
})();
|
|
2549
2607
|
return v_error === undefined ? null : v_error;
|
|
2550
2608
|
}
|
|
2551
|
-
const select$
|
|
2552
|
-
const { selections:
|
|
2609
|
+
const select$E = function EinsteinPromptTemplateLatencyStepRepresentationSelect() {
|
|
2610
|
+
const { selections: EinsteinPromptTemplateLatencyBreakdownItemRepresentation__selections, opaque: EinsteinPromptTemplateLatencyBreakdownItemRepresentation__opaque, } = select$F();
|
|
2611
|
+
const { selections: EinsteinPromptTemplateLatencyRepresentation__selections, opaque: EinsteinPromptTemplateLatencyRepresentation__opaque, } = select$G();
|
|
2553
2612
|
return {
|
|
2554
2613
|
kind: 'Fragment',
|
|
2555
|
-
version: VERSION$
|
|
2614
|
+
version: VERSION$n,
|
|
2556
2615
|
private: [],
|
|
2557
2616
|
selections: [
|
|
2558
2617
|
{
|
|
2559
|
-
name: '
|
|
2560
|
-
kind: 'Scalar'
|
|
2561
|
-
},
|
|
2562
|
-
{
|
|
2563
|
-
name: 'moderationSettings',
|
|
2618
|
+
name: 'breakdown',
|
|
2564
2619
|
kind: 'Object',
|
|
2565
|
-
|
|
2566
|
-
selections:
|
|
2620
|
+
plural: true,
|
|
2621
|
+
selections: EinsteinPromptTemplateLatencyBreakdownItemRepresentation__selections,
|
|
2567
2622
|
required: false
|
|
2568
2623
|
},
|
|
2569
2624
|
{
|
|
2570
|
-
name: '
|
|
2571
|
-
kind: '
|
|
2572
|
-
|
|
2625
|
+
name: 'latency',
|
|
2626
|
+
kind: 'Object',
|
|
2627
|
+
selections: EinsteinPromptTemplateLatencyRepresentation__selections
|
|
2573
2628
|
}
|
|
2574
2629
|
]
|
|
2575
2630
|
};
|
|
2576
2631
|
};
|
|
2577
|
-
function equals$
|
|
2578
|
-
const
|
|
2579
|
-
const
|
|
2580
|
-
if
|
|
2632
|
+
function equals$n(existing, incoming) {
|
|
2633
|
+
const existing_breakdown = existing.breakdown;
|
|
2634
|
+
const incoming_breakdown = incoming.breakdown;
|
|
2635
|
+
// if at least one of these optionals is defined
|
|
2636
|
+
if (existing_breakdown !== undefined || incoming_breakdown !== undefined) {
|
|
2637
|
+
// if one of these is not defined we know the other is defined and therefore
|
|
2638
|
+
// not equal
|
|
2639
|
+
if (existing_breakdown === undefined || incoming_breakdown === undefined) {
|
|
2640
|
+
return false;
|
|
2641
|
+
}
|
|
2642
|
+
const equals_breakdown_items = equalsArray(existing_breakdown, incoming_breakdown, (existing_breakdown_item, incoming_breakdown_item) => {
|
|
2643
|
+
if (!(equals$o(existing_breakdown_item, incoming_breakdown_item))) {
|
|
2644
|
+
return false;
|
|
2645
|
+
}
|
|
2646
|
+
});
|
|
2647
|
+
if (equals_breakdown_items === false) {
|
|
2648
|
+
return false;
|
|
2649
|
+
}
|
|
2650
|
+
}
|
|
2651
|
+
const existing_latency = existing.latency;
|
|
2652
|
+
const incoming_latency = incoming.latency;
|
|
2653
|
+
if (!(equals$p(existing_latency, incoming_latency))) {
|
|
2654
|
+
return false;
|
|
2655
|
+
}
|
|
2656
|
+
return true;
|
|
2657
|
+
}
|
|
2658
|
+
|
|
2659
|
+
const VERSION$m = "d6838fb296069ed6df17b2215be2da09";
|
|
2660
|
+
function validate$q(obj, path = 'EinsteinPromptTemplateLatencyExecutionRepresentation') {
|
|
2661
|
+
const v_error = (() => {
|
|
2662
|
+
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
2663
|
+
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
2664
|
+
}
|
|
2665
|
+
if (obj.generation !== undefined) {
|
|
2666
|
+
const obj_generation = obj.generation;
|
|
2667
|
+
const path_generation = path + '.generation';
|
|
2668
|
+
const referencepath_generationValidationError = validate$r(obj_generation, path_generation);
|
|
2669
|
+
if (referencepath_generationValidationError !== null) {
|
|
2670
|
+
let message = 'Object doesn\'t match EinsteinPromptTemplateLatencyStepRepresentation (at "' + path_generation + '")\n';
|
|
2671
|
+
message += referencepath_generationValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
2672
|
+
return new TypeError(message);
|
|
2673
|
+
}
|
|
2674
|
+
}
|
|
2675
|
+
if (obj.hydration !== undefined) {
|
|
2676
|
+
const obj_hydration = obj.hydration;
|
|
2677
|
+
const path_hydration = path + '.hydration';
|
|
2678
|
+
const referencepath_hydrationValidationError = validate$r(obj_hydration, path_hydration);
|
|
2679
|
+
if (referencepath_hydrationValidationError !== null) {
|
|
2680
|
+
let message = 'Object doesn\'t match EinsteinPromptTemplateLatencyStepRepresentation (at "' + path_hydration + '")\n';
|
|
2681
|
+
message += referencepath_hydrationValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
2682
|
+
return new TypeError(message);
|
|
2683
|
+
}
|
|
2684
|
+
}
|
|
2685
|
+
const obj_loadTemplate = obj.loadTemplate;
|
|
2686
|
+
const path_loadTemplate = path + '.loadTemplate';
|
|
2687
|
+
const referencepath_loadTemplateValidationError = validate$r(obj_loadTemplate, path_loadTemplate);
|
|
2688
|
+
if (referencepath_loadTemplateValidationError !== null) {
|
|
2689
|
+
let message = 'Object doesn\'t match EinsteinPromptTemplateLatencyStepRepresentation (at "' + path_loadTemplate + '")\n';
|
|
2690
|
+
message += referencepath_loadTemplateValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
2691
|
+
return new TypeError(message);
|
|
2692
|
+
}
|
|
2693
|
+
if (obj.mask !== undefined) {
|
|
2694
|
+
const obj_mask = obj.mask;
|
|
2695
|
+
const path_mask = path + '.mask';
|
|
2696
|
+
const referencepath_maskValidationError = validate$r(obj_mask, path_mask);
|
|
2697
|
+
if (referencepath_maskValidationError !== null) {
|
|
2698
|
+
let message = 'Object doesn\'t match EinsteinPromptTemplateLatencyStepRepresentation (at "' + path_mask + '")\n';
|
|
2699
|
+
message += referencepath_maskValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
2700
|
+
return new TypeError(message);
|
|
2701
|
+
}
|
|
2702
|
+
}
|
|
2703
|
+
if (obj.resolveData !== undefined) {
|
|
2704
|
+
const obj_resolveData = obj.resolveData;
|
|
2705
|
+
const path_resolveData = path + '.resolveData';
|
|
2706
|
+
const referencepath_resolveDataValidationError = validate$r(obj_resolveData, path_resolveData);
|
|
2707
|
+
if (referencepath_resolveDataValidationError !== null) {
|
|
2708
|
+
let message = 'Object doesn\'t match EinsteinPromptTemplateLatencyStepRepresentation (at "' + path_resolveData + '")\n';
|
|
2709
|
+
message += referencepath_resolveDataValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
2710
|
+
return new TypeError(message);
|
|
2711
|
+
}
|
|
2712
|
+
}
|
|
2713
|
+
if (obj.summarize !== undefined) {
|
|
2714
|
+
const obj_summarize = obj.summarize;
|
|
2715
|
+
const path_summarize = path + '.summarize';
|
|
2716
|
+
const referencepath_summarizeValidationError = validate$r(obj_summarize, path_summarize);
|
|
2717
|
+
if (referencepath_summarizeValidationError !== null) {
|
|
2718
|
+
let message = 'Object doesn\'t match EinsteinPromptTemplateLatencyStepRepresentation (at "' + path_summarize + '")\n';
|
|
2719
|
+
message += referencepath_summarizeValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
2720
|
+
return new TypeError(message);
|
|
2721
|
+
}
|
|
2722
|
+
}
|
|
2723
|
+
})();
|
|
2724
|
+
return v_error === undefined ? null : v_error;
|
|
2725
|
+
}
|
|
2726
|
+
const select$D = function EinsteinPromptTemplateLatencyExecutionRepresentationSelect() {
|
|
2727
|
+
const { selections: EinsteinPromptTemplateLatencyStepRepresentation__selections, opaque: EinsteinPromptTemplateLatencyStepRepresentation__opaque, } = select$E();
|
|
2728
|
+
return {
|
|
2729
|
+
kind: 'Fragment',
|
|
2730
|
+
version: VERSION$m,
|
|
2731
|
+
private: [],
|
|
2732
|
+
selections: [
|
|
2733
|
+
{
|
|
2734
|
+
name: 'generation',
|
|
2735
|
+
kind: 'Object',
|
|
2736
|
+
selections: EinsteinPromptTemplateLatencyStepRepresentation__selections,
|
|
2737
|
+
required: false
|
|
2738
|
+
},
|
|
2739
|
+
{
|
|
2740
|
+
name: 'hydration',
|
|
2741
|
+
kind: 'Object',
|
|
2742
|
+
selections: EinsteinPromptTemplateLatencyStepRepresentation__selections,
|
|
2743
|
+
required: false
|
|
2744
|
+
},
|
|
2745
|
+
{
|
|
2746
|
+
name: 'loadTemplate',
|
|
2747
|
+
kind: 'Object',
|
|
2748
|
+
selections: EinsteinPromptTemplateLatencyStepRepresentation__selections
|
|
2749
|
+
},
|
|
2750
|
+
{
|
|
2751
|
+
name: 'mask',
|
|
2752
|
+
kind: 'Object',
|
|
2753
|
+
selections: EinsteinPromptTemplateLatencyStepRepresentation__selections,
|
|
2754
|
+
required: false
|
|
2755
|
+
},
|
|
2756
|
+
{
|
|
2757
|
+
name: 'resolveData',
|
|
2758
|
+
kind: 'Object',
|
|
2759
|
+
selections: EinsteinPromptTemplateLatencyStepRepresentation__selections,
|
|
2760
|
+
required: false
|
|
2761
|
+
},
|
|
2762
|
+
{
|
|
2763
|
+
name: 'summarize',
|
|
2764
|
+
kind: 'Object',
|
|
2765
|
+
selections: EinsteinPromptTemplateLatencyStepRepresentation__selections,
|
|
2766
|
+
required: false
|
|
2767
|
+
}
|
|
2768
|
+
]
|
|
2769
|
+
};
|
|
2770
|
+
};
|
|
2771
|
+
function equals$m(existing, incoming) {
|
|
2772
|
+
const existing_generation = existing.generation;
|
|
2773
|
+
const incoming_generation = incoming.generation;
|
|
2774
|
+
// if at least one of these optionals is defined
|
|
2775
|
+
if (existing_generation !== undefined || incoming_generation !== undefined) {
|
|
2776
|
+
// if one of these is not defined we know the other is defined and therefore
|
|
2777
|
+
// not equal
|
|
2778
|
+
if (existing_generation === undefined || incoming_generation === undefined) {
|
|
2779
|
+
return false;
|
|
2780
|
+
}
|
|
2781
|
+
if (!(equals$n(existing_generation, incoming_generation))) {
|
|
2782
|
+
return false;
|
|
2783
|
+
}
|
|
2784
|
+
}
|
|
2785
|
+
const existing_hydration = existing.hydration;
|
|
2786
|
+
const incoming_hydration = incoming.hydration;
|
|
2787
|
+
// if at least one of these optionals is defined
|
|
2788
|
+
if (existing_hydration !== undefined || incoming_hydration !== undefined) {
|
|
2789
|
+
// if one of these is not defined we know the other is defined and therefore
|
|
2790
|
+
// not equal
|
|
2791
|
+
if (existing_hydration === undefined || incoming_hydration === undefined) {
|
|
2792
|
+
return false;
|
|
2793
|
+
}
|
|
2794
|
+
if (!(equals$n(existing_hydration, incoming_hydration))) {
|
|
2795
|
+
return false;
|
|
2796
|
+
}
|
|
2797
|
+
}
|
|
2798
|
+
const existing_loadTemplate = existing.loadTemplate;
|
|
2799
|
+
const incoming_loadTemplate = incoming.loadTemplate;
|
|
2800
|
+
if (!(equals$n(existing_loadTemplate, incoming_loadTemplate))) {
|
|
2801
|
+
return false;
|
|
2802
|
+
}
|
|
2803
|
+
const existing_mask = existing.mask;
|
|
2804
|
+
const incoming_mask = incoming.mask;
|
|
2805
|
+
// if at least one of these optionals is defined
|
|
2806
|
+
if (existing_mask !== undefined || incoming_mask !== undefined) {
|
|
2807
|
+
// if one of these is not defined we know the other is defined and therefore
|
|
2808
|
+
// not equal
|
|
2809
|
+
if (existing_mask === undefined || incoming_mask === undefined) {
|
|
2810
|
+
return false;
|
|
2811
|
+
}
|
|
2812
|
+
if (!(equals$n(existing_mask, incoming_mask))) {
|
|
2813
|
+
return false;
|
|
2814
|
+
}
|
|
2815
|
+
}
|
|
2816
|
+
const existing_resolveData = existing.resolveData;
|
|
2817
|
+
const incoming_resolveData = incoming.resolveData;
|
|
2818
|
+
// if at least one of these optionals is defined
|
|
2819
|
+
if (existing_resolveData !== undefined || incoming_resolveData !== undefined) {
|
|
2820
|
+
// if one of these is not defined we know the other is defined and therefore
|
|
2821
|
+
// not equal
|
|
2822
|
+
if (existing_resolveData === undefined || incoming_resolveData === undefined) {
|
|
2823
|
+
return false;
|
|
2824
|
+
}
|
|
2825
|
+
if (!(equals$n(existing_resolveData, incoming_resolveData))) {
|
|
2826
|
+
return false;
|
|
2827
|
+
}
|
|
2828
|
+
}
|
|
2829
|
+
const existing_summarize = existing.summarize;
|
|
2830
|
+
const incoming_summarize = incoming.summarize;
|
|
2831
|
+
// if at least one of these optionals is defined
|
|
2832
|
+
if (existing_summarize !== undefined || incoming_summarize !== undefined) {
|
|
2833
|
+
// if one of these is not defined we know the other is defined and therefore
|
|
2834
|
+
// not equal
|
|
2835
|
+
if (existing_summarize === undefined || incoming_summarize === undefined) {
|
|
2836
|
+
return false;
|
|
2837
|
+
}
|
|
2838
|
+
if (!(equals$n(existing_summarize, incoming_summarize))) {
|
|
2839
|
+
return false;
|
|
2840
|
+
}
|
|
2841
|
+
}
|
|
2842
|
+
return true;
|
|
2843
|
+
}
|
|
2844
|
+
|
|
2845
|
+
const VERSION$l = "bfbfa37e3d6bd35c36ba73c3f9b973b6";
|
|
2846
|
+
function validate$p(obj, path = 'EinsteinPromptTemplatePerformanceRepresentation') {
|
|
2847
|
+
const v_error = (() => {
|
|
2848
|
+
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
2849
|
+
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
2850
|
+
}
|
|
2851
|
+
const obj_execution = obj.execution;
|
|
2852
|
+
const path_execution = path + '.execution';
|
|
2853
|
+
const referencepath_executionValidationError = validate$q(obj_execution, path_execution);
|
|
2854
|
+
if (referencepath_executionValidationError !== null) {
|
|
2855
|
+
let message = 'Object doesn\'t match EinsteinPromptTemplateLatencyExecutionRepresentation (at "' + path_execution + '")\n';
|
|
2856
|
+
message += referencepath_executionValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
2857
|
+
return new TypeError(message);
|
|
2858
|
+
}
|
|
2859
|
+
const obj_latency = obj.latency;
|
|
2860
|
+
const path_latency = path + '.latency';
|
|
2861
|
+
const referencepath_latencyValidationError = validate$t(obj_latency, path_latency);
|
|
2862
|
+
if (referencepath_latencyValidationError !== null) {
|
|
2863
|
+
let message = 'Object doesn\'t match EinsteinPromptTemplateLatencyRepresentation (at "' + path_latency + '")\n';
|
|
2864
|
+
message += referencepath_latencyValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
2865
|
+
return new TypeError(message);
|
|
2866
|
+
}
|
|
2867
|
+
})();
|
|
2868
|
+
return v_error === undefined ? null : v_error;
|
|
2869
|
+
}
|
|
2870
|
+
const select$C = function EinsteinPromptTemplatePerformanceRepresentationSelect() {
|
|
2871
|
+
const { selections: EinsteinPromptTemplateLatencyExecutionRepresentation__selections, opaque: EinsteinPromptTemplateLatencyExecutionRepresentation__opaque, } = select$D();
|
|
2872
|
+
const { selections: EinsteinPromptTemplateLatencyRepresentation__selections, opaque: EinsteinPromptTemplateLatencyRepresentation__opaque, } = select$G();
|
|
2873
|
+
return {
|
|
2874
|
+
kind: 'Fragment',
|
|
2875
|
+
version: VERSION$l,
|
|
2876
|
+
private: [],
|
|
2877
|
+
selections: [
|
|
2878
|
+
{
|
|
2879
|
+
name: 'execution',
|
|
2880
|
+
kind: 'Object',
|
|
2881
|
+
selections: EinsteinPromptTemplateLatencyExecutionRepresentation__selections
|
|
2882
|
+
},
|
|
2883
|
+
{
|
|
2884
|
+
name: 'latency',
|
|
2885
|
+
kind: 'Object',
|
|
2886
|
+
selections: EinsteinPromptTemplateLatencyRepresentation__selections
|
|
2887
|
+
}
|
|
2888
|
+
]
|
|
2889
|
+
};
|
|
2890
|
+
};
|
|
2891
|
+
function equals$l(existing, incoming) {
|
|
2892
|
+
const existing_execution = existing.execution;
|
|
2893
|
+
const incoming_execution = incoming.execution;
|
|
2894
|
+
if (!(equals$m(existing_execution, incoming_execution))) {
|
|
2895
|
+
return false;
|
|
2896
|
+
}
|
|
2897
|
+
const existing_latency = existing.latency;
|
|
2898
|
+
const incoming_latency = incoming.latency;
|
|
2899
|
+
if (!(equals$p(existing_latency, incoming_latency))) {
|
|
2900
|
+
return false;
|
|
2901
|
+
}
|
|
2902
|
+
return true;
|
|
2903
|
+
}
|
|
2904
|
+
|
|
2905
|
+
const VERSION$k = "7c417ce44e4bc05dfcc454e6825590e8";
|
|
2906
|
+
function validate$o(obj, path = 'EinsteinPromptTemplateMaskSettingsRepresentation') {
|
|
2907
|
+
const v_error = (() => {
|
|
2908
|
+
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
2909
|
+
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
2910
|
+
}
|
|
2911
|
+
const obj_enableModeration = obj.enableModeration;
|
|
2912
|
+
const path_enableModeration = path + '.enableModeration';
|
|
2913
|
+
if (typeof obj_enableModeration !== 'boolean') {
|
|
2914
|
+
return new TypeError('Expected "boolean" but received "' + typeof obj_enableModeration + '" (at "' + path_enableModeration + '")');
|
|
2915
|
+
}
|
|
2916
|
+
})();
|
|
2917
|
+
return v_error === undefined ? null : v_error;
|
|
2918
|
+
}
|
|
2919
|
+
const select$B = function EinsteinPromptTemplateMaskSettingsRepresentationSelect() {
|
|
2920
|
+
return {
|
|
2921
|
+
kind: 'Fragment',
|
|
2922
|
+
version: VERSION$k,
|
|
2923
|
+
private: [],
|
|
2924
|
+
selections: [
|
|
2925
|
+
{
|
|
2926
|
+
name: 'enableModeration',
|
|
2927
|
+
kind: 'Scalar'
|
|
2928
|
+
}
|
|
2929
|
+
]
|
|
2930
|
+
};
|
|
2931
|
+
};
|
|
2932
|
+
function equals$k(existing, incoming) {
|
|
2933
|
+
const existing_enableModeration = existing.enableModeration;
|
|
2934
|
+
const incoming_enableModeration = incoming.enableModeration;
|
|
2935
|
+
if (!(existing_enableModeration === incoming_enableModeration)) {
|
|
2936
|
+
return false;
|
|
2937
|
+
}
|
|
2938
|
+
return true;
|
|
2939
|
+
}
|
|
2940
|
+
|
|
2941
|
+
const VERSION$j = "92ad1abd0e2a60bc36941409cadda7e2";
|
|
2942
|
+
function validate$n(obj, path = 'EinsteinPromptTemplateMaskContentRepresentation') {
|
|
2943
|
+
const v_error = (() => {
|
|
2944
|
+
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
2945
|
+
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
2946
|
+
}
|
|
2947
|
+
const obj_content = obj.content;
|
|
2948
|
+
const path_content = path + '.content';
|
|
2949
|
+
if (typeof obj_content !== 'string') {
|
|
2950
|
+
return new TypeError('Expected "string" but received "' + typeof obj_content + '" (at "' + path_content + '")');
|
|
2951
|
+
}
|
|
2952
|
+
if (obj.moderationSettings !== undefined) {
|
|
2953
|
+
const obj_moderationSettings = obj.moderationSettings;
|
|
2954
|
+
const path_moderationSettings = path + '.moderationSettings';
|
|
2955
|
+
let obj_moderationSettings_union0 = null;
|
|
2956
|
+
const obj_moderationSettings_union0_error = (() => {
|
|
2957
|
+
const referencepath_moderationSettingsValidationError = validate$o(obj_moderationSettings, path_moderationSettings);
|
|
2958
|
+
if (referencepath_moderationSettingsValidationError !== null) {
|
|
2959
|
+
let message = 'Object doesn\'t match EinsteinPromptTemplateMaskSettingsRepresentation (at "' + path_moderationSettings + '")\n';
|
|
2960
|
+
message += referencepath_moderationSettingsValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
2961
|
+
return new TypeError(message);
|
|
2962
|
+
}
|
|
2963
|
+
})();
|
|
2964
|
+
if (obj_moderationSettings_union0_error != null) {
|
|
2965
|
+
obj_moderationSettings_union0 = obj_moderationSettings_union0_error.message;
|
|
2966
|
+
}
|
|
2967
|
+
let obj_moderationSettings_union1 = null;
|
|
2968
|
+
const obj_moderationSettings_union1_error = (() => {
|
|
2969
|
+
if (obj_moderationSettings !== null) {
|
|
2970
|
+
return new TypeError('Expected "null" but received "' + typeof obj_moderationSettings + '" (at "' + path_moderationSettings + '")');
|
|
2971
|
+
}
|
|
2972
|
+
})();
|
|
2973
|
+
if (obj_moderationSettings_union1_error != null) {
|
|
2974
|
+
obj_moderationSettings_union1 = obj_moderationSettings_union1_error.message;
|
|
2975
|
+
}
|
|
2976
|
+
if (obj_moderationSettings_union0 && obj_moderationSettings_union1) {
|
|
2977
|
+
let message = 'Object doesn\'t match union (at "' + path_moderationSettings + '")';
|
|
2978
|
+
message += '\n' + obj_moderationSettings_union0.split('\n').map((line) => '\t' + line).join('\n');
|
|
2979
|
+
message += '\n' + obj_moderationSettings_union1.split('\n').map((line) => '\t' + line).join('\n');
|
|
2980
|
+
return new TypeError(message);
|
|
2981
|
+
}
|
|
2982
|
+
}
|
|
2983
|
+
if (obj.role !== undefined) {
|
|
2984
|
+
const obj_role = obj.role;
|
|
2985
|
+
const path_role = path + '.role';
|
|
2986
|
+
if (typeof obj_role !== 'string') {
|
|
2987
|
+
return new TypeError('Expected "string" but received "' + typeof obj_role + '" (at "' + path_role + '")');
|
|
2988
|
+
}
|
|
2989
|
+
}
|
|
2990
|
+
})();
|
|
2991
|
+
return v_error === undefined ? null : v_error;
|
|
2992
|
+
}
|
|
2993
|
+
const select$A = function EinsteinPromptTemplateMaskContentRepresentationSelect() {
|
|
2994
|
+
const { selections: EinsteinPromptTemplateMaskSettingsRepresentation__selections, opaque: EinsteinPromptTemplateMaskSettingsRepresentation__opaque, } = select$B();
|
|
2995
|
+
return {
|
|
2996
|
+
kind: 'Fragment',
|
|
2997
|
+
version: VERSION$j,
|
|
2998
|
+
private: [],
|
|
2999
|
+
selections: [
|
|
3000
|
+
{
|
|
3001
|
+
name: 'content',
|
|
3002
|
+
kind: 'Scalar'
|
|
3003
|
+
},
|
|
3004
|
+
{
|
|
3005
|
+
name: 'moderationSettings',
|
|
3006
|
+
kind: 'Object',
|
|
3007
|
+
nullable: true,
|
|
3008
|
+
selections: EinsteinPromptTemplateMaskSettingsRepresentation__selections,
|
|
3009
|
+
required: false
|
|
3010
|
+
},
|
|
3011
|
+
{
|
|
3012
|
+
name: 'role',
|
|
3013
|
+
kind: 'Scalar',
|
|
3014
|
+
required: false
|
|
3015
|
+
}
|
|
3016
|
+
]
|
|
3017
|
+
};
|
|
3018
|
+
};
|
|
3019
|
+
function equals$j(existing, incoming) {
|
|
3020
|
+
const existing_content = existing.content;
|
|
3021
|
+
const incoming_content = incoming.content;
|
|
3022
|
+
if (!(existing_content === incoming_content)) {
|
|
3023
|
+
return false;
|
|
3024
|
+
}
|
|
3025
|
+
const existing_role = existing.role;
|
|
3026
|
+
const incoming_role = incoming.role;
|
|
3027
|
+
// if at least one of these optionals is defined
|
|
3028
|
+
if (existing_role !== undefined || incoming_role !== undefined) {
|
|
3029
|
+
// if one of these is not defined we know the other is defined and therefore
|
|
3030
|
+
// not equal
|
|
3031
|
+
if (existing_role === undefined || incoming_role === undefined) {
|
|
3032
|
+
return false;
|
|
3033
|
+
}
|
|
3034
|
+
if (!(existing_role === incoming_role)) {
|
|
3035
|
+
return false;
|
|
3036
|
+
}
|
|
3037
|
+
}
|
|
3038
|
+
const existing_moderationSettings = existing.moderationSettings;
|
|
3039
|
+
const incoming_moderationSettings = incoming.moderationSettings;
|
|
3040
|
+
// if at least one of these optionals is defined
|
|
3041
|
+
if (existing_moderationSettings !== undefined || incoming_moderationSettings !== undefined) {
|
|
3042
|
+
// if one of these is not defined we know the other is defined and therefore
|
|
3043
|
+
// not equal
|
|
3044
|
+
if (existing_moderationSettings === undefined || incoming_moderationSettings === undefined) {
|
|
3045
|
+
return false;
|
|
3046
|
+
}
|
|
3047
|
+
if (!(existing_moderationSettings === incoming_moderationSettings
|
|
3048
|
+
|| (existing_moderationSettings != null &&
|
|
3049
|
+
incoming_moderationSettings != null &&
|
|
3050
|
+
equals$k(existing_moderationSettings, incoming_moderationSettings)))) {
|
|
3051
|
+
return false;
|
|
3052
|
+
}
|
|
3053
|
+
}
|
|
3054
|
+
return true;
|
|
3055
|
+
}
|
|
3056
|
+
|
|
3057
|
+
const VERSION$i = "507a815605f8d30ae9b52b0ec513d25e";
|
|
3058
|
+
function validate$m(obj, path = 'EinsteinPromptTemplateMaskDataRepresentation') {
|
|
3059
|
+
const v_error = (() => {
|
|
3060
|
+
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
3061
|
+
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
3062
|
+
}
|
|
3063
|
+
const obj_originalValue = obj.originalValue;
|
|
3064
|
+
const path_originalValue = path + '.originalValue';
|
|
3065
|
+
if (typeof obj_originalValue !== 'string') {
|
|
3066
|
+
return new TypeError('Expected "string" but received "' + typeof obj_originalValue + '" (at "' + path_originalValue + '")');
|
|
3067
|
+
}
|
|
3068
|
+
const obj_placeHolder = obj.placeHolder;
|
|
3069
|
+
const path_placeHolder = path + '.placeHolder';
|
|
3070
|
+
if (typeof obj_placeHolder !== 'string') {
|
|
3071
|
+
return new TypeError('Expected "string" but received "' + typeof obj_placeHolder + '" (at "' + path_placeHolder + '")');
|
|
3072
|
+
}
|
|
3073
|
+
const obj_recognizers = obj.recognizers;
|
|
3074
|
+
const path_recognizers = path + '.recognizers';
|
|
3075
|
+
if (!ArrayIsArray(obj_recognizers)) {
|
|
3076
|
+
return new TypeError('Expected "array" but received "' + typeof obj_recognizers + '" (at "' + path_recognizers + '")');
|
|
3077
|
+
}
|
|
3078
|
+
for (let i = 0; i < obj_recognizers.length; i++) {
|
|
3079
|
+
const obj_recognizers_item = obj_recognizers[i];
|
|
3080
|
+
const path_recognizers_item = path_recognizers + '[' + i + ']';
|
|
3081
|
+
if (typeof obj_recognizers_item !== 'string') {
|
|
3082
|
+
return new TypeError('Expected "string" but received "' + typeof obj_recognizers_item + '" (at "' + path_recognizers_item + '")');
|
|
3083
|
+
}
|
|
3084
|
+
}
|
|
3085
|
+
})();
|
|
3086
|
+
return v_error === undefined ? null : v_error;
|
|
3087
|
+
}
|
|
3088
|
+
const select$z = function EinsteinPromptTemplateMaskDataRepresentationSelect() {
|
|
3089
|
+
return {
|
|
3090
|
+
kind: 'Fragment',
|
|
3091
|
+
version: VERSION$i,
|
|
3092
|
+
private: [],
|
|
3093
|
+
selections: [
|
|
3094
|
+
{
|
|
3095
|
+
name: 'originalValue',
|
|
3096
|
+
kind: 'Scalar'
|
|
3097
|
+
},
|
|
3098
|
+
{
|
|
3099
|
+
name: 'placeHolder',
|
|
3100
|
+
kind: 'Scalar'
|
|
3101
|
+
},
|
|
3102
|
+
{
|
|
3103
|
+
name: 'recognizers',
|
|
3104
|
+
kind: 'Scalar',
|
|
3105
|
+
plural: true
|
|
3106
|
+
}
|
|
3107
|
+
]
|
|
3108
|
+
};
|
|
3109
|
+
};
|
|
3110
|
+
function equals$i(existing, incoming) {
|
|
3111
|
+
const existing_originalValue = existing.originalValue;
|
|
3112
|
+
const incoming_originalValue = incoming.originalValue;
|
|
3113
|
+
if (!(existing_originalValue === incoming_originalValue)) {
|
|
3114
|
+
return false;
|
|
3115
|
+
}
|
|
3116
|
+
const existing_placeHolder = existing.placeHolder;
|
|
3117
|
+
const incoming_placeHolder = incoming.placeHolder;
|
|
3118
|
+
if (!(existing_placeHolder === incoming_placeHolder)) {
|
|
3119
|
+
return false;
|
|
3120
|
+
}
|
|
3121
|
+
const existing_recognizers = existing.recognizers;
|
|
3122
|
+
const incoming_recognizers = incoming.recognizers;
|
|
3123
|
+
const equals_recognizers_items = equalsArray(existing_recognizers, incoming_recognizers, (existing_recognizers_item, incoming_recognizers_item) => {
|
|
3124
|
+
if (!(existing_recognizers_item === incoming_recognizers_item)) {
|
|
3125
|
+
return false;
|
|
3126
|
+
}
|
|
3127
|
+
});
|
|
3128
|
+
if (equals_recognizers_items === false) {
|
|
3129
|
+
return false;
|
|
3130
|
+
}
|
|
3131
|
+
return true;
|
|
3132
|
+
}
|
|
3133
|
+
|
|
3134
|
+
const VERSION$h = "76811380b919e1427b00791d86819029";
|
|
3135
|
+
function validate$l(obj, path = 'EinsteinPromptTemplateTokenBreakdownRepresentation') {
|
|
3136
|
+
const v_error = (() => {
|
|
3137
|
+
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
3138
|
+
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
3139
|
+
}
|
|
3140
|
+
const obj_occurrences = obj.occurrences;
|
|
3141
|
+
const path_occurrences = path + '.occurrences';
|
|
3142
|
+
if (typeof obj_occurrences !== 'number' || (typeof obj_occurrences === 'number' && Math.floor(obj_occurrences) !== obj_occurrences)) {
|
|
3143
|
+
return new TypeError('Expected "integer" but received "' + typeof obj_occurrences + '" (at "' + path_occurrences + '")');
|
|
3144
|
+
}
|
|
3145
|
+
const obj_role = obj.role;
|
|
3146
|
+
const path_role = path + '.role';
|
|
3147
|
+
if (typeof obj_role !== 'string') {
|
|
3148
|
+
return new TypeError('Expected "string" but received "' + typeof obj_role + '" (at "' + path_role + '")');
|
|
3149
|
+
}
|
|
3150
|
+
const obj_source = obj.source;
|
|
3151
|
+
const path_source = path + '.source';
|
|
3152
|
+
if (typeof obj_source !== 'string') {
|
|
3153
|
+
return new TypeError('Expected "string" but received "' + typeof obj_source + '" (at "' + path_source + '")');
|
|
3154
|
+
}
|
|
3155
|
+
const obj_tokens = obj.tokens;
|
|
3156
|
+
const path_tokens = path + '.tokens';
|
|
3157
|
+
if (typeof obj_tokens !== 'number' || (typeof obj_tokens === 'number' && Math.floor(obj_tokens) !== obj_tokens)) {
|
|
3158
|
+
return new TypeError('Expected "integer" but received "' + typeof obj_tokens + '" (at "' + path_tokens + '")');
|
|
3159
|
+
}
|
|
3160
|
+
})();
|
|
3161
|
+
return v_error === undefined ? null : v_error;
|
|
3162
|
+
}
|
|
3163
|
+
const select$y = function EinsteinPromptTemplateTokenBreakdownRepresentationSelect() {
|
|
3164
|
+
return {
|
|
3165
|
+
kind: 'Fragment',
|
|
3166
|
+
version: VERSION$h,
|
|
3167
|
+
private: [],
|
|
3168
|
+
selections: [
|
|
3169
|
+
{
|
|
3170
|
+
name: 'occurrences',
|
|
3171
|
+
kind: 'Scalar'
|
|
3172
|
+
},
|
|
3173
|
+
{
|
|
3174
|
+
name: 'role',
|
|
3175
|
+
kind: 'Scalar'
|
|
3176
|
+
},
|
|
3177
|
+
{
|
|
3178
|
+
name: 'source',
|
|
3179
|
+
kind: 'Scalar'
|
|
3180
|
+
},
|
|
3181
|
+
{
|
|
3182
|
+
name: 'tokens',
|
|
3183
|
+
kind: 'Scalar'
|
|
3184
|
+
}
|
|
3185
|
+
]
|
|
3186
|
+
};
|
|
3187
|
+
};
|
|
3188
|
+
function equals$h(existing, incoming) {
|
|
3189
|
+
const existing_occurrences = existing.occurrences;
|
|
3190
|
+
const incoming_occurrences = incoming.occurrences;
|
|
3191
|
+
if (!(existing_occurrences === incoming_occurrences)) {
|
|
3192
|
+
return false;
|
|
3193
|
+
}
|
|
3194
|
+
const existing_tokens = existing.tokens;
|
|
3195
|
+
const incoming_tokens = incoming.tokens;
|
|
3196
|
+
if (!(existing_tokens === incoming_tokens)) {
|
|
2581
3197
|
return false;
|
|
2582
3198
|
}
|
|
2583
3199
|
const existing_role = existing.role;
|
|
2584
3200
|
const incoming_role = incoming.role;
|
|
2585
|
-
|
|
2586
|
-
|
|
2587
|
-
|
|
2588
|
-
|
|
2589
|
-
|
|
2590
|
-
|
|
3201
|
+
if (!(existing_role === incoming_role)) {
|
|
3202
|
+
return false;
|
|
3203
|
+
}
|
|
3204
|
+
const existing_source = existing.source;
|
|
3205
|
+
const incoming_source = incoming.source;
|
|
3206
|
+
if (!(existing_source === incoming_source)) {
|
|
3207
|
+
return false;
|
|
3208
|
+
}
|
|
3209
|
+
return true;
|
|
3210
|
+
}
|
|
3211
|
+
|
|
3212
|
+
const VERSION$g = "7212a778ca53a828691ec38760108a72";
|
|
3213
|
+
function validate$k(obj, path = 'EinsteinPromptTemplatePromptTokenUsageRepresentation') {
|
|
3214
|
+
const v_error = (() => {
|
|
3215
|
+
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
3216
|
+
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
2591
3217
|
}
|
|
2592
|
-
if (
|
|
2593
|
-
|
|
3218
|
+
if (obj.breakdown !== undefined) {
|
|
3219
|
+
const obj_breakdown = obj.breakdown;
|
|
3220
|
+
const path_breakdown = path + '.breakdown';
|
|
3221
|
+
if (!ArrayIsArray(obj_breakdown)) {
|
|
3222
|
+
return new TypeError('Expected "array" but received "' + typeof obj_breakdown + '" (at "' + path_breakdown + '")');
|
|
3223
|
+
}
|
|
3224
|
+
for (let i = 0; i < obj_breakdown.length; i++) {
|
|
3225
|
+
const obj_breakdown_item = obj_breakdown[i];
|
|
3226
|
+
const path_breakdown_item = path_breakdown + '[' + i + ']';
|
|
3227
|
+
const referencepath_breakdown_itemValidationError = validate$l(obj_breakdown_item, path_breakdown_item);
|
|
3228
|
+
if (referencepath_breakdown_itemValidationError !== null) {
|
|
3229
|
+
let message = 'Object doesn\'t match EinsteinPromptTemplateTokenBreakdownRepresentation (at "' + path_breakdown_item + '")\n';
|
|
3230
|
+
message += referencepath_breakdown_itemValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
3231
|
+
return new TypeError(message);
|
|
3232
|
+
}
|
|
3233
|
+
}
|
|
3234
|
+
}
|
|
3235
|
+
const obj_total = obj.total;
|
|
3236
|
+
const path_total = path + '.total';
|
|
3237
|
+
if (typeof obj_total !== 'number' || (typeof obj_total === 'number' && Math.floor(obj_total) !== obj_total)) {
|
|
3238
|
+
return new TypeError('Expected "integer" but received "' + typeof obj_total + '" (at "' + path_total + '")');
|
|
2594
3239
|
}
|
|
3240
|
+
})();
|
|
3241
|
+
return v_error === undefined ? null : v_error;
|
|
3242
|
+
}
|
|
3243
|
+
const select$x = function EinsteinPromptTemplatePromptTokenUsageRepresentationSelect() {
|
|
3244
|
+
const { selections: EinsteinPromptTemplateTokenBreakdownRepresentation__selections, opaque: EinsteinPromptTemplateTokenBreakdownRepresentation__opaque, } = select$y();
|
|
3245
|
+
return {
|
|
3246
|
+
kind: 'Fragment',
|
|
3247
|
+
version: VERSION$g,
|
|
3248
|
+
private: [],
|
|
3249
|
+
selections: [
|
|
3250
|
+
{
|
|
3251
|
+
name: 'breakdown',
|
|
3252
|
+
kind: 'Object',
|
|
3253
|
+
plural: true,
|
|
3254
|
+
selections: EinsteinPromptTemplateTokenBreakdownRepresentation__selections,
|
|
3255
|
+
required: false
|
|
3256
|
+
},
|
|
3257
|
+
{
|
|
3258
|
+
name: 'total',
|
|
3259
|
+
kind: 'Scalar'
|
|
3260
|
+
}
|
|
3261
|
+
]
|
|
3262
|
+
};
|
|
3263
|
+
};
|
|
3264
|
+
function equals$g(existing, incoming) {
|
|
3265
|
+
const existing_total = existing.total;
|
|
3266
|
+
const incoming_total = incoming.total;
|
|
3267
|
+
if (!(existing_total === incoming_total)) {
|
|
3268
|
+
return false;
|
|
2595
3269
|
}
|
|
2596
|
-
const
|
|
2597
|
-
const
|
|
3270
|
+
const existing_breakdown = existing.breakdown;
|
|
3271
|
+
const incoming_breakdown = incoming.breakdown;
|
|
2598
3272
|
// if at least one of these optionals is defined
|
|
2599
|
-
if (
|
|
3273
|
+
if (existing_breakdown !== undefined || incoming_breakdown !== undefined) {
|
|
2600
3274
|
// if one of these is not defined we know the other is defined and therefore
|
|
2601
3275
|
// not equal
|
|
2602
|
-
if (
|
|
3276
|
+
if (existing_breakdown === undefined || incoming_breakdown === undefined) {
|
|
2603
3277
|
return false;
|
|
2604
3278
|
}
|
|
2605
|
-
|
|
2606
|
-
|
|
2607
|
-
|
|
2608
|
-
|
|
3279
|
+
const equals_breakdown_items = equalsArray(existing_breakdown, incoming_breakdown, (existing_breakdown_item, incoming_breakdown_item) => {
|
|
3280
|
+
if (!(equals$h(existing_breakdown_item, incoming_breakdown_item))) {
|
|
3281
|
+
return false;
|
|
3282
|
+
}
|
|
3283
|
+
});
|
|
3284
|
+
if (equals_breakdown_items === false) {
|
|
2609
3285
|
return false;
|
|
2610
3286
|
}
|
|
2611
3287
|
}
|
|
2612
3288
|
return true;
|
|
2613
3289
|
}
|
|
2614
3290
|
|
|
2615
|
-
const VERSION$
|
|
2616
|
-
function validate$
|
|
3291
|
+
const VERSION$f = "20ed3f8bf15ce2c8910245591e27fae5";
|
|
3292
|
+
function validate$j(obj, path = 'EinsteinPromptTemplateTokenUsageRepresentation') {
|
|
2617
3293
|
const v_error = (() => {
|
|
2618
3294
|
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
2619
3295
|
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
2620
3296
|
}
|
|
2621
|
-
const
|
|
2622
|
-
const
|
|
2623
|
-
if (typeof
|
|
2624
|
-
return new TypeError('Expected "
|
|
2625
|
-
}
|
|
2626
|
-
const obj_placeHolder = obj.placeHolder;
|
|
2627
|
-
const path_placeHolder = path + '.placeHolder';
|
|
2628
|
-
if (typeof obj_placeHolder !== 'string') {
|
|
2629
|
-
return new TypeError('Expected "string" but received "' + typeof obj_placeHolder + '" (at "' + path_placeHolder + '")');
|
|
3297
|
+
const obj_completion = obj.completion;
|
|
3298
|
+
const path_completion = path + '.completion';
|
|
3299
|
+
if (typeof obj_completion !== 'number' || (typeof obj_completion === 'number' && Math.floor(obj_completion) !== obj_completion)) {
|
|
3300
|
+
return new TypeError('Expected "integer" but received "' + typeof obj_completion + '" (at "' + path_completion + '")');
|
|
2630
3301
|
}
|
|
2631
|
-
const
|
|
2632
|
-
const
|
|
2633
|
-
|
|
2634
|
-
|
|
3302
|
+
const obj_prompt = obj.prompt;
|
|
3303
|
+
const path_prompt = path + '.prompt';
|
|
3304
|
+
const referencepath_promptValidationError = validate$k(obj_prompt, path_prompt);
|
|
3305
|
+
if (referencepath_promptValidationError !== null) {
|
|
3306
|
+
let message = 'Object doesn\'t match EinsteinPromptTemplatePromptTokenUsageRepresentation (at "' + path_prompt + '")\n';
|
|
3307
|
+
message += referencepath_promptValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
3308
|
+
return new TypeError(message);
|
|
2635
3309
|
}
|
|
2636
|
-
|
|
2637
|
-
|
|
2638
|
-
|
|
2639
|
-
|
|
2640
|
-
return new TypeError('Expected "string" but received "' + typeof obj_recognizers_item + '" (at "' + path_recognizers_item + '")');
|
|
2641
|
-
}
|
|
3310
|
+
const obj_total = obj.total;
|
|
3311
|
+
const path_total = path + '.total';
|
|
3312
|
+
if (typeof obj_total !== 'number' || (typeof obj_total === 'number' && Math.floor(obj_total) !== obj_total)) {
|
|
3313
|
+
return new TypeError('Expected "integer" but received "' + typeof obj_total + '" (at "' + path_total + '")');
|
|
2642
3314
|
}
|
|
2643
3315
|
})();
|
|
2644
3316
|
return v_error === undefined ? null : v_error;
|
|
2645
3317
|
}
|
|
2646
|
-
const select$
|
|
3318
|
+
const select$w = function EinsteinPromptTemplateTokenUsageRepresentationSelect() {
|
|
3319
|
+
const { selections: EinsteinPromptTemplatePromptTokenUsageRepresentation__selections, opaque: EinsteinPromptTemplatePromptTokenUsageRepresentation__opaque, } = select$x();
|
|
2647
3320
|
return {
|
|
2648
3321
|
kind: 'Fragment',
|
|
2649
|
-
version: VERSION$
|
|
3322
|
+
version: VERSION$f,
|
|
2650
3323
|
private: [],
|
|
2651
3324
|
selections: [
|
|
2652
3325
|
{
|
|
2653
|
-
name: '
|
|
3326
|
+
name: 'completion',
|
|
2654
3327
|
kind: 'Scalar'
|
|
2655
3328
|
},
|
|
2656
3329
|
{
|
|
2657
|
-
name: '
|
|
2658
|
-
kind: '
|
|
3330
|
+
name: 'prompt',
|
|
3331
|
+
kind: 'Object',
|
|
3332
|
+
selections: EinsteinPromptTemplatePromptTokenUsageRepresentation__selections
|
|
2659
3333
|
},
|
|
2660
3334
|
{
|
|
2661
|
-
name: '
|
|
2662
|
-
kind: 'Scalar'
|
|
2663
|
-
plural: true
|
|
3335
|
+
name: 'total',
|
|
3336
|
+
kind: 'Scalar'
|
|
2664
3337
|
}
|
|
2665
3338
|
]
|
|
2666
3339
|
};
|
|
2667
3340
|
};
|
|
2668
|
-
function equals$
|
|
2669
|
-
const
|
|
2670
|
-
const
|
|
2671
|
-
if (!(
|
|
3341
|
+
function equals$f(existing, incoming) {
|
|
3342
|
+
const existing_completion = existing.completion;
|
|
3343
|
+
const incoming_completion = incoming.completion;
|
|
3344
|
+
if (!(existing_completion === incoming_completion)) {
|
|
2672
3345
|
return false;
|
|
2673
3346
|
}
|
|
2674
|
-
const
|
|
2675
|
-
const
|
|
2676
|
-
if (!(
|
|
3347
|
+
const existing_total = existing.total;
|
|
3348
|
+
const incoming_total = incoming.total;
|
|
3349
|
+
if (!(existing_total === incoming_total)) {
|
|
2677
3350
|
return false;
|
|
2678
3351
|
}
|
|
2679
|
-
const
|
|
2680
|
-
const
|
|
2681
|
-
|
|
2682
|
-
if (!(existing_recognizers_item === incoming_recognizers_item)) {
|
|
2683
|
-
return false;
|
|
2684
|
-
}
|
|
2685
|
-
});
|
|
2686
|
-
if (equals_recognizers_items === false) {
|
|
3352
|
+
const existing_prompt = existing.prompt;
|
|
3353
|
+
const incoming_prompt = incoming.prompt;
|
|
3354
|
+
if (!(equals$g(existing_prompt, incoming_prompt))) {
|
|
2687
3355
|
return false;
|
|
2688
3356
|
}
|
|
2689
3357
|
return true;
|
|
2690
3358
|
}
|
|
2691
3359
|
|
|
2692
|
-
const TTL$
|
|
2693
|
-
const VERSION$
|
|
2694
|
-
function validate$
|
|
3360
|
+
const TTL$a = 100;
|
|
3361
|
+
const VERSION$e = "c298962a9a914e248606ab1ac01d1d08";
|
|
3362
|
+
function validate$i(obj, path = 'EinsteinPromptTemplateGenerationsRepresentation') {
|
|
2695
3363
|
const v_error = (() => {
|
|
2696
3364
|
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
2697
3365
|
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
@@ -2699,7 +3367,7 @@ function validate$h(obj, path = 'EinsteinPromptTemplateGenerationsRepresentation
|
|
|
2699
3367
|
if (obj.citations !== undefined) {
|
|
2700
3368
|
const obj_citations = obj.citations;
|
|
2701
3369
|
const path_citations = path + '.citations';
|
|
2702
|
-
const referencepath_citationsValidationError = validate$
|
|
3370
|
+
const referencepath_citationsValidationError = validate$x(obj_citations, path_citations);
|
|
2703
3371
|
if (referencepath_citationsValidationError !== null) {
|
|
2704
3372
|
let message = 'Object doesn\'t match EinsteinLlmGenerationCitationRepresentation (at "' + path_citations + '")\n';
|
|
2705
3373
|
message += referencepath_citationsValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
@@ -2715,7 +3383,7 @@ function validate$h(obj, path = 'EinsteinPromptTemplateGenerationsRepresentation
|
|
|
2715
3383
|
for (let i = 0; i < obj_fileData.length; i++) {
|
|
2716
3384
|
const obj_fileData_item = obj_fileData[i];
|
|
2717
3385
|
const path_fileData_item = path_fileData + '[' + i + ']';
|
|
2718
|
-
const referencepath_fileData_itemValidationError = validate$
|
|
3386
|
+
const referencepath_fileData_itemValidationError = validate$v(obj_fileData_item, path_fileData_item);
|
|
2719
3387
|
if (referencepath_fileData_itemValidationError !== null) {
|
|
2720
3388
|
let message = 'Object doesn\'t match EinsteinPromptTemplateAttachmentRepresentation (at "' + path_fileData_item + '")\n';
|
|
2721
3389
|
message += referencepath_fileData_itemValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
@@ -2732,7 +3400,7 @@ function validate$h(obj, path = 'EinsteinPromptTemplateGenerationsRepresentation
|
|
|
2732
3400
|
for (let i = 0; i < obj_generationErrors.length; i++) {
|
|
2733
3401
|
const obj_generationErrors_item = obj_generationErrors[i];
|
|
2734
3402
|
const path_generationErrors_item = path_generationErrors + '[' + i + ']';
|
|
2735
|
-
const referencepath_generationErrors_itemValidationError = validate$
|
|
3403
|
+
const referencepath_generationErrors_itemValidationError = validate$u(obj_generationErrors_item, path_generationErrors_item);
|
|
2736
3404
|
if (referencepath_generationErrors_itemValidationError !== null) {
|
|
2737
3405
|
let message = 'Object doesn\'t match EinsteinPromptTemplateGenerationsErrorRepresentation (at "' + path_generationErrors_item + '")\n';
|
|
2738
3406
|
message += referencepath_generationErrors_itemValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
@@ -2748,7 +3416,7 @@ function validate$h(obj, path = 'EinsteinPromptTemplateGenerationsRepresentation
|
|
|
2748
3416
|
for (let i = 0; i < obj_generations.length; i++) {
|
|
2749
3417
|
const obj_generations_item = obj_generations[i];
|
|
2750
3418
|
const path_generations_item = path_generations + '[' + i + ']';
|
|
2751
|
-
const referencepath_generations_itemValidationError = validate$
|
|
3419
|
+
const referencepath_generations_itemValidationError = validate$D(obj_generations_item, path_generations_item);
|
|
2752
3420
|
if (referencepath_generations_itemValidationError !== null) {
|
|
2753
3421
|
let message = 'Object doesn\'t match EinsteinLlmGenerationItemRepresentation (at "' + path_generations_item + '")\n';
|
|
2754
3422
|
message += referencepath_generations_itemValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
@@ -2775,7 +3443,7 @@ function validate$h(obj, path = 'EinsteinPromptTemplateGenerationsRepresentation
|
|
|
2775
3443
|
const path_parameters = path + '.parameters';
|
|
2776
3444
|
let obj_parameters_union0 = null;
|
|
2777
3445
|
const obj_parameters_union0_error = (() => {
|
|
2778
|
-
const referencepath_parametersValidationError = validate$
|
|
3446
|
+
const referencepath_parametersValidationError = validate$C(obj_parameters, path_parameters);
|
|
2779
3447
|
if (referencepath_parametersValidationError !== null) {
|
|
2780
3448
|
let message = 'Object doesn\'t match WrappedMap (at "' + path_parameters + '")\n';
|
|
2781
3449
|
message += referencepath_parametersValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
@@ -2800,6 +3468,16 @@ function validate$h(obj, path = 'EinsteinPromptTemplateGenerationsRepresentation
|
|
|
2800
3468
|
message += '\n' + obj_parameters_union1.split('\n').map((line) => '\t' + line).join('\n');
|
|
2801
3469
|
return new TypeError(message);
|
|
2802
3470
|
}
|
|
3471
|
+
if (obj.performance !== undefined) {
|
|
3472
|
+
const obj_performance = obj.performance;
|
|
3473
|
+
const path_performance = path + '.performance';
|
|
3474
|
+
const referencepath_performanceValidationError = validate$p(obj_performance, path_performance);
|
|
3475
|
+
if (referencepath_performanceValidationError !== null) {
|
|
3476
|
+
let message = 'Object doesn\'t match EinsteinPromptTemplatePerformanceRepresentation (at "' + path_performance + '")\n';
|
|
3477
|
+
message += referencepath_performanceValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
3478
|
+
return new TypeError(message);
|
|
3479
|
+
}
|
|
3480
|
+
}
|
|
2803
3481
|
const obj_prompt = obj.prompt;
|
|
2804
3482
|
const path_prompt = path + '.prompt';
|
|
2805
3483
|
let obj_prompt_union0 = null;
|
|
@@ -2871,7 +3549,7 @@ function validate$h(obj, path = 'EinsteinPromptTemplateGenerationsRepresentation
|
|
|
2871
3549
|
for (let i = 0; i < obj_requestMessages.length; i++) {
|
|
2872
3550
|
const obj_requestMessages_item = obj_requestMessages[i];
|
|
2873
3551
|
const path_requestMessages_item = path_requestMessages + '[' + i + ']';
|
|
2874
|
-
const referencepath_requestMessages_itemValidationError = validate$
|
|
3552
|
+
const referencepath_requestMessages_itemValidationError = validate$n(obj_requestMessages_item, path_requestMessages_item);
|
|
2875
3553
|
if (referencepath_requestMessages_itemValidationError !== null) {
|
|
2876
3554
|
let message = 'Object doesn\'t match EinsteinPromptTemplateMaskContentRepresentation (at "' + path_requestMessages_item + '")\n';
|
|
2877
3555
|
message += referencepath_requestMessages_itemValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
@@ -2888,7 +3566,7 @@ function validate$h(obj, path = 'EinsteinPromptTemplateGenerationsRepresentation
|
|
|
2888
3566
|
for (let i = 0; i < obj_responseMessages.length; i++) {
|
|
2889
3567
|
const obj_responseMessages_item = obj_responseMessages[i];
|
|
2890
3568
|
const path_responseMessages_item = path_responseMessages + '[' + i + ']';
|
|
2891
|
-
const referencepath_responseMessages_itemValidationError = validate$
|
|
3569
|
+
const referencepath_responseMessages_itemValidationError = validate$n(obj_responseMessages_item, path_responseMessages_item);
|
|
2892
3570
|
if (referencepath_responseMessages_itemValidationError !== null) {
|
|
2893
3571
|
let message = 'Object doesn\'t match EinsteinPromptTemplateMaskContentRepresentation (at "' + path_responseMessages_item + '")\n';
|
|
2894
3572
|
message += referencepath_responseMessages_itemValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
@@ -2905,7 +3583,7 @@ function validate$h(obj, path = 'EinsteinPromptTemplateGenerationsRepresentation
|
|
|
2905
3583
|
for (let i = 0; i < obj_slotsMaskingInformation.length; i++) {
|
|
2906
3584
|
const obj_slotsMaskingInformation_item = obj_slotsMaskingInformation[i];
|
|
2907
3585
|
const path_slotsMaskingInformation_item = path_slotsMaskingInformation + '[' + i + ']';
|
|
2908
|
-
const referencepath_slotsMaskingInformation_itemValidationError = validate$
|
|
3586
|
+
const referencepath_slotsMaskingInformation_itemValidationError = validate$m(obj_slotsMaskingInformation_item, path_slotsMaskingInformation_item);
|
|
2909
3587
|
if (referencepath_slotsMaskingInformation_itemValidationError !== null) {
|
|
2910
3588
|
let message = 'Object doesn\'t match EinsteinPromptTemplateMaskDataRepresentation (at "' + path_slotsMaskingInformation_item + '")\n';
|
|
2911
3589
|
message += referencepath_slotsMaskingInformation_itemValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
@@ -2913,33 +3591,45 @@ function validate$h(obj, path = 'EinsteinPromptTemplateGenerationsRepresentation
|
|
|
2913
3591
|
}
|
|
2914
3592
|
}
|
|
2915
3593
|
}
|
|
3594
|
+
if (obj.tokenUsage !== undefined) {
|
|
3595
|
+
const obj_tokenUsage = obj.tokenUsage;
|
|
3596
|
+
const path_tokenUsage = path + '.tokenUsage';
|
|
3597
|
+
const referencepath_tokenUsageValidationError = validate$j(obj_tokenUsage, path_tokenUsage);
|
|
3598
|
+
if (referencepath_tokenUsageValidationError !== null) {
|
|
3599
|
+
let message = 'Object doesn\'t match EinsteinPromptTemplateTokenUsageRepresentation (at "' + path_tokenUsage + '")\n';
|
|
3600
|
+
message += referencepath_tokenUsageValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
3601
|
+
return new TypeError(message);
|
|
3602
|
+
}
|
|
3603
|
+
}
|
|
2916
3604
|
})();
|
|
2917
3605
|
return v_error === undefined ? null : v_error;
|
|
2918
3606
|
}
|
|
2919
|
-
const RepresentationType$
|
|
2920
|
-
function keyBuilder$
|
|
2921
|
-
return keyPrefix + '::' + RepresentationType$
|
|
3607
|
+
const RepresentationType$a = 'EinsteinPromptTemplateGenerationsRepresentation';
|
|
3608
|
+
function keyBuilder$o(luvio, config) {
|
|
3609
|
+
return keyPrefix + '::' + RepresentationType$a + ':' + config.requestId;
|
|
2922
3610
|
}
|
|
2923
3611
|
function keyBuilderFromType$2(luvio, object) {
|
|
2924
3612
|
const keyParams = {
|
|
2925
3613
|
requestId: object.requestId
|
|
2926
3614
|
};
|
|
2927
|
-
return keyBuilder$
|
|
3615
|
+
return keyBuilder$o(luvio, keyParams);
|
|
2928
3616
|
}
|
|
2929
|
-
function normalize$
|
|
3617
|
+
function normalize$a(input, existing, path, luvio, store, timestamp) {
|
|
2930
3618
|
return input;
|
|
2931
3619
|
}
|
|
2932
|
-
const select$
|
|
2933
|
-
const { selections: EinsteinLlmGenerationCitationRepresentation__selections, opaque: EinsteinLlmGenerationCitationRepresentation__opaque, } = select$
|
|
2934
|
-
const { selections: EinsteinPromptTemplateAttachmentRepresentation__selections, opaque: EinsteinPromptTemplateAttachmentRepresentation__opaque, } = select$
|
|
2935
|
-
const { selections: EinsteinPromptTemplateGenerationsErrorRepresentation__selections, opaque: EinsteinPromptTemplateGenerationsErrorRepresentation__opaque, } = select$
|
|
2936
|
-
const { selections: EinsteinLlmGenerationItemRepresentation__selections, opaque: EinsteinLlmGenerationItemRepresentation__opaque, } = select$
|
|
2937
|
-
const { selections: WrappedMap__selections, opaque: WrappedMap__opaque, } = select$
|
|
2938
|
-
const { selections:
|
|
2939
|
-
const { selections:
|
|
3620
|
+
const select$v = function EinsteinPromptTemplateGenerationsRepresentationSelect() {
|
|
3621
|
+
const { selections: EinsteinLlmGenerationCitationRepresentation__selections, opaque: EinsteinLlmGenerationCitationRepresentation__opaque, } = select$K();
|
|
3622
|
+
const { selections: EinsteinPromptTemplateAttachmentRepresentation__selections, opaque: EinsteinPromptTemplateAttachmentRepresentation__opaque, } = select$I();
|
|
3623
|
+
const { selections: EinsteinPromptTemplateGenerationsErrorRepresentation__selections, opaque: EinsteinPromptTemplateGenerationsErrorRepresentation__opaque, } = select$H();
|
|
3624
|
+
const { selections: EinsteinLlmGenerationItemRepresentation__selections, opaque: EinsteinLlmGenerationItemRepresentation__opaque, } = select$P();
|
|
3625
|
+
const { selections: WrappedMap__selections, opaque: WrappedMap__opaque, } = select$O();
|
|
3626
|
+
const { selections: EinsteinPromptTemplatePerformanceRepresentation__selections, opaque: EinsteinPromptTemplatePerformanceRepresentation__opaque, } = select$C();
|
|
3627
|
+
const { selections: EinsteinPromptTemplateMaskContentRepresentation__selections, opaque: EinsteinPromptTemplateMaskContentRepresentation__opaque, } = select$A();
|
|
3628
|
+
const { selections: EinsteinPromptTemplateMaskDataRepresentation__selections, opaque: EinsteinPromptTemplateMaskDataRepresentation__opaque, } = select$z();
|
|
3629
|
+
const { selections: EinsteinPromptTemplateTokenUsageRepresentation__selections, opaque: EinsteinPromptTemplateTokenUsageRepresentation__opaque, } = select$w();
|
|
2940
3630
|
return {
|
|
2941
3631
|
kind: 'Fragment',
|
|
2942
|
-
version: VERSION$
|
|
3632
|
+
version: VERSION$e,
|
|
2943
3633
|
private: [],
|
|
2944
3634
|
selections: [
|
|
2945
3635
|
{
|
|
@@ -2979,6 +3669,12 @@ const select$t = function EinsteinPromptTemplateGenerationsRepresentationSelect(
|
|
|
2979
3669
|
nullable: true,
|
|
2980
3670
|
selections: WrappedMap__selections
|
|
2981
3671
|
},
|
|
3672
|
+
{
|
|
3673
|
+
name: 'performance',
|
|
3674
|
+
kind: 'Object',
|
|
3675
|
+
selections: EinsteinPromptTemplatePerformanceRepresentation__selections,
|
|
3676
|
+
required: false
|
|
3677
|
+
},
|
|
2982
3678
|
{
|
|
2983
3679
|
name: 'prompt',
|
|
2984
3680
|
kind: 'Scalar'
|
|
@@ -3015,11 +3711,17 @@ const select$t = function EinsteinPromptTemplateGenerationsRepresentationSelect(
|
|
|
3015
3711
|
plural: true,
|
|
3016
3712
|
selections: EinsteinPromptTemplateMaskDataRepresentation__selections,
|
|
3017
3713
|
required: false
|
|
3714
|
+
},
|
|
3715
|
+
{
|
|
3716
|
+
name: 'tokenUsage',
|
|
3717
|
+
kind: 'Object',
|
|
3718
|
+
selections: EinsteinPromptTemplateTokenUsageRepresentation__selections,
|
|
3719
|
+
required: false
|
|
3018
3720
|
}
|
|
3019
3721
|
]
|
|
3020
3722
|
};
|
|
3021
3723
|
};
|
|
3022
|
-
function equals$
|
|
3724
|
+
function equals$e(existing, incoming) {
|
|
3023
3725
|
const existing_promptTemplateDevName = existing.promptTemplateDevName;
|
|
3024
3726
|
const incoming_promptTemplateDevName = incoming.promptTemplateDevName;
|
|
3025
3727
|
if (!(existing_promptTemplateDevName === incoming_promptTemplateDevName)) {
|
|
@@ -3039,7 +3741,7 @@ function equals$d(existing, incoming) {
|
|
|
3039
3741
|
if (existing_citations === undefined || incoming_citations === undefined) {
|
|
3040
3742
|
return false;
|
|
3041
3743
|
}
|
|
3042
|
-
if (!(equals$
|
|
3744
|
+
if (!(equals$t(existing_citations, incoming_citations))) {
|
|
3043
3745
|
return false;
|
|
3044
3746
|
}
|
|
3045
3747
|
}
|
|
@@ -3053,7 +3755,7 @@ function equals$d(existing, incoming) {
|
|
|
3053
3755
|
return false;
|
|
3054
3756
|
}
|
|
3055
3757
|
const equals_fileData_items = equalsArray(existing_fileData, incoming_fileData, (existing_fileData_item, incoming_fileData_item) => {
|
|
3056
|
-
if (!(equals$
|
|
3758
|
+
if (!(equals$r(existing_fileData_item, incoming_fileData_item))) {
|
|
3057
3759
|
return false;
|
|
3058
3760
|
}
|
|
3059
3761
|
});
|
|
@@ -3071,7 +3773,7 @@ function equals$d(existing, incoming) {
|
|
|
3071
3773
|
return false;
|
|
3072
3774
|
}
|
|
3073
3775
|
const equals_generationErrors_items = equalsArray(existing_generationErrors, incoming_generationErrors, (existing_generationErrors_item, incoming_generationErrors_item) => {
|
|
3074
|
-
if (!(equals$
|
|
3776
|
+
if (!(equals$q(existing_generationErrors_item, incoming_generationErrors_item))) {
|
|
3075
3777
|
return false;
|
|
3076
3778
|
}
|
|
3077
3779
|
});
|
|
@@ -3082,7 +3784,7 @@ function equals$d(existing, incoming) {
|
|
|
3082
3784
|
const existing_generations = existing.generations;
|
|
3083
3785
|
const incoming_generations = incoming.generations;
|
|
3084
3786
|
const equals_generations_items = equalsArray(existing_generations, incoming_generations, (existing_generations_item, incoming_generations_item) => {
|
|
3085
|
-
if (!(equals$
|
|
3787
|
+
if (!(equals$x(existing_generations_item, incoming_generations_item))) {
|
|
3086
3788
|
return false;
|
|
3087
3789
|
}
|
|
3088
3790
|
});
|
|
@@ -3112,9 +3814,22 @@ function equals$d(existing, incoming) {
|
|
|
3112
3814
|
if (!(existing_parameters === incoming_parameters
|
|
3113
3815
|
|| (existing_parameters != null &&
|
|
3114
3816
|
incoming_parameters != null &&
|
|
3115
|
-
equals$
|
|
3817
|
+
equals$w(existing_parameters, incoming_parameters)))) {
|
|
3116
3818
|
return false;
|
|
3117
3819
|
}
|
|
3820
|
+
const existing_performance = existing.performance;
|
|
3821
|
+
const incoming_performance = incoming.performance;
|
|
3822
|
+
// if at least one of these optionals is defined
|
|
3823
|
+
if (existing_performance !== undefined || incoming_performance !== undefined) {
|
|
3824
|
+
// if one of these is not defined we know the other is defined and therefore
|
|
3825
|
+
// not equal
|
|
3826
|
+
if (existing_performance === undefined || incoming_performance === undefined) {
|
|
3827
|
+
return false;
|
|
3828
|
+
}
|
|
3829
|
+
if (!(equals$l(existing_performance, incoming_performance))) {
|
|
3830
|
+
return false;
|
|
3831
|
+
}
|
|
3832
|
+
}
|
|
3118
3833
|
const existing_prompt = existing.prompt;
|
|
3119
3834
|
const incoming_prompt = incoming.prompt;
|
|
3120
3835
|
if (!(existing_prompt === incoming_prompt)) {
|
|
@@ -3135,7 +3850,7 @@ function equals$d(existing, incoming) {
|
|
|
3135
3850
|
return false;
|
|
3136
3851
|
}
|
|
3137
3852
|
const equals_requestMessages_items = equalsArray(existing_requestMessages, incoming_requestMessages, (existing_requestMessages_item, incoming_requestMessages_item) => {
|
|
3138
|
-
if (!(equals$
|
|
3853
|
+
if (!(equals$j(existing_requestMessages_item, incoming_requestMessages_item))) {
|
|
3139
3854
|
return false;
|
|
3140
3855
|
}
|
|
3141
3856
|
});
|
|
@@ -3153,7 +3868,7 @@ function equals$d(existing, incoming) {
|
|
|
3153
3868
|
return false;
|
|
3154
3869
|
}
|
|
3155
3870
|
const equals_responseMessages_items = equalsArray(existing_responseMessages, incoming_responseMessages, (existing_responseMessages_item, incoming_responseMessages_item) => {
|
|
3156
|
-
if (!(equals$
|
|
3871
|
+
if (!(equals$j(existing_responseMessages_item, incoming_responseMessages_item))) {
|
|
3157
3872
|
return false;
|
|
3158
3873
|
}
|
|
3159
3874
|
});
|
|
@@ -3171,7 +3886,7 @@ function equals$d(existing, incoming) {
|
|
|
3171
3886
|
return false;
|
|
3172
3887
|
}
|
|
3173
3888
|
const equals_slotsMaskingInformation_items = equalsArray(existing_slotsMaskingInformation, incoming_slotsMaskingInformation, (existing_slotsMaskingInformation_item, incoming_slotsMaskingInformation_item) => {
|
|
3174
|
-
if (!(equals$
|
|
3889
|
+
if (!(equals$i(existing_slotsMaskingInformation_item, incoming_slotsMaskingInformation_item))) {
|
|
3175
3890
|
return false;
|
|
3176
3891
|
}
|
|
3177
3892
|
});
|
|
@@ -3179,43 +3894,56 @@ function equals$d(existing, incoming) {
|
|
|
3179
3894
|
return false;
|
|
3180
3895
|
}
|
|
3181
3896
|
}
|
|
3897
|
+
const existing_tokenUsage = existing.tokenUsage;
|
|
3898
|
+
const incoming_tokenUsage = incoming.tokenUsage;
|
|
3899
|
+
// if at least one of these optionals is defined
|
|
3900
|
+
if (existing_tokenUsage !== undefined || incoming_tokenUsage !== undefined) {
|
|
3901
|
+
// if one of these is not defined we know the other is defined and therefore
|
|
3902
|
+
// not equal
|
|
3903
|
+
if (existing_tokenUsage === undefined || incoming_tokenUsage === undefined) {
|
|
3904
|
+
return false;
|
|
3905
|
+
}
|
|
3906
|
+
if (!(equals$f(existing_tokenUsage, incoming_tokenUsage))) {
|
|
3907
|
+
return false;
|
|
3908
|
+
}
|
|
3909
|
+
}
|
|
3182
3910
|
return true;
|
|
3183
3911
|
}
|
|
3184
|
-
const ingest$
|
|
3912
|
+
const ingest$a = function EinsteinPromptTemplateGenerationsRepresentationIngest(input, path, luvio, store, timestamp) {
|
|
3185
3913
|
if (process.env.NODE_ENV !== 'production') {
|
|
3186
|
-
const validateError = validate$
|
|
3914
|
+
const validateError = validate$i(input);
|
|
3187
3915
|
if (validateError !== null) {
|
|
3188
3916
|
throw validateError;
|
|
3189
3917
|
}
|
|
3190
3918
|
}
|
|
3191
3919
|
const key = keyBuilderFromType$2(luvio, input);
|
|
3192
|
-
const ttlToUse = TTL$
|
|
3193
|
-
ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize$
|
|
3920
|
+
const ttlToUse = TTL$a;
|
|
3921
|
+
ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize$a, "EinsteinLLM", VERSION$e, RepresentationType$a, equals$e);
|
|
3194
3922
|
return createLink(key);
|
|
3195
3923
|
};
|
|
3196
|
-
function getTypeCacheKeys$
|
|
3924
|
+
function getTypeCacheKeys$a(rootKeySet, luvio, input, fullPathFactory) {
|
|
3197
3925
|
// root cache key (uses fullPathFactory if keyBuilderFromType isn't defined)
|
|
3198
3926
|
const rootKey = keyBuilderFromType$2(luvio, input);
|
|
3199
3927
|
rootKeySet.set(rootKey, {
|
|
3200
3928
|
namespace: keyPrefix,
|
|
3201
|
-
representationName: RepresentationType$
|
|
3929
|
+
representationName: RepresentationType$a,
|
|
3202
3930
|
mergeable: false
|
|
3203
3931
|
});
|
|
3204
3932
|
}
|
|
3205
3933
|
|
|
3206
|
-
function select$
|
|
3207
|
-
return select$
|
|
3934
|
+
function select$u(luvio, params) {
|
|
3935
|
+
return select$v();
|
|
3208
3936
|
}
|
|
3209
|
-
function getResponseCacheKeys$
|
|
3210
|
-
getTypeCacheKeys$
|
|
3937
|
+
function getResponseCacheKeys$g(storeKeyMap, luvio, resourceParams, response) {
|
|
3938
|
+
getTypeCacheKeys$a(storeKeyMap, luvio, response);
|
|
3211
3939
|
}
|
|
3212
|
-
function ingestSuccess$
|
|
3940
|
+
function ingestSuccess$g(luvio, resourceParams, response) {
|
|
3213
3941
|
const { body } = response;
|
|
3214
3942
|
const key = keyBuilderFromType$2(luvio, body);
|
|
3215
|
-
luvio.storeIngest(key, ingest$
|
|
3943
|
+
luvio.storeIngest(key, ingest$a, body);
|
|
3216
3944
|
const snapshot = luvio.storeLookup({
|
|
3217
3945
|
recordId: key,
|
|
3218
|
-
node: select$
|
|
3946
|
+
node: select$u(),
|
|
3219
3947
|
variables: {},
|
|
3220
3948
|
});
|
|
3221
3949
|
if (process.env.NODE_ENV !== 'production') {
|
|
@@ -3226,7 +3954,7 @@ function ingestSuccess$f(luvio, resourceParams, response) {
|
|
|
3226
3954
|
deepFreeze(snapshot.data);
|
|
3227
3955
|
return snapshot;
|
|
3228
3956
|
}
|
|
3229
|
-
function createResourceRequest$
|
|
3957
|
+
function createResourceRequest$g(config) {
|
|
3230
3958
|
const headers = {};
|
|
3231
3959
|
return {
|
|
3232
3960
|
baseUri: '/services/data/v67.0',
|
|
@@ -3240,48 +3968,48 @@ function createResourceRequest$f(config) {
|
|
|
3240
3968
|
};
|
|
3241
3969
|
}
|
|
3242
3970
|
|
|
3243
|
-
const adapterName$
|
|
3971
|
+
const adapterName$g = 'createGenerationsForPromptTemplate';
|
|
3244
3972
|
const createGenerationsForPromptTemplate_ConfigPropertyMetadata = [
|
|
3245
3973
|
generateParamConfigMetadata('promptTemplateDevName', true, 0 /* UrlParameter */, 0 /* String */),
|
|
3246
3974
|
generateParamConfigMetadata('versionId', false, 1 /* QueryParameter */, 0 /* String */),
|
|
3247
3975
|
generateParamConfigMetadata('promptTemplateGenerationsInput', true, 2 /* Body */, 4 /* Unsupported */),
|
|
3248
3976
|
];
|
|
3249
|
-
const createGenerationsForPromptTemplate_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$
|
|
3250
|
-
const createResourceParams$
|
|
3251
|
-
function typeCheckConfig$
|
|
3977
|
+
const createGenerationsForPromptTemplate_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$g, createGenerationsForPromptTemplate_ConfigPropertyMetadata);
|
|
3978
|
+
const createResourceParams$g = /*#__PURE__*/ createResourceParams$k(createGenerationsForPromptTemplate_ConfigPropertyMetadata);
|
|
3979
|
+
function typeCheckConfig$g(untrustedConfig) {
|
|
3252
3980
|
const config = {};
|
|
3253
|
-
typeCheckConfig$
|
|
3981
|
+
typeCheckConfig$k(untrustedConfig, config, createGenerationsForPromptTemplate_ConfigPropertyMetadata);
|
|
3254
3982
|
const untrustedConfig_promptTemplateGenerationsInput = untrustedConfig.promptTemplateGenerationsInput;
|
|
3255
|
-
const referenceEinsteinPromptTemplateGenerationsInputRepresentationValidationError = validate$
|
|
3983
|
+
const referenceEinsteinPromptTemplateGenerationsInputRepresentationValidationError = validate$z(untrustedConfig_promptTemplateGenerationsInput);
|
|
3256
3984
|
if (referenceEinsteinPromptTemplateGenerationsInputRepresentationValidationError === null) {
|
|
3257
3985
|
config.promptTemplateGenerationsInput = untrustedConfig_promptTemplateGenerationsInput;
|
|
3258
3986
|
}
|
|
3259
3987
|
return config;
|
|
3260
3988
|
}
|
|
3261
|
-
function validateAdapterConfig$
|
|
3989
|
+
function validateAdapterConfig$g(untrustedConfig, configPropertyNames) {
|
|
3262
3990
|
if (!untrustedIsObject(untrustedConfig)) {
|
|
3263
3991
|
return null;
|
|
3264
3992
|
}
|
|
3265
3993
|
if (process.env.NODE_ENV !== 'production') {
|
|
3266
3994
|
validateConfig(untrustedConfig, configPropertyNames);
|
|
3267
3995
|
}
|
|
3268
|
-
const config = typeCheckConfig$
|
|
3996
|
+
const config = typeCheckConfig$g(untrustedConfig);
|
|
3269
3997
|
if (!areRequiredParametersPresent(config, configPropertyNames)) {
|
|
3270
3998
|
return null;
|
|
3271
3999
|
}
|
|
3272
4000
|
return config;
|
|
3273
4001
|
}
|
|
3274
|
-
function buildNetworkSnapshot$
|
|
3275
|
-
const resourceParams = createResourceParams$
|
|
3276
|
-
const request = createResourceRequest$
|
|
4002
|
+
function buildNetworkSnapshot$g(luvio, config, options) {
|
|
4003
|
+
const resourceParams = createResourceParams$g(config);
|
|
4004
|
+
const request = createResourceRequest$g(resourceParams);
|
|
3277
4005
|
return luvio.dispatchResourceRequest(request, options)
|
|
3278
4006
|
.then((response) => {
|
|
3279
4007
|
return luvio.handleSuccessResponse(() => {
|
|
3280
|
-
const snapshot = ingestSuccess$
|
|
4008
|
+
const snapshot = ingestSuccess$g(luvio, resourceParams, response);
|
|
3281
4009
|
return luvio.storeBroadcast().then(() => snapshot);
|
|
3282
4010
|
}, () => {
|
|
3283
4011
|
const cache = new StoreKeyMap();
|
|
3284
|
-
getResponseCacheKeys$
|
|
4012
|
+
getResponseCacheKeys$g(cache, luvio, resourceParams, response.body);
|
|
3285
4013
|
return cache;
|
|
3286
4014
|
});
|
|
3287
4015
|
}, (response) => {
|
|
@@ -3291,18 +4019,18 @@ function buildNetworkSnapshot$f(luvio, config, options) {
|
|
|
3291
4019
|
}
|
|
3292
4020
|
const createGenerationsForPromptTemplateAdapterFactory = (luvio) => {
|
|
3293
4021
|
return function createGenerationsForPromptTemplate(untrustedConfig) {
|
|
3294
|
-
const config = validateAdapterConfig$
|
|
4022
|
+
const config = validateAdapterConfig$g(untrustedConfig, createGenerationsForPromptTemplate_ConfigPropertyNames);
|
|
3295
4023
|
// Invalid or incomplete config
|
|
3296
4024
|
if (config === null) {
|
|
3297
4025
|
throw new Error('Invalid config for "createGenerationsForPromptTemplate"');
|
|
3298
4026
|
}
|
|
3299
|
-
return buildNetworkSnapshot$
|
|
4027
|
+
return buildNetworkSnapshot$g(luvio, config);
|
|
3300
4028
|
};
|
|
3301
4029
|
};
|
|
3302
4030
|
|
|
3303
|
-
const TTL$
|
|
3304
|
-
const VERSION$
|
|
3305
|
-
function validate$
|
|
4031
|
+
const TTL$9 = 100;
|
|
4032
|
+
const VERSION$d = "a90a51578e2fdd7a9741d310bed22b1d";
|
|
4033
|
+
function validate$h(obj, path = 'EinsteinPromptTemplateRepresentation') {
|
|
3306
4034
|
const v_error = (() => {
|
|
3307
4035
|
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
3308
4036
|
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
@@ -3310,7 +4038,7 @@ function validate$g(obj, path = 'EinsteinPromptTemplateRepresentation') {
|
|
|
3310
4038
|
if (obj.additionalData !== undefined) {
|
|
3311
4039
|
const obj_additionalData = obj.additionalData;
|
|
3312
4040
|
const path_additionalData = path + '.additionalData';
|
|
3313
|
-
const referencepath_additionalDataValidationError = validate$
|
|
4041
|
+
const referencepath_additionalDataValidationError = validate$C(obj_additionalData, path_additionalData);
|
|
3314
4042
|
if (referencepath_additionalDataValidationError !== null) {
|
|
3315
4043
|
let message = 'Object doesn\'t match WrappedMap (at "' + path_additionalData + '")\n';
|
|
3316
4044
|
message += referencepath_additionalDataValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
@@ -3378,24 +4106,24 @@ function validate$g(obj, path = 'EinsteinPromptTemplateRepresentation') {
|
|
|
3378
4106
|
})();
|
|
3379
4107
|
return v_error === undefined ? null : v_error;
|
|
3380
4108
|
}
|
|
3381
|
-
const RepresentationType$
|
|
3382
|
-
function keyBuilder$
|
|
3383
|
-
return keyPrefix + '::' + RepresentationType$
|
|
4109
|
+
const RepresentationType$9 = 'EinsteinPromptTemplateRepresentation';
|
|
4110
|
+
function keyBuilder$n(luvio, config) {
|
|
4111
|
+
return keyPrefix + '::' + RepresentationType$9 + ':' + config.versionId;
|
|
3384
4112
|
}
|
|
3385
4113
|
function keyBuilderFromType$1(luvio, object) {
|
|
3386
4114
|
const keyParams = {
|
|
3387
4115
|
versionId: object.versionId
|
|
3388
4116
|
};
|
|
3389
|
-
return keyBuilder$
|
|
4117
|
+
return keyBuilder$n(luvio, keyParams);
|
|
3390
4118
|
}
|
|
3391
|
-
function normalize$
|
|
4119
|
+
function normalize$9(input, existing, path, luvio, store, timestamp) {
|
|
3392
4120
|
return input;
|
|
3393
4121
|
}
|
|
3394
|
-
const select$
|
|
3395
|
-
const { selections: WrappedMap__selections, opaque: WrappedMap__opaque, } = select$
|
|
4122
|
+
const select$t = function EinsteinPromptTemplateRepresentationSelect() {
|
|
4123
|
+
const { selections: WrappedMap__selections, opaque: WrappedMap__opaque, } = select$O();
|
|
3396
4124
|
return {
|
|
3397
4125
|
kind: 'Fragment',
|
|
3398
|
-
version: VERSION$
|
|
4126
|
+
version: VERSION$d,
|
|
3399
4127
|
private: [],
|
|
3400
4128
|
selections: [
|
|
3401
4129
|
{
|
|
@@ -3443,7 +4171,7 @@ const select$r = function EinsteinPromptTemplateRepresentationSelect() {
|
|
|
3443
4171
|
]
|
|
3444
4172
|
};
|
|
3445
4173
|
};
|
|
3446
|
-
function equals$
|
|
4174
|
+
function equals$d(existing, incoming) {
|
|
3447
4175
|
const existing_hasWarning = existing.hasWarning;
|
|
3448
4176
|
const incoming_hasWarning = incoming.hasWarning;
|
|
3449
4177
|
if (!(existing_hasWarning === incoming_hasWarning)) {
|
|
@@ -3499,7 +4227,7 @@ function equals$c(existing, incoming) {
|
|
|
3499
4227
|
if (existing_additionalData === undefined || incoming_additionalData === undefined) {
|
|
3500
4228
|
return false;
|
|
3501
4229
|
}
|
|
3502
|
-
if (!(equals$
|
|
4230
|
+
if (!(equals$w(existing_additionalData, incoming_additionalData))) {
|
|
3503
4231
|
return false;
|
|
3504
4232
|
}
|
|
3505
4233
|
}
|
|
@@ -3525,41 +4253,41 @@ function equals$c(existing, incoming) {
|
|
|
3525
4253
|
}
|
|
3526
4254
|
return true;
|
|
3527
4255
|
}
|
|
3528
|
-
const ingest$
|
|
4256
|
+
const ingest$9 = function EinsteinPromptTemplateRepresentationIngest(input, path, luvio, store, timestamp) {
|
|
3529
4257
|
if (process.env.NODE_ENV !== 'production') {
|
|
3530
|
-
const validateError = validate$
|
|
4258
|
+
const validateError = validate$h(input);
|
|
3531
4259
|
if (validateError !== null) {
|
|
3532
4260
|
throw validateError;
|
|
3533
4261
|
}
|
|
3534
4262
|
}
|
|
3535
4263
|
const key = keyBuilderFromType$1(luvio, input);
|
|
3536
|
-
const ttlToUse = TTL$
|
|
3537
|
-
ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize$
|
|
4264
|
+
const ttlToUse = TTL$9;
|
|
4265
|
+
ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize$9, "EinsteinLLM", VERSION$d, RepresentationType$9, equals$d);
|
|
3538
4266
|
return createLink(key);
|
|
3539
4267
|
};
|
|
3540
|
-
function getTypeCacheKeys$
|
|
4268
|
+
function getTypeCacheKeys$9(rootKeySet, luvio, input, fullPathFactory) {
|
|
3541
4269
|
// root cache key (uses fullPathFactory if keyBuilderFromType isn't defined)
|
|
3542
4270
|
const rootKey = keyBuilderFromType$1(luvio, input);
|
|
3543
4271
|
rootKeySet.set(rootKey, {
|
|
3544
4272
|
namespace: keyPrefix,
|
|
3545
|
-
representationName: RepresentationType$
|
|
4273
|
+
representationName: RepresentationType$9,
|
|
3546
4274
|
mergeable: false
|
|
3547
4275
|
});
|
|
3548
4276
|
}
|
|
3549
4277
|
|
|
3550
|
-
function select$
|
|
3551
|
-
return select$
|
|
4278
|
+
function select$s(luvio, params) {
|
|
4279
|
+
return select$t();
|
|
3552
4280
|
}
|
|
3553
|
-
function getResponseCacheKeys$
|
|
3554
|
-
getTypeCacheKeys$
|
|
4281
|
+
function getResponseCacheKeys$f(storeKeyMap, luvio, resourceParams, response) {
|
|
4282
|
+
getTypeCacheKeys$9(storeKeyMap, luvio, response);
|
|
3555
4283
|
}
|
|
3556
|
-
function ingestSuccess$
|
|
4284
|
+
function ingestSuccess$f(luvio, resourceParams, response) {
|
|
3557
4285
|
const { body } = response;
|
|
3558
4286
|
const key = keyBuilderFromType$1(luvio, body);
|
|
3559
|
-
luvio.storeIngest(key, ingest$
|
|
4287
|
+
luvio.storeIngest(key, ingest$9, body);
|
|
3560
4288
|
const snapshot = luvio.storeLookup({
|
|
3561
4289
|
recordId: key,
|
|
3562
|
-
node: select$
|
|
4290
|
+
node: select$s(),
|
|
3563
4291
|
variables: {},
|
|
3564
4292
|
});
|
|
3565
4293
|
if (process.env.NODE_ENV !== 'production') {
|
|
@@ -3570,7 +4298,7 @@ function ingestSuccess$e(luvio, resourceParams, response) {
|
|
|
3570
4298
|
deepFreeze(snapshot.data);
|
|
3571
4299
|
return snapshot;
|
|
3572
4300
|
}
|
|
3573
|
-
function createResourceRequest$
|
|
4301
|
+
function createResourceRequest$f(config) {
|
|
3574
4302
|
const headers = {};
|
|
3575
4303
|
return {
|
|
3576
4304
|
baseUri: '/services/data/v67.0',
|
|
@@ -3584,18 +4312,18 @@ function createResourceRequest$e(config) {
|
|
|
3584
4312
|
};
|
|
3585
4313
|
}
|
|
3586
4314
|
|
|
3587
|
-
const adapterName$
|
|
4315
|
+
const adapterName$f = 'createPromptTemplate';
|
|
3588
4316
|
const createPromptTemplate_ConfigPropertyMetadata = [
|
|
3589
4317
|
generateParamConfigMetadata('apiName', true, 2 /* Body */, 0 /* String */),
|
|
3590
4318
|
generateParamConfigMetadata('childRelationships', true, 2 /* Body */, 4 /* Unsupported */),
|
|
3591
4319
|
generateParamConfigMetadata('fields', true, 2 /* Body */, 4 /* Unsupported */),
|
|
3592
4320
|
generateParamConfigMetadata('id', false, 2 /* Body */, 0 /* String */),
|
|
3593
4321
|
];
|
|
3594
|
-
const createPromptTemplate_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$
|
|
3595
|
-
const createResourceParams$
|
|
3596
|
-
function typeCheckConfig$
|
|
4322
|
+
const createPromptTemplate_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$f, createPromptTemplate_ConfigPropertyMetadata);
|
|
4323
|
+
const createResourceParams$f = /*#__PURE__*/ createResourceParams$k(createPromptTemplate_ConfigPropertyMetadata);
|
|
4324
|
+
function typeCheckConfig$f(untrustedConfig) {
|
|
3597
4325
|
const config = {};
|
|
3598
|
-
typeCheckConfig$
|
|
4326
|
+
typeCheckConfig$k(untrustedConfig, config, createPromptTemplate_ConfigPropertyMetadata);
|
|
3599
4327
|
const untrustedConfig_childRelationships = untrustedConfig.childRelationships;
|
|
3600
4328
|
if (untrustedIsObject(untrustedConfig_childRelationships)) {
|
|
3601
4329
|
const untrustedConfig_childRelationships_object = {};
|
|
@@ -3628,30 +4356,30 @@ function typeCheckConfig$e(untrustedConfig) {
|
|
|
3628
4356
|
}
|
|
3629
4357
|
return config;
|
|
3630
4358
|
}
|
|
3631
|
-
function validateAdapterConfig$
|
|
4359
|
+
function validateAdapterConfig$f(untrustedConfig, configPropertyNames) {
|
|
3632
4360
|
if (!untrustedIsObject(untrustedConfig)) {
|
|
3633
4361
|
return null;
|
|
3634
4362
|
}
|
|
3635
4363
|
if (process.env.NODE_ENV !== 'production') {
|
|
3636
4364
|
validateConfig(untrustedConfig, configPropertyNames);
|
|
3637
4365
|
}
|
|
3638
|
-
const config = typeCheckConfig$
|
|
4366
|
+
const config = typeCheckConfig$f(untrustedConfig);
|
|
3639
4367
|
if (!areRequiredParametersPresent(config, configPropertyNames)) {
|
|
3640
4368
|
return null;
|
|
3641
4369
|
}
|
|
3642
4370
|
return config;
|
|
3643
4371
|
}
|
|
3644
|
-
function buildNetworkSnapshot$
|
|
3645
|
-
const resourceParams = createResourceParams$
|
|
3646
|
-
const request = createResourceRequest$
|
|
4372
|
+
function buildNetworkSnapshot$f(luvio, config, options) {
|
|
4373
|
+
const resourceParams = createResourceParams$f(config);
|
|
4374
|
+
const request = createResourceRequest$f(resourceParams);
|
|
3647
4375
|
return luvio.dispatchResourceRequest(request, options)
|
|
3648
4376
|
.then((response) => {
|
|
3649
4377
|
return luvio.handleSuccessResponse(() => {
|
|
3650
|
-
const snapshot = ingestSuccess$
|
|
4378
|
+
const snapshot = ingestSuccess$f(luvio, resourceParams, response);
|
|
3651
4379
|
return luvio.storeBroadcast().then(() => snapshot);
|
|
3652
4380
|
}, () => {
|
|
3653
4381
|
const cache = new StoreKeyMap();
|
|
3654
|
-
getResponseCacheKeys$
|
|
4382
|
+
getResponseCacheKeys$f(cache, luvio, resourceParams, response.body);
|
|
3655
4383
|
return cache;
|
|
3656
4384
|
});
|
|
3657
4385
|
}, (response) => {
|
|
@@ -3661,28 +4389,28 @@ function buildNetworkSnapshot$e(luvio, config, options) {
|
|
|
3661
4389
|
}
|
|
3662
4390
|
const createPromptTemplateAdapterFactory = (luvio) => {
|
|
3663
4391
|
return function createPromptTemplate(untrustedConfig) {
|
|
3664
|
-
const config = validateAdapterConfig$
|
|
4392
|
+
const config = validateAdapterConfig$f(untrustedConfig, createPromptTemplate_ConfigPropertyNames);
|
|
3665
4393
|
// Invalid or incomplete config
|
|
3666
4394
|
if (config === null) {
|
|
3667
4395
|
throw new Error('Invalid config for "createPromptTemplate"');
|
|
3668
4396
|
}
|
|
3669
|
-
return buildNetworkSnapshot$
|
|
4397
|
+
return buildNetworkSnapshot$f(luvio, config);
|
|
3670
4398
|
};
|
|
3671
4399
|
};
|
|
3672
4400
|
|
|
3673
|
-
function select$
|
|
3674
|
-
return select$
|
|
4401
|
+
function select$r(luvio, params) {
|
|
4402
|
+
return select$t();
|
|
3675
4403
|
}
|
|
3676
|
-
function getResponseCacheKeys$
|
|
3677
|
-
getTypeCacheKeys$
|
|
4404
|
+
function getResponseCacheKeys$e(storeKeyMap, luvio, resourceParams, response) {
|
|
4405
|
+
getTypeCacheKeys$9(storeKeyMap, luvio, response);
|
|
3678
4406
|
}
|
|
3679
|
-
function ingestSuccess$
|
|
4407
|
+
function ingestSuccess$e(luvio, resourceParams, response) {
|
|
3680
4408
|
const { body } = response;
|
|
3681
4409
|
const key = keyBuilderFromType$1(luvio, body);
|
|
3682
|
-
luvio.storeIngest(key, ingest$
|
|
4410
|
+
luvio.storeIngest(key, ingest$9, body);
|
|
3683
4411
|
const snapshot = luvio.storeLookup({
|
|
3684
4412
|
recordId: key,
|
|
3685
|
-
node: select$
|
|
4413
|
+
node: select$r(),
|
|
3686
4414
|
variables: {},
|
|
3687
4415
|
});
|
|
3688
4416
|
if (process.env.NODE_ENV !== 'production') {
|
|
@@ -3693,7 +4421,7 @@ function ingestSuccess$d(luvio, resourceParams, response) {
|
|
|
3693
4421
|
deepFreeze(snapshot.data);
|
|
3694
4422
|
return snapshot;
|
|
3695
4423
|
}
|
|
3696
|
-
function createResourceRequest$
|
|
4424
|
+
function createResourceRequest$e(config) {
|
|
3697
4425
|
const headers = {};
|
|
3698
4426
|
return {
|
|
3699
4427
|
baseUri: '/services/data/v67.0',
|
|
@@ -3707,7 +4435,7 @@ function createResourceRequest$d(config) {
|
|
|
3707
4435
|
};
|
|
3708
4436
|
}
|
|
3709
4437
|
|
|
3710
|
-
const adapterName$
|
|
4438
|
+
const adapterName$e = 'createPromptTemplateVersion';
|
|
3711
4439
|
const createPromptTemplateVersion_ConfigPropertyMetadata = [
|
|
3712
4440
|
generateParamConfigMetadata('promptTemplateDevName', true, 0 /* UrlParameter */, 0 /* String */),
|
|
3713
4441
|
generateParamConfigMetadata('apiName', true, 2 /* Body */, 0 /* String */),
|
|
@@ -3715,11 +4443,11 @@ const createPromptTemplateVersion_ConfigPropertyMetadata = [
|
|
|
3715
4443
|
generateParamConfigMetadata('fields', true, 2 /* Body */, 4 /* Unsupported */),
|
|
3716
4444
|
generateParamConfigMetadata('id', false, 2 /* Body */, 0 /* String */),
|
|
3717
4445
|
];
|
|
3718
|
-
const createPromptTemplateVersion_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$
|
|
3719
|
-
const createResourceParams$
|
|
3720
|
-
function typeCheckConfig$
|
|
4446
|
+
const createPromptTemplateVersion_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$e, createPromptTemplateVersion_ConfigPropertyMetadata);
|
|
4447
|
+
const createResourceParams$e = /*#__PURE__*/ createResourceParams$k(createPromptTemplateVersion_ConfigPropertyMetadata);
|
|
4448
|
+
function typeCheckConfig$e(untrustedConfig) {
|
|
3721
4449
|
const config = {};
|
|
3722
|
-
typeCheckConfig$
|
|
4450
|
+
typeCheckConfig$k(untrustedConfig, config, createPromptTemplateVersion_ConfigPropertyMetadata);
|
|
3723
4451
|
const untrustedConfig_childRelationships = untrustedConfig.childRelationships;
|
|
3724
4452
|
if (untrustedIsObject(untrustedConfig_childRelationships)) {
|
|
3725
4453
|
const untrustedConfig_childRelationships_object = {};
|
|
@@ -3752,30 +4480,30 @@ function typeCheckConfig$d(untrustedConfig) {
|
|
|
3752
4480
|
}
|
|
3753
4481
|
return config;
|
|
3754
4482
|
}
|
|
3755
|
-
function validateAdapterConfig$
|
|
4483
|
+
function validateAdapterConfig$e(untrustedConfig, configPropertyNames) {
|
|
3756
4484
|
if (!untrustedIsObject(untrustedConfig)) {
|
|
3757
4485
|
return null;
|
|
3758
4486
|
}
|
|
3759
4487
|
if (process.env.NODE_ENV !== 'production') {
|
|
3760
4488
|
validateConfig(untrustedConfig, configPropertyNames);
|
|
3761
4489
|
}
|
|
3762
|
-
const config = typeCheckConfig$
|
|
4490
|
+
const config = typeCheckConfig$e(untrustedConfig);
|
|
3763
4491
|
if (!areRequiredParametersPresent(config, configPropertyNames)) {
|
|
3764
4492
|
return null;
|
|
3765
4493
|
}
|
|
3766
4494
|
return config;
|
|
3767
4495
|
}
|
|
3768
|
-
function buildNetworkSnapshot$
|
|
3769
|
-
const resourceParams = createResourceParams$
|
|
3770
|
-
const request = createResourceRequest$
|
|
4496
|
+
function buildNetworkSnapshot$e(luvio, config, options) {
|
|
4497
|
+
const resourceParams = createResourceParams$e(config);
|
|
4498
|
+
const request = createResourceRequest$e(resourceParams);
|
|
3771
4499
|
return luvio.dispatchResourceRequest(request, options)
|
|
3772
4500
|
.then((response) => {
|
|
3773
4501
|
return luvio.handleSuccessResponse(() => {
|
|
3774
|
-
const snapshot = ingestSuccess$
|
|
4502
|
+
const snapshot = ingestSuccess$e(luvio, resourceParams, response);
|
|
3775
4503
|
return luvio.storeBroadcast().then(() => snapshot);
|
|
3776
4504
|
}, () => {
|
|
3777
4505
|
const cache = new StoreKeyMap();
|
|
3778
|
-
getResponseCacheKeys$
|
|
4506
|
+
getResponseCacheKeys$e(cache, luvio, resourceParams, response.body);
|
|
3779
4507
|
return cache;
|
|
3780
4508
|
});
|
|
3781
4509
|
}, (response) => {
|
|
@@ -3785,16 +4513,16 @@ function buildNetworkSnapshot$d(luvio, config, options) {
|
|
|
3785
4513
|
}
|
|
3786
4514
|
const createPromptTemplateVersionAdapterFactory = (luvio) => {
|
|
3787
4515
|
return function createPromptTemplateVersion(untrustedConfig) {
|
|
3788
|
-
const config = validateAdapterConfig$
|
|
4516
|
+
const config = validateAdapterConfig$e(untrustedConfig, createPromptTemplateVersion_ConfigPropertyNames);
|
|
3789
4517
|
// Invalid or incomplete config
|
|
3790
4518
|
if (config === null) {
|
|
3791
4519
|
throw new Error('Invalid config for "createPromptTemplateVersion"');
|
|
3792
4520
|
}
|
|
3793
|
-
return buildNetworkSnapshot$
|
|
4521
|
+
return buildNetworkSnapshot$e(luvio, config);
|
|
3794
4522
|
};
|
|
3795
4523
|
};
|
|
3796
4524
|
|
|
3797
|
-
function validate$
|
|
4525
|
+
function validate$g(obj, path = 'PromptTemplateDataProviderOutputParamRepresentation') {
|
|
3798
4526
|
const v_error = (() => {
|
|
3799
4527
|
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
3800
4528
|
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
@@ -3820,7 +4548,7 @@ function validate$f(obj, path = 'PromptTemplateDataProviderOutputParamRepresenta
|
|
|
3820
4548
|
return v_error === undefined ? null : v_error;
|
|
3821
4549
|
}
|
|
3822
4550
|
|
|
3823
|
-
function validate$
|
|
4551
|
+
function validate$f(obj, path = 'PromptTemplateDataProviderInputParamRepresentation') {
|
|
3824
4552
|
const v_error = (() => {
|
|
3825
4553
|
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
3826
4554
|
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
@@ -3849,9 +4577,9 @@ function validate$e(obj, path = 'PromptTemplateDataProviderInputParamRepresentat
|
|
|
3849
4577
|
return v_error === undefined ? null : v_error;
|
|
3850
4578
|
}
|
|
3851
4579
|
|
|
3852
|
-
const TTL$
|
|
3853
|
-
const VERSION$
|
|
3854
|
-
function validate$
|
|
4580
|
+
const TTL$8 = 300;
|
|
4581
|
+
const VERSION$c = "d4824d8c6e7848df0de89295e6d9d434";
|
|
4582
|
+
function validate$e(obj, path = 'PromptTemplateDataProviderInstanceConfigRepresentation') {
|
|
3855
4583
|
const v_error = (() => {
|
|
3856
4584
|
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
3857
4585
|
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
@@ -3880,7 +4608,7 @@ function validate$d(obj, path = 'PromptTemplateDataProviderInstanceConfigReprese
|
|
|
3880
4608
|
if (obj.defaultOutputParam !== undefined) {
|
|
3881
4609
|
const obj_defaultOutputParam = obj.defaultOutputParam;
|
|
3882
4610
|
const path_defaultOutputParam = path + '.defaultOutputParam';
|
|
3883
|
-
const referencepath_defaultOutputParamValidationError = validate$
|
|
4611
|
+
const referencepath_defaultOutputParamValidationError = validate$g(obj_defaultOutputParam, path_defaultOutputParam);
|
|
3884
4612
|
if (referencepath_defaultOutputParamValidationError !== null) {
|
|
3885
4613
|
let message = 'Object doesn\'t match PromptTemplateDataProviderOutputParamRepresentation (at "' + path_defaultOutputParam + '")\n';
|
|
3886
4614
|
message += referencepath_defaultOutputParamValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
@@ -3934,7 +4662,7 @@ function validate$d(obj, path = 'PromptTemplateDataProviderInstanceConfigReprese
|
|
|
3934
4662
|
for (let i = 0; i < obj_inputParams.length; i++) {
|
|
3935
4663
|
const obj_inputParams_item = obj_inputParams[i];
|
|
3936
4664
|
const path_inputParams_item = path_inputParams + '[' + i + ']';
|
|
3937
|
-
const referencepath_inputParams_itemValidationError = validate$
|
|
4665
|
+
const referencepath_inputParams_itemValidationError = validate$f(obj_inputParams_item, path_inputParams_item);
|
|
3938
4666
|
if (referencepath_inputParams_itemValidationError !== null) {
|
|
3939
4667
|
let message = 'Object doesn\'t match PromptTemplateDataProviderInputParamRepresentation (at "' + path_inputParams_item + '")\n';
|
|
3940
4668
|
message += referencepath_inputParams_itemValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
@@ -4000,7 +4728,7 @@ function validate$d(obj, path = 'PromptTemplateDataProviderInstanceConfigReprese
|
|
|
4000
4728
|
for (let i = 0; i < obj_outputParams.length; i++) {
|
|
4001
4729
|
const obj_outputParams_item = obj_outputParams[i];
|
|
4002
4730
|
const path_outputParams_item = path_outputParams + '[' + i + ']';
|
|
4003
|
-
const referencepath_outputParams_itemValidationError = validate$
|
|
4731
|
+
const referencepath_outputParams_itemValidationError = validate$g(obj_outputParams_item, path_outputParams_item);
|
|
4004
4732
|
if (referencepath_outputParams_itemValidationError !== null) {
|
|
4005
4733
|
let message = 'Object doesn\'t match PromptTemplateDataProviderOutputParamRepresentation (at "' + path_outputParams_item + '")\n';
|
|
4006
4734
|
message += referencepath_outputParams_itemValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
@@ -4053,30 +4781,300 @@ function validate$d(obj, path = 'PromptTemplateDataProviderInstanceConfigReprese
|
|
|
4053
4781
|
if (obj_subGroup_union0_error != null) {
|
|
4054
4782
|
obj_subGroup_union0 = obj_subGroup_union0_error.message;
|
|
4055
4783
|
}
|
|
4056
|
-
let obj_subGroup_union1 = null;
|
|
4057
|
-
const obj_subGroup_union1_error = (() => {
|
|
4058
|
-
if (obj_subGroup !== null) {
|
|
4059
|
-
return new TypeError('Expected "null" but received "' + typeof obj_subGroup + '" (at "' + path_subGroup + '")');
|
|
4060
|
-
}
|
|
4061
|
-
})();
|
|
4062
|
-
if (obj_subGroup_union1_error != null) {
|
|
4063
|
-
obj_subGroup_union1 = obj_subGroup_union1_error.message;
|
|
4784
|
+
let obj_subGroup_union1 = null;
|
|
4785
|
+
const obj_subGroup_union1_error = (() => {
|
|
4786
|
+
if (obj_subGroup !== null) {
|
|
4787
|
+
return new TypeError('Expected "null" but received "' + typeof obj_subGroup + '" (at "' + path_subGroup + '")');
|
|
4788
|
+
}
|
|
4789
|
+
})();
|
|
4790
|
+
if (obj_subGroup_union1_error != null) {
|
|
4791
|
+
obj_subGroup_union1 = obj_subGroup_union1_error.message;
|
|
4792
|
+
}
|
|
4793
|
+
if (obj_subGroup_union0 && obj_subGroup_union1) {
|
|
4794
|
+
let message = 'Object doesn\'t match union (at "' + path_subGroup + '")';
|
|
4795
|
+
message += '\n' + obj_subGroup_union0.split('\n').map((line) => '\t' + line).join('\n');
|
|
4796
|
+
message += '\n' + obj_subGroup_union1.split('\n').map((line) => '\t' + line).join('\n');
|
|
4797
|
+
return new TypeError(message);
|
|
4798
|
+
}
|
|
4799
|
+
}
|
|
4800
|
+
})();
|
|
4801
|
+
return v_error === undefined ? null : v_error;
|
|
4802
|
+
}
|
|
4803
|
+
const RepresentationType$8 = 'PromptTemplateDataProviderInstanceConfigRepresentation';
|
|
4804
|
+
function normalize$8(input, existing, path, luvio, store, timestamp) {
|
|
4805
|
+
return input;
|
|
4806
|
+
}
|
|
4807
|
+
const select$q = function PromptTemplateDataProviderInstanceConfigRepresentationSelect() {
|
|
4808
|
+
return {
|
|
4809
|
+
kind: 'Fragment',
|
|
4810
|
+
version: VERSION$c,
|
|
4811
|
+
private: [],
|
|
4812
|
+
opaque: true
|
|
4813
|
+
};
|
|
4814
|
+
};
|
|
4815
|
+
function equals$c(existing, incoming) {
|
|
4816
|
+
if (JSONStringify(incoming) !== JSONStringify(existing)) {
|
|
4817
|
+
return false;
|
|
4818
|
+
}
|
|
4819
|
+
return true;
|
|
4820
|
+
}
|
|
4821
|
+
const ingest$8 = function PromptTemplateDataProviderInstanceConfigRepresentationIngest(input, path, luvio, store, timestamp) {
|
|
4822
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
4823
|
+
const validateError = validate$e(input);
|
|
4824
|
+
if (validateError !== null) {
|
|
4825
|
+
throw validateError;
|
|
4826
|
+
}
|
|
4827
|
+
}
|
|
4828
|
+
const key = path.fullPath;
|
|
4829
|
+
const ttlToUse = TTL$8;
|
|
4830
|
+
ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize$8, "EinsteinLLM", VERSION$c, RepresentationType$8, equals$c);
|
|
4831
|
+
return createLink(key);
|
|
4832
|
+
};
|
|
4833
|
+
function getTypeCacheKeys$8(rootKeySet, luvio, input, fullPathFactory) {
|
|
4834
|
+
// root cache key (uses fullPathFactory if keyBuilderFromType isn't defined)
|
|
4835
|
+
const rootKey = fullPathFactory();
|
|
4836
|
+
rootKeySet.set(rootKey, {
|
|
4837
|
+
namespace: keyPrefix,
|
|
4838
|
+
representationName: RepresentationType$8,
|
|
4839
|
+
mergeable: false
|
|
4840
|
+
});
|
|
4841
|
+
}
|
|
4842
|
+
|
|
4843
|
+
function select$p(luvio, params) {
|
|
4844
|
+
return select$q();
|
|
4845
|
+
}
|
|
4846
|
+
function keyBuilder$m(luvio, params) {
|
|
4847
|
+
return keyPrefix + '::PromptTemplateDataProviderInstanceConfigRepresentation:(' + stableJSONStringify(params.body.additionalParam) + '::' + 'definition:' + params.body.definition + '::' + 'groupName:' + params.body.groupName + ')';
|
|
4848
|
+
}
|
|
4849
|
+
function getResponseCacheKeys$d(storeKeyMap, luvio, resourceParams, response) {
|
|
4850
|
+
getTypeCacheKeys$8(storeKeyMap, luvio, response, () => keyBuilder$m(luvio, resourceParams));
|
|
4851
|
+
}
|
|
4852
|
+
function ingestSuccess$d(luvio, resourceParams, response, snapshotRefresh) {
|
|
4853
|
+
const { body } = response;
|
|
4854
|
+
const key = keyBuilder$m(luvio, resourceParams);
|
|
4855
|
+
luvio.storeIngest(key, ingest$8, body);
|
|
4856
|
+
const snapshot = luvio.storeLookup({
|
|
4857
|
+
recordId: key,
|
|
4858
|
+
node: select$p(),
|
|
4859
|
+
variables: {},
|
|
4860
|
+
}, snapshotRefresh);
|
|
4861
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
4862
|
+
if (snapshot.state !== 'Fulfilled') {
|
|
4863
|
+
throw new Error('Invalid network response. Expected resource response to result in Fulfilled snapshot');
|
|
4864
|
+
}
|
|
4865
|
+
}
|
|
4866
|
+
deepFreeze(snapshot.data);
|
|
4867
|
+
return snapshot;
|
|
4868
|
+
}
|
|
4869
|
+
function ingestError$a(luvio, params, error, snapshotRefresh) {
|
|
4870
|
+
const key = keyBuilder$m(luvio, params);
|
|
4871
|
+
const errorSnapshot = luvio.errorSnapshot(error, snapshotRefresh);
|
|
4872
|
+
const storeMetadataParams = {
|
|
4873
|
+
ttl: TTL$8,
|
|
4874
|
+
namespace: keyPrefix,
|
|
4875
|
+
version: VERSION$c,
|
|
4876
|
+
representationName: RepresentationType$8
|
|
4877
|
+
};
|
|
4878
|
+
luvio.storeIngestError(key, errorSnapshot, storeMetadataParams);
|
|
4879
|
+
return errorSnapshot;
|
|
4880
|
+
}
|
|
4881
|
+
function createResourceRequest$d(config) {
|
|
4882
|
+
const headers = {};
|
|
4883
|
+
return {
|
|
4884
|
+
baseUri: '/services/data/v67.0',
|
|
4885
|
+
basePath: '/einstein/prompt-templates/data-provider/describe',
|
|
4886
|
+
method: 'post',
|
|
4887
|
+
body: config.body,
|
|
4888
|
+
urlParams: {},
|
|
4889
|
+
queryParams: {},
|
|
4890
|
+
headers,
|
|
4891
|
+
priority: 'normal',
|
|
4892
|
+
};
|
|
4893
|
+
}
|
|
4894
|
+
|
|
4895
|
+
const adapterName$d = 'getDataProviderInstanceConfig';
|
|
4896
|
+
const getDataProviderInstanceConfig_ConfigPropertyMetadata = [
|
|
4897
|
+
generateParamConfigMetadata('additionalParam', false, 2 /* Body */, 4 /* Unsupported */),
|
|
4898
|
+
generateParamConfigMetadata('definition', true, 2 /* Body */, 0 /* String */),
|
|
4899
|
+
generateParamConfigMetadata('groupName', true, 2 /* Body */, 0 /* String */),
|
|
4900
|
+
];
|
|
4901
|
+
const getDataProviderInstanceConfig_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$d, getDataProviderInstanceConfig_ConfigPropertyMetadata);
|
|
4902
|
+
const createResourceParams$d = /*#__PURE__*/ createResourceParams$k(getDataProviderInstanceConfig_ConfigPropertyMetadata);
|
|
4903
|
+
function keyBuilder$l(luvio, config) {
|
|
4904
|
+
const resourceParams = createResourceParams$d(config);
|
|
4905
|
+
return keyBuilder$m(luvio, resourceParams);
|
|
4906
|
+
}
|
|
4907
|
+
function typeCheckConfig$d(untrustedConfig) {
|
|
4908
|
+
const config = {};
|
|
4909
|
+
typeCheckConfig$k(untrustedConfig, config, getDataProviderInstanceConfig_ConfigPropertyMetadata);
|
|
4910
|
+
const untrustedConfig_additionalParam = untrustedConfig.additionalParam;
|
|
4911
|
+
if (untrustedIsObject(untrustedConfig_additionalParam)) {
|
|
4912
|
+
const untrustedConfig_additionalParam_object = {};
|
|
4913
|
+
const untrustedConfig_additionalParam_keys = Object.keys(untrustedConfig_additionalParam);
|
|
4914
|
+
for (let i = 0, arrayLength = untrustedConfig_additionalParam_keys.length; i < arrayLength; i++) {
|
|
4915
|
+
const key = untrustedConfig_additionalParam_keys[i];
|
|
4916
|
+
const untrustedConfig_additionalParam_prop = untrustedConfig_additionalParam[key];
|
|
4917
|
+
if (untrustedConfig_additionalParam_object !== undefined) {
|
|
4918
|
+
untrustedConfig_additionalParam_object[key] = untrustedConfig_additionalParam_prop;
|
|
4919
|
+
}
|
|
4920
|
+
}
|
|
4921
|
+
if (untrustedConfig_additionalParam_object !== undefined && Object.keys(untrustedConfig_additionalParam_object).length >= 0) {
|
|
4922
|
+
config.additionalParam = untrustedConfig_additionalParam_object;
|
|
4923
|
+
}
|
|
4924
|
+
}
|
|
4925
|
+
return config;
|
|
4926
|
+
}
|
|
4927
|
+
function validateAdapterConfig$d(untrustedConfig, configPropertyNames) {
|
|
4928
|
+
if (!untrustedIsObject(untrustedConfig)) {
|
|
4929
|
+
return null;
|
|
4930
|
+
}
|
|
4931
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
4932
|
+
validateConfig(untrustedConfig, configPropertyNames);
|
|
4933
|
+
}
|
|
4934
|
+
const config = typeCheckConfig$d(untrustedConfig);
|
|
4935
|
+
if (!areRequiredParametersPresent(config, configPropertyNames)) {
|
|
4936
|
+
return null;
|
|
4937
|
+
}
|
|
4938
|
+
return config;
|
|
4939
|
+
}
|
|
4940
|
+
function adapterFragment$a(luvio, config) {
|
|
4941
|
+
createResourceParams$d(config);
|
|
4942
|
+
return select$p();
|
|
4943
|
+
}
|
|
4944
|
+
function onFetchResponseSuccess$a(luvio, config, resourceParams, response) {
|
|
4945
|
+
const snapshot = ingestSuccess$d(luvio, resourceParams, response, {
|
|
4946
|
+
config,
|
|
4947
|
+
resolve: () => buildNetworkSnapshot$d(luvio, config, snapshotRefreshOptions)
|
|
4948
|
+
});
|
|
4949
|
+
return luvio.storeBroadcast().then(() => snapshot);
|
|
4950
|
+
}
|
|
4951
|
+
function onFetchResponseError$a(luvio, config, resourceParams, response) {
|
|
4952
|
+
const snapshot = ingestError$a(luvio, resourceParams, response, {
|
|
4953
|
+
config,
|
|
4954
|
+
resolve: () => buildNetworkSnapshot$d(luvio, config, snapshotRefreshOptions)
|
|
4955
|
+
});
|
|
4956
|
+
return luvio.storeBroadcast().then(() => snapshot);
|
|
4957
|
+
}
|
|
4958
|
+
function buildNetworkSnapshot$d(luvio, config, options) {
|
|
4959
|
+
const resourceParams = createResourceParams$d(config);
|
|
4960
|
+
const request = createResourceRequest$d(resourceParams);
|
|
4961
|
+
return luvio.dispatchResourceRequest(request, options)
|
|
4962
|
+
.then((response) => {
|
|
4963
|
+
return luvio.handleSuccessResponse(() => onFetchResponseSuccess$a(luvio, config, resourceParams, response), () => {
|
|
4964
|
+
const cache = new StoreKeyMap();
|
|
4965
|
+
getResponseCacheKeys$d(cache, luvio, resourceParams, response.body);
|
|
4966
|
+
return cache;
|
|
4967
|
+
});
|
|
4968
|
+
}, (response) => {
|
|
4969
|
+
return luvio.handleErrorResponse(() => onFetchResponseError$a(luvio, config, resourceParams, response));
|
|
4970
|
+
});
|
|
4971
|
+
}
|
|
4972
|
+
function buildNetworkSnapshotCachePolicy$a(context, coercedAdapterRequestContext) {
|
|
4973
|
+
return buildNetworkSnapshotCachePolicy$c(context, coercedAdapterRequestContext, buildNetworkSnapshot$d, 'get', false);
|
|
4974
|
+
}
|
|
4975
|
+
function buildCachedSnapshotCachePolicy$a(context, storeLookup) {
|
|
4976
|
+
const { luvio, config } = context;
|
|
4977
|
+
const selector = {
|
|
4978
|
+
recordId: keyBuilder$l(luvio, config),
|
|
4979
|
+
node: adapterFragment$a(luvio, config),
|
|
4980
|
+
variables: {},
|
|
4981
|
+
};
|
|
4982
|
+
const cacheSnapshot = storeLookup(selector, {
|
|
4983
|
+
config,
|
|
4984
|
+
resolve: () => buildNetworkSnapshot$d(luvio, config, snapshotRefreshOptions)
|
|
4985
|
+
});
|
|
4986
|
+
return cacheSnapshot;
|
|
4987
|
+
}
|
|
4988
|
+
const getDataProviderInstanceConfigAdapterFactory = (luvio) => function EinsteinLLM__getDataProviderInstanceConfig(untrustedConfig, requestContext) {
|
|
4989
|
+
const config = validateAdapterConfig$d(untrustedConfig, getDataProviderInstanceConfig_ConfigPropertyNames);
|
|
4990
|
+
// Invalid or incomplete config
|
|
4991
|
+
if (config === null) {
|
|
4992
|
+
return null;
|
|
4993
|
+
}
|
|
4994
|
+
return luvio.applyCachePolicy((requestContext || {}), { config, luvio }, // BuildSnapshotContext
|
|
4995
|
+
buildCachedSnapshotCachePolicy$a, buildNetworkSnapshotCachePolicy$a);
|
|
4996
|
+
};
|
|
4997
|
+
|
|
4998
|
+
function validate$d(obj, path = 'PromptTemplateDataProviderTypeConfigRepresentation') {
|
|
4999
|
+
const v_error = (() => {
|
|
5000
|
+
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
5001
|
+
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
5002
|
+
}
|
|
5003
|
+
if (obj.description !== undefined) {
|
|
5004
|
+
const obj_description = obj.description;
|
|
5005
|
+
const path_description = path + '.description';
|
|
5006
|
+
if (typeof obj_description !== 'string') {
|
|
5007
|
+
return new TypeError('Expected "string" but received "' + typeof obj_description + '" (at "' + path_description + '")');
|
|
5008
|
+
}
|
|
5009
|
+
}
|
|
5010
|
+
const obj_groupName = obj.groupName;
|
|
5011
|
+
const path_groupName = path + '.groupName';
|
|
5012
|
+
if (typeof obj_groupName !== 'string') {
|
|
5013
|
+
return new TypeError('Expected "string" but received "' + typeof obj_groupName + '" (at "' + path_groupName + '")');
|
|
5014
|
+
}
|
|
5015
|
+
const obj_icon = obj.icon;
|
|
5016
|
+
const path_icon = path + '.icon';
|
|
5017
|
+
if (typeof obj_icon !== 'string') {
|
|
5018
|
+
return new TypeError('Expected "string" but received "' + typeof obj_icon + '" (at "' + path_icon + '")');
|
|
5019
|
+
}
|
|
5020
|
+
const obj_isTopLevel = obj.isTopLevel;
|
|
5021
|
+
const path_isTopLevel = path + '.isTopLevel';
|
|
5022
|
+
if (typeof obj_isTopLevel !== 'boolean') {
|
|
5023
|
+
return new TypeError('Expected "boolean" but received "' + typeof obj_isTopLevel + '" (at "' + path_isTopLevel + '")');
|
|
5024
|
+
}
|
|
5025
|
+
const obj_label = obj.label;
|
|
5026
|
+
const path_label = path + '.label';
|
|
5027
|
+
if (typeof obj_label !== 'string') {
|
|
5028
|
+
return new TypeError('Expected "string" but received "' + typeof obj_label + '" (at "' + path_label + '")');
|
|
5029
|
+
}
|
|
5030
|
+
if (obj.parentNode !== undefined) {
|
|
5031
|
+
const obj_parentNode = obj.parentNode;
|
|
5032
|
+
const path_parentNode = path + '.parentNode';
|
|
5033
|
+
if (typeof obj_parentNode !== 'string') {
|
|
5034
|
+
return new TypeError('Expected "string" but received "' + typeof obj_parentNode + '" (at "' + path_parentNode + '")');
|
|
5035
|
+
}
|
|
5036
|
+
}
|
|
5037
|
+
if (obj.scope !== undefined) {
|
|
5038
|
+
const obj_scope = obj.scope;
|
|
5039
|
+
const path_scope = path + '.scope';
|
|
5040
|
+
if (obj_scope === undefined) {
|
|
5041
|
+
return new TypeError('Expected "defined" but received "' + typeof obj_scope + '" (at "' + path_scope + '")');
|
|
4064
5042
|
}
|
|
4065
|
-
|
|
4066
|
-
|
|
4067
|
-
|
|
4068
|
-
|
|
5043
|
+
}
|
|
5044
|
+
})();
|
|
5045
|
+
return v_error === undefined ? null : v_error;
|
|
5046
|
+
}
|
|
5047
|
+
|
|
5048
|
+
const TTL$7 = 300;
|
|
5049
|
+
const VERSION$b = "212332dac1decc071b476742df3440fb";
|
|
5050
|
+
function validate$c(obj, path = 'PromptTemplateDataProviderTypeConfigCollectionRepresentation') {
|
|
5051
|
+
const v_error = (() => {
|
|
5052
|
+
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
5053
|
+
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
5054
|
+
}
|
|
5055
|
+
const obj_dataProviderTypeConfigs = obj.dataProviderTypeConfigs;
|
|
5056
|
+
const path_dataProviderTypeConfigs = path + '.dataProviderTypeConfigs';
|
|
5057
|
+
if (!ArrayIsArray(obj_dataProviderTypeConfigs)) {
|
|
5058
|
+
return new TypeError('Expected "array" but received "' + typeof obj_dataProviderTypeConfigs + '" (at "' + path_dataProviderTypeConfigs + '")');
|
|
5059
|
+
}
|
|
5060
|
+
for (let i = 0; i < obj_dataProviderTypeConfigs.length; i++) {
|
|
5061
|
+
const obj_dataProviderTypeConfigs_item = obj_dataProviderTypeConfigs[i];
|
|
5062
|
+
const path_dataProviderTypeConfigs_item = path_dataProviderTypeConfigs + '[' + i + ']';
|
|
5063
|
+
const referencepath_dataProviderTypeConfigs_itemValidationError = validate$d(obj_dataProviderTypeConfigs_item, path_dataProviderTypeConfigs_item);
|
|
5064
|
+
if (referencepath_dataProviderTypeConfigs_itemValidationError !== null) {
|
|
5065
|
+
let message = 'Object doesn\'t match PromptTemplateDataProviderTypeConfigRepresentation (at "' + path_dataProviderTypeConfigs_item + '")\n';
|
|
5066
|
+
message += referencepath_dataProviderTypeConfigs_itemValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
4069
5067
|
return new TypeError(message);
|
|
4070
5068
|
}
|
|
4071
5069
|
}
|
|
4072
5070
|
})();
|
|
4073
5071
|
return v_error === undefined ? null : v_error;
|
|
4074
5072
|
}
|
|
4075
|
-
const RepresentationType$7 = '
|
|
5073
|
+
const RepresentationType$7 = 'PromptTemplateDataProviderTypeConfigCollectionRepresentation';
|
|
4076
5074
|
function normalize$7(input, existing, path, luvio, store, timestamp) {
|
|
4077
5075
|
return input;
|
|
4078
5076
|
}
|
|
4079
|
-
const select$o = function
|
|
5077
|
+
const select$o = function PromptTemplateDataProviderTypeConfigCollectionRepresentationSelect() {
|
|
4080
5078
|
return {
|
|
4081
5079
|
kind: 'Fragment',
|
|
4082
5080
|
version: VERSION$b,
|
|
@@ -4090,9 +5088,9 @@ function equals$b(existing, incoming) {
|
|
|
4090
5088
|
}
|
|
4091
5089
|
return true;
|
|
4092
5090
|
}
|
|
4093
|
-
const ingest$7 = function
|
|
5091
|
+
const ingest$7 = function PromptTemplateDataProviderTypeConfigCollectionRepresentationIngest(input, path, luvio, store, timestamp) {
|
|
4094
5092
|
if (process.env.NODE_ENV !== 'production') {
|
|
4095
|
-
const validateError = validate$
|
|
5093
|
+
const validateError = validate$c(input);
|
|
4096
5094
|
if (validateError !== null) {
|
|
4097
5095
|
throw validateError;
|
|
4098
5096
|
}
|
|
@@ -4116,7 +5114,7 @@ function select$n(luvio, params) {
|
|
|
4116
5114
|
return select$o();
|
|
4117
5115
|
}
|
|
4118
5116
|
function keyBuilder$k(luvio, params) {
|
|
4119
|
-
return keyPrefix + '::
|
|
5117
|
+
return keyPrefix + '::PromptTemplateDataProviderTypeConfigCollectionRepresentation:(' + 'templateType:' + params.urlParams.templateType + ')';
|
|
4120
5118
|
}
|
|
4121
5119
|
function getResponseCacheKeys$c(storeKeyMap, luvio, resourceParams, response) {
|
|
4122
5120
|
getTypeCacheKeys$7(storeKeyMap, luvio, response, () => keyBuilder$k(luvio, resourceParams));
|
|
@@ -4154,46 +5152,29 @@ function createResourceRequest$c(config) {
|
|
|
4154
5152
|
const headers = {};
|
|
4155
5153
|
return {
|
|
4156
5154
|
baseUri: '/services/data/v67.0',
|
|
4157
|
-
basePath: '/einstein/prompt-templates/data-provider/
|
|
4158
|
-
method: '
|
|
4159
|
-
body:
|
|
4160
|
-
urlParams:
|
|
5155
|
+
basePath: '/einstein/prompt-templates/data-provider-types/' + config.urlParams.templateType + '',
|
|
5156
|
+
method: 'get',
|
|
5157
|
+
body: null,
|
|
5158
|
+
urlParams: config.urlParams,
|
|
4161
5159
|
queryParams: {},
|
|
4162
5160
|
headers,
|
|
4163
5161
|
priority: 'normal',
|
|
4164
5162
|
};
|
|
4165
5163
|
}
|
|
4166
5164
|
|
|
4167
|
-
const adapterName$c = '
|
|
4168
|
-
const
|
|
4169
|
-
generateParamConfigMetadata('
|
|
4170
|
-
generateParamConfigMetadata('definition', true, 2 /* Body */, 0 /* String */),
|
|
4171
|
-
generateParamConfigMetadata('groupName', true, 2 /* Body */, 0 /* String */),
|
|
5165
|
+
const adapterName$c = 'getDataProviderTypeConfigs';
|
|
5166
|
+
const getDataProviderTypeConfigs_ConfigPropertyMetadata = [
|
|
5167
|
+
generateParamConfigMetadata('templateType', true, 0 /* UrlParameter */, 0 /* String */),
|
|
4172
5168
|
];
|
|
4173
|
-
const
|
|
4174
|
-
const createResourceParams$c = /*#__PURE__*/ createResourceParams$
|
|
5169
|
+
const getDataProviderTypeConfigs_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$c, getDataProviderTypeConfigs_ConfigPropertyMetadata);
|
|
5170
|
+
const createResourceParams$c = /*#__PURE__*/ createResourceParams$k(getDataProviderTypeConfigs_ConfigPropertyMetadata);
|
|
4175
5171
|
function keyBuilder$j(luvio, config) {
|
|
4176
5172
|
const resourceParams = createResourceParams$c(config);
|
|
4177
5173
|
return keyBuilder$k(luvio, resourceParams);
|
|
4178
5174
|
}
|
|
4179
5175
|
function typeCheckConfig$c(untrustedConfig) {
|
|
4180
5176
|
const config = {};
|
|
4181
|
-
typeCheckConfig$
|
|
4182
|
-
const untrustedConfig_additionalParam = untrustedConfig.additionalParam;
|
|
4183
|
-
if (untrustedIsObject(untrustedConfig_additionalParam)) {
|
|
4184
|
-
const untrustedConfig_additionalParam_object = {};
|
|
4185
|
-
const untrustedConfig_additionalParam_keys = Object.keys(untrustedConfig_additionalParam);
|
|
4186
|
-
for (let i = 0, arrayLength = untrustedConfig_additionalParam_keys.length; i < arrayLength; i++) {
|
|
4187
|
-
const key = untrustedConfig_additionalParam_keys[i];
|
|
4188
|
-
const untrustedConfig_additionalParam_prop = untrustedConfig_additionalParam[key];
|
|
4189
|
-
if (untrustedConfig_additionalParam_object !== undefined) {
|
|
4190
|
-
untrustedConfig_additionalParam_object[key] = untrustedConfig_additionalParam_prop;
|
|
4191
|
-
}
|
|
4192
|
-
}
|
|
4193
|
-
if (untrustedConfig_additionalParam_object !== undefined && Object.keys(untrustedConfig_additionalParam_object).length >= 0) {
|
|
4194
|
-
config.additionalParam = untrustedConfig_additionalParam_object;
|
|
4195
|
-
}
|
|
4196
|
-
}
|
|
5177
|
+
typeCheckConfig$k(untrustedConfig, config, getDataProviderTypeConfigs_ConfigPropertyMetadata);
|
|
4197
5178
|
return config;
|
|
4198
5179
|
}
|
|
4199
5180
|
function validateAdapterConfig$c(untrustedConfig, configPropertyNames) {
|
|
@@ -4242,7 +5223,7 @@ function buildNetworkSnapshot$c(luvio, config, options) {
|
|
|
4242
5223
|
});
|
|
4243
5224
|
}
|
|
4244
5225
|
function buildNetworkSnapshotCachePolicy$9(context, coercedAdapterRequestContext) {
|
|
4245
|
-
return buildNetworkSnapshotCachePolicy$
|
|
5226
|
+
return buildNetworkSnapshotCachePolicy$c(context, coercedAdapterRequestContext, buildNetworkSnapshot$c, undefined, false);
|
|
4246
5227
|
}
|
|
4247
5228
|
function buildCachedSnapshotCachePolicy$9(context, storeLookup) {
|
|
4248
5229
|
const { luvio, config } = context;
|
|
@@ -4257,8 +5238,8 @@ function buildCachedSnapshotCachePolicy$9(context, storeLookup) {
|
|
|
4257
5238
|
});
|
|
4258
5239
|
return cacheSnapshot;
|
|
4259
5240
|
}
|
|
4260
|
-
const
|
|
4261
|
-
const config = validateAdapterConfig$c(untrustedConfig,
|
|
5241
|
+
const getDataProviderTypeConfigsAdapterFactory = (luvio) => function EinsteinLLM__getDataProviderTypeConfigs(untrustedConfig, requestContext) {
|
|
5242
|
+
const config = validateAdapterConfig$c(untrustedConfig, getDataProviderTypeConfigs_ConfigPropertyNames);
|
|
4262
5243
|
// Invalid or incomplete config
|
|
4263
5244
|
if (config === null) {
|
|
4264
5245
|
return null;
|
|
@@ -4267,86 +5248,36 @@ const getDataProviderInstanceConfigAdapterFactory = (luvio) => function Einstein
|
|
|
4267
5248
|
buildCachedSnapshotCachePolicy$9, buildNetworkSnapshotCachePolicy$9);
|
|
4268
5249
|
};
|
|
4269
5250
|
|
|
4270
|
-
function validate$c(obj, path = 'PromptTemplateDataProviderTypeConfigRepresentation') {
|
|
4271
|
-
const v_error = (() => {
|
|
4272
|
-
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
4273
|
-
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
4274
|
-
}
|
|
4275
|
-
if (obj.description !== undefined) {
|
|
4276
|
-
const obj_description = obj.description;
|
|
4277
|
-
const path_description = path + '.description';
|
|
4278
|
-
if (typeof obj_description !== 'string') {
|
|
4279
|
-
return new TypeError('Expected "string" but received "' + typeof obj_description + '" (at "' + path_description + '")');
|
|
4280
|
-
}
|
|
4281
|
-
}
|
|
4282
|
-
const obj_groupName = obj.groupName;
|
|
4283
|
-
const path_groupName = path + '.groupName';
|
|
4284
|
-
if (typeof obj_groupName !== 'string') {
|
|
4285
|
-
return new TypeError('Expected "string" but received "' + typeof obj_groupName + '" (at "' + path_groupName + '")');
|
|
4286
|
-
}
|
|
4287
|
-
const obj_icon = obj.icon;
|
|
4288
|
-
const path_icon = path + '.icon';
|
|
4289
|
-
if (typeof obj_icon !== 'string') {
|
|
4290
|
-
return new TypeError('Expected "string" but received "' + typeof obj_icon + '" (at "' + path_icon + '")');
|
|
4291
|
-
}
|
|
4292
|
-
const obj_isTopLevel = obj.isTopLevel;
|
|
4293
|
-
const path_isTopLevel = path + '.isTopLevel';
|
|
4294
|
-
if (typeof obj_isTopLevel !== 'boolean') {
|
|
4295
|
-
return new TypeError('Expected "boolean" but received "' + typeof obj_isTopLevel + '" (at "' + path_isTopLevel + '")');
|
|
4296
|
-
}
|
|
4297
|
-
const obj_label = obj.label;
|
|
4298
|
-
const path_label = path + '.label';
|
|
4299
|
-
if (typeof obj_label !== 'string') {
|
|
4300
|
-
return new TypeError('Expected "string" but received "' + typeof obj_label + '" (at "' + path_label + '")');
|
|
4301
|
-
}
|
|
4302
|
-
if (obj.parentNode !== undefined) {
|
|
4303
|
-
const obj_parentNode = obj.parentNode;
|
|
4304
|
-
const path_parentNode = path + '.parentNode';
|
|
4305
|
-
if (typeof obj_parentNode !== 'string') {
|
|
4306
|
-
return new TypeError('Expected "string" but received "' + typeof obj_parentNode + '" (at "' + path_parentNode + '")');
|
|
4307
|
-
}
|
|
4308
|
-
}
|
|
4309
|
-
if (obj.scope !== undefined) {
|
|
4310
|
-
const obj_scope = obj.scope;
|
|
4311
|
-
const path_scope = path + '.scope';
|
|
4312
|
-
if (obj_scope === undefined) {
|
|
4313
|
-
return new TypeError('Expected "defined" but received "' + typeof obj_scope + '" (at "' + path_scope + '")');
|
|
4314
|
-
}
|
|
4315
|
-
}
|
|
4316
|
-
})();
|
|
4317
|
-
return v_error === undefined ? null : v_error;
|
|
4318
|
-
}
|
|
4319
|
-
|
|
4320
5251
|
const TTL$6 = 300;
|
|
4321
|
-
const VERSION$a = "
|
|
4322
|
-
function validate$b(obj, path = '
|
|
5252
|
+
const VERSION$a = "3a6ecdfe18eb2af8f8f6aaa1a30b194c";
|
|
5253
|
+
function validate$b(obj, path = 'PromptTemplateDataProviderInstanceConfigCollectionRepresentation') {
|
|
4323
5254
|
const v_error = (() => {
|
|
4324
5255
|
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
4325
5256
|
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
4326
5257
|
}
|
|
4327
|
-
const
|
|
4328
|
-
const
|
|
4329
|
-
if (!ArrayIsArray(
|
|
4330
|
-
return new TypeError('Expected "array" but received "' + typeof
|
|
5258
|
+
const obj_dataProviderInstanceConfigs = obj.dataProviderInstanceConfigs;
|
|
5259
|
+
const path_dataProviderInstanceConfigs = path + '.dataProviderInstanceConfigs';
|
|
5260
|
+
if (!ArrayIsArray(obj_dataProviderInstanceConfigs)) {
|
|
5261
|
+
return new TypeError('Expected "array" but received "' + typeof obj_dataProviderInstanceConfigs + '" (at "' + path_dataProviderInstanceConfigs + '")');
|
|
4331
5262
|
}
|
|
4332
|
-
for (let i = 0; i <
|
|
4333
|
-
const
|
|
4334
|
-
const
|
|
4335
|
-
const
|
|
4336
|
-
if (
|
|
4337
|
-
let message = 'Object doesn\'t match
|
|
4338
|
-
message +=
|
|
5263
|
+
for (let i = 0; i < obj_dataProviderInstanceConfigs.length; i++) {
|
|
5264
|
+
const obj_dataProviderInstanceConfigs_item = obj_dataProviderInstanceConfigs[i];
|
|
5265
|
+
const path_dataProviderInstanceConfigs_item = path_dataProviderInstanceConfigs + '[' + i + ']';
|
|
5266
|
+
const referencepath_dataProviderInstanceConfigs_itemValidationError = validate$e(obj_dataProviderInstanceConfigs_item, path_dataProviderInstanceConfigs_item);
|
|
5267
|
+
if (referencepath_dataProviderInstanceConfigs_itemValidationError !== null) {
|
|
5268
|
+
let message = 'Object doesn\'t match PromptTemplateDataProviderInstanceConfigRepresentation (at "' + path_dataProviderInstanceConfigs_item + '")\n';
|
|
5269
|
+
message += referencepath_dataProviderInstanceConfigs_itemValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
4339
5270
|
return new TypeError(message);
|
|
4340
5271
|
}
|
|
4341
5272
|
}
|
|
4342
5273
|
})();
|
|
4343
5274
|
return v_error === undefined ? null : v_error;
|
|
4344
5275
|
}
|
|
4345
|
-
const RepresentationType$6 = '
|
|
5276
|
+
const RepresentationType$6 = 'PromptTemplateDataProviderInstanceConfigCollectionRepresentation';
|
|
4346
5277
|
function normalize$6(input, existing, path, luvio, store, timestamp) {
|
|
4347
5278
|
return input;
|
|
4348
5279
|
}
|
|
4349
|
-
const select$m = function
|
|
5280
|
+
const select$m = function PromptTemplateDataProviderInstanceConfigCollectionRepresentationSelect() {
|
|
4350
5281
|
return {
|
|
4351
5282
|
kind: 'Fragment',
|
|
4352
5283
|
version: VERSION$a,
|
|
@@ -4360,7 +5291,7 @@ function equals$a(existing, incoming) {
|
|
|
4360
5291
|
}
|
|
4361
5292
|
return true;
|
|
4362
5293
|
}
|
|
4363
|
-
const ingest$6 = function
|
|
5294
|
+
const ingest$6 = function PromptTemplateDataProviderInstanceConfigCollectionRepresentationIngest(input, path, luvio, store, timestamp) {
|
|
4364
5295
|
if (process.env.NODE_ENV !== 'production') {
|
|
4365
5296
|
const validateError = validate$b(input);
|
|
4366
5297
|
if (validateError !== null) {
|
|
@@ -4386,7 +5317,7 @@ function select$l(luvio, params) {
|
|
|
4386
5317
|
return select$m();
|
|
4387
5318
|
}
|
|
4388
5319
|
function keyBuilder$i(luvio, params) {
|
|
4389
|
-
return keyPrefix + '::
|
|
5320
|
+
return keyPrefix + '::PromptTemplateDataProviderInstanceConfigCollectionRepresentation:(' + 'groupNames:' + params.queryParams.groupNames + ',' + 'targets:' + params.queryParams.targets + ',' + 'templateType:' + params.urlParams.templateType + ')';
|
|
4390
5321
|
}
|
|
4391
5322
|
function getResponseCacheKeys$b(storeKeyMap, luvio, resourceParams, response) {
|
|
4392
5323
|
getTypeCacheKeys$6(storeKeyMap, luvio, response, () => keyBuilder$i(luvio, resourceParams));
|
|
@@ -4424,29 +5355,31 @@ function createResourceRequest$b(config) {
|
|
|
4424
5355
|
const headers = {};
|
|
4425
5356
|
return {
|
|
4426
5357
|
baseUri: '/services/data/v67.0',
|
|
4427
|
-
basePath: '/einstein/prompt-templates/data-
|
|
5358
|
+
basePath: '/einstein/prompt-templates/data-providers/' + config.urlParams.templateType + '',
|
|
4428
5359
|
method: 'get',
|
|
4429
5360
|
body: null,
|
|
4430
5361
|
urlParams: config.urlParams,
|
|
4431
|
-
queryParams:
|
|
5362
|
+
queryParams: config.queryParams,
|
|
4432
5363
|
headers,
|
|
4433
5364
|
priority: 'normal',
|
|
4434
5365
|
};
|
|
4435
5366
|
}
|
|
4436
5367
|
|
|
4437
|
-
const adapterName$b = '
|
|
4438
|
-
const
|
|
5368
|
+
const adapterName$b = 'getDataProviders';
|
|
5369
|
+
const getDataProviders_ConfigPropertyMetadata = [
|
|
4439
5370
|
generateParamConfigMetadata('templateType', true, 0 /* UrlParameter */, 0 /* String */),
|
|
5371
|
+
generateParamConfigMetadata('groupNames', false, 1 /* QueryParameter */, 0 /* String */, true),
|
|
5372
|
+
generateParamConfigMetadata('targets', false, 1 /* QueryParameter */, 0 /* String */, true),
|
|
4440
5373
|
];
|
|
4441
|
-
const
|
|
4442
|
-
const createResourceParams$b = /*#__PURE__*/ createResourceParams$
|
|
5374
|
+
const getDataProviders_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$b, getDataProviders_ConfigPropertyMetadata);
|
|
5375
|
+
const createResourceParams$b = /*#__PURE__*/ createResourceParams$k(getDataProviders_ConfigPropertyMetadata);
|
|
4443
5376
|
function keyBuilder$h(luvio, config) {
|
|
4444
5377
|
const resourceParams = createResourceParams$b(config);
|
|
4445
5378
|
return keyBuilder$i(luvio, resourceParams);
|
|
4446
5379
|
}
|
|
4447
5380
|
function typeCheckConfig$b(untrustedConfig) {
|
|
4448
5381
|
const config = {};
|
|
4449
|
-
typeCheckConfig$
|
|
5382
|
+
typeCheckConfig$k(untrustedConfig, config, getDataProviders_ConfigPropertyMetadata);
|
|
4450
5383
|
return config;
|
|
4451
5384
|
}
|
|
4452
5385
|
function validateAdapterConfig$b(untrustedConfig, configPropertyNames) {
|
|
@@ -4495,7 +5428,7 @@ function buildNetworkSnapshot$b(luvio, config, options) {
|
|
|
4495
5428
|
});
|
|
4496
5429
|
}
|
|
4497
5430
|
function buildNetworkSnapshotCachePolicy$8(context, coercedAdapterRequestContext) {
|
|
4498
|
-
return buildNetworkSnapshotCachePolicy$
|
|
5431
|
+
return buildNetworkSnapshotCachePolicy$c(context, coercedAdapterRequestContext, buildNetworkSnapshot$b, undefined, false);
|
|
4499
5432
|
}
|
|
4500
5433
|
function buildCachedSnapshotCachePolicy$8(context, storeLookup) {
|
|
4501
5434
|
const { luvio, config } = context;
|
|
@@ -4510,8 +5443,8 @@ function buildCachedSnapshotCachePolicy$8(context, storeLookup) {
|
|
|
4510
5443
|
});
|
|
4511
5444
|
return cacheSnapshot;
|
|
4512
5445
|
}
|
|
4513
|
-
const
|
|
4514
|
-
const config = validateAdapterConfig$b(untrustedConfig,
|
|
5446
|
+
const getDataProvidersAdapterFactory = (luvio) => function EinsteinLLM__getDataProviders(untrustedConfig, requestContext) {
|
|
5447
|
+
const config = validateAdapterConfig$b(untrustedConfig, getDataProviders_ConfigPropertyNames);
|
|
4515
5448
|
// Invalid or incomplete config
|
|
4516
5449
|
if (config === null) {
|
|
4517
5450
|
return null;
|
|
@@ -4520,36 +5453,84 @@ const getDataProviderTypeConfigsAdapterFactory = (luvio) => function EinsteinLLM
|
|
|
4520
5453
|
buildCachedSnapshotCachePolicy$8, buildNetworkSnapshotCachePolicy$8);
|
|
4521
5454
|
};
|
|
4522
5455
|
|
|
4523
|
-
const TTL$5 =
|
|
4524
|
-
const VERSION$9 = "
|
|
4525
|
-
function validate$a(obj, path = '
|
|
5456
|
+
const TTL$5 = 100;
|
|
5457
|
+
const VERSION$9 = "fb53643f64759f6cff6a161f34c670fb";
|
|
5458
|
+
function validate$a(obj, path = 'EinsteinPromptTemplateReferencesRepresentation') {
|
|
4526
5459
|
const v_error = (() => {
|
|
4527
5460
|
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
4528
5461
|
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
4529
5462
|
}
|
|
4530
|
-
|
|
4531
|
-
|
|
4532
|
-
|
|
4533
|
-
|
|
4534
|
-
|
|
4535
|
-
|
|
4536
|
-
|
|
4537
|
-
const path_dataProviderInstanceConfigs_item = path_dataProviderInstanceConfigs + '[' + i + ']';
|
|
4538
|
-
const referencepath_dataProviderInstanceConfigs_itemValidationError = validate$d(obj_dataProviderInstanceConfigs_item, path_dataProviderInstanceConfigs_item);
|
|
4539
|
-
if (referencepath_dataProviderInstanceConfigs_itemValidationError !== null) {
|
|
4540
|
-
let message = 'Object doesn\'t match PromptTemplateDataProviderInstanceConfigRepresentation (at "' + path_dataProviderInstanceConfigs_item + '")\n';
|
|
4541
|
-
message += referencepath_dataProviderInstanceConfigs_itemValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
5463
|
+
if (obj.additionalData !== undefined) {
|
|
5464
|
+
const obj_additionalData = obj.additionalData;
|
|
5465
|
+
const path_additionalData = path + '.additionalData';
|
|
5466
|
+
const referencepath_additionalDataValidationError = validate$C(obj_additionalData, path_additionalData);
|
|
5467
|
+
if (referencepath_additionalDataValidationError !== null) {
|
|
5468
|
+
let message = 'Object doesn\'t match WrappedMap (at "' + path_additionalData + '")\n';
|
|
5469
|
+
message += referencepath_additionalDataValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
4542
5470
|
return new TypeError(message);
|
|
4543
5471
|
}
|
|
4544
5472
|
}
|
|
5473
|
+
const obj_errorMessages = obj.errorMessages;
|
|
5474
|
+
const path_errorMessages = path + '.errorMessages';
|
|
5475
|
+
if (!ArrayIsArray(obj_errorMessages)) {
|
|
5476
|
+
return new TypeError('Expected "array" but received "' + typeof obj_errorMessages + '" (at "' + path_errorMessages + '")');
|
|
5477
|
+
}
|
|
5478
|
+
for (let i = 0; i < obj_errorMessages.length; i++) {
|
|
5479
|
+
const obj_errorMessages_item = obj_errorMessages[i];
|
|
5480
|
+
const path_errorMessages_item = path_errorMessages + '[' + i + ']';
|
|
5481
|
+
if (typeof obj_errorMessages_item !== 'string') {
|
|
5482
|
+
return new TypeError('Expected "string" but received "' + typeof obj_errorMessages_item + '" (at "' + path_errorMessages_item + '")');
|
|
5483
|
+
}
|
|
5484
|
+
}
|
|
5485
|
+
const obj_hasWarning = obj.hasWarning;
|
|
5486
|
+
const path_hasWarning = path + '.hasWarning';
|
|
5487
|
+
if (typeof obj_hasWarning !== 'boolean') {
|
|
5488
|
+
return new TypeError('Expected "boolean" but received "' + typeof obj_hasWarning + '" (at "' + path_hasWarning + '")');
|
|
5489
|
+
}
|
|
5490
|
+
const obj_isSuccessful = obj.isSuccessful;
|
|
5491
|
+
const path_isSuccessful = path + '.isSuccessful';
|
|
5492
|
+
if (typeof obj_isSuccessful !== 'boolean') {
|
|
5493
|
+
return new TypeError('Expected "boolean" but received "' + typeof obj_isSuccessful + '" (at "' + path_isSuccessful + '")');
|
|
5494
|
+
}
|
|
5495
|
+
if (obj.statusCode !== undefined) {
|
|
5496
|
+
const obj_statusCode = obj.statusCode;
|
|
5497
|
+
const path_statusCode = path + '.statusCode';
|
|
5498
|
+
if (typeof obj_statusCode !== 'string') {
|
|
5499
|
+
return new TypeError('Expected "string" but received "' + typeof obj_statusCode + '" (at "' + path_statusCode + '")');
|
|
5500
|
+
}
|
|
5501
|
+
}
|
|
5502
|
+
const obj_templateId = obj.templateId;
|
|
5503
|
+
const path_templateId = path + '.templateId';
|
|
5504
|
+
if (typeof obj_templateId !== 'string') {
|
|
5505
|
+
return new TypeError('Expected "string" but received "' + typeof obj_templateId + '" (at "' + path_templateId + '")');
|
|
5506
|
+
}
|
|
5507
|
+
if (obj.templateType !== undefined) {
|
|
5508
|
+
const obj_templateType = obj.templateType;
|
|
5509
|
+
const path_templateType = path + '.templateType';
|
|
5510
|
+
if (typeof obj_templateType !== 'string') {
|
|
5511
|
+
return new TypeError('Expected "string" but received "' + typeof obj_templateType + '" (at "' + path_templateType + '")');
|
|
5512
|
+
}
|
|
5513
|
+
}
|
|
5514
|
+
const obj_warningMessages = obj.warningMessages;
|
|
5515
|
+
const path_warningMessages = path + '.warningMessages';
|
|
5516
|
+
if (!ArrayIsArray(obj_warningMessages)) {
|
|
5517
|
+
return new TypeError('Expected "array" but received "' + typeof obj_warningMessages + '" (at "' + path_warningMessages + '")');
|
|
5518
|
+
}
|
|
5519
|
+
for (let i = 0; i < obj_warningMessages.length; i++) {
|
|
5520
|
+
const obj_warningMessages_item = obj_warningMessages[i];
|
|
5521
|
+
const path_warningMessages_item = path_warningMessages + '[' + i + ']';
|
|
5522
|
+
if (typeof obj_warningMessages_item !== 'string') {
|
|
5523
|
+
return new TypeError('Expected "string" but received "' + typeof obj_warningMessages_item + '" (at "' + path_warningMessages_item + '")');
|
|
5524
|
+
}
|
|
5525
|
+
}
|
|
4545
5526
|
})();
|
|
4546
5527
|
return v_error === undefined ? null : v_error;
|
|
4547
5528
|
}
|
|
4548
|
-
const RepresentationType$5 = '
|
|
5529
|
+
const RepresentationType$5 = 'EinsteinPromptTemplateReferencesRepresentation';
|
|
4549
5530
|
function normalize$5(input, existing, path, luvio, store, timestamp) {
|
|
4550
5531
|
return input;
|
|
4551
5532
|
}
|
|
4552
|
-
const select$k = function
|
|
5533
|
+
const select$k = function EinsteinPromptTemplateReferencesRepresentationSelect() {
|
|
4553
5534
|
return {
|
|
4554
5535
|
kind: 'Fragment',
|
|
4555
5536
|
version: VERSION$9,
|
|
@@ -4563,7 +5544,7 @@ function equals$9(existing, incoming) {
|
|
|
4563
5544
|
}
|
|
4564
5545
|
return true;
|
|
4565
5546
|
}
|
|
4566
|
-
const ingest$5 = function
|
|
5547
|
+
const ingest$5 = function EinsteinPromptTemplateReferencesRepresentationIngest(input, path, luvio, store, timestamp) {
|
|
4567
5548
|
if (process.env.NODE_ENV !== 'production') {
|
|
4568
5549
|
const validateError = validate$a(input);
|
|
4569
5550
|
if (validateError !== null) {
|
|
@@ -4589,7 +5570,7 @@ function select$j(luvio, params) {
|
|
|
4589
5570
|
return select$k();
|
|
4590
5571
|
}
|
|
4591
5572
|
function keyBuilder$g(luvio, params) {
|
|
4592
|
-
return keyPrefix + '::
|
|
5573
|
+
return keyPrefix + '::EinsteinPromptTemplateReferencesRepresentation:(' + 'promptTemplateDevName:' + params.urlParams.promptTemplateDevName + ')';
|
|
4593
5574
|
}
|
|
4594
5575
|
function getResponseCacheKeys$a(storeKeyMap, luvio, resourceParams, response) {
|
|
4595
5576
|
getTypeCacheKeys$5(storeKeyMap, luvio, response, () => keyBuilder$g(luvio, resourceParams));
|
|
@@ -4627,31 +5608,29 @@ function createResourceRequest$a(config) {
|
|
|
4627
5608
|
const headers = {};
|
|
4628
5609
|
return {
|
|
4629
5610
|
baseUri: '/services/data/v67.0',
|
|
4630
|
-
basePath: '/einstein/prompt-templates/
|
|
5611
|
+
basePath: '/einstein/prompt-templates/' + config.urlParams.promptTemplateDevName + '/references',
|
|
4631
5612
|
method: 'get',
|
|
4632
5613
|
body: null,
|
|
4633
5614
|
urlParams: config.urlParams,
|
|
4634
|
-
queryParams:
|
|
5615
|
+
queryParams: {},
|
|
4635
5616
|
headers,
|
|
4636
5617
|
priority: 'normal',
|
|
4637
5618
|
};
|
|
4638
5619
|
}
|
|
4639
5620
|
|
|
4640
|
-
const adapterName$a = '
|
|
4641
|
-
const
|
|
4642
|
-
generateParamConfigMetadata('
|
|
4643
|
-
generateParamConfigMetadata('groupNames', false, 1 /* QueryParameter */, 0 /* String */, true),
|
|
4644
|
-
generateParamConfigMetadata('targets', false, 1 /* QueryParameter */, 0 /* String */, true),
|
|
5621
|
+
const adapterName$a = 'getEinsteinPromptTemplateReferences';
|
|
5622
|
+
const getEinsteinPromptTemplateReferences_ConfigPropertyMetadata = [
|
|
5623
|
+
generateParamConfigMetadata('promptTemplateDevName', true, 0 /* UrlParameter */, 0 /* String */),
|
|
4645
5624
|
];
|
|
4646
|
-
const
|
|
4647
|
-
const createResourceParams$a = /*#__PURE__*/ createResourceParams$
|
|
5625
|
+
const getEinsteinPromptTemplateReferences_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$a, getEinsteinPromptTemplateReferences_ConfigPropertyMetadata);
|
|
5626
|
+
const createResourceParams$a = /*#__PURE__*/ createResourceParams$k(getEinsteinPromptTemplateReferences_ConfigPropertyMetadata);
|
|
4648
5627
|
function keyBuilder$f(luvio, config) {
|
|
4649
5628
|
const resourceParams = createResourceParams$a(config);
|
|
4650
5629
|
return keyBuilder$g(luvio, resourceParams);
|
|
4651
5630
|
}
|
|
4652
5631
|
function typeCheckConfig$a(untrustedConfig) {
|
|
4653
5632
|
const config = {};
|
|
4654
|
-
typeCheckConfig$
|
|
5633
|
+
typeCheckConfig$k(untrustedConfig, config, getEinsteinPromptTemplateReferences_ConfigPropertyMetadata);
|
|
4655
5634
|
return config;
|
|
4656
5635
|
}
|
|
4657
5636
|
function validateAdapterConfig$a(untrustedConfig, configPropertyNames) {
|
|
@@ -4700,7 +5679,7 @@ function buildNetworkSnapshot$a(luvio, config, options) {
|
|
|
4700
5679
|
});
|
|
4701
5680
|
}
|
|
4702
5681
|
function buildNetworkSnapshotCachePolicy$7(context, coercedAdapterRequestContext) {
|
|
4703
|
-
return buildNetworkSnapshotCachePolicy$
|
|
5682
|
+
return buildNetworkSnapshotCachePolicy$c(context, coercedAdapterRequestContext, buildNetworkSnapshot$a, undefined, false);
|
|
4704
5683
|
}
|
|
4705
5684
|
function buildCachedSnapshotCachePolicy$7(context, storeLookup) {
|
|
4706
5685
|
const { luvio, config } = context;
|
|
@@ -4715,8 +5694,8 @@ function buildCachedSnapshotCachePolicy$7(context, storeLookup) {
|
|
|
4715
5694
|
});
|
|
4716
5695
|
return cacheSnapshot;
|
|
4717
5696
|
}
|
|
4718
|
-
const
|
|
4719
|
-
const config = validateAdapterConfig$a(untrustedConfig,
|
|
5697
|
+
const getEinsteinPromptTemplateReferencesAdapterFactory = (luvio) => function EinsteinLLM__getEinsteinPromptTemplateReferences(untrustedConfig, requestContext) {
|
|
5698
|
+
const config = validateAdapterConfig$a(untrustedConfig, getEinsteinPromptTemplateReferences_ConfigPropertyNames);
|
|
4720
5699
|
// Invalid or incomplete config
|
|
4721
5700
|
if (config === null) {
|
|
4722
5701
|
return null;
|
|
@@ -4726,18 +5705,18 @@ const getDataProvidersAdapterFactory = (luvio) => function EinsteinLLM__getDataP
|
|
|
4726
5705
|
};
|
|
4727
5706
|
|
|
4728
5707
|
function select$i(luvio, params) {
|
|
4729
|
-
return select$
|
|
5708
|
+
return select$m();
|
|
4730
5709
|
}
|
|
4731
5710
|
function keyBuilder$e(luvio, params) {
|
|
4732
5711
|
return keyPrefix + '::PromptTemplateDataProviderInstanceConfigCollectionRepresentation:(' + (params.body.groupName === undefined ? 'groupName' : 'groupName:' + params.body.groupName) + '::' + (params.body.target === undefined ? 'target' : 'target:' + params.body.target) + '::' + 'templateInputs:' + params.body.templateInputs + '::' + 'templateTypeName:' + params.body.templateTypeName + ')';
|
|
4733
5712
|
}
|
|
4734
5713
|
function getResponseCacheKeys$9(storeKeyMap, luvio, resourceParams, response) {
|
|
4735
|
-
getTypeCacheKeys$
|
|
5714
|
+
getTypeCacheKeys$6(storeKeyMap, luvio, response, () => keyBuilder$e(luvio, resourceParams));
|
|
4736
5715
|
}
|
|
4737
5716
|
function ingestSuccess$9(luvio, resourceParams, response, snapshotRefresh) {
|
|
4738
5717
|
const { body } = response;
|
|
4739
5718
|
const key = keyBuilder$e(luvio, resourceParams);
|
|
4740
|
-
luvio.storeIngest(key, ingest$
|
|
5719
|
+
luvio.storeIngest(key, ingest$6, body);
|
|
4741
5720
|
const snapshot = luvio.storeLookup({
|
|
4742
5721
|
recordId: key,
|
|
4743
5722
|
node: select$i(),
|
|
@@ -4755,10 +5734,10 @@ function ingestError$6(luvio, params, error, snapshotRefresh) {
|
|
|
4755
5734
|
const key = keyBuilder$e(luvio, params);
|
|
4756
5735
|
const errorSnapshot = luvio.errorSnapshot(error, snapshotRefresh);
|
|
4757
5736
|
const storeMetadataParams = {
|
|
4758
|
-
ttl: TTL$
|
|
5737
|
+
ttl: TTL$6,
|
|
4759
5738
|
namespace: keyPrefix,
|
|
4760
|
-
version: VERSION$
|
|
4761
|
-
representationName: RepresentationType$
|
|
5739
|
+
version: VERSION$a,
|
|
5740
|
+
representationName: RepresentationType$6
|
|
4762
5741
|
};
|
|
4763
5742
|
luvio.storeIngestError(key, errorSnapshot, storeMetadataParams);
|
|
4764
5743
|
return errorSnapshot;
|
|
@@ -4785,14 +5764,14 @@ const getInputMappedDataProviders_ConfigPropertyMetadata = [
|
|
|
4785
5764
|
generateParamConfigMetadata('templateTypeName', true, 2 /* Body */, 0 /* String */),
|
|
4786
5765
|
];
|
|
4787
5766
|
const getInputMappedDataProviders_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$9, getInputMappedDataProviders_ConfigPropertyMetadata);
|
|
4788
|
-
const createResourceParams$9 = /*#__PURE__*/ createResourceParams$
|
|
5767
|
+
const createResourceParams$9 = /*#__PURE__*/ createResourceParams$k(getInputMappedDataProviders_ConfigPropertyMetadata);
|
|
4789
5768
|
function keyBuilder$d(luvio, config) {
|
|
4790
5769
|
const resourceParams = createResourceParams$9(config);
|
|
4791
5770
|
return keyBuilder$e(luvio, resourceParams);
|
|
4792
5771
|
}
|
|
4793
5772
|
function typeCheckConfig$9(untrustedConfig) {
|
|
4794
5773
|
const config = {};
|
|
4795
|
-
typeCheckConfig$
|
|
5774
|
+
typeCheckConfig$k(untrustedConfig, config, getInputMappedDataProviders_ConfigPropertyMetadata);
|
|
4796
5775
|
const untrustedConfig_templateInputs = untrustedConfig.templateInputs;
|
|
4797
5776
|
if (ArrayIsArray$1(untrustedConfig_templateInputs)) {
|
|
4798
5777
|
const untrustedConfig_templateInputs_array = [];
|
|
@@ -4850,7 +5829,7 @@ function buildNetworkSnapshot$9(luvio, config, options) {
|
|
|
4850
5829
|
});
|
|
4851
5830
|
}
|
|
4852
5831
|
function buildNetworkSnapshotCachePolicy$6(context, coercedAdapterRequestContext) {
|
|
4853
|
-
return buildNetworkSnapshotCachePolicy$
|
|
5832
|
+
return buildNetworkSnapshotCachePolicy$c(context, coercedAdapterRequestContext, buildNetworkSnapshot$9, 'get', false);
|
|
4854
5833
|
}
|
|
4855
5834
|
function buildCachedSnapshotCachePolicy$6(context, storeLookup) {
|
|
4856
5835
|
const { luvio, config } = context;
|
|
@@ -5188,14 +6167,14 @@ const getOutputLanguages_ConfigPropertyMetadata = [
|
|
|
5188
6167
|
generateParamConfigMetadata('versionId', false, 1 /* QueryParameter */, 0 /* String */),
|
|
5189
6168
|
];
|
|
5190
6169
|
const getOutputLanguages_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$8, getOutputLanguages_ConfigPropertyMetadata);
|
|
5191
|
-
const createResourceParams$8 = /*#__PURE__*/ createResourceParams$
|
|
6170
|
+
const createResourceParams$8 = /*#__PURE__*/ createResourceParams$k(getOutputLanguages_ConfigPropertyMetadata);
|
|
5192
6171
|
function keyBuilder$b(luvio, config) {
|
|
5193
6172
|
const resourceParams = createResourceParams$8(config);
|
|
5194
6173
|
return keyBuilder$c(luvio, resourceParams);
|
|
5195
6174
|
}
|
|
5196
6175
|
function typeCheckConfig$8(untrustedConfig) {
|
|
5197
6176
|
const config = {};
|
|
5198
|
-
typeCheckConfig$
|
|
6177
|
+
typeCheckConfig$k(untrustedConfig, config, getOutputLanguages_ConfigPropertyMetadata);
|
|
5199
6178
|
return config;
|
|
5200
6179
|
}
|
|
5201
6180
|
function validateAdapterConfig$8(untrustedConfig, configPropertyNames) {
|
|
@@ -5244,7 +6223,7 @@ function buildNetworkSnapshot$8(luvio, config, options) {
|
|
|
5244
6223
|
});
|
|
5245
6224
|
}
|
|
5246
6225
|
function buildNetworkSnapshotCachePolicy$5(context, coercedAdapterRequestContext) {
|
|
5247
|
-
return buildNetworkSnapshotCachePolicy$
|
|
6226
|
+
return buildNetworkSnapshotCachePolicy$c(context, coercedAdapterRequestContext, buildNetworkSnapshot$8, undefined, false);
|
|
5248
6227
|
}
|
|
5249
6228
|
function buildCachedSnapshotCachePolicy$5(context, storeLookup) {
|
|
5250
6229
|
const { luvio, config } = context;
|
|
@@ -5513,14 +6492,14 @@ const getPromptTemplate_ConfigPropertyMetadata = [
|
|
|
5513
6492
|
generateParamConfigMetadata('versionId', false, 1 /* QueryParameter */, 0 /* String */),
|
|
5514
6493
|
];
|
|
5515
6494
|
const getPromptTemplate_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$7, getPromptTemplate_ConfigPropertyMetadata);
|
|
5516
|
-
const createResourceParams$7 = /*#__PURE__*/ createResourceParams$
|
|
6495
|
+
const createResourceParams$7 = /*#__PURE__*/ createResourceParams$k(getPromptTemplate_ConfigPropertyMetadata);
|
|
5517
6496
|
function keyBuilder$9(luvio, config) {
|
|
5518
6497
|
const resourceParams = createResourceParams$7(config);
|
|
5519
6498
|
return keyBuilder$a(luvio, resourceParams);
|
|
5520
6499
|
}
|
|
5521
6500
|
function typeCheckConfig$7(untrustedConfig) {
|
|
5522
6501
|
const config = {};
|
|
5523
|
-
typeCheckConfig$
|
|
6502
|
+
typeCheckConfig$k(untrustedConfig, config, getPromptTemplate_ConfigPropertyMetadata);
|
|
5524
6503
|
return config;
|
|
5525
6504
|
}
|
|
5526
6505
|
function validateAdapterConfig$7(untrustedConfig, configPropertyNames) {
|
|
@@ -5569,7 +6548,7 @@ function buildNetworkSnapshot$7(luvio, config, options) {
|
|
|
5569
6548
|
});
|
|
5570
6549
|
}
|
|
5571
6550
|
function buildNetworkSnapshotCachePolicy$4(context, coercedAdapterRequestContext) {
|
|
5572
|
-
return buildNetworkSnapshotCachePolicy$
|
|
6551
|
+
return buildNetworkSnapshotCachePolicy$c(context, coercedAdapterRequestContext, buildNetworkSnapshot$7, undefined, false);
|
|
5573
6552
|
}
|
|
5574
6553
|
function buildCachedSnapshotCachePolicy$4(context, storeLookup) {
|
|
5575
6554
|
const { luvio, config } = context;
|
|
@@ -5654,14 +6633,14 @@ const getPromptTemplateVersion_ConfigPropertyMetadata = [
|
|
|
5654
6633
|
generateParamConfigMetadata('includingVersionDetail', false, 1 /* QueryParameter */, 1 /* Boolean */),
|
|
5655
6634
|
];
|
|
5656
6635
|
const getPromptTemplateVersion_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$6, getPromptTemplateVersion_ConfigPropertyMetadata);
|
|
5657
|
-
const createResourceParams$6 = /*#__PURE__*/ createResourceParams$
|
|
6636
|
+
const createResourceParams$6 = /*#__PURE__*/ createResourceParams$k(getPromptTemplateVersion_ConfigPropertyMetadata);
|
|
5658
6637
|
function keyBuilder$7(luvio, config) {
|
|
5659
6638
|
const resourceParams = createResourceParams$6(config);
|
|
5660
6639
|
return keyBuilder$8(luvio, resourceParams);
|
|
5661
6640
|
}
|
|
5662
6641
|
function typeCheckConfig$6(untrustedConfig) {
|
|
5663
6642
|
const config = {};
|
|
5664
|
-
typeCheckConfig$
|
|
6643
|
+
typeCheckConfig$k(untrustedConfig, config, getPromptTemplateVersion_ConfigPropertyMetadata);
|
|
5665
6644
|
return config;
|
|
5666
6645
|
}
|
|
5667
6646
|
function validateAdapterConfig$6(untrustedConfig, configPropertyNames) {
|
|
@@ -5710,7 +6689,7 @@ function buildNetworkSnapshot$6(luvio, config, options) {
|
|
|
5710
6689
|
});
|
|
5711
6690
|
}
|
|
5712
6691
|
function buildNetworkSnapshotCachePolicy$3(context, coercedAdapterRequestContext) {
|
|
5713
|
-
return buildNetworkSnapshotCachePolicy$
|
|
6692
|
+
return buildNetworkSnapshotCachePolicy$c(context, coercedAdapterRequestContext, buildNetworkSnapshot$6, undefined, false);
|
|
5714
6693
|
}
|
|
5715
6694
|
function buildCachedSnapshotCachePolicy$3(context, storeLookup) {
|
|
5716
6695
|
const { luvio, config } = context;
|
|
@@ -5794,14 +6773,14 @@ const getPromptTemplateVersions_ConfigPropertyMetadata = [
|
|
|
5794
6773
|
generateParamConfigMetadata('includingVersionDetail', false, 1 /* QueryParameter */, 1 /* Boolean */),
|
|
5795
6774
|
];
|
|
5796
6775
|
const getPromptTemplateVersions_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$5, getPromptTemplateVersions_ConfigPropertyMetadata);
|
|
5797
|
-
const createResourceParams$5 = /*#__PURE__*/ createResourceParams$
|
|
6776
|
+
const createResourceParams$5 = /*#__PURE__*/ createResourceParams$k(getPromptTemplateVersions_ConfigPropertyMetadata);
|
|
5798
6777
|
function keyBuilder$5(luvio, config) {
|
|
5799
6778
|
const resourceParams = createResourceParams$5(config);
|
|
5800
6779
|
return keyBuilder$6(luvio, resourceParams);
|
|
5801
6780
|
}
|
|
5802
6781
|
function typeCheckConfig$5(untrustedConfig) {
|
|
5803
6782
|
const config = {};
|
|
5804
|
-
typeCheckConfig$
|
|
6783
|
+
typeCheckConfig$k(untrustedConfig, config, getPromptTemplateVersions_ConfigPropertyMetadata);
|
|
5805
6784
|
return config;
|
|
5806
6785
|
}
|
|
5807
6786
|
function validateAdapterConfig$5(untrustedConfig, configPropertyNames) {
|
|
@@ -5850,7 +6829,7 @@ function buildNetworkSnapshot$5(luvio, config, options) {
|
|
|
5850
6829
|
});
|
|
5851
6830
|
}
|
|
5852
6831
|
function buildNetworkSnapshotCachePolicy$2(context, coercedAdapterRequestContext) {
|
|
5853
|
-
return buildNetworkSnapshotCachePolicy$
|
|
6832
|
+
return buildNetworkSnapshotCachePolicy$c(context, coercedAdapterRequestContext, buildNetworkSnapshot$5, undefined, false);
|
|
5854
6833
|
}
|
|
5855
6834
|
function buildCachedSnapshotCachePolicy$2(context, storeLookup) {
|
|
5856
6835
|
const { luvio, config } = context;
|
|
@@ -6016,14 +6995,14 @@ const getPromptTemplates_ConfigPropertyMetadata = [
|
|
|
6016
6995
|
generateParamConfigMetadata('sortBy', false, 1 /* QueryParameter */, 0 /* String */),
|
|
6017
6996
|
];
|
|
6018
6997
|
const getPromptTemplates_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$4, getPromptTemplates_ConfigPropertyMetadata);
|
|
6019
|
-
const createResourceParams$4 = /*#__PURE__*/ createResourceParams$
|
|
6998
|
+
const createResourceParams$4 = /*#__PURE__*/ createResourceParams$k(getPromptTemplates_ConfigPropertyMetadata);
|
|
6020
6999
|
function keyBuilder$3(luvio, config) {
|
|
6021
7000
|
const resourceParams = createResourceParams$4(config);
|
|
6022
7001
|
return keyBuilder$4(luvio, resourceParams);
|
|
6023
7002
|
}
|
|
6024
7003
|
function typeCheckConfig$4(untrustedConfig) {
|
|
6025
7004
|
const config = {};
|
|
6026
|
-
typeCheckConfig$
|
|
7005
|
+
typeCheckConfig$k(untrustedConfig, config, getPromptTemplates_ConfigPropertyMetadata);
|
|
6027
7006
|
return config;
|
|
6028
7007
|
}
|
|
6029
7008
|
function validateAdapterConfig$4(untrustedConfig, configPropertyNames) {
|
|
@@ -6072,7 +7051,7 @@ function buildNetworkSnapshot$4(luvio, config, options) {
|
|
|
6072
7051
|
});
|
|
6073
7052
|
}
|
|
6074
7053
|
function buildNetworkSnapshotCachePolicy$1(context, coercedAdapterRequestContext) {
|
|
6075
|
-
return buildNetworkSnapshotCachePolicy$
|
|
7054
|
+
return buildNetworkSnapshotCachePolicy$c(context, coercedAdapterRequestContext, buildNetworkSnapshot$4, undefined, false);
|
|
6076
7055
|
}
|
|
6077
7056
|
function buildCachedSnapshotCachePolicy$1(context, storeLookup) {
|
|
6078
7057
|
const { luvio, config } = context;
|
|
@@ -6466,14 +7445,14 @@ const getTemplateType_ConfigPropertyMetadata = [
|
|
|
6466
7445
|
generateParamConfigMetadata('templateTypeName', true, 0 /* UrlParameter */, 0 /* String */),
|
|
6467
7446
|
];
|
|
6468
7447
|
const getTemplateType_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$3, getTemplateType_ConfigPropertyMetadata);
|
|
6469
|
-
const createResourceParams$3 = /*#__PURE__*/ createResourceParams$
|
|
7448
|
+
const createResourceParams$3 = /*#__PURE__*/ createResourceParams$k(getTemplateType_ConfigPropertyMetadata);
|
|
6470
7449
|
function keyBuilder$1(luvio, config) {
|
|
6471
7450
|
const resourceParams = createResourceParams$3(config);
|
|
6472
7451
|
return keyBuilder$2(luvio, resourceParams);
|
|
6473
7452
|
}
|
|
6474
7453
|
function typeCheckConfig$3(untrustedConfig) {
|
|
6475
7454
|
const config = {};
|
|
6476
|
-
typeCheckConfig$
|
|
7455
|
+
typeCheckConfig$k(untrustedConfig, config, getTemplateType_ConfigPropertyMetadata);
|
|
6477
7456
|
return config;
|
|
6478
7457
|
}
|
|
6479
7458
|
function validateAdapterConfig$3(untrustedConfig, configPropertyNames) {
|
|
@@ -6522,7 +7501,7 @@ function buildNetworkSnapshot$3(luvio, config, options) {
|
|
|
6522
7501
|
});
|
|
6523
7502
|
}
|
|
6524
7503
|
function buildNetworkSnapshotCachePolicy(context, coercedAdapterRequestContext) {
|
|
6525
|
-
return buildNetworkSnapshotCachePolicy$
|
|
7504
|
+
return buildNetworkSnapshotCachePolicy$c(context, coercedAdapterRequestContext, buildNetworkSnapshot$3, undefined, false);
|
|
6526
7505
|
}
|
|
6527
7506
|
function buildCachedSnapshotCachePolicy(context, storeLookup) {
|
|
6528
7507
|
const { luvio, config } = context;
|
|
@@ -6557,7 +7536,7 @@ function validate(obj, path = 'EinsteinPromptTemplateStatusRepresentation') {
|
|
|
6557
7536
|
if (obj.additionalData !== undefined) {
|
|
6558
7537
|
const obj_additionalData = obj.additionalData;
|
|
6559
7538
|
const path_additionalData = path + '.additionalData';
|
|
6560
|
-
const referencepath_additionalDataValidationError = validate$
|
|
7539
|
+
const referencepath_additionalDataValidationError = validate$C(obj_additionalData, path_additionalData);
|
|
6561
7540
|
if (referencepath_additionalDataValidationError !== null) {
|
|
6562
7541
|
let message = 'Object doesn\'t match WrappedMap (at "' + path_additionalData + '")\n';
|
|
6563
7542
|
message += referencepath_additionalDataValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
@@ -6634,7 +7613,7 @@ function normalize(input, existing, path, luvio, store, timestamp) {
|
|
|
6634
7613
|
return input;
|
|
6635
7614
|
}
|
|
6636
7615
|
const select$3 = function EinsteinPromptTemplateStatusRepresentationSelect() {
|
|
6637
|
-
const { selections: WrappedMap__selections, opaque: WrappedMap__opaque, } = select$
|
|
7616
|
+
const { selections: WrappedMap__selections, opaque: WrappedMap__opaque, } = select$O();
|
|
6638
7617
|
return {
|
|
6639
7618
|
kind: 'Fragment',
|
|
6640
7619
|
version: VERSION,
|
|
@@ -6732,7 +7711,7 @@ function equals(existing, incoming) {
|
|
|
6732
7711
|
if (existing_additionalData === undefined || incoming_additionalData === undefined) {
|
|
6733
7712
|
return false;
|
|
6734
7713
|
}
|
|
6735
|
-
if (!(equals$
|
|
7714
|
+
if (!(equals$w(existing_additionalData, incoming_additionalData))) {
|
|
6736
7715
|
return false;
|
|
6737
7716
|
}
|
|
6738
7717
|
}
|
|
@@ -6823,10 +7802,10 @@ const putEinsteinPromptTemplateStatus_ConfigPropertyMetadata = [
|
|
|
6823
7802
|
generateParamConfigMetadata('action', false, 1 /* QueryParameter */, 0 /* String */),
|
|
6824
7803
|
];
|
|
6825
7804
|
const putEinsteinPromptTemplateStatus_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$2, putEinsteinPromptTemplateStatus_ConfigPropertyMetadata);
|
|
6826
|
-
const createResourceParams$2 = /*#__PURE__*/ createResourceParams$
|
|
7805
|
+
const createResourceParams$2 = /*#__PURE__*/ createResourceParams$k(putEinsteinPromptTemplateStatus_ConfigPropertyMetadata);
|
|
6827
7806
|
function typeCheckConfig$2(untrustedConfig) {
|
|
6828
7807
|
const config = {};
|
|
6829
|
-
typeCheckConfig$
|
|
7808
|
+
typeCheckConfig$k(untrustedConfig, config, putEinsteinPromptTemplateStatus_ConfigPropertyMetadata);
|
|
6830
7809
|
return config;
|
|
6831
7810
|
}
|
|
6832
7811
|
function validateAdapterConfig$2(untrustedConfig, configPropertyNames) {
|
|
@@ -6872,15 +7851,15 @@ const putEinsteinPromptTemplateStatusAdapterFactory = (luvio) => {
|
|
|
6872
7851
|
};
|
|
6873
7852
|
|
|
6874
7853
|
function select$1(luvio, params) {
|
|
6875
|
-
return select$
|
|
7854
|
+
return select$t();
|
|
6876
7855
|
}
|
|
6877
7856
|
function getResponseCacheKeys$1(storeKeyMap, luvio, resourceParams, response) {
|
|
6878
|
-
getTypeCacheKeys$
|
|
7857
|
+
getTypeCacheKeys$9(storeKeyMap, luvio, response);
|
|
6879
7858
|
}
|
|
6880
7859
|
function ingestSuccess$1(luvio, resourceParams, response) {
|
|
6881
7860
|
const { body } = response;
|
|
6882
7861
|
const key = keyBuilderFromType$1(luvio, body);
|
|
6883
|
-
luvio.storeIngest(key, ingest$
|
|
7862
|
+
luvio.storeIngest(key, ingest$9, body);
|
|
6884
7863
|
const snapshot = luvio.storeLookup({
|
|
6885
7864
|
recordId: key,
|
|
6886
7865
|
node: select$1(),
|
|
@@ -6916,10 +7895,10 @@ const putEinsteinPromptTemplateVersionStatus_ConfigPropertyMetadata = [
|
|
|
6916
7895
|
generateParamConfigMetadata('ignoreWarnings', false, 1 /* QueryParameter */, 1 /* Boolean */),
|
|
6917
7896
|
];
|
|
6918
7897
|
const putEinsteinPromptTemplateVersionStatus_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$1, putEinsteinPromptTemplateVersionStatus_ConfigPropertyMetadata);
|
|
6919
|
-
const createResourceParams$1 = /*#__PURE__*/ createResourceParams$
|
|
7898
|
+
const createResourceParams$1 = /*#__PURE__*/ createResourceParams$k(putEinsteinPromptTemplateVersionStatus_ConfigPropertyMetadata);
|
|
6920
7899
|
function typeCheckConfig$1(untrustedConfig) {
|
|
6921
7900
|
const config = {};
|
|
6922
|
-
typeCheckConfig$
|
|
7901
|
+
typeCheckConfig$k(untrustedConfig, config, putEinsteinPromptTemplateVersionStatus_ConfigPropertyMetadata);
|
|
6923
7902
|
return config;
|
|
6924
7903
|
}
|
|
6925
7904
|
function validateAdapterConfig$1(untrustedConfig, configPropertyNames) {
|
|
@@ -6965,15 +7944,15 @@ const putEinsteinPromptTemplateVersionStatusAdapterFactory = (luvio) => {
|
|
|
6965
7944
|
};
|
|
6966
7945
|
|
|
6967
7946
|
function select(luvio, params) {
|
|
6968
|
-
return select$
|
|
7947
|
+
return select$t();
|
|
6969
7948
|
}
|
|
6970
7949
|
function getResponseCacheKeys(storeKeyMap, luvio, resourceParams, response) {
|
|
6971
|
-
getTypeCacheKeys$
|
|
7950
|
+
getTypeCacheKeys$9(storeKeyMap, luvio, response);
|
|
6972
7951
|
}
|
|
6973
7952
|
function ingestSuccess(luvio, resourceParams, response) {
|
|
6974
7953
|
const { body } = response;
|
|
6975
7954
|
const key = keyBuilderFromType$1(luvio, body);
|
|
6976
|
-
luvio.storeIngest(key, ingest$
|
|
7955
|
+
luvio.storeIngest(key, ingest$9, body);
|
|
6977
7956
|
const snapshot = luvio.storeLookup({
|
|
6978
7957
|
recordId: key,
|
|
6979
7958
|
node: select(),
|
|
@@ -7011,10 +7990,10 @@ const updatePromptTemplateVersion_ConfigPropertyMetadata = [
|
|
|
7011
7990
|
generateParamConfigMetadata('id', false, 2 /* Body */, 0 /* String */),
|
|
7012
7991
|
];
|
|
7013
7992
|
const updatePromptTemplateVersion_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName, updatePromptTemplateVersion_ConfigPropertyMetadata);
|
|
7014
|
-
const createResourceParams = /*#__PURE__*/ createResourceParams$
|
|
7993
|
+
const createResourceParams = /*#__PURE__*/ createResourceParams$k(updatePromptTemplateVersion_ConfigPropertyMetadata);
|
|
7015
7994
|
function typeCheckConfig(untrustedConfig) {
|
|
7016
7995
|
const config = {};
|
|
7017
|
-
typeCheckConfig$
|
|
7996
|
+
typeCheckConfig$k(untrustedConfig, config, updatePromptTemplateVersion_ConfigPropertyMetadata);
|
|
7018
7997
|
const untrustedConfig_childRelationships = untrustedConfig.childRelationships;
|
|
7019
7998
|
if (untrustedIsObject(untrustedConfig_childRelationships)) {
|
|
7020
7999
|
const untrustedConfig_childRelationships_object = {};
|
|
@@ -7098,6 +8077,7 @@ let createPromptTemplateVersion;
|
|
|
7098
8077
|
let getDataProviderInstanceConfig;
|
|
7099
8078
|
let getDataProviderTypeConfigs;
|
|
7100
8079
|
let getDataProviders;
|
|
8080
|
+
let getEinsteinPromptTemplateReferences;
|
|
7101
8081
|
let getInputMappedDataProviders;
|
|
7102
8082
|
let getOutputLanguages;
|
|
7103
8083
|
let getPromptTemplate;
|
|
@@ -7113,6 +8093,7 @@ let createEmbeddings_imperative;
|
|
|
7113
8093
|
let getDataProviderInstanceConfig_imperative;
|
|
7114
8094
|
let getDataProviderTypeConfigs_imperative;
|
|
7115
8095
|
let getDataProviders_imperative;
|
|
8096
|
+
let getEinsteinPromptTemplateReferences_imperative;
|
|
7116
8097
|
let getInputMappedDataProviders_imperative;
|
|
7117
8098
|
let getOutputLanguages_imperative;
|
|
7118
8099
|
let getPromptTemplate_imperative;
|
|
@@ -7133,6 +8114,11 @@ const getDataProviderTypeConfigsMetadata = {
|
|
|
7133
8114
|
ttl: 300,
|
|
7134
8115
|
};
|
|
7135
8116
|
const getDataProvidersMetadata = { apiFamily: 'EinsteinLLM', name: 'getDataProviders', ttl: 300 };
|
|
8117
|
+
const getEinsteinPromptTemplateReferencesMetadata = {
|
|
8118
|
+
apiFamily: 'EinsteinLLM',
|
|
8119
|
+
name: 'getEinsteinPromptTemplateReferences',
|
|
8120
|
+
ttl: 100,
|
|
8121
|
+
};
|
|
7136
8122
|
const getInputMappedDataProvidersMetadata = {
|
|
7137
8123
|
apiFamily: 'EinsteinLLM',
|
|
7138
8124
|
name: 'getInputMappedDataProviders',
|
|
@@ -7167,6 +8153,7 @@ function bindExportsTo(luvio) {
|
|
|
7167
8153
|
const getDataProviderInstanceConfig_ldsAdapter = createInstrumentedAdapter(createLDSAdapter(luvio, 'getDataProviderInstanceConfig', getDataProviderInstanceConfigAdapterFactory), getDataProviderInstanceConfigMetadata);
|
|
7168
8154
|
const getDataProviderTypeConfigs_ldsAdapter = createInstrumentedAdapter(createLDSAdapter(luvio, 'getDataProviderTypeConfigs', getDataProviderTypeConfigsAdapterFactory), getDataProviderTypeConfigsMetadata);
|
|
7169
8155
|
const getDataProviders_ldsAdapter = createInstrumentedAdapter(createLDSAdapter(luvio, 'getDataProviders', getDataProvidersAdapterFactory), getDataProvidersMetadata);
|
|
8156
|
+
const getEinsteinPromptTemplateReferences_ldsAdapter = createInstrumentedAdapter(createLDSAdapter(luvio, 'getEinsteinPromptTemplateReferences', getEinsteinPromptTemplateReferencesAdapterFactory), getEinsteinPromptTemplateReferencesMetadata);
|
|
7170
8157
|
const getInputMappedDataProviders_ldsAdapter = createInstrumentedAdapter(createLDSAdapter(luvio, 'getInputMappedDataProviders', getInputMappedDataProvidersAdapterFactory), getInputMappedDataProvidersMetadata);
|
|
7171
8158
|
const getOutputLanguages_ldsAdapter = createInstrumentedAdapter(createLDSAdapter(luvio, 'getOutputLanguages', getOutputLanguagesAdapterFactory), getOutputLanguagesMetadata);
|
|
7172
8159
|
const getPromptTemplate_ldsAdapter = createInstrumentedAdapter(createLDSAdapter(luvio, 'getPromptTemplate', getPromptTemplateAdapterFactory), getPromptTemplateMetadata);
|
|
@@ -7188,6 +8175,7 @@ function bindExportsTo(luvio) {
|
|
|
7188
8175
|
getDataProviderInstanceConfig: createWireAdapterConstructor(luvio, getDataProviderInstanceConfig_ldsAdapter, getDataProviderInstanceConfigMetadata),
|
|
7189
8176
|
getDataProviderTypeConfigs: createWireAdapterConstructor(luvio, getDataProviderTypeConfigs_ldsAdapter, getDataProviderTypeConfigsMetadata),
|
|
7190
8177
|
getDataProviders: createWireAdapterConstructor(luvio, getDataProviders_ldsAdapter, getDataProvidersMetadata),
|
|
8178
|
+
getEinsteinPromptTemplateReferences: createWireAdapterConstructor(luvio, getEinsteinPromptTemplateReferences_ldsAdapter, getEinsteinPromptTemplateReferencesMetadata),
|
|
7191
8179
|
getInputMappedDataProviders: createWireAdapterConstructor(luvio, getInputMappedDataProviders_ldsAdapter, getInputMappedDataProvidersMetadata),
|
|
7192
8180
|
getOutputLanguages: createWireAdapterConstructor(luvio, getOutputLanguages_ldsAdapter, getOutputLanguagesMetadata),
|
|
7193
8181
|
getPromptTemplate: createWireAdapterConstructor(luvio, getPromptTemplate_ldsAdapter, getPromptTemplateMetadata),
|
|
@@ -7203,6 +8191,7 @@ function bindExportsTo(luvio) {
|
|
|
7203
8191
|
getDataProviderInstanceConfig_imperative: createImperativeAdapter(luvio, getDataProviderInstanceConfig_ldsAdapter, getDataProviderInstanceConfigMetadata),
|
|
7204
8192
|
getDataProviderTypeConfigs_imperative: createImperativeAdapter(luvio, getDataProviderTypeConfigs_ldsAdapter, getDataProviderTypeConfigsMetadata),
|
|
7205
8193
|
getDataProviders_imperative: createImperativeAdapter(luvio, getDataProviders_ldsAdapter, getDataProvidersMetadata),
|
|
8194
|
+
getEinsteinPromptTemplateReferences_imperative: createImperativeAdapter(luvio, getEinsteinPromptTemplateReferences_ldsAdapter, getEinsteinPromptTemplateReferencesMetadata),
|
|
7206
8195
|
getInputMappedDataProviders_imperative: createImperativeAdapter(luvio, getInputMappedDataProviders_ldsAdapter, getInputMappedDataProvidersMetadata),
|
|
7207
8196
|
getOutputLanguages_imperative: createImperativeAdapter(luvio, getOutputLanguages_ldsAdapter, getOutputLanguagesMetadata),
|
|
7208
8197
|
getPromptTemplate_imperative: createImperativeAdapter(luvio, getPromptTemplate_ldsAdapter, getPromptTemplateMetadata),
|
|
@@ -7224,6 +8213,7 @@ withDefaultLuvio((luvio) => {
|
|
|
7224
8213
|
getDataProviderInstanceConfig,
|
|
7225
8214
|
getDataProviderTypeConfigs,
|
|
7226
8215
|
getDataProviders,
|
|
8216
|
+
getEinsteinPromptTemplateReferences,
|
|
7227
8217
|
getInputMappedDataProviders,
|
|
7228
8218
|
getOutputLanguages,
|
|
7229
8219
|
getPromptTemplate,
|
|
@@ -7238,6 +8228,7 @@ withDefaultLuvio((luvio) => {
|
|
|
7238
8228
|
getDataProviderInstanceConfig_imperative,
|
|
7239
8229
|
getDataProviderTypeConfigs_imperative,
|
|
7240
8230
|
getDataProviders_imperative,
|
|
8231
|
+
getEinsteinPromptTemplateReferences_imperative,
|
|
7241
8232
|
getInputMappedDataProviders_imperative,
|
|
7242
8233
|
getOutputLanguages_imperative,
|
|
7243
8234
|
getPromptTemplate_imperative,
|
|
@@ -7248,5 +8239,5 @@ withDefaultLuvio((luvio) => {
|
|
|
7248
8239
|
} = bindExportsTo(luvio));
|
|
7249
8240
|
});
|
|
7250
8241
|
|
|
7251
|
-
export { createEmbeddings, createEmbeddings_imperative, createFeedback, createGenerations, createGenerationsForPromptTemplate, createPromptTemplate, createPromptTemplateVersion, getDataProviderInstanceConfig, getDataProviderInstanceConfig_imperative, getDataProviderTypeConfigs, getDataProviderTypeConfigs_imperative, getDataProviders, getDataProviders_imperative, getInputMappedDataProviders, getInputMappedDataProviders_imperative, getOutputLanguages, getOutputLanguages_imperative, getPromptTemplate, getPromptTemplateVersion, getPromptTemplateVersion_imperative, getPromptTemplateVersions, getPromptTemplateVersions_imperative, getPromptTemplate_imperative, getPromptTemplates, getPromptTemplates_imperative, getTemplateType, getTemplateType_imperative, putEinsteinPromptTemplateStatus, putEinsteinPromptTemplateVersionStatus, updatePromptTemplateVersion };
|
|
7252
|
-
// version: 1.
|
|
8242
|
+
export { createEmbeddings, createEmbeddings_imperative, createFeedback, createGenerations, createGenerationsForPromptTemplate, createPromptTemplate, createPromptTemplateVersion, getDataProviderInstanceConfig, getDataProviderInstanceConfig_imperative, getDataProviderTypeConfigs, getDataProviderTypeConfigs_imperative, getDataProviders, getDataProviders_imperative, getEinsteinPromptTemplateReferences, getEinsteinPromptTemplateReferences_imperative, getInputMappedDataProviders, getInputMappedDataProviders_imperative, getOutputLanguages, getOutputLanguages_imperative, getPromptTemplate, getPromptTemplateVersion, getPromptTemplateVersion_imperative, getPromptTemplateVersions, getPromptTemplateVersions_imperative, getPromptTemplate_imperative, getPromptTemplates, getPromptTemplates_imperative, getTemplateType, getTemplateType_imperative, putEinsteinPromptTemplateStatus, putEinsteinPromptTemplateVersionStatus, updatePromptTemplateVersion };
|
|
8243
|
+
// version: 1.416.0-e1e24eaee8
|