@crewdle/web-sdk-types 1.0.48 → 1.0.50
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/generative-ai/jobs/collection-query/GenerativeAICollectionQueryCreateJobParameters.d.ts +4 -0
- package/dist/generative-ai/jobs/collection-query/GenerativeAICollectionQueryJob.d.ts +4 -0
- package/dist/generative-ai/jobs/collection-query/GenerativeAICollectionQueryWorkerParameters.d.ts +4 -0
- package/dist/generative-ai/jobs/file-delete/GenerativeAIFileDeleteCreateJobParameters.d.ts +4 -0
- package/dist/generative-ai/jobs/file-delete/GenerativeAIFileDeleteJob.d.ts +4 -0
- package/dist/generative-ai/jobs/file-delete/GenerativeAIFileDeleteWorkerParameters.d.ts +4 -0
- package/dist/generative-ai/jobs/file-ingest/GenerativeAIFileIngestCreateJobParameters.d.ts +4 -0
- package/dist/generative-ai/jobs/file-ingest/GenerativeAIFileIngestJob.d.ts +4 -0
- package/dist/generative-ai/jobs/file-ingest/GenerativeAIFileIngestWorkerParameters.d.ts +4 -0
- package/dist/generative-ai/jobs/file-list/GenerativeAIFileListCreateJobParameters.d.ts +4 -0
- package/dist/generative-ai/jobs/file-list/GenerativeAIFileListJob.d.ts +4 -0
- package/dist/generative-ai/jobs/file-list/GenerativeAIFileListWorkerParameters.d.ts +4 -0
- package/dist/generative-ai/jobs/inference/GenerativeAIInferenceWorkerParameters.d.ts +33 -2
- package/dist/generative-ai/jobs/inference/GenerativeAIInferenceWorkerParameters.js +2 -0
- package/dist/generative-ai/jobs/prompt/GenerativeAIPromptCreateJobParameters.d.ts +8 -0
- package/dist/generative-ai/jobs/prompt/GenerativeAIPromptJob.d.ts +8 -0
- package/dist/generative-ai/jobs/prompt/GenerativeAIPromptOptions.d.ts +2 -2
- package/dist/generative-ai/jobs/prompt/GenerativeAIPromptWorkerParameters.d.ts +8 -0
- package/dist/generative-ai/jobs/prompt/options/PromptFunction.d.ts +44 -0
- package/dist/generative-ai/rag/GenerativeAIRagConnector.d.ts +13 -12
- package/package.json +1 -1
|
@@ -13,6 +13,10 @@ export interface IGenerativeAICollectionQueryJob extends IGenerativeAIJob {
|
|
|
13
13
|
* The collection id for the search.
|
|
14
14
|
*/
|
|
15
15
|
collectionId: string;
|
|
16
|
+
/**
|
|
17
|
+
* The namespace for the search.
|
|
18
|
+
*/
|
|
19
|
+
namespace?: string;
|
|
16
20
|
/**
|
|
17
21
|
* Run the search job.
|
|
18
22
|
* @returns A promise that resolves with the result.
|
|
@@ -13,6 +13,10 @@ export interface IGenerativeAIFileDeleteCreateJobParameters extends IGenerativeA
|
|
|
13
13
|
* The collection id of the file to delete.
|
|
14
14
|
*/
|
|
15
15
|
collectionId: string;
|
|
16
|
+
/**
|
|
17
|
+
* The namespace to delete the file.
|
|
18
|
+
*/
|
|
19
|
+
namespace?: string;
|
|
16
20
|
/**
|
|
17
21
|
* The file id of the file to delete.
|
|
18
22
|
*/
|
|
@@ -9,6 +9,10 @@ export interface IGenerativeAIFileDeleteJob extends IGenerativeAIJob {
|
|
|
9
9
|
* The collection id of the file to delete.
|
|
10
10
|
*/
|
|
11
11
|
collectionId: string;
|
|
12
|
+
/**
|
|
13
|
+
* The namespace to delete the file.
|
|
14
|
+
*/
|
|
15
|
+
namespace?: string;
|
|
12
16
|
/**
|
|
13
17
|
* The file id of the file to delete.
|
|
14
18
|
*/
|
|
@@ -13,6 +13,10 @@ export interface IGenerativeAIFileDeleteWorkerParameters extends IGenerativeAIWo
|
|
|
13
13
|
* The collection id of the file to delete.
|
|
14
14
|
*/
|
|
15
15
|
collectionId: string;
|
|
16
|
+
/**
|
|
17
|
+
* The namespace to delete the file.
|
|
18
|
+
*/
|
|
19
|
+
namespace?: string;
|
|
16
20
|
/**
|
|
17
21
|
* The file id of the file to delete.
|
|
18
22
|
*/
|
|
@@ -13,6 +13,10 @@ export interface IGenerativeAIFileIngestCreateJobParameters extends IGenerativeA
|
|
|
13
13
|
* The collection id of the file to ingest.
|
|
14
14
|
*/
|
|
15
15
|
collectionId: string;
|
|
16
|
+
/**
|
|
17
|
+
* The namespace to ingest the file.
|
|
18
|
+
*/
|
|
19
|
+
namespace?: string;
|
|
16
20
|
/**
|
|
17
21
|
* The name of the file to ingest.
|
|
18
22
|
*/
|
|
@@ -9,6 +9,10 @@ export interface IGenerativeAIFileIngestJob extends IGenerativeAIJob {
|
|
|
9
9
|
* The collection id of the file to ingest.
|
|
10
10
|
*/
|
|
11
11
|
collectionId: string;
|
|
12
|
+
/**
|
|
13
|
+
* The namespace to ingest the file.
|
|
14
|
+
*/
|
|
15
|
+
namespace?: string;
|
|
12
16
|
/**
|
|
13
17
|
* The name of the file to ingest.
|
|
14
18
|
*/
|
|
@@ -13,6 +13,10 @@ export interface IGenerativeAIFileIngestWorkerParameters extends IGenerativeAIWo
|
|
|
13
13
|
* The collection id for the file to ingest.
|
|
14
14
|
*/
|
|
15
15
|
collectionId: string;
|
|
16
|
+
/**
|
|
17
|
+
* The namespace to ingest the file.
|
|
18
|
+
*/
|
|
19
|
+
namespace?: string;
|
|
16
20
|
/**
|
|
17
21
|
* The name of the file to ingest.
|
|
18
22
|
*/
|
|
@@ -9,6 +9,10 @@ export interface IGenerativeAIFileListJob extends IGenerativeAIJob {
|
|
|
9
9
|
* The collection id of the file to list.
|
|
10
10
|
*/
|
|
11
11
|
collectionId: string;
|
|
12
|
+
/**
|
|
13
|
+
* The namespace to list files.
|
|
14
|
+
*/
|
|
15
|
+
namespace?: string;
|
|
12
16
|
/**
|
|
13
17
|
* Run the file list job.
|
|
14
18
|
* @returns A promise that resolves with the result.
|
|
@@ -104,7 +104,9 @@ export interface IGenerativeAIInferenceTool {
|
|
|
104
104
|
headers?: {
|
|
105
105
|
name: string;
|
|
106
106
|
value: string;
|
|
107
|
-
}[]
|
|
107
|
+
}[] | {
|
|
108
|
+
[key: string]: string;
|
|
109
|
+
};
|
|
108
110
|
/**
|
|
109
111
|
* The query parameters for the tool.
|
|
110
112
|
*/
|
|
@@ -135,6 +137,10 @@ export interface IGenerativeAIInferenceTool {
|
|
|
135
137
|
* The workflow ID to use for the tool.
|
|
136
138
|
*/
|
|
137
139
|
workflowId?: string;
|
|
140
|
+
/**
|
|
141
|
+
* The user ID to use for the tool.
|
|
142
|
+
*/
|
|
143
|
+
userId?: string;
|
|
138
144
|
/**
|
|
139
145
|
* Whether the tool is async.
|
|
140
146
|
*/
|
|
@@ -159,6 +165,10 @@ export interface IGenerativeAIInferenceTool {
|
|
|
159
165
|
* The collection ID for the tool.
|
|
160
166
|
*/
|
|
161
167
|
collectionId?: string;
|
|
168
|
+
/**
|
|
169
|
+
* The namespace for the tool.
|
|
170
|
+
*/
|
|
171
|
+
namespace?: string;
|
|
162
172
|
/**
|
|
163
173
|
* The form skill questions for the tool.
|
|
164
174
|
*/
|
|
@@ -167,6 +177,25 @@ export interface IGenerativeAIInferenceTool {
|
|
|
167
177
|
* Whether to emit the tool call result.
|
|
168
178
|
*/
|
|
169
179
|
shouldEmit?: boolean;
|
|
180
|
+
/**
|
|
181
|
+
* The server label for the tool.
|
|
182
|
+
*/
|
|
183
|
+
server_label?: string;
|
|
184
|
+
/**
|
|
185
|
+
* The server URL for the tool.
|
|
186
|
+
*/
|
|
187
|
+
server_url?: string;
|
|
188
|
+
/**
|
|
189
|
+
* The require approval for the tool.
|
|
190
|
+
*/
|
|
191
|
+
require_approval?: string;
|
|
192
|
+
/**
|
|
193
|
+
* The allowed tools for the tool.
|
|
194
|
+
*/
|
|
195
|
+
allowed_tools?: string[];
|
|
196
|
+
/**
|
|
197
|
+
* The headers for the tool.
|
|
198
|
+
*/
|
|
170
199
|
/**
|
|
171
200
|
* The tools for the tool.
|
|
172
201
|
*/
|
|
@@ -192,7 +221,9 @@ export declare enum GenerativeAIInferenceToolType {
|
|
|
192
221
|
FormSkillGetQuestion = "form-skill-get-question",
|
|
193
222
|
FormSkillSetAnswer = "form-skill-set-answer",
|
|
194
223
|
FormSkillSubmitForm = "form-skill-submit-form",
|
|
195
|
-
WorkflowTool = "workflow-tool"
|
|
224
|
+
WorkflowTool = "workflow-tool",
|
|
225
|
+
GenerateImage = "generate-image",
|
|
226
|
+
CrewdleMCP = "crewdle-mcp"
|
|
196
227
|
}
|
|
197
228
|
/**
|
|
198
229
|
* The interface for the generative AI inference form skill question.
|
|
@@ -20,4 +20,6 @@ export var GenerativeAIInferenceToolType;
|
|
|
20
20
|
GenerativeAIInferenceToolType["FormSkillSetAnswer"] = "form-skill-set-answer";
|
|
21
21
|
GenerativeAIInferenceToolType["FormSkillSubmitForm"] = "form-skill-submit-form";
|
|
22
22
|
GenerativeAIInferenceToolType["WorkflowTool"] = "workflow-tool";
|
|
23
|
+
GenerativeAIInferenceToolType["GenerateImage"] = "generate-image";
|
|
24
|
+
GenerativeAIInferenceToolType["CrewdleMCP"] = "crewdle-mcp";
|
|
23
25
|
})(GenerativeAIInferenceToolType || (GenerativeAIInferenceToolType = {}));
|
|
@@ -15,6 +15,14 @@ export interface IGenerativeAIPromptCreateJobParameters extends IGenerativeAICre
|
|
|
15
15
|
* The workflow id to use for the prompt.
|
|
16
16
|
*/
|
|
17
17
|
workflowId: string;
|
|
18
|
+
/**
|
|
19
|
+
* The user id to use for the prompt.
|
|
20
|
+
*/
|
|
21
|
+
userId?: string;
|
|
22
|
+
/**
|
|
23
|
+
* The namespace to use for the prompt.
|
|
24
|
+
*/
|
|
25
|
+
namespace?: string;
|
|
18
26
|
/**
|
|
19
27
|
* The prompt to be processed.
|
|
20
28
|
*/
|
|
@@ -9,6 +9,14 @@ export interface IGenerativeAIPromptJob extends IGenerativeAIJob {
|
|
|
9
9
|
* The workflow id to use for the prompt.
|
|
10
10
|
*/
|
|
11
11
|
workflowId: string;
|
|
12
|
+
/**
|
|
13
|
+
* The user id to use for the prompt.
|
|
14
|
+
*/
|
|
15
|
+
userId?: string;
|
|
16
|
+
/**
|
|
17
|
+
* The namespace to use for the prompt.
|
|
18
|
+
*/
|
|
19
|
+
namespace?: string;
|
|
12
20
|
/**
|
|
13
21
|
* The prompt to be processed
|
|
14
22
|
*/
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { IGenerativeAIOptions } from '../generic/GenerativeAIOptions';
|
|
2
|
-
import {
|
|
2
|
+
import { IPromptHistory, PromptFunction } from './options';
|
|
3
3
|
export interface IGenerativeAIPromptFile {
|
|
4
4
|
/**
|
|
5
5
|
* The name of the file.
|
|
@@ -57,7 +57,7 @@ export interface IGenerativeAIPromptOptions extends IGenerativeAIOptions {
|
|
|
57
57
|
/**
|
|
58
58
|
* The functions that can be called by the LLM.
|
|
59
59
|
*/
|
|
60
|
-
functions?: Map<string,
|
|
60
|
+
functions?: Map<string, PromptFunction>;
|
|
61
61
|
/**
|
|
62
62
|
* The files that will be used by the LLM.
|
|
63
63
|
*/
|
|
@@ -13,6 +13,14 @@ export interface IGenerativeAIPromptWorkerParameters extends IGenerativeAIWorker
|
|
|
13
13
|
* The workflow ID.
|
|
14
14
|
*/
|
|
15
15
|
workflowId: string;
|
|
16
|
+
/**
|
|
17
|
+
* The user id to use for the prompt.
|
|
18
|
+
*/
|
|
19
|
+
userId?: string;
|
|
20
|
+
/**
|
|
21
|
+
* The namespace to use for the prompt.
|
|
22
|
+
*/
|
|
23
|
+
namespace?: string;
|
|
16
24
|
/**
|
|
17
25
|
* The prompt for the AI job.
|
|
18
26
|
*/
|
|
@@ -5,6 +5,10 @@ import { IPromptFunctionParams } from './PromptFunctionParams';
|
|
|
5
5
|
* @category AI
|
|
6
6
|
*/
|
|
7
7
|
export interface IPromptFunction {
|
|
8
|
+
/**
|
|
9
|
+
* The function type.
|
|
10
|
+
*/
|
|
11
|
+
type: 'function';
|
|
8
12
|
/**
|
|
9
13
|
* The function description.
|
|
10
14
|
*/
|
|
@@ -20,3 +24,43 @@ export interface IPromptFunction {
|
|
|
20
24
|
[key: string]: string | number | boolean;
|
|
21
25
|
}) => string | Promise<string>;
|
|
22
26
|
}
|
|
27
|
+
/**
|
|
28
|
+
* The MCP function Interface
|
|
29
|
+
* Represents a function that can be called by the LLM.
|
|
30
|
+
* @category AI
|
|
31
|
+
*/
|
|
32
|
+
export interface IMcpFunction {
|
|
33
|
+
type: 'mcp';
|
|
34
|
+
server_label: string;
|
|
35
|
+
server_url: string;
|
|
36
|
+
require_approval: string;
|
|
37
|
+
allowed_tools: string[];
|
|
38
|
+
headers?: {
|
|
39
|
+
[key: string]: string;
|
|
40
|
+
};
|
|
41
|
+
}
|
|
42
|
+
/**
|
|
43
|
+
* The code interpreter function Interface
|
|
44
|
+
* Represents a function that can be called by the LLM.
|
|
45
|
+
* @category AI
|
|
46
|
+
*/
|
|
47
|
+
export interface ICodeInterpreterFunction {
|
|
48
|
+
type: 'code_interpreter';
|
|
49
|
+
container: {
|
|
50
|
+
type: 'auto';
|
|
51
|
+
};
|
|
52
|
+
}
|
|
53
|
+
/**
|
|
54
|
+
* The image generation function Interface
|
|
55
|
+
* Represents a function that can be called by the LLM.
|
|
56
|
+
* @category AI
|
|
57
|
+
*/
|
|
58
|
+
export interface IImageGenerationFunction {
|
|
59
|
+
type: 'image_generation';
|
|
60
|
+
}
|
|
61
|
+
/**
|
|
62
|
+
* The prompt function Type
|
|
63
|
+
* Represents a function that can be called by the LLM.
|
|
64
|
+
* @category AI
|
|
65
|
+
*/
|
|
66
|
+
export type PromptFunction = IPromptFunction | IMcpFunction | ICodeInterpreterFunction | IImageGenerationFunction;
|
|
@@ -5,6 +5,11 @@ export declare enum GenerativeAIRagType {
|
|
|
5
5
|
Pinecone = "pinecone",
|
|
6
6
|
Crewdle = "crewdle"
|
|
7
7
|
}
|
|
8
|
+
export interface IGenerativeAIRagCollection {
|
|
9
|
+
instanceId: string;
|
|
10
|
+
collectionId: string;
|
|
11
|
+
namespace?: string;
|
|
12
|
+
}
|
|
8
13
|
/**
|
|
9
14
|
* Generative AI Rag Connector Interface
|
|
10
15
|
* @category AI
|
|
@@ -27,35 +32,31 @@ export interface IGenerativeAIRagConnector {
|
|
|
27
32
|
deleteCollection(instanceId: string, collectionId: string, deleteInstance: boolean): Promise<void>;
|
|
28
33
|
/**
|
|
29
34
|
* Query a collection.
|
|
30
|
-
* @param
|
|
31
|
-
* @param collectionId The collection id to query.
|
|
35
|
+
* @param collection The collection to query.
|
|
32
36
|
* @param query The query to run.
|
|
33
37
|
* @param topK The number of results to return.
|
|
34
38
|
* @returns The search results.
|
|
35
39
|
*/
|
|
36
|
-
queryCollection(
|
|
40
|
+
queryCollection(collection: IGenerativeAIRagCollection, query: string | number[], topK: number): Promise<ISearchResult[]>;
|
|
37
41
|
/**
|
|
38
42
|
* Delete a file.
|
|
39
|
-
* @param
|
|
40
|
-
* @param collectionId The collection id of the file to delete.
|
|
43
|
+
* @param collection The collection to delete the file.
|
|
41
44
|
* @param fileId The file id to delete.
|
|
42
45
|
* @returns A promise that resolves when the file is deleted.
|
|
43
46
|
*/
|
|
44
|
-
deleteFile(
|
|
47
|
+
deleteFile(collection: IGenerativeAIRagCollection, fileId: string): Promise<void>;
|
|
45
48
|
/**
|
|
46
49
|
* Ingest a file.
|
|
47
|
-
* @param
|
|
48
|
-
* @param collectionId The collection id to ingest the file.
|
|
50
|
+
* @param collection The collection to ingest the file.
|
|
49
51
|
* @param fileName The name of the file to ingest.
|
|
50
52
|
* @param content The content of the file to ingest.
|
|
51
53
|
* @returns A promise that resolves when the file is ingested.
|
|
52
54
|
*/
|
|
53
|
-
ingestFile(
|
|
55
|
+
ingestFile(collection: IGenerativeAIRagCollection, fileName: string, content: string | IIndex[]): Promise<void>;
|
|
54
56
|
/**
|
|
55
57
|
* List files in a collection.
|
|
56
|
-
* @param
|
|
57
|
-
* @param collectionId The collection id to list files.
|
|
58
|
+
* @param collection The collection to list files.
|
|
58
59
|
* @returns The list of files.
|
|
59
60
|
*/
|
|
60
|
-
listFiles(
|
|
61
|
+
listFiles(collection: IGenerativeAIRagCollection): Promise<IGenerativeAIFile[]>;
|
|
61
62
|
}
|