@crewdle/web-sdk-types 1.0.49 → 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/inference/GenerativeAIInferenceWorkerParameters.d.ts +29 -2
- package/dist/generative-ai/jobs/inference/GenerativeAIInferenceWorkerParameters.js +2 -0
- package/dist/generative-ai/jobs/prompt/GenerativeAIPromptCreateJobParameters.d.ts +4 -0
- package/dist/generative-ai/jobs/prompt/GenerativeAIPromptJob.d.ts +4 -0
- package/dist/generative-ai/jobs/prompt/GenerativeAIPromptOptions.d.ts +2 -2
- package/dist/generative-ai/jobs/prompt/GenerativeAIPromptWorkerParameters.d.ts +4 -0
- package/dist/generative-ai/jobs/prompt/options/PromptFunction.d.ts +44 -0
- package/package.json +1 -1
|
@@ -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
|
*/
|
|
@@ -171,6 +177,25 @@ export interface IGenerativeAIInferenceTool {
|
|
|
171
177
|
* Whether to emit the tool call result.
|
|
172
178
|
*/
|
|
173
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
|
+
*/
|
|
174
199
|
/**
|
|
175
200
|
* The tools for the tool.
|
|
176
201
|
*/
|
|
@@ -196,7 +221,9 @@ export declare enum GenerativeAIInferenceToolType {
|
|
|
196
221
|
FormSkillGetQuestion = "form-skill-get-question",
|
|
197
222
|
FormSkillSetAnswer = "form-skill-set-answer",
|
|
198
223
|
FormSkillSubmitForm = "form-skill-submit-form",
|
|
199
|
-
WorkflowTool = "workflow-tool"
|
|
224
|
+
WorkflowTool = "workflow-tool",
|
|
225
|
+
GenerateImage = "generate-image",
|
|
226
|
+
CrewdleMCP = "crewdle-mcp"
|
|
200
227
|
}
|
|
201
228
|
/**
|
|
202
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,10 @@ 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;
|
|
18
22
|
/**
|
|
19
23
|
* The namespace to use for the prompt.
|
|
20
24
|
*/
|
|
@@ -9,6 +9,10 @@ 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;
|
|
12
16
|
/**
|
|
13
17
|
* The namespace to use for the prompt.
|
|
14
18
|
*/
|
|
@@ -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,10 @@ 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;
|
|
16
20
|
/**
|
|
17
21
|
* The namespace to use for the prompt.
|
|
18
22
|
*/
|
|
@@ -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;
|