@salesforce/lds-adapters-service-einsteinllm 1.298.0 → 1.299.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 +527 -200
- package/dist/es/es2018/types/src/generated/adapters/getPromptTemplates.d.ts +28 -0
- package/dist/es/es2018/types/src/generated/artifacts/main.d.ts +1 -0
- package/dist/es/es2018/types/src/generated/artifacts/sfdc.d.ts +3 -1
- package/dist/es/es2018/types/src/generated/resources/getEinsteinPromptTemplates.d.ts +16 -0
- package/dist/es/es2018/types/src/generated/types/EinsteinPromptTemplateOutputRepresentation.d.ts +30 -0
- package/dist/es/es2018/types/src/generated/types/EinsteinPromptTemplateRepresentation.d.ts +34 -0
- package/package.json +4 -4
- package/sfdc/index.js +615 -276
- package/src/raml/api.raml +46 -0
- package/src/raml/luvio.raml +7 -0
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { AdapterConfigMetadata as $64$luvio_engine_AdapterConfigMetadata, Luvio as $64$luvio_engine_Luvio, NormalizedKeyMetadata as $64$luvio_engine_NormalizedKeyMetadata, Fragment as $64$luvio_engine_Fragment, Snapshot as $64$luvio_engine_Snapshot, FetchResponse as $64$luvio_engine_FetchResponse, ErrorResponse as $64$luvio_engine_ErrorResponse, DispatchResourceRequestContext as $64$luvio_engine_DispatchResourceRequestContext, CoercedAdapterRequestContext as $64$luvio_engine_CoercedAdapterRequestContext, StoreLookup as $64$luvio_engine_StoreLookup, AdapterFactory as $64$luvio_engine_AdapterFactory } from '@luvio/engine';
|
|
2
|
+
import { Untrusted as adapter$45$utils_Untrusted, AdapterValidationConfig as adapter$45$utils_AdapterValidationConfig } from './adapter-utils';
|
|
3
|
+
import { ResourceRequestConfig as resources_getEinsteinPromptTemplates_ResourceRequestConfig } from '../resources/getEinsteinPromptTemplates';
|
|
4
|
+
import { EinsteinPromptTemplateOutputRepresentation as types_EinsteinPromptTemplateOutputRepresentation_EinsteinPromptTemplateOutputRepresentation } from '../types/EinsteinPromptTemplateOutputRepresentation';
|
|
5
|
+
export declare const adapterName = "getPromptTemplates";
|
|
6
|
+
export declare const getPromptTemplates_ConfigPropertyMetadata: $64$luvio_engine_AdapterConfigMetadata[];
|
|
7
|
+
export declare const getPromptTemplates_ConfigPropertyNames: adapter$45$utils_AdapterValidationConfig;
|
|
8
|
+
export interface GetPromptTemplatesConfig {
|
|
9
|
+
objectName?: string;
|
|
10
|
+
promptType?: string;
|
|
11
|
+
}
|
|
12
|
+
export declare const createResourceParams: (config: GetPromptTemplatesConfig) => resources_getEinsteinPromptTemplates_ResourceRequestConfig;
|
|
13
|
+
export declare function keyBuilder(luvio: $64$luvio_engine_Luvio, config: GetPromptTemplatesConfig): string;
|
|
14
|
+
export declare function keyBuilder_StructuredKey(luvio: $64$luvio_engine_Luvio, config: GetPromptTemplatesConfig): $64$luvio_engine_NormalizedKeyMetadata;
|
|
15
|
+
export declare function typeCheckConfig(untrustedConfig: adapter$45$utils_Untrusted<GetPromptTemplatesConfig>): adapter$45$utils_Untrusted<GetPromptTemplatesConfig>;
|
|
16
|
+
export declare function validateAdapterConfig(untrustedConfig: unknown, configPropertyNames: adapter$45$utils_AdapterValidationConfig): GetPromptTemplatesConfig | null;
|
|
17
|
+
export declare function adapterFragment(luvio: $64$luvio_engine_Luvio, config: GetPromptTemplatesConfig): $64$luvio_engine_Fragment;
|
|
18
|
+
export declare function buildCachedSnapshot(luvio: $64$luvio_engine_Luvio, config: GetPromptTemplatesConfig): $64$luvio_engine_Snapshot<types_EinsteinPromptTemplateOutputRepresentation_EinsteinPromptTemplateOutputRepresentation, any>;
|
|
19
|
+
export declare function onFetchResponseSuccess(luvio: $64$luvio_engine_Luvio, config: GetPromptTemplatesConfig, resourceParams: resources_getEinsteinPromptTemplates_ResourceRequestConfig, response: $64$luvio_engine_FetchResponse<types_EinsteinPromptTemplateOutputRepresentation_EinsteinPromptTemplateOutputRepresentation>): Promise<import("@luvio/engine").FulfilledSnapshot<types_EinsteinPromptTemplateOutputRepresentation_EinsteinPromptTemplateOutputRepresentation, {}> | import("@luvio/engine").StaleSnapshot<types_EinsteinPromptTemplateOutputRepresentation_EinsteinPromptTemplateOutputRepresentation, {}> | import("@luvio/engine").PendingSnapshot<types_EinsteinPromptTemplateOutputRepresentation_EinsteinPromptTemplateOutputRepresentation, any>>;
|
|
20
|
+
export declare function onFetchResponseError(luvio: $64$luvio_engine_Luvio, config: GetPromptTemplatesConfig, resourceParams: resources_getEinsteinPromptTemplates_ResourceRequestConfig, response: $64$luvio_engine_ErrorResponse): Promise<import("@luvio/engine").ErrorSnapshot>;
|
|
21
|
+
export declare function buildNetworkSnapshot(luvio: $64$luvio_engine_Luvio, config: GetPromptTemplatesConfig, options?: $64$luvio_engine_DispatchResourceRequestContext): Promise<$64$luvio_engine_Snapshot<types_EinsteinPromptTemplateOutputRepresentation_EinsteinPromptTemplateOutputRepresentation, any>>;
|
|
22
|
+
export type BuildSnapshotContext = {
|
|
23
|
+
luvio: $64$luvio_engine_Luvio;
|
|
24
|
+
config: GetPromptTemplatesConfig;
|
|
25
|
+
};
|
|
26
|
+
export declare function buildNetworkSnapshotCachePolicy(context: BuildSnapshotContext, coercedAdapterRequestContext: $64$luvio_engine_CoercedAdapterRequestContext): Promise<$64$luvio_engine_Snapshot<types_EinsteinPromptTemplateOutputRepresentation_EinsteinPromptTemplateOutputRepresentation, any>>;
|
|
27
|
+
export declare function buildCachedSnapshotCachePolicy(context: BuildSnapshotContext, storeLookup: $64$luvio_engine_StoreLookup<types_EinsteinPromptTemplateOutputRepresentation_EinsteinPromptTemplateOutputRepresentation>): $64$luvio_engine_Snapshot<types_EinsteinPromptTemplateOutputRepresentation_EinsteinPromptTemplateOutputRepresentation, any>;
|
|
28
|
+
export declare const getPromptTemplatesAdapterFactory: $64$luvio_engine_AdapterFactory<GetPromptTemplatesConfig, types_EinsteinPromptTemplateOutputRepresentation_EinsteinPromptTemplateOutputRepresentation>;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
export { createEmbeddingsAdapterFactory } from '../adapters/createEmbeddings';
|
|
2
2
|
export { createFeedbackAdapterFactory } from '../adapters/createFeedback';
|
|
3
3
|
export { createGenerationsAdapterFactory } from '../adapters/createGenerations';
|
|
4
|
+
export { getPromptTemplatesAdapterFactory } from '../adapters/getPromptTemplates';
|
|
4
5
|
export { createGenerationsForPromptTemplateAdapterFactory } from '../adapters/createGenerationsForPromptTemplate';
|
|
@@ -2,5 +2,7 @@ declare let createEmbeddings: any;
|
|
|
2
2
|
declare let createFeedback: any;
|
|
3
3
|
declare let createGenerations: any;
|
|
4
4
|
declare let createGenerationsForPromptTemplate: any;
|
|
5
|
+
declare let getPromptTemplates: any;
|
|
5
6
|
declare let createEmbeddings_imperative: any;
|
|
6
|
-
|
|
7
|
+
declare let getPromptTemplates_imperative: any;
|
|
8
|
+
export { createEmbeddings, createFeedback, createGenerations, createGenerationsForPromptTemplate, getPromptTemplates, createEmbeddings_imperative, getPromptTemplates_imperative, };
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { Luvio as $64$luvio_engine_Luvio, Fragment as $64$luvio_engine_Fragment, NormalizedKeyMetadata as $64$luvio_engine_NormalizedKeyMetadata, FetchResponse as $64$luvio_engine_FetchResponse, SnapshotRefresh as $64$luvio_engine_SnapshotRefresh, FulfilledSnapshot as $64$luvio_engine_FulfilledSnapshot, StaleSnapshot as $64$luvio_engine_StaleSnapshot, PendingSnapshot as $64$luvio_engine_PendingSnapshot, ErrorResponse as $64$luvio_engine_ErrorResponse, ErrorSnapshot as $64$luvio_engine_ErrorSnapshot, ResourceRequest as $64$luvio_engine_ResourceRequest } from '@luvio/engine';
|
|
2
|
+
import { EinsteinPromptTemplateOutputRepresentation as types_EinsteinPromptTemplateOutputRepresentation_EinsteinPromptTemplateOutputRepresentation } from '../types/EinsteinPromptTemplateOutputRepresentation';
|
|
3
|
+
export interface ResourceRequestConfig {
|
|
4
|
+
queryParams: {
|
|
5
|
+
objectName?: string;
|
|
6
|
+
promptType?: string;
|
|
7
|
+
};
|
|
8
|
+
}
|
|
9
|
+
export declare function select(luvio: $64$luvio_engine_Luvio, params: ResourceRequestConfig): $64$luvio_engine_Fragment;
|
|
10
|
+
export declare function keyBuilder(luvio: $64$luvio_engine_Luvio, params: ResourceRequestConfig): string;
|
|
11
|
+
export declare function keyBuilder_StructuredKey(luvio: $64$luvio_engine_Luvio, params: ResourceRequestConfig): $64$luvio_engine_NormalizedKeyMetadata;
|
|
12
|
+
export declare function getResponseCacheKeys(storeKeyMap: any, luvio: $64$luvio_engine_Luvio, resourceParams: ResourceRequestConfig, response: types_EinsteinPromptTemplateOutputRepresentation_EinsteinPromptTemplateOutputRepresentation): void;
|
|
13
|
+
export declare function ingestSuccess(luvio: $64$luvio_engine_Luvio, resourceParams: ResourceRequestConfig, response: $64$luvio_engine_FetchResponse<types_EinsteinPromptTemplateOutputRepresentation_EinsteinPromptTemplateOutputRepresentation>, snapshotRefresh?: $64$luvio_engine_SnapshotRefresh<types_EinsteinPromptTemplateOutputRepresentation_EinsteinPromptTemplateOutputRepresentation>): $64$luvio_engine_FulfilledSnapshot<types_EinsteinPromptTemplateOutputRepresentation_EinsteinPromptTemplateOutputRepresentation, {}> | $64$luvio_engine_StaleSnapshot<types_EinsteinPromptTemplateOutputRepresentation_EinsteinPromptTemplateOutputRepresentation, {}> | $64$luvio_engine_PendingSnapshot<types_EinsteinPromptTemplateOutputRepresentation_EinsteinPromptTemplateOutputRepresentation, any>;
|
|
14
|
+
export declare function ingestError(luvio: $64$luvio_engine_Luvio, params: ResourceRequestConfig, error: $64$luvio_engine_ErrorResponse, snapshotRefresh?: $64$luvio_engine_SnapshotRefresh<types_EinsteinPromptTemplateOutputRepresentation_EinsteinPromptTemplateOutputRepresentation>): $64$luvio_engine_ErrorSnapshot;
|
|
15
|
+
export declare function createResourceRequest(config: ResourceRequestConfig): $64$luvio_engine_ResourceRequest;
|
|
16
|
+
export default createResourceRequest;
|
package/dist/es/es2018/types/src/generated/types/EinsteinPromptTemplateOutputRepresentation.d.ts
ADDED
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { EinsteinPromptTemplateRepresentation as EinsteinPromptTemplateRepresentation_EinsteinPromptTemplateRepresentation } from './EinsteinPromptTemplateRepresentation';
|
|
2
|
+
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';
|
|
3
|
+
export declare const TTL = 100;
|
|
4
|
+
export declare const VERSION = "74ddb28bbbb6ed1fc91167ffb7d4c2ed";
|
|
5
|
+
export declare function validate(obj: any, path?: string): TypeError | null;
|
|
6
|
+
export declare const RepresentationType: string;
|
|
7
|
+
export declare function normalize(input: EinsteinPromptTemplateOutputRepresentation, existing: EinsteinPromptTemplateOutputRepresentationNormalized, path: $64$luvio_engine_IngestPath, luvio: $64$luvio_engine_Luvio, store: $64$luvio_engine_Store, timestamp: number): EinsteinPromptTemplateOutputRepresentationNormalized;
|
|
8
|
+
export declare const select: () => $64$luvio_engine_FragmentSelection;
|
|
9
|
+
export declare function equals(existing: EinsteinPromptTemplateOutputRepresentationNormalized, incoming: EinsteinPromptTemplateOutputRepresentationNormalized): boolean;
|
|
10
|
+
export declare const ingest: $64$luvio_engine_ResourceIngest;
|
|
11
|
+
export declare function getTypeCacheKeys(rootKeySet: $64$luvio_engine_DurableStoreKeyMetadataMap, luvio: $64$luvio_engine_Luvio, input: EinsteinPromptTemplateOutputRepresentation, fullPathFactory: () => string | $64$luvio_engine_NormalizedKeyMetadata): void;
|
|
12
|
+
/**
|
|
13
|
+
* Output of the PromptTemplate request
|
|
14
|
+
*
|
|
15
|
+
* Keys:
|
|
16
|
+
* (none)
|
|
17
|
+
*/
|
|
18
|
+
export interface EinsteinPromptTemplateOutputRepresentationNormalized {
|
|
19
|
+
/** List of prompt templates that are available for selection. */
|
|
20
|
+
promptTemplates?: Array<EinsteinPromptTemplateRepresentation_EinsteinPromptTemplateRepresentation>;
|
|
21
|
+
}
|
|
22
|
+
/**
|
|
23
|
+
* Output of the PromptTemplate request
|
|
24
|
+
*
|
|
25
|
+
* Keys:
|
|
26
|
+
* (none)
|
|
27
|
+
*/
|
|
28
|
+
export interface EinsteinPromptTemplateOutputRepresentation {
|
|
29
|
+
promptTemplates?: Array<EinsteinPromptTemplateRepresentation_EinsteinPromptTemplateRepresentation>;
|
|
30
|
+
}
|
|
@@ -0,0 +1,34 @@
|
|
|
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 = "dae416517e0a664e0253f2c108824225";
|
|
3
|
+
export declare function validate(obj: any, path?: string): TypeError | null;
|
|
4
|
+
export declare const RepresentationType: string;
|
|
5
|
+
export declare function normalize(input: EinsteinPromptTemplateRepresentation, existing: EinsteinPromptTemplateRepresentationNormalized, path: $64$luvio_engine_IngestPath, luvio: $64$luvio_engine_Luvio, store: $64$luvio_engine_Store, timestamp: number): EinsteinPromptTemplateRepresentationNormalized;
|
|
6
|
+
export declare const select: () => $64$luvio_engine_FragmentSelection;
|
|
7
|
+
export declare function equals(existing: EinsteinPromptTemplateRepresentationNormalized, incoming: EinsteinPromptTemplateRepresentationNormalized): boolean;
|
|
8
|
+
export declare const ingest: $64$luvio_engine_ResourceIngest;
|
|
9
|
+
export declare function getTypeCacheKeys(rootKeySet: $64$luvio_engine_DurableStoreKeyMetadataMap, luvio: $64$luvio_engine_Luvio, input: EinsteinPromptTemplateRepresentation, fullPathFactory: () => string | $64$luvio_engine_NormalizedKeyMetadata): void;
|
|
10
|
+
/**
|
|
11
|
+
* Representation of a single Prompt Template
|
|
12
|
+
*
|
|
13
|
+
* Keys:
|
|
14
|
+
* (none)
|
|
15
|
+
*/
|
|
16
|
+
export interface EinsteinPromptTemplateRepresentationNormalized {
|
|
17
|
+
/** The ID of the prompt template */
|
|
18
|
+
id?: string;
|
|
19
|
+
/** The master label of the prompt template */
|
|
20
|
+
label?: string;
|
|
21
|
+
/** The API name of the prompt template */
|
|
22
|
+
name?: string;
|
|
23
|
+
}
|
|
24
|
+
/**
|
|
25
|
+
* Representation of a single Prompt Template
|
|
26
|
+
*
|
|
27
|
+
* Keys:
|
|
28
|
+
* (none)
|
|
29
|
+
*/
|
|
30
|
+
export interface EinsteinPromptTemplateRepresentation {
|
|
31
|
+
id?: string;
|
|
32
|
+
label?: string;
|
|
33
|
+
name?: string;
|
|
34
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@salesforce/lds-adapters-service-einsteinllm",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.299.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.299.0"
|
|
48
48
|
},
|
|
49
49
|
"devDependencies": {
|
|
50
|
-
"@salesforce/lds-compiler-plugins": "^1.
|
|
51
|
-
"@salesforce/lds-karma": "^1.
|
|
50
|
+
"@salesforce/lds-compiler-plugins": "^1.299.0",
|
|
51
|
+
"@salesforce/lds-karma": "^1.299.0"
|
|
52
52
|
},
|
|
53
53
|
"nx": {
|
|
54
54
|
"targets": {
|