@salesforce/lds-adapters-service-einsteinllm 1.404.0-dev2 → 1.404.0-dev5
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 +46 -4
- package/dist/es/es2018/types/src/generated/types/EinsteinLlmGenerationGenAiCitedReferenceRepresentation.d.ts +4 -1
- package/dist/es/es2018/types/src/generated/types/EinsteinPromptRecordFieldRepresentation.d.ts +3 -3
- package/package.json +4 -4
- package/sfdc/index.js +47 -5
- package/src/raml/api.raml +5 -1
|
@@ -1880,19 +1880,36 @@ function validate$q(obj, path = 'EinsteinPromptRecordFieldRepresentation') {
|
|
|
1880
1880
|
}
|
|
1881
1881
|
let obj_value_union3 = null;
|
|
1882
1882
|
const obj_value_union3_error = (() => {
|
|
1883
|
-
if (obj_value
|
|
1884
|
-
return new TypeError('Expected "
|
|
1883
|
+
if (!ArrayIsArray(obj_value)) {
|
|
1884
|
+
return new TypeError('Expected "array" but received "' + typeof obj_value + '" (at "' + path_value + '")');
|
|
1885
|
+
}
|
|
1886
|
+
for (let i = 0; i < obj_value.length; i++) {
|
|
1887
|
+
const obj_value_item = obj_value[i];
|
|
1888
|
+
const path_value_item = path_value + '[' + i + ']';
|
|
1889
|
+
if (typeof obj_value_item !== 'string') {
|
|
1890
|
+
return new TypeError('Expected "string" but received "' + typeof obj_value_item + '" (at "' + path_value_item + '")');
|
|
1891
|
+
}
|
|
1885
1892
|
}
|
|
1886
1893
|
})();
|
|
1887
1894
|
if (obj_value_union3_error != null) {
|
|
1888
1895
|
obj_value_union3 = obj_value_union3_error.message;
|
|
1889
1896
|
}
|
|
1890
|
-
|
|
1897
|
+
let obj_value_union4 = null;
|
|
1898
|
+
const obj_value_union4_error = (() => {
|
|
1899
|
+
if (obj_value !== null) {
|
|
1900
|
+
return new TypeError('Expected "null" but received "' + typeof obj_value + '" (at "' + path_value + '")');
|
|
1901
|
+
}
|
|
1902
|
+
})();
|
|
1903
|
+
if (obj_value_union4_error != null) {
|
|
1904
|
+
obj_value_union4 = obj_value_union4_error.message;
|
|
1905
|
+
}
|
|
1906
|
+
if (obj_value_union0 && obj_value_union1 && obj_value_union2 && obj_value_union3 && obj_value_union4) {
|
|
1891
1907
|
let message = 'Object doesn\'t match union (at "' + path_value + '")';
|
|
1892
1908
|
message += '\n' + obj_value_union0.split('\n').map((line) => '\t' + line).join('\n');
|
|
1893
1909
|
message += '\n' + obj_value_union1.split('\n').map((line) => '\t' + line).join('\n');
|
|
1894
1910
|
message += '\n' + obj_value_union2.split('\n').map((line) => '\t' + line).join('\n');
|
|
1895
1911
|
message += '\n' + obj_value_union3.split('\n').map((line) => '\t' + line).join('\n');
|
|
1912
|
+
message += '\n' + obj_value_union4.split('\n').map((line) => '\t' + line).join('\n');
|
|
1896
1913
|
return new TypeError(message);
|
|
1897
1914
|
}
|
|
1898
1915
|
})();
|
|
@@ -4519,7 +4536,7 @@ function validate$f(obj, path = 'EinsteinPromptTemplateGenerationsInputRepresent
|
|
|
4519
4536
|
return v_error === undefined ? null : v_error;
|
|
4520
4537
|
}
|
|
4521
4538
|
|
|
4522
|
-
const VERSION$e = "
|
|
4539
|
+
const VERSION$e = "6a209d0b32d59e6e04155812fdf5c985";
|
|
4523
4540
|
function validate$e(obj, path = 'EinsteinLlmGenerationGenAiCitedReferenceRepresentation') {
|
|
4524
4541
|
const v_error = (() => {
|
|
4525
4542
|
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
@@ -4553,6 +4570,13 @@ function validate$e(obj, path = 'EinsteinLlmGenerationGenAiCitedReferenceReprese
|
|
|
4553
4570
|
}
|
|
4554
4571
|
}
|
|
4555
4572
|
}
|
|
4573
|
+
if (obj.label !== undefined) {
|
|
4574
|
+
const obj_label = obj.label;
|
|
4575
|
+
const path_label = path + '.label';
|
|
4576
|
+
if (typeof obj_label !== 'string') {
|
|
4577
|
+
return new TypeError('Expected "string" but received "' + typeof obj_label + '" (at "' + path_label + '")');
|
|
4578
|
+
}
|
|
4579
|
+
}
|
|
4556
4580
|
if (obj.link !== undefined) {
|
|
4557
4581
|
const obj_link = obj.link;
|
|
4558
4582
|
const path_link = path + '.link';
|
|
@@ -4595,6 +4619,11 @@ const select$h = function EinsteinLlmGenerationGenAiCitedReferenceRepresentation
|
|
|
4595
4619
|
plural: true,
|
|
4596
4620
|
required: false
|
|
4597
4621
|
},
|
|
4622
|
+
{
|
|
4623
|
+
name: 'label',
|
|
4624
|
+
kind: 'Scalar',
|
|
4625
|
+
required: false
|
|
4626
|
+
},
|
|
4598
4627
|
{
|
|
4599
4628
|
name: 'link',
|
|
4600
4629
|
kind: 'Scalar',
|
|
@@ -4614,6 +4643,19 @@ const select$h = function EinsteinLlmGenerationGenAiCitedReferenceRepresentation
|
|
|
4614
4643
|
};
|
|
4615
4644
|
};
|
|
4616
4645
|
function equals$e(existing, incoming) {
|
|
4646
|
+
const existing_label = existing.label;
|
|
4647
|
+
const incoming_label = incoming.label;
|
|
4648
|
+
// if at least one of these optionals is defined
|
|
4649
|
+
if (existing_label !== undefined || incoming_label !== undefined) {
|
|
4650
|
+
// if one of these is not defined we know the other is defined and therefore
|
|
4651
|
+
// not equal
|
|
4652
|
+
if (existing_label === undefined || incoming_label === undefined) {
|
|
4653
|
+
return false;
|
|
4654
|
+
}
|
|
4655
|
+
if (!(existing_label === incoming_label)) {
|
|
4656
|
+
return false;
|
|
4657
|
+
}
|
|
4658
|
+
}
|
|
4617
4659
|
const existing_link = existing.link;
|
|
4618
4660
|
const incoming_link = incoming.link;
|
|
4619
4661
|
// if at least one of these optionals is defined
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
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';
|
|
2
|
-
export declare const VERSION = "
|
|
2
|
+
export declare const VERSION = "6a209d0b32d59e6e04155812fdf5c985";
|
|
3
3
|
export declare function validate(obj: any, path?: string): TypeError | null;
|
|
4
4
|
export declare const RepresentationType: string;
|
|
5
5
|
export declare function normalize(input: EinsteinLlmGenerationGenAiCitedReferenceRepresentation, existing: EinsteinLlmGenerationGenAiCitedReferenceRepresentationNormalized, path: $64$luvio_engine_IngestPath, luvio: $64$luvio_engine_Luvio, store: $64$luvio_engine_Store, timestamp: number): EinsteinLlmGenerationGenAiCitedReferenceRepresentationNormalized;
|
|
@@ -18,6 +18,8 @@ export interface EinsteinLlmGenerationGenAiCitedReferenceRepresentationNormalize
|
|
|
18
18
|
citationLocations?: Array<number>;
|
|
19
19
|
/** Matching chunk from the input text */
|
|
20
20
|
claims?: Array<string>;
|
|
21
|
+
/** Label */
|
|
22
|
+
label?: string;
|
|
21
23
|
/** Link */
|
|
22
24
|
link?: string;
|
|
23
25
|
/** SourceObjectApiName */
|
|
@@ -34,6 +36,7 @@ export interface EinsteinLlmGenerationGenAiCitedReferenceRepresentationNormalize
|
|
|
34
36
|
export interface EinsteinLlmGenerationGenAiCitedReferenceRepresentation {
|
|
35
37
|
citationLocations?: Array<number>;
|
|
36
38
|
claims?: Array<string>;
|
|
39
|
+
label?: string;
|
|
37
40
|
link?: string;
|
|
38
41
|
sourceObjectApiName?: string;
|
|
39
42
|
sourceObjectRecordId?: string;
|
package/dist/es/es2018/types/src/generated/types/EinsteinPromptRecordFieldRepresentation.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
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';
|
|
2
|
-
export declare const VERSION = "
|
|
2
|
+
export declare const VERSION = "c4993d997b5852ad9d11bd2a720192b3";
|
|
3
3
|
export declare function validate(obj: any, path?: string): TypeError | null;
|
|
4
4
|
export declare const RepresentationType: string;
|
|
5
5
|
export declare function normalize(input: EinsteinPromptRecordFieldRepresentation, existing: EinsteinPromptRecordFieldRepresentationNormalized, path: $64$luvio_engine_IngestPath, luvio: $64$luvio_engine_Luvio, store: $64$luvio_engine_Store, timestamp: number): EinsteinPromptRecordFieldRepresentationNormalized;
|
|
@@ -17,7 +17,7 @@ export interface EinsteinPromptRecordFieldRepresentationNormalized {
|
|
|
17
17
|
/** The displayable value for a field */
|
|
18
18
|
displayValue: string;
|
|
19
19
|
/** The value of a field in its raw data form. */
|
|
20
|
-
value: boolean | number | string | null;
|
|
20
|
+
value: boolean | number | string | Array<string> | null;
|
|
21
21
|
}
|
|
22
22
|
/**
|
|
23
23
|
* Contains both the raw and displayable field values for a field in a Record.
|
|
@@ -27,5 +27,5 @@ export interface EinsteinPromptRecordFieldRepresentationNormalized {
|
|
|
27
27
|
*/
|
|
28
28
|
export interface EinsteinPromptRecordFieldRepresentation {
|
|
29
29
|
displayValue: string;
|
|
30
|
-
value: boolean | number | string | null;
|
|
30
|
+
value: boolean | number | string | Array<string> | null;
|
|
31
31
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@salesforce/lds-adapters-service-einsteinllm",
|
|
3
|
-
"version": "1.404.0-
|
|
3
|
+
"version": "1.404.0-dev5",
|
|
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.404.0-
|
|
47
|
+
"@salesforce/lds-bindings": "^1.404.0-dev5"
|
|
48
48
|
},
|
|
49
49
|
"devDependencies": {
|
|
50
|
-
"@salesforce/lds-compiler-plugins": "^1.404.0-
|
|
51
|
-
"@salesforce/lds-karma": "^1.404.0-
|
|
50
|
+
"@salesforce/lds-compiler-plugins": "^1.404.0-dev5",
|
|
51
|
+
"@salesforce/lds-karma": "^1.404.0-dev5"
|
|
52
52
|
},
|
|
53
53
|
"nx": {
|
|
54
54
|
"targets": {
|
package/sfdc/index.js
CHANGED
|
@@ -1925,7 +1925,7 @@ function validate$p(obj, path = 'EinsteinPromptTemplateGenerationsInputRepresent
|
|
|
1925
1925
|
return v_error === undefined ? null : v_error;
|
|
1926
1926
|
}
|
|
1927
1927
|
|
|
1928
|
-
const VERSION$k = "
|
|
1928
|
+
const VERSION$k = "6a209d0b32d59e6e04155812fdf5c985";
|
|
1929
1929
|
function validate$o(obj, path = 'EinsteinLlmGenerationGenAiCitedReferenceRepresentation') {
|
|
1930
1930
|
const v_error = (() => {
|
|
1931
1931
|
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
@@ -1959,6 +1959,13 @@ function validate$o(obj, path = 'EinsteinLlmGenerationGenAiCitedReferenceReprese
|
|
|
1959
1959
|
}
|
|
1960
1960
|
}
|
|
1961
1961
|
}
|
|
1962
|
+
if (obj.label !== undefined) {
|
|
1963
|
+
const obj_label = obj.label;
|
|
1964
|
+
const path_label = path + '.label';
|
|
1965
|
+
if (typeof obj_label !== 'string') {
|
|
1966
|
+
return new TypeError('Expected "string" but received "' + typeof obj_label + '" (at "' + path_label + '")');
|
|
1967
|
+
}
|
|
1968
|
+
}
|
|
1962
1969
|
if (obj.link !== undefined) {
|
|
1963
1970
|
const obj_link = obj.link;
|
|
1964
1971
|
const path_link = path + '.link';
|
|
@@ -2001,6 +2008,11 @@ const select$z = function EinsteinLlmGenerationGenAiCitedReferenceRepresentation
|
|
|
2001
2008
|
plural: true,
|
|
2002
2009
|
required: false
|
|
2003
2010
|
},
|
|
2011
|
+
{
|
|
2012
|
+
name: 'label',
|
|
2013
|
+
kind: 'Scalar',
|
|
2014
|
+
required: false
|
|
2015
|
+
},
|
|
2004
2016
|
{
|
|
2005
2017
|
name: 'link',
|
|
2006
2018
|
kind: 'Scalar',
|
|
@@ -2020,6 +2032,19 @@ const select$z = function EinsteinLlmGenerationGenAiCitedReferenceRepresentation
|
|
|
2020
2032
|
};
|
|
2021
2033
|
};
|
|
2022
2034
|
function equals$k(existing, incoming) {
|
|
2035
|
+
const existing_label = existing.label;
|
|
2036
|
+
const incoming_label = incoming.label;
|
|
2037
|
+
// if at least one of these optionals is defined
|
|
2038
|
+
if (existing_label !== undefined || incoming_label !== undefined) {
|
|
2039
|
+
// if one of these is not defined we know the other is defined and therefore
|
|
2040
|
+
// not equal
|
|
2041
|
+
if (existing_label === undefined || incoming_label === undefined) {
|
|
2042
|
+
return false;
|
|
2043
|
+
}
|
|
2044
|
+
if (!(existing_label === incoming_label)) {
|
|
2045
|
+
return false;
|
|
2046
|
+
}
|
|
2047
|
+
}
|
|
2023
2048
|
const existing_link = existing.link;
|
|
2024
2049
|
const incoming_link = incoming.link;
|
|
2025
2050
|
// if at least one of these optionals is defined
|
|
@@ -5285,19 +5310,36 @@ function validate$5(obj, path = 'EinsteinPromptRecordFieldRepresentation') {
|
|
|
5285
5310
|
}
|
|
5286
5311
|
let obj_value_union3 = null;
|
|
5287
5312
|
const obj_value_union3_error = (() => {
|
|
5288
|
-
if (obj_value
|
|
5289
|
-
return new TypeError('Expected "
|
|
5313
|
+
if (!ArrayIsArray(obj_value)) {
|
|
5314
|
+
return new TypeError('Expected "array" but received "' + typeof obj_value + '" (at "' + path_value + '")');
|
|
5315
|
+
}
|
|
5316
|
+
for (let i = 0; i < obj_value.length; i++) {
|
|
5317
|
+
const obj_value_item = obj_value[i];
|
|
5318
|
+
const path_value_item = path_value + '[' + i + ']';
|
|
5319
|
+
if (typeof obj_value_item !== 'string') {
|
|
5320
|
+
return new TypeError('Expected "string" but received "' + typeof obj_value_item + '" (at "' + path_value_item + '")');
|
|
5321
|
+
}
|
|
5290
5322
|
}
|
|
5291
5323
|
})();
|
|
5292
5324
|
if (obj_value_union3_error != null) {
|
|
5293
5325
|
obj_value_union3 = obj_value_union3_error.message;
|
|
5294
5326
|
}
|
|
5295
|
-
|
|
5327
|
+
let obj_value_union4 = null;
|
|
5328
|
+
const obj_value_union4_error = (() => {
|
|
5329
|
+
if (obj_value !== null) {
|
|
5330
|
+
return new TypeError('Expected "null" but received "' + typeof obj_value + '" (at "' + path_value + '")');
|
|
5331
|
+
}
|
|
5332
|
+
})();
|
|
5333
|
+
if (obj_value_union4_error != null) {
|
|
5334
|
+
obj_value_union4 = obj_value_union4_error.message;
|
|
5335
|
+
}
|
|
5336
|
+
if (obj_value_union0 && obj_value_union1 && obj_value_union2 && obj_value_union3 && obj_value_union4) {
|
|
5296
5337
|
let message = 'Object doesn\'t match union (at "' + path_value + '")';
|
|
5297
5338
|
message += '\n' + obj_value_union0.split('\n').map((line) => '\t' + line).join('\n');
|
|
5298
5339
|
message += '\n' + obj_value_union1.split('\n').map((line) => '\t' + line).join('\n');
|
|
5299
5340
|
message += '\n' + obj_value_union2.split('\n').map((line) => '\t' + line).join('\n');
|
|
5300
5341
|
message += '\n' + obj_value_union3.split('\n').map((line) => '\t' + line).join('\n');
|
|
5342
|
+
message += '\n' + obj_value_union4.split('\n').map((line) => '\t' + line).join('\n');
|
|
5301
5343
|
return new TypeError(message);
|
|
5302
5344
|
}
|
|
5303
5345
|
})();
|
|
@@ -6880,4 +6922,4 @@ withDefaultLuvio((luvio) => {
|
|
|
6880
6922
|
});
|
|
6881
6923
|
|
|
6882
6924
|
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, putEinsteinPromptTemplateVersionStatus, updatePromptTemplateVersion };
|
|
6883
|
-
// version: 1.404.0-
|
|
6925
|
+
// version: 1.404.0-dev5-38a59c52aa
|
package/src/raml/api.raml
CHANGED
|
@@ -356,7 +356,7 @@ types:
|
|
|
356
356
|
type: string
|
|
357
357
|
value:
|
|
358
358
|
description: The value of a field in its raw data form.
|
|
359
|
-
type: boolean | integer | string | nil
|
|
359
|
+
type: boolean | integer | string | string[] | nil # TODO Hand-rolled W-20480888
|
|
360
360
|
EinsteinPromptRecordInputRepresentation:
|
|
361
361
|
description: Input representation for creating a prompt template
|
|
362
362
|
type: object
|
|
@@ -551,6 +551,10 @@ types:
|
|
|
551
551
|
description: Link
|
|
552
552
|
type: string
|
|
553
553
|
required: false # TODO Hand-rolled W-19304625
|
|
554
|
+
label:
|
|
555
|
+
description: Label
|
|
556
|
+
type: string
|
|
557
|
+
required: false
|
|
554
558
|
sourceObjectApiName:
|
|
555
559
|
description: SourceObjectApiName
|
|
556
560
|
type: string
|