@crewdle/web-sdk-types 1.0.37 → 1.0.38

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.
@@ -27,9 +27,10 @@ export interface ISDK {
27
27
  /**
28
28
  * Validate a key.
29
29
  * @param key The key to validate.
30
+ * @param origin The origin of the request.
30
31
  * @returns A promise that resolves with the vendor ID.
31
32
  */
32
- validateKey(key: string): Promise<string>;
33
+ validateKey(key: string, origin?: string): Promise<string>;
33
34
  /**
34
35
  * Join a cluster.
35
36
  * @param clusterId The ID of the cluster to join.
@@ -62,7 +62,8 @@ export declare enum GenerativeAITaskType {
62
62
  export declare enum GenerativeAIEngineType {
63
63
  Llamacpp = "llamacpp",
64
64
  Transformers = "transformers",
65
- OpenAI = "openai"
65
+ OpenAI = "openai",
66
+ Anthropic = "anthropic"
66
67
  }
67
68
  /**
68
69
  * The generative AI model interface.
@@ -63,4 +63,5 @@ export var GenerativeAIEngineType;
63
63
  GenerativeAIEngineType["Llamacpp"] = "llamacpp";
64
64
  GenerativeAIEngineType["Transformers"] = "transformers";
65
65
  GenerativeAIEngineType["OpenAI"] = "openai";
66
+ GenerativeAIEngineType["Anthropic"] = "anthropic";
66
67
  })(GenerativeAIEngineType || (GenerativeAIEngineType = {}));
@@ -127,10 +127,26 @@ export interface IGenerativeAIInferenceTool {
127
127
  * The temperature for the tool.
128
128
  */
129
129
  temperature?: number;
130
+ /**
131
+ * The grammar for the tool.
132
+ */
133
+ grammar?: any;
130
134
  /**
131
135
  * The collection ID for the tool.
132
136
  */
133
137
  collectionId?: string;
138
+ /**
139
+ * The form skill questions for the tool.
140
+ */
141
+ questions?: IGenerativeAIInferenceQuestion[];
142
+ /**
143
+ * Whether to emit the tool call result.
144
+ */
145
+ shouldEmit?: boolean;
146
+ /**
147
+ * The tools for the tool.
148
+ */
149
+ tools?: IGenerativeAIInferenceTool[];
134
150
  }
135
151
  /**
136
152
  * The enum for the generative AI inference tool type.
@@ -148,7 +164,28 @@ export declare enum GenerativeAIInferenceToolType {
148
164
  Search = "search",
149
165
  WebScraper = "web-scraper",
150
166
  WebScraperRaw = "web-scraper-raw",
151
- WriteFile = "write-file"
167
+ WriteFile = "write-file",
168
+ FormSkillGetQuestion = "form-skill-get-question",
169
+ FormSkillSetAnswer = "form-skill-set-answer",
170
+ FormSkillSubmitForm = "form-skill-submit-form"
171
+ }
172
+ /**
173
+ * The interface for the generative AI inference form skill question.
174
+ * @category AI
175
+ */
176
+ export interface IGenerativeAIInferenceQuestion {
177
+ /**
178
+ * The question.
179
+ */
180
+ question: string;
181
+ /**
182
+ * The validation for the question.
183
+ */
184
+ validation: string;
185
+ /**
186
+ * Whether the question is required.
187
+ */
188
+ required: boolean;
152
189
  }
153
190
  /**
154
191
  * The interface for the generative AI inference tool parameter.
@@ -16,4 +16,7 @@ export var GenerativeAIInferenceToolType;
16
16
  GenerativeAIInferenceToolType["WebScraper"] = "web-scraper";
17
17
  GenerativeAIInferenceToolType["WebScraperRaw"] = "web-scraper-raw";
18
18
  GenerativeAIInferenceToolType["WriteFile"] = "write-file";
19
+ GenerativeAIInferenceToolType["FormSkillGetQuestion"] = "form-skill-get-question";
20
+ GenerativeAIInferenceToolType["FormSkillSetAnswer"] = "form-skill-set-answer";
21
+ GenerativeAIInferenceToolType["FormSkillSubmitForm"] = "form-skill-submit-form";
19
22
  })(GenerativeAIInferenceToolType || (GenerativeAIInferenceToolType = {}));
@@ -14,6 +14,12 @@ export interface IGenerativeAIToolCallCreateJobParameters extends IGenerativeAIC
14
14
  * The tool to be processed.
15
15
  */
16
16
  tool: IGenerativeAIInferenceTool;
17
+ /**
18
+ * The internal context for the AI job.
19
+ */
20
+ internalContext?: {
21
+ [key: string]: string;
22
+ };
17
23
  /**
18
24
  * The arguments for the tool.
19
25
  */
@@ -15,6 +15,12 @@ export interface IGenerativeAIToolCallJob extends IGenerativeAIJob {
15
15
  * The tool to be processed.
16
16
  */
17
17
  tool: IGenerativeAIInferenceTool;
18
+ /**
19
+ * The internal context for the AI job.
20
+ */
21
+ internalContext?: {
22
+ [key: string]: string;
23
+ };
18
24
  /**
19
25
  * Runs the job.
20
26
  * @returns A promise that resolves with the result of the job.
@@ -13,4 +13,10 @@ export interface IGenerativeAIToolCallResult extends IGenerativeAIJobResult {
13
13
  * The output of the tool.
14
14
  */
15
15
  output: string;
16
+ /**
17
+ * The internal context for the AI job.
18
+ */
19
+ internalContext?: {
20
+ [key: string]: string;
21
+ };
16
22
  }
@@ -14,6 +14,12 @@ export interface IGenerativeAIToolCallWorkerParameters extends IGenerativeAIWork
14
14
  * The tool to be processed.
15
15
  */
16
16
  tool: IGenerativeAIInferenceTool;
17
+ /**
18
+ * The internal context for the AI job.
19
+ */
20
+ internalContext?: {
21
+ [key: string]: string;
22
+ };
17
23
  /**
18
24
  * The arguments for the tool.
19
25
  */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@crewdle/web-sdk-types",
3
- "version": "1.0.37",
3
+ "version": "1.0.38",
4
4
  "description": "The Crewdle Mist Web SDK public types and interfaces",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",