@salesforce/lds-adapters-service-einsteinllm 1.375.0 → 1.377.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 +47 -1
- package/dist/es/es2018/types/src/generated/types/EinsteinPromptTemplateGenerationsInputRepresentation.d.ts +4 -1
- package/dist/es/es2018/types/src/generated/types/EinsteinPromptTemplateGenerationsRepresentation.d.ts +8 -1
- package/package.json +4 -4
- package/sfdc/index.js +48 -2
- package/src/raml/api.raml +10 -0
|
@@ -2425,6 +2425,13 @@ function validate$a(obj, path = 'EinsteinPromptTemplateGenerationsInputRepresent
|
|
|
2425
2425
|
return new TypeError('Expected "string" but received "' + typeof obj_provider + '" (at "' + path_provider + '")');
|
|
2426
2426
|
}
|
|
2427
2427
|
}
|
|
2428
|
+
if (obj.showGroundingMetadataInResolvedPrompt !== undefined) {
|
|
2429
|
+
const obj_showGroundingMetadataInResolvedPrompt = obj.showGroundingMetadataInResolvedPrompt;
|
|
2430
|
+
const path_showGroundingMetadataInResolvedPrompt = path + '.showGroundingMetadataInResolvedPrompt';
|
|
2431
|
+
if (typeof obj_showGroundingMetadataInResolvedPrompt !== 'boolean') {
|
|
2432
|
+
return new TypeError('Expected "boolean" but received "' + typeof obj_showGroundingMetadataInResolvedPrompt + '" (at "' + path_showGroundingMetadataInResolvedPrompt + '")');
|
|
2433
|
+
}
|
|
2434
|
+
}
|
|
2428
2435
|
})();
|
|
2429
2436
|
return v_error === undefined ? null : v_error;
|
|
2430
2437
|
}
|
|
@@ -2931,7 +2938,7 @@ function equals$4(existing, incoming) {
|
|
|
2931
2938
|
}
|
|
2932
2939
|
|
|
2933
2940
|
const TTL$1 = 100;
|
|
2934
|
-
const VERSION$3 = "
|
|
2941
|
+
const VERSION$3 = "492c5045545dfbf96d7f660532a30499";
|
|
2935
2942
|
function validate$3(obj, path = 'EinsteinPromptTemplateGenerationsRepresentation') {
|
|
2936
2943
|
const v_error = (() => {
|
|
2937
2944
|
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
@@ -2986,6 +2993,22 @@ function validate$3(obj, path = 'EinsteinPromptTemplateGenerationsRepresentation
|
|
|
2986
2993
|
return new TypeError(message);
|
|
2987
2994
|
}
|
|
2988
2995
|
}
|
|
2996
|
+
if (obj.mergeFieldInformation !== undefined) {
|
|
2997
|
+
const obj_mergeFieldInformation = obj.mergeFieldInformation;
|
|
2998
|
+
const path_mergeFieldInformation = path + '.mergeFieldInformation';
|
|
2999
|
+
if (typeof obj_mergeFieldInformation !== 'object' || ArrayIsArray(obj_mergeFieldInformation) || obj_mergeFieldInformation === null) {
|
|
3000
|
+
return new TypeError('Expected "object" but received "' + typeof obj_mergeFieldInformation + '" (at "' + path_mergeFieldInformation + '")');
|
|
3001
|
+
}
|
|
3002
|
+
const obj_mergeFieldInformation_keys = ObjectKeys(obj_mergeFieldInformation);
|
|
3003
|
+
for (let i = 0; i < obj_mergeFieldInformation_keys.length; i++) {
|
|
3004
|
+
const key = obj_mergeFieldInformation_keys[i];
|
|
3005
|
+
const obj_mergeFieldInformation_prop = obj_mergeFieldInformation[key];
|
|
3006
|
+
const path_mergeFieldInformation_prop = path_mergeFieldInformation + '["' + key + '"]';
|
|
3007
|
+
if (obj_mergeFieldInformation_prop === undefined) {
|
|
3008
|
+
return new TypeError('Expected "defined" but received "' + typeof obj_mergeFieldInformation_prop + '" (at "' + path_mergeFieldInformation_prop + '")');
|
|
3009
|
+
}
|
|
3010
|
+
}
|
|
3011
|
+
}
|
|
2989
3012
|
const obj_parameters = obj.parameters;
|
|
2990
3013
|
const path_parameters = path + '.parameters';
|
|
2991
3014
|
let obj_parameters_union0 = null;
|
|
@@ -3150,6 +3173,11 @@ const select$5 = function EinsteinPromptTemplateGenerationsRepresentationSelect(
|
|
|
3150
3173
|
plural: true,
|
|
3151
3174
|
selections: EinsteinLlmGenerationItemRepresentation__selections
|
|
3152
3175
|
},
|
|
3176
|
+
{
|
|
3177
|
+
name: 'mergeFieldInformation',
|
|
3178
|
+
kind: 'Object',
|
|
3179
|
+
// any
|
|
3180
|
+
},
|
|
3153
3181
|
{
|
|
3154
3182
|
name: 'parameters',
|
|
3155
3183
|
kind: 'Object',
|
|
@@ -3249,6 +3277,24 @@ function equals$3(existing, incoming) {
|
|
|
3249
3277
|
if (equals_generations_items === false) {
|
|
3250
3278
|
return false;
|
|
3251
3279
|
}
|
|
3280
|
+
const existing_mergeFieldInformation = existing.mergeFieldInformation;
|
|
3281
|
+
const incoming_mergeFieldInformation = incoming.mergeFieldInformation;
|
|
3282
|
+
// if at least one of these optionals is defined
|
|
3283
|
+
if (existing_mergeFieldInformation !== undefined || incoming_mergeFieldInformation !== undefined) {
|
|
3284
|
+
// if one of these is not defined we know the other is defined and therefore
|
|
3285
|
+
// not equal
|
|
3286
|
+
if (existing_mergeFieldInformation === undefined || incoming_mergeFieldInformation === undefined) {
|
|
3287
|
+
return false;
|
|
3288
|
+
}
|
|
3289
|
+
const equals_mergeFieldInformation_props = equalsObject(existing_mergeFieldInformation, incoming_mergeFieldInformation, (existing_mergeFieldInformation_prop, incoming_mergeFieldInformation_prop) => {
|
|
3290
|
+
if (JSONStringify(incoming_mergeFieldInformation_prop) !== JSONStringify(existing_mergeFieldInformation_prop)) {
|
|
3291
|
+
return false;
|
|
3292
|
+
}
|
|
3293
|
+
});
|
|
3294
|
+
if (equals_mergeFieldInformation_props === false) {
|
|
3295
|
+
return false;
|
|
3296
|
+
}
|
|
3297
|
+
}
|
|
3252
3298
|
const existing_parameters = existing.parameters;
|
|
3253
3299
|
const incoming_parameters = incoming.parameters;
|
|
3254
3300
|
if (!(existing_parameters === incoming_parameters
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { EinsteinLlmAdditionalConfigInputRepresentation as EinsteinLlmAdditionalConfigInputRepresentation_EinsteinLlmAdditionalConfigInputRepresentation } from './EinsteinLlmAdditionalConfigInputRepresentation';
|
|
2
2
|
import { WrappedValueMap as WrappedValueMap_WrappedValueMap } from './WrappedValueMap';
|
|
3
3
|
import { IngestPath as $64$luvio_engine_IngestPath, Luvio as $64$luvio_engine_Luvio, Store as $64$luvio_engine_Store, FragmentSelection as $64$luvio_engine_FragmentSelection, ResourceIngest as $64$luvio_engine_ResourceIngest, DurableStoreKeyMetadataMap as $64$luvio_engine_DurableStoreKeyMetadataMap, NormalizedKeyMetadata as $64$luvio_engine_NormalizedKeyMetadata } from '@luvio/engine';
|
|
4
|
-
export declare const VERSION = "
|
|
4
|
+
export declare const VERSION = "a2cd7e0282d520ef2004c8eb2a8178b1";
|
|
5
5
|
export declare function validate(obj: any, path?: string): TypeError | null;
|
|
6
6
|
export declare const RepresentationType: string;
|
|
7
7
|
export declare function normalize(input: EinsteinPromptTemplateGenerationsInputRepresentation, existing: EinsteinPromptTemplateGenerationsInputRepresentationNormalized, path: $64$luvio_engine_IngestPath, luvio: $64$luvio_engine_Luvio, store: $64$luvio_engine_Store, timestamp: number): EinsteinPromptTemplateGenerationsInputRepresentationNormalized;
|
|
@@ -26,6 +26,8 @@ export interface EinsteinPromptTemplateGenerationsInputRepresentationNormalized
|
|
|
26
26
|
outputLanguage?: string;
|
|
27
27
|
/** LLM Provider */
|
|
28
28
|
provider?: string;
|
|
29
|
+
/** When this flag is true, mergeFieldInformation will be added to the LLM Generations Response output, which will be used to show annotations in the resolved prompt. */
|
|
30
|
+
showGroundingMetadataInResolvedPrompt?: boolean;
|
|
29
31
|
}
|
|
30
32
|
/**
|
|
31
33
|
* Input representation for generating prompt template responses with Einstein LLM
|
|
@@ -39,4 +41,5 @@ export interface EinsteinPromptTemplateGenerationsInputRepresentation {
|
|
|
39
41
|
isPreview: boolean;
|
|
40
42
|
outputLanguage?: string;
|
|
41
43
|
provider?: string;
|
|
44
|
+
showGroundingMetadataInResolvedPrompt?: boolean;
|
|
42
45
|
}
|
|
@@ -6,7 +6,7 @@ import { EinsteinPromptTemplateMaskContentRepresentation as EinsteinPromptTempla
|
|
|
6
6
|
import { EinsteinPromptTemplateMaskDataRepresentation as EinsteinPromptTemplateMaskDataRepresentation_EinsteinPromptTemplateMaskDataRepresentation } from './EinsteinPromptTemplateMaskDataRepresentation';
|
|
7
7
|
import { KeyMetadata as $64$luvio_engine_KeyMetadata, NormalizedKeyMetadata as $64$luvio_engine_NormalizedKeyMetadata, Luvio as $64$luvio_engine_Luvio, IngestPath as $64$luvio_engine_IngestPath, Store as $64$luvio_engine_Store, FragmentSelection as $64$luvio_engine_FragmentSelection, ResourceIngest as $64$luvio_engine_ResourceIngest, DurableStoreKeyMetadataMap as $64$luvio_engine_DurableStoreKeyMetadataMap } from '@luvio/engine';
|
|
8
8
|
export declare const TTL = 100;
|
|
9
|
-
export declare const VERSION = "
|
|
9
|
+
export declare const VERSION = "492c5045545dfbf96d7f660532a30499";
|
|
10
10
|
export declare function validate(obj: any, path?: string): TypeError | null;
|
|
11
11
|
export declare const RepresentationType: string;
|
|
12
12
|
export interface KeyParams extends $64$luvio_engine_KeyMetadata {
|
|
@@ -36,6 +36,10 @@ export interface EinsteinPromptTemplateGenerationsRepresentationNormalized {
|
|
|
36
36
|
generationErrors?: Array<EinsteinPromptTemplateGenerationsErrorRepresentation_EinsteinPromptTemplateGenerationsErrorRepresentation>;
|
|
37
37
|
/** List of generated text */
|
|
38
38
|
generations: Array<EinsteinLlmGenerationItemRepresentation_EinsteinLlmGenerationItemRepresentation>;
|
|
39
|
+
/** merge field information mapping used for annotations in the resolved prompt */
|
|
40
|
+
mergeFieldInformation?: {
|
|
41
|
+
[key: string]: unknown;
|
|
42
|
+
};
|
|
39
43
|
/** Any provider specific attributes will be included as part of this object */
|
|
40
44
|
parameters: WrappedMap_WrappedMap | null;
|
|
41
45
|
/** Prompt used for the generation */
|
|
@@ -61,6 +65,9 @@ export interface EinsteinPromptTemplateGenerationsRepresentation {
|
|
|
61
65
|
fileData?: Array<EinsteinPromptTemplateAttachmentRepresentation_EinsteinPromptTemplateAttachmentRepresentation>;
|
|
62
66
|
generationErrors?: Array<EinsteinPromptTemplateGenerationsErrorRepresentation_EinsteinPromptTemplateGenerationsErrorRepresentation>;
|
|
63
67
|
generations: Array<EinsteinLlmGenerationItemRepresentation_EinsteinLlmGenerationItemRepresentation>;
|
|
68
|
+
mergeFieldInformation?: {
|
|
69
|
+
[key: string]: unknown;
|
|
70
|
+
};
|
|
64
71
|
parameters: WrappedMap_WrappedMap | null;
|
|
65
72
|
prompt: string | null;
|
|
66
73
|
promptTemplateDevName: string;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@salesforce/lds-adapters-service-einsteinllm",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.377.0",
|
|
4
4
|
"description": "Connect family for Einstein LLM generations",
|
|
5
5
|
"license": "SEE LICENSE IN LICENSE.txt",
|
|
6
6
|
"main": "dist/es/es2018/service-einsteinllm.js",
|
|
@@ -44,11 +44,11 @@
|
|
|
44
44
|
"test:unit": "jest --config=./jest.config.js"
|
|
45
45
|
},
|
|
46
46
|
"dependencies": {
|
|
47
|
-
"@salesforce/lds-bindings": "^1.
|
|
47
|
+
"@salesforce/lds-bindings": "^1.377.0"
|
|
48
48
|
},
|
|
49
49
|
"devDependencies": {
|
|
50
|
-
"@salesforce/lds-compiler-plugins": "^1.
|
|
51
|
-
"@salesforce/lds-karma": "^1.
|
|
50
|
+
"@salesforce/lds-compiler-plugins": "^1.377.0",
|
|
51
|
+
"@salesforce/lds-karma": "^1.377.0"
|
|
52
52
|
},
|
|
53
53
|
"nx": {
|
|
54
54
|
"targets": {
|
package/sfdc/index.js
CHANGED
|
@@ -1905,6 +1905,13 @@ function validate$d(obj, path = 'EinsteinPromptTemplateGenerationsInputRepresent
|
|
|
1905
1905
|
return new TypeError('Expected "string" but received "' + typeof obj_provider + '" (at "' + path_provider + '")');
|
|
1906
1906
|
}
|
|
1907
1907
|
}
|
|
1908
|
+
if (obj.showGroundingMetadataInResolvedPrompt !== undefined) {
|
|
1909
|
+
const obj_showGroundingMetadataInResolvedPrompt = obj.showGroundingMetadataInResolvedPrompt;
|
|
1910
|
+
const path_showGroundingMetadataInResolvedPrompt = path + '.showGroundingMetadataInResolvedPrompt';
|
|
1911
|
+
if (typeof obj_showGroundingMetadataInResolvedPrompt !== 'boolean') {
|
|
1912
|
+
return new TypeError('Expected "boolean" but received "' + typeof obj_showGroundingMetadataInResolvedPrompt + '" (at "' + path_showGroundingMetadataInResolvedPrompt + '")');
|
|
1913
|
+
}
|
|
1914
|
+
}
|
|
1908
1915
|
})();
|
|
1909
1916
|
return v_error === undefined ? null : v_error;
|
|
1910
1917
|
}
|
|
@@ -2411,7 +2418,7 @@ function equals$6(existing, incoming) {
|
|
|
2411
2418
|
}
|
|
2412
2419
|
|
|
2413
2420
|
const TTL$3 = 100;
|
|
2414
|
-
const VERSION$5 = "
|
|
2421
|
+
const VERSION$5 = "492c5045545dfbf96d7f660532a30499";
|
|
2415
2422
|
function validate$6(obj, path = 'EinsteinPromptTemplateGenerationsRepresentation') {
|
|
2416
2423
|
const v_error = (() => {
|
|
2417
2424
|
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
@@ -2466,6 +2473,22 @@ function validate$6(obj, path = 'EinsteinPromptTemplateGenerationsRepresentation
|
|
|
2466
2473
|
return new TypeError(message);
|
|
2467
2474
|
}
|
|
2468
2475
|
}
|
|
2476
|
+
if (obj.mergeFieldInformation !== undefined) {
|
|
2477
|
+
const obj_mergeFieldInformation = obj.mergeFieldInformation;
|
|
2478
|
+
const path_mergeFieldInformation = path + '.mergeFieldInformation';
|
|
2479
|
+
if (typeof obj_mergeFieldInformation !== 'object' || ArrayIsArray(obj_mergeFieldInformation) || obj_mergeFieldInformation === null) {
|
|
2480
|
+
return new TypeError('Expected "object" but received "' + typeof obj_mergeFieldInformation + '" (at "' + path_mergeFieldInformation + '")');
|
|
2481
|
+
}
|
|
2482
|
+
const obj_mergeFieldInformation_keys = ObjectKeys(obj_mergeFieldInformation);
|
|
2483
|
+
for (let i = 0; i < obj_mergeFieldInformation_keys.length; i++) {
|
|
2484
|
+
const key = obj_mergeFieldInformation_keys[i];
|
|
2485
|
+
const obj_mergeFieldInformation_prop = obj_mergeFieldInformation[key];
|
|
2486
|
+
const path_mergeFieldInformation_prop = path_mergeFieldInformation + '["' + key + '"]';
|
|
2487
|
+
if (obj_mergeFieldInformation_prop === undefined) {
|
|
2488
|
+
return new TypeError('Expected "defined" but received "' + typeof obj_mergeFieldInformation_prop + '" (at "' + path_mergeFieldInformation_prop + '")');
|
|
2489
|
+
}
|
|
2490
|
+
}
|
|
2491
|
+
}
|
|
2469
2492
|
const obj_parameters = obj.parameters;
|
|
2470
2493
|
const path_parameters = path + '.parameters';
|
|
2471
2494
|
let obj_parameters_union0 = null;
|
|
@@ -2630,6 +2653,11 @@ const select$9 = function EinsteinPromptTemplateGenerationsRepresentationSelect(
|
|
|
2630
2653
|
plural: true,
|
|
2631
2654
|
selections: EinsteinLlmGenerationItemRepresentation__selections
|
|
2632
2655
|
},
|
|
2656
|
+
{
|
|
2657
|
+
name: 'mergeFieldInformation',
|
|
2658
|
+
kind: 'Object',
|
|
2659
|
+
// any
|
|
2660
|
+
},
|
|
2633
2661
|
{
|
|
2634
2662
|
name: 'parameters',
|
|
2635
2663
|
kind: 'Object',
|
|
@@ -2729,6 +2757,24 @@ function equals$5(existing, incoming) {
|
|
|
2729
2757
|
if (equals_generations_items === false) {
|
|
2730
2758
|
return false;
|
|
2731
2759
|
}
|
|
2760
|
+
const existing_mergeFieldInformation = existing.mergeFieldInformation;
|
|
2761
|
+
const incoming_mergeFieldInformation = incoming.mergeFieldInformation;
|
|
2762
|
+
// if at least one of these optionals is defined
|
|
2763
|
+
if (existing_mergeFieldInformation !== undefined || incoming_mergeFieldInformation !== undefined) {
|
|
2764
|
+
// if one of these is not defined we know the other is defined and therefore
|
|
2765
|
+
// not equal
|
|
2766
|
+
if (existing_mergeFieldInformation === undefined || incoming_mergeFieldInformation === undefined) {
|
|
2767
|
+
return false;
|
|
2768
|
+
}
|
|
2769
|
+
const equals_mergeFieldInformation_props = equalsObject(existing_mergeFieldInformation, incoming_mergeFieldInformation, (existing_mergeFieldInformation_prop, incoming_mergeFieldInformation_prop) => {
|
|
2770
|
+
if (JSONStringify(incoming_mergeFieldInformation_prop) !== JSONStringify(existing_mergeFieldInformation_prop)) {
|
|
2771
|
+
return false;
|
|
2772
|
+
}
|
|
2773
|
+
});
|
|
2774
|
+
if (equals_mergeFieldInformation_props === false) {
|
|
2775
|
+
return false;
|
|
2776
|
+
}
|
|
2777
|
+
}
|
|
2732
2778
|
const existing_parameters = existing.parameters;
|
|
2733
2779
|
const incoming_parameters = incoming.parameters;
|
|
2734
2780
|
if (!(existing_parameters === incoming_parameters
|
|
@@ -3910,4 +3956,4 @@ withDefaultLuvio((luvio) => {
|
|
|
3910
3956
|
});
|
|
3911
3957
|
|
|
3912
3958
|
export { createEmbeddings, createEmbeddings_imperative, createFeedback, createGenerations, createGenerationsForPromptTemplate, getOutputLanguages, getOutputLanguages_imperative, getPromptTemplate, getPromptTemplate_imperative, getPromptTemplates, getPromptTemplates_imperative };
|
|
3913
|
-
// version: 1.
|
|
3959
|
+
// version: 1.377.0-b0d5c49e07
|
package/src/raml/api.raml
CHANGED
|
@@ -431,6 +431,10 @@ types:
|
|
|
431
431
|
description: LLM Provider
|
|
432
432
|
type: string
|
|
433
433
|
required: false # TODO Hand-rolled W-9314597
|
|
434
|
+
showGroundingMetadataInResolvedPrompt:
|
|
435
|
+
description: When this flag is true, mergeFieldInformation will be added to the LLM Generations Response output, which will be used to show annotations in the resolved prompt.
|
|
436
|
+
type: boolean
|
|
437
|
+
required: false # TODO Hand-rolled W-18853661
|
|
434
438
|
EinsteinPromptTemplateGenerationsRepresentation:
|
|
435
439
|
description: Output of a einstein llm generations response for given prompt template
|
|
436
440
|
type: object
|
|
@@ -474,6 +478,12 @@ types:
|
|
|
474
478
|
type: array
|
|
475
479
|
items:
|
|
476
480
|
type: EinsteinPromptTemplateMaskDataRepresentation
|
|
481
|
+
mergeFieldInformation?: # TODO Hand-rolled W-18853661
|
|
482
|
+
description: merge field information mapping used for annotations in the resolved prompt
|
|
483
|
+
type: object
|
|
484
|
+
properties:
|
|
485
|
+
//:
|
|
486
|
+
type: any
|
|
477
487
|
fileData:
|
|
478
488
|
description: file info of the input files used in generation
|
|
479
489
|
type: array
|