@salesforce/lds-adapters-sfap-einstein-ai-gateway 1.250.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/LICENSE.txt +82 -0
- package/dist/es/es2018/sfap-einstein-ai-gateway.js +1023 -0
- package/dist/es/es2018/types/src/generated/adapters/adapter-utils.d.ts +62 -0
- package/dist/es/es2018/types/src/generated/adapters/getGenerations.d.ts +39 -0
- package/dist/es/es2018/types/src/generated/adapters/registerFeedback.d.ts +21 -0
- package/dist/es/es2018/types/src/generated/artifacts/main.d.ts +2 -0
- package/dist/es/es2018/types/src/generated/artifacts/sfdc.d.ts +4 -0
- package/dist/es/es2018/types/src/generated/resources/postAiGptV1Feedback.d.ts +20 -0
- package/dist/es/es2018/types/src/generated/resources/postAiGptV1Generations.d.ts +29 -0
- package/dist/es/es2018/types/src/generated/types/ChatMessage.d.ts +43 -0
- package/dist/es/es2018/types/src/generated/types/ConversationalMemorySettings.d.ts +31 -0
- package/dist/es/es2018/types/src/generated/types/Error.d.ts +28 -0
- package/dist/es/es2018/types/src/generated/types/FeedbackErrorRepresentation.d.ts +28 -0
- package/dist/es/es2018/types/src/generated/types/FeedbackRequest.d.ts +43 -0
- package/dist/es/es2018/types/src/generated/types/FeedbackResponse202Representation.d.ts +28 -0
- package/dist/es/es2018/types/src/generated/types/FeedbackResponseRepresentation.d.ts +38 -0
- package/dist/es/es2018/types/src/generated/types/GenerationDetails.d.ts +32 -0
- package/dist/es/es2018/types/src/generated/types/GenerationRequest.d.ts +58 -0
- package/dist/es/es2018/types/src/generated/types/GenerationResponse.d.ts +38 -0
- package/dist/es/es2018/types/src/generated/types/GenerationResponseGenerations.d.ts +37 -0
- package/dist/es/es2018/types/src/generated/types/GenerationSettings.d.ts +46 -0
- package/dist/es/es2018/types/src/generated/types/GenerationsErrorRepresentation.d.ts +28 -0
- package/dist/es/es2018/types/src/generated/types/HyperLink.d.ts +28 -0
- package/dist/es/es2018/types/src/generated/types/LLMProviderDetails.d.ts +43 -0
- package/dist/es/es2018/types/src/generated/types/LLMProviderResponse.d.ts +31 -0
- package/dist/es/es2018/types/src/generated/types/Links.d.ts +32 -0
- package/dist/es/es2018/types/src/generated/types/ModelResponse.d.ts +31 -0
- package/dist/es/es2018/types/src/generated/types/PluginGenerationRequest.d.ts +25 -0
- package/dist/es/es2018/types/src/generated/types/PluginGenerationResponse.d.ts +25 -0
- package/dist/es/es2018/types/src/generated/types/SafetyCategoryScores.d.ts +39 -0
- package/dist/es/es2018/types/src/generated/types/SafetyScoreRepresentation.d.ts +31 -0
- package/dist/es/es2018/types/src/generated/types/type-utils.d.ts +32 -0
- package/package.json +66 -0
- package/sfdc/index.d.ts +1 -0
- package/sfdc/index.js +1062 -0
- package/src/raml/api.raml +717 -0
- package/src/raml/luvio.raml +27 -0
|
@@ -0,0 +1,46 @@
|
|
|
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 = "e21119e091aa6d42b4db9c7084ef4581";
|
|
3
|
+
export declare function validate(obj: any, path?: string): TypeError | null;
|
|
4
|
+
export declare const RepresentationType: string;
|
|
5
|
+
export declare function normalize(input: GenerationSettings, existing: GenerationSettingsNormalized, path: $64$luvio_engine_IngestPath, luvio: $64$luvio_engine_Luvio, store: $64$luvio_engine_Store, timestamp: number): GenerationSettingsNormalized;
|
|
6
|
+
export declare const select: () => $64$luvio_engine_FragmentSelection;
|
|
7
|
+
export declare function equals(existing: GenerationSettingsNormalized, incoming: GenerationSettingsNormalized): 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: GenerationSettings, fullPathFactory: () => string | $64$luvio_engine_NormalizedKeyMetadata): void;
|
|
10
|
+
/**
|
|
11
|
+
* Settings that can be configured for a generation.
|
|
12
|
+
*
|
|
13
|
+
* Keys:
|
|
14
|
+
* (none)
|
|
15
|
+
*/
|
|
16
|
+
export interface GenerationSettingsNormalized {
|
|
17
|
+
/** The frequency penalty to be used. Min value is 0.0; max value is 1.0. Can reduce the repetitiveness of generated tokens. The higher the value, the stronger a penalty is applied to previously present tokens, proportional to how many times they have already appeared in the prompt or prior generation. */
|
|
18
|
+
frequency_penalty?: number;
|
|
19
|
+
/** Maximum number of tokens to be generated. */
|
|
20
|
+
max_tokens?: number;
|
|
21
|
+
/** Number of completions to be generated for a prompt. */
|
|
22
|
+
num_generations?: number;
|
|
23
|
+
/** Dictionary of any other parameters that are required by the specified provider. Values are passed as is to the provider so that the request can include parameters that are unique to a provider. */
|
|
24
|
+
parameters?: {};
|
|
25
|
+
/** The presence penalty to be used. Min value is 0.0; max value is 1.0. Can reduce the repetitiveness of generated tokens. Behaves similarly to `frequency_penalty`, except that this penalty is applied equally to all tokens that have already appeared, regardless of their exact frequencies. */
|
|
26
|
+
presence_penalty?: number;
|
|
27
|
+
/** An array of stop sequences to be used. The generated text is cut at the end of the earliest occurrence of a stop sequence. */
|
|
28
|
+
stop_sequences?: Array<string>;
|
|
29
|
+
/** Sampling temperature to be used. Higher values mean more random token choices. Lower values mean less random token choices. Min value of 0; max value of 1.0. */
|
|
30
|
+
temperature?: number;
|
|
31
|
+
}
|
|
32
|
+
/**
|
|
33
|
+
* Settings that can be configured for a generation.
|
|
34
|
+
*
|
|
35
|
+
* Keys:
|
|
36
|
+
* (none)
|
|
37
|
+
*/
|
|
38
|
+
export interface GenerationSettings {
|
|
39
|
+
frequency_penalty?: number;
|
|
40
|
+
max_tokens?: number;
|
|
41
|
+
num_generations?: number;
|
|
42
|
+
parameters?: {};
|
|
43
|
+
presence_penalty?: number;
|
|
44
|
+
stop_sequences?: Array<string>;
|
|
45
|
+
temperature?: number;
|
|
46
|
+
}
|
|
@@ -0,0 +1,28 @@
|
|
|
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 = "d01776f996fe394bf0ea0ded2f10b594";
|
|
3
|
+
export declare function validate(obj: any, path?: string): TypeError | null;
|
|
4
|
+
export declare const RepresentationType: string;
|
|
5
|
+
export declare function normalize(input: GenerationsErrorRepresentation, existing: GenerationsErrorRepresentationNormalized, path: $64$luvio_engine_IngestPath, luvio: $64$luvio_engine_Luvio, store: $64$luvio_engine_Store, timestamp: number): GenerationsErrorRepresentationNormalized;
|
|
6
|
+
export declare const select: () => $64$luvio_engine_FragmentSelection;
|
|
7
|
+
export declare function equals(existing: GenerationsErrorRepresentationNormalized, incoming: GenerationsErrorRepresentationNormalized): 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: GenerationsErrorRepresentation, fullPathFactory: () => string | $64$luvio_engine_NormalizedKeyMetadata): void;
|
|
10
|
+
/**
|
|
11
|
+
* Error response representation
|
|
12
|
+
*
|
|
13
|
+
* Keys:
|
|
14
|
+
* (none)
|
|
15
|
+
*/
|
|
16
|
+
export interface GenerationsErrorRepresentationNormalized {
|
|
17
|
+
/** Exception error message */
|
|
18
|
+
message: string;
|
|
19
|
+
}
|
|
20
|
+
/**
|
|
21
|
+
* Error response representation
|
|
22
|
+
*
|
|
23
|
+
* Keys:
|
|
24
|
+
* (none)
|
|
25
|
+
*/
|
|
26
|
+
export interface GenerationsErrorRepresentation {
|
|
27
|
+
message: string;
|
|
28
|
+
}
|
|
@@ -0,0 +1,28 @@
|
|
|
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 = "f783b46ba9d013a0f241850ca4fe7b85";
|
|
3
|
+
export declare function validate(obj: any, path?: string): TypeError | null;
|
|
4
|
+
export declare const RepresentationType: string;
|
|
5
|
+
export declare function normalize(input: HyperLink, existing: HyperLinkNormalized, path: $64$luvio_engine_IngestPath, luvio: $64$luvio_engine_Luvio, store: $64$luvio_engine_Store, timestamp: number): HyperLinkNormalized;
|
|
6
|
+
export declare const select: () => $64$luvio_engine_FragmentSelection;
|
|
7
|
+
export declare function equals(existing: HyperLinkNormalized, incoming: HyperLinkNormalized): 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: HyperLink, fullPathFactory: () => string | $64$luvio_engine_NormalizedKeyMetadata): void;
|
|
10
|
+
/**
|
|
11
|
+
* Hyperlink object included in the Links schema.
|
|
12
|
+
*
|
|
13
|
+
* Keys:
|
|
14
|
+
* (none)
|
|
15
|
+
*/
|
|
16
|
+
export interface HyperLinkNormalized {
|
|
17
|
+
/** Link to the endpoint. */
|
|
18
|
+
href?: string;
|
|
19
|
+
}
|
|
20
|
+
/**
|
|
21
|
+
* Hyperlink object included in the Links schema.
|
|
22
|
+
*
|
|
23
|
+
* Keys:
|
|
24
|
+
* (none)
|
|
25
|
+
*/
|
|
26
|
+
export interface HyperLink {
|
|
27
|
+
href?: string;
|
|
28
|
+
}
|
|
@@ -0,0 +1,43 @@
|
|
|
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 = "e05aa7da8ede76f58255c678c598f404";
|
|
3
|
+
export declare function validate(obj: any, path?: string): TypeError | null;
|
|
4
|
+
export declare const RepresentationType: string;
|
|
5
|
+
export declare function normalize(input: LLMProviderDetails, existing: LLMProviderDetailsNormalized, path: $64$luvio_engine_IngestPath, luvio: $64$luvio_engine_Luvio, store: $64$luvio_engine_Store, timestamp: number): LLMProviderDetailsNormalized;
|
|
6
|
+
export declare const select: () => $64$luvio_engine_FragmentSelection;
|
|
7
|
+
export declare function equals(existing: LLMProviderDetailsNormalized, incoming: LLMProviderDetailsNormalized): 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: LLMProviderDetails, fullPathFactory: () => string | $64$luvio_engine_NormalizedKeyMetadata): void;
|
|
10
|
+
/**
|
|
11
|
+
* Dictionary of properties for the provider.
|
|
12
|
+
*
|
|
13
|
+
* Keys:
|
|
14
|
+
* (none)
|
|
15
|
+
*/
|
|
16
|
+
export interface LLMProviderDetailsNormalized {
|
|
17
|
+
/** The maximum number of tokens allowed by the provider. */
|
|
18
|
+
max_tokens: number;
|
|
19
|
+
/** Short description of the provider. */
|
|
20
|
+
provider_description: string;
|
|
21
|
+
/** Type of LLM provider (internal or external). */
|
|
22
|
+
provider_type: string;
|
|
23
|
+
/** Indicates whether the provider supports the `embeddings` operation. */
|
|
24
|
+
supports_embeddings: boolean;
|
|
25
|
+
/** Indicates whether the provider supports the `generate` operation. */
|
|
26
|
+
supports_generate: boolean;
|
|
27
|
+
/** Indicates whether the provider supports the `models` operation. */
|
|
28
|
+
supports_models: boolean;
|
|
29
|
+
}
|
|
30
|
+
/**
|
|
31
|
+
* Dictionary of properties for the provider.
|
|
32
|
+
*
|
|
33
|
+
* Keys:
|
|
34
|
+
* (none)
|
|
35
|
+
*/
|
|
36
|
+
export interface LLMProviderDetails {
|
|
37
|
+
max_tokens: number;
|
|
38
|
+
provider_description: string;
|
|
39
|
+
provider_type: string;
|
|
40
|
+
supports_embeddings: boolean;
|
|
41
|
+
supports_generate: boolean;
|
|
42
|
+
supports_models: boolean;
|
|
43
|
+
}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { LLMProviderDetails as LLMProviderDetails_LLMProviderDetails } from './LLMProviderDetails';
|
|
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 VERSION = "b8ed81e14b7f803cfecc475c9c84686d";
|
|
4
|
+
export declare function validate(obj: any, path?: string): TypeError | null;
|
|
5
|
+
export declare const RepresentationType: string;
|
|
6
|
+
export declare function normalize(input: LLMProviderResponse, existing: LLMProviderResponseNormalized, path: $64$luvio_engine_IngestPath, luvio: $64$luvio_engine_Luvio, store: $64$luvio_engine_Store, timestamp: number): LLMProviderResponseNormalized;
|
|
7
|
+
export declare const select: () => $64$luvio_engine_FragmentSelection;
|
|
8
|
+
export declare function equals(existing: LLMProviderResponseNormalized, incoming: LLMProviderResponseNormalized): boolean;
|
|
9
|
+
export declare const ingest: $64$luvio_engine_ResourceIngest;
|
|
10
|
+
export declare function getTypeCacheKeys(rootKeySet: $64$luvio_engine_DurableStoreKeyMetadataMap, luvio: $64$luvio_engine_Luvio, input: LLMProviderResponse, fullPathFactory: () => string | $64$luvio_engine_NormalizedKeyMetadata): void;
|
|
11
|
+
/**
|
|
12
|
+
* LLM provider properties.
|
|
13
|
+
*
|
|
14
|
+
* Keys:
|
|
15
|
+
* (none)
|
|
16
|
+
*/
|
|
17
|
+
export interface LLMProviderResponseNormalized {
|
|
18
|
+
details?: LLMProviderDetails_LLMProviderDetails;
|
|
19
|
+
/** Name of the provider. */
|
|
20
|
+
name: string;
|
|
21
|
+
}
|
|
22
|
+
/**
|
|
23
|
+
* LLM provider properties.
|
|
24
|
+
*
|
|
25
|
+
* Keys:
|
|
26
|
+
* (none)
|
|
27
|
+
*/
|
|
28
|
+
export interface LLMProviderResponse {
|
|
29
|
+
details?: LLMProviderDetails_LLMProviderDetails;
|
|
30
|
+
name: string;
|
|
31
|
+
}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { HyperLink as HyperLink_HyperLink } from './HyperLink';
|
|
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 VERSION = "d3c08cec82021ea675d1eabe93063466";
|
|
4
|
+
export declare function validate(obj: any, path?: string): TypeError | null;
|
|
5
|
+
export declare const RepresentationType: string;
|
|
6
|
+
export declare function normalize(input: Links, existing: LinksNormalized, path: $64$luvio_engine_IngestPath, luvio: $64$luvio_engine_Luvio, store: $64$luvio_engine_Store, timestamp: number): LinksNormalized;
|
|
7
|
+
export declare const select: () => $64$luvio_engine_FragmentSelection;
|
|
8
|
+
export declare function equals(existing: LinksNormalized, incoming: LinksNormalized): boolean;
|
|
9
|
+
export declare const ingest: $64$luvio_engine_ResourceIngest;
|
|
10
|
+
export declare function getTypeCacheKeys(rootKeySet: $64$luvio_engine_DurableStoreKeyMetadataMap, luvio: $64$luvio_engine_Luvio, input: Links, fullPathFactory: () => string | $64$luvio_engine_NormalizedKeyMetadata): void;
|
|
11
|
+
/**
|
|
12
|
+
* List of Einstein GPT API endpoints for HATEOAS compliance.
|
|
13
|
+
*
|
|
14
|
+
* Keys:
|
|
15
|
+
* (none)
|
|
16
|
+
*/
|
|
17
|
+
export interface LinksNormalized {
|
|
18
|
+
messages?: HyperLink_HyperLink;
|
|
19
|
+
self: HyperLink_HyperLink;
|
|
20
|
+
session?: HyperLink_HyperLink;
|
|
21
|
+
}
|
|
22
|
+
/**
|
|
23
|
+
* List of Einstein GPT API endpoints for HATEOAS compliance.
|
|
24
|
+
*
|
|
25
|
+
* Keys:
|
|
26
|
+
* (none)
|
|
27
|
+
*/
|
|
28
|
+
export interface Links {
|
|
29
|
+
messages?: HyperLink_HyperLink;
|
|
30
|
+
self: HyperLink_HyperLink;
|
|
31
|
+
session?: HyperLink_HyperLink;
|
|
32
|
+
}
|
|
@@ -0,0 +1,31 @@
|
|
|
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 = "c77b2dc4c2f24102c608c88c493bb5d9";
|
|
3
|
+
export declare function validate(obj: any, path?: string): TypeError | null;
|
|
4
|
+
export declare const RepresentationType: string;
|
|
5
|
+
export declare function normalize(input: ModelResponse, existing: ModelResponseNormalized, path: $64$luvio_engine_IngestPath, luvio: $64$luvio_engine_Luvio, store: $64$luvio_engine_Store, timestamp: number): ModelResponseNormalized;
|
|
6
|
+
export declare const select: () => $64$luvio_engine_FragmentSelection;
|
|
7
|
+
export declare function equals(existing: ModelResponseNormalized, incoming: ModelResponseNormalized): 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: ModelResponse, fullPathFactory: () => string | $64$luvio_engine_NormalizedKeyMetadata): void;
|
|
10
|
+
/**
|
|
11
|
+
* Model properties.
|
|
12
|
+
*
|
|
13
|
+
* Keys:
|
|
14
|
+
* (none)
|
|
15
|
+
*/
|
|
16
|
+
export interface ModelResponseNormalized {
|
|
17
|
+
/** ID of the model. */
|
|
18
|
+
id: string;
|
|
19
|
+
/** Dictionary of properties for the model. Values are specific to each provider. */
|
|
20
|
+
properties?: {};
|
|
21
|
+
}
|
|
22
|
+
/**
|
|
23
|
+
* Model properties.
|
|
24
|
+
*
|
|
25
|
+
* Keys:
|
|
26
|
+
* (none)
|
|
27
|
+
*/
|
|
28
|
+
export interface ModelResponse {
|
|
29
|
+
id: string;
|
|
30
|
+
properties?: {};
|
|
31
|
+
}
|
|
@@ -0,0 +1,25 @@
|
|
|
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 = "1bd09a85f09dd6e48175ea08a7a8dfd0";
|
|
3
|
+
export declare function validate(obj: any, path?: string): TypeError | null;
|
|
4
|
+
export declare const RepresentationType: string;
|
|
5
|
+
export declare function normalize(input: PluginGenerationRequest, existing: PluginGenerationRequestNormalized, path: $64$luvio_engine_IngestPath, luvio: $64$luvio_engine_Luvio, store: $64$luvio_engine_Store, timestamp: number): PluginGenerationRequestNormalized;
|
|
6
|
+
export declare const select: () => $64$luvio_engine_FragmentSelection;
|
|
7
|
+
export declare function equals(existing: PluginGenerationRequestNormalized, incoming: PluginGenerationRequestNormalized): 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: PluginGenerationRequest, fullPathFactory: () => string | $64$luvio_engine_NormalizedKeyMetadata): void;
|
|
10
|
+
/**
|
|
11
|
+
* Generic plug-in generation request
|
|
12
|
+
*
|
|
13
|
+
* Keys:
|
|
14
|
+
* (none)
|
|
15
|
+
*/
|
|
16
|
+
export interface PluginGenerationRequestNormalized {
|
|
17
|
+
}
|
|
18
|
+
/**
|
|
19
|
+
* Generic plug-in generation request
|
|
20
|
+
*
|
|
21
|
+
* Keys:
|
|
22
|
+
* (none)
|
|
23
|
+
*/
|
|
24
|
+
export interface PluginGenerationRequest {
|
|
25
|
+
}
|
|
@@ -0,0 +1,25 @@
|
|
|
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 = "f072ea503f00517d5957ed529d54c87e";
|
|
3
|
+
export declare function validate(obj: any, path?: string): TypeError | null;
|
|
4
|
+
export declare const RepresentationType: string;
|
|
5
|
+
export declare function normalize(input: PluginGenerationResponse, existing: PluginGenerationResponseNormalized, path: $64$luvio_engine_IngestPath, luvio: $64$luvio_engine_Luvio, store: $64$luvio_engine_Store, timestamp: number): PluginGenerationResponseNormalized;
|
|
6
|
+
export declare const select: () => $64$luvio_engine_FragmentSelection;
|
|
7
|
+
export declare function equals(existing: PluginGenerationResponseNormalized, incoming: PluginGenerationResponseNormalized): 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: PluginGenerationResponse, fullPathFactory: () => string | $64$luvio_engine_NormalizedKeyMetadata): void;
|
|
10
|
+
/**
|
|
11
|
+
* Generic plug-in generation response
|
|
12
|
+
*
|
|
13
|
+
* Keys:
|
|
14
|
+
* (none)
|
|
15
|
+
*/
|
|
16
|
+
export interface PluginGenerationResponseNormalized {
|
|
17
|
+
}
|
|
18
|
+
/**
|
|
19
|
+
* Generic plug-in generation response
|
|
20
|
+
*
|
|
21
|
+
* Keys:
|
|
22
|
+
* (none)
|
|
23
|
+
*/
|
|
24
|
+
export interface PluginGenerationResponse {
|
|
25
|
+
}
|
|
@@ -0,0 +1,39 @@
|
|
|
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 = "647dd4ada228e1c62a79f1cdb4e44377";
|
|
3
|
+
export declare function validate(obj: any, path?: string): TypeError | null;
|
|
4
|
+
export declare const RepresentationType: string;
|
|
5
|
+
export declare function normalize(input: SafetyCategoryScores, existing: SafetyCategoryScoresNormalized, path: $64$luvio_engine_IngestPath, luvio: $64$luvio_engine_Luvio, store: $64$luvio_engine_Store, timestamp: number): SafetyCategoryScoresNormalized;
|
|
6
|
+
export declare const select: () => $64$luvio_engine_FragmentSelection;
|
|
7
|
+
export declare function equals(existing: SafetyCategoryScoresNormalized, incoming: SafetyCategoryScoresNormalized): 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: SafetyCategoryScores, fullPathFactory: () => string | $64$luvio_engine_NormalizedKeyMetadata): void;
|
|
10
|
+
/**
|
|
11
|
+
* Probability for each category. A higher probability indicates a more toxic content.
|
|
12
|
+
*
|
|
13
|
+
* Keys:
|
|
14
|
+
* (none)
|
|
15
|
+
*/
|
|
16
|
+
export interface SafetyCategoryScoresNormalized {
|
|
17
|
+
hate?: number;
|
|
18
|
+
identity?: number;
|
|
19
|
+
physical?: number;
|
|
20
|
+
profanity?: number;
|
|
21
|
+
sexual?: number;
|
|
22
|
+
toxicity?: number;
|
|
23
|
+
violence?: number;
|
|
24
|
+
}
|
|
25
|
+
/**
|
|
26
|
+
* Probability for each category. A higher probability indicates a more toxic content.
|
|
27
|
+
*
|
|
28
|
+
* Keys:
|
|
29
|
+
* (none)
|
|
30
|
+
*/
|
|
31
|
+
export interface SafetyCategoryScores {
|
|
32
|
+
hate?: number;
|
|
33
|
+
identity?: number;
|
|
34
|
+
physical?: number;
|
|
35
|
+
profanity?: number;
|
|
36
|
+
sexual?: number;
|
|
37
|
+
toxicity?: number;
|
|
38
|
+
violence?: number;
|
|
39
|
+
}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { SafetyCategoryScores as SafetyCategoryScores_SafetyCategoryScores } from './SafetyCategoryScores';
|
|
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 VERSION = "16253d7587aa43b19fae0671874a0667";
|
|
4
|
+
export declare function validate(obj: any, path?: string): TypeError | null;
|
|
5
|
+
export declare const RepresentationType: string;
|
|
6
|
+
export declare function normalize(input: SafetyScoreRepresentation, existing: SafetyScoreRepresentationNormalized, path: $64$luvio_engine_IngestPath, luvio: $64$luvio_engine_Luvio, store: $64$luvio_engine_Store, timestamp: number): SafetyScoreRepresentationNormalized;
|
|
7
|
+
export declare const select: () => $64$luvio_engine_FragmentSelection;
|
|
8
|
+
export declare function equals(existing: SafetyScoreRepresentationNormalized, incoming: SafetyScoreRepresentationNormalized): boolean;
|
|
9
|
+
export declare const ingest: $64$luvio_engine_ResourceIngest;
|
|
10
|
+
export declare function getTypeCacheKeys(rootKeySet: $64$luvio_engine_DurableStoreKeyMetadataMap, luvio: $64$luvio_engine_Luvio, input: SafetyScoreRepresentation, fullPathFactory: () => string | $64$luvio_engine_NormalizedKeyMetadata): void;
|
|
11
|
+
/**
|
|
12
|
+
* Overall score and category score
|
|
13
|
+
*
|
|
14
|
+
* Keys:
|
|
15
|
+
* (none)
|
|
16
|
+
*/
|
|
17
|
+
export interface SafetyScoreRepresentationNormalized {
|
|
18
|
+
category_scores?: SafetyCategoryScores_SafetyCategoryScores;
|
|
19
|
+
/** A higher score implies safer content */
|
|
20
|
+
safety_score?: number;
|
|
21
|
+
}
|
|
22
|
+
/**
|
|
23
|
+
* Overall score and category score
|
|
24
|
+
*
|
|
25
|
+
* Keys:
|
|
26
|
+
* (none)
|
|
27
|
+
*/
|
|
28
|
+
export interface SafetyScoreRepresentation {
|
|
29
|
+
category_scores?: SafetyCategoryScores_SafetyCategoryScores;
|
|
30
|
+
safety_score?: number;
|
|
31
|
+
}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { NormalizedKeyMetadata as $64$luvio_engine_NormalizedKeyMetadata } from '@luvio/engine';
|
|
2
|
+
export declare const ObjectKeys: {
|
|
3
|
+
(o: object): string[];
|
|
4
|
+
(o: {}): string[];
|
|
5
|
+
}, ObjectCreate: {
|
|
6
|
+
(o: object | null): any;
|
|
7
|
+
(o: object | null, properties: PropertyDescriptorMap & ThisType<any>): any;
|
|
8
|
+
}, ObjectAssign: {
|
|
9
|
+
<T extends {}, U>(target: T, source: U): T & U;
|
|
10
|
+
<T_1 extends {}, U_1, V>(target: T_1, source1: U_1, source2: V): T_1 & U_1 & V;
|
|
11
|
+
<T_2 extends {}, U_2, V_1, W>(target: T_2, source1: U_2, source2: V_1, source3: W): T_2 & U_2 & V_1 & W;
|
|
12
|
+
(target: object, ...sources: any[]): any;
|
|
13
|
+
};
|
|
14
|
+
export declare const ArrayIsArray: (arg: any) => arg is any[];
|
|
15
|
+
export declare const JSONStringify: {
|
|
16
|
+
(value: any, replacer?: ((this: any, key: string, value: any) => any) | undefined, space?: string | number | undefined): string;
|
|
17
|
+
(value: any, replacer?: (string | number)[] | null | undefined, space?: string | number | undefined): string;
|
|
18
|
+
};
|
|
19
|
+
type AllowedPrimitives = boolean | string | number | Date | null;
|
|
20
|
+
type Value<T> = T extends AllowedPrimitives ? T : RecursivePartial<T>;
|
|
21
|
+
export type RecursivePartial<T> = null | {
|
|
22
|
+
[P in keyof T]?: T[P] extends Array<infer U> ? Array<Value<U>> | null : Value<T[P]> | null;
|
|
23
|
+
};
|
|
24
|
+
export declare function equalsArray<U, V extends U[]>(a: V, b: V, equalsItem: (itemA: U, itemB: U) => boolean | void): boolean;
|
|
25
|
+
export declare function equalsObject<U, V extends {
|
|
26
|
+
[key: string]: U;
|
|
27
|
+
}>(a: V, b: V, equalsProp: (propA: U, propB: U) => boolean | void): boolean;
|
|
28
|
+
export declare function createLink(ref: string | $64$luvio_engine_NormalizedKeyMetadata): {
|
|
29
|
+
__ref: string;
|
|
30
|
+
};
|
|
31
|
+
export declare function assignMetadataLink(entry: any, metadataKey: string | $64$luvio_engine_NormalizedKeyMetadata): void;
|
|
32
|
+
export {};
|
package/package.json
ADDED
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@salesforce/lds-adapters-sfap-einstein-ai-gateway",
|
|
3
|
+
"version": "1.250.0",
|
|
4
|
+
"description": "LLM Gateway API's",
|
|
5
|
+
"license": "SEE LICENSE IN LICENSE.txt",
|
|
6
|
+
"main": "dist/es/es2018/sfap-einstein-ai-gateway.js",
|
|
7
|
+
"module": "dist/es/es2018/sfap-einstein-ai-gateway.js",
|
|
8
|
+
"types": "dist/es/es2018/types/src/generated/artifacts/main.d.ts",
|
|
9
|
+
"files": [
|
|
10
|
+
"dist",
|
|
11
|
+
"sfdc",
|
|
12
|
+
"src/raml/*"
|
|
13
|
+
],
|
|
14
|
+
"exports": {
|
|
15
|
+
".": {
|
|
16
|
+
"types": "./dist/es/es2018/types/src/generated/artifacts/main.d.ts",
|
|
17
|
+
"import": "./dist/es/es2018/sfap-einstein-ai-gateway.js",
|
|
18
|
+
"require": "./dist/es/es2018/sfap-einstein-ai-gateway.js"
|
|
19
|
+
},
|
|
20
|
+
"./sfdc": {
|
|
21
|
+
"types": "./sfdc/index.d.ts",
|
|
22
|
+
"import": "./sfdc/index.js",
|
|
23
|
+
"default": "./sfdc/index.js"
|
|
24
|
+
}
|
|
25
|
+
},
|
|
26
|
+
"sfdc": {
|
|
27
|
+
"namespace": "lightning",
|
|
28
|
+
"module": "sfapEinsteinAiGatewayApi"
|
|
29
|
+
},
|
|
30
|
+
"contributors": [
|
|
31
|
+
"jnalluru@salesforce.com"
|
|
32
|
+
],
|
|
33
|
+
"scripts": {
|
|
34
|
+
"build": "yarn build:services",
|
|
35
|
+
"build:raml": "luvio generate src/raml/luvio.raml src/generated -p '../lds-compiler-plugins'",
|
|
36
|
+
"build:services": "rollup --bundleConfigAsCjs --config rollup.config.js",
|
|
37
|
+
"clean": "rm -rf dist sfdc src/generated",
|
|
38
|
+
"release:core": "../../scripts/release/core.js --adapter=lds-adapters-sfap-einstein-ai-gateway",
|
|
39
|
+
"release:corejar": "yarn build && ../core-build/scripts/core.js --adapter=lds-adapters-sfap-einstein-ai-gateway",
|
|
40
|
+
"test:unit": "jest"
|
|
41
|
+
},
|
|
42
|
+
"dependencies": {
|
|
43
|
+
"@salesforce/lds-bindings": "*"
|
|
44
|
+
},
|
|
45
|
+
"devDependencies": {
|
|
46
|
+
"@salesforce/lds-compiler-plugins": "*"
|
|
47
|
+
},
|
|
48
|
+
"nx": {
|
|
49
|
+
"targets": {
|
|
50
|
+
"build": {
|
|
51
|
+
"outputs": [
|
|
52
|
+
"{projectRoot}/dist",
|
|
53
|
+
"{projectRoot}/sfdc"
|
|
54
|
+
]
|
|
55
|
+
},
|
|
56
|
+
"build:raml": {
|
|
57
|
+
"outputs": [
|
|
58
|
+
"{projectRoot}/src/generated"
|
|
59
|
+
]
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
},
|
|
63
|
+
"volta": {
|
|
64
|
+
"extends": "../../package.json"
|
|
65
|
+
}
|
|
66
|
+
}
|
package/sfdc/index.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from '../dist/es/es2018/types/src/generated/artifacts/sfdc';
|