@crewdle/web-sdk-types 1.0.41 → 1.0.43

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.
@@ -60,6 +60,11 @@ export interface ICluster extends IClusterEventEmitter {
60
60
  * @param label The label of the generative AI context.
61
61
  */
62
62
  openGenerativeAIContext(label: string): Promise<IGenerativeAIContext>;
63
+ /**
64
+ * Open a generative AI context.
65
+ * @param label The label of the generative AI context.
66
+ */
67
+ openGenerativeAIContextStandalone(label: string): Promise<IGenerativeAIContext>;
63
68
  /**
64
69
  * Open a generative AI worker.
65
70
  * @param label The label of the generative AI Worker.
@@ -116,6 +121,11 @@ export interface ICluster extends IClusterEventEmitter {
116
121
  * @param strategy The strategy to use to filter the job dispatchers.
117
122
  */
118
123
  getGenerativeAIContexts(strategy?: (item: IGenerativeAIContext) => boolean): IGenerativeAIContext[];
124
+ /**
125
+ * Get an array of opened generative AI contexts.
126
+ * @param strategy The strategy to use to filter the job dispatchers.
127
+ */
128
+ getGenerativeAIContextsStandalone(strategy?: (item: IGenerativeAIContext) => boolean): IGenerativeAIContext[];
119
129
  /**
120
130
  * Get an array of opened generative AI workers.
121
131
  * @param strategy The strategy to use to filter the job workers.
@@ -34,8 +34,9 @@ export interface ISDK {
34
34
  /**
35
35
  * Join a cluster.
36
36
  * @param clusterId The ID of the cluster to join.
37
+ * @param standalone Whether to join the cluster as a standalone node.
37
38
  * @returns A promise that resolves with the cluster.
38
39
  * @throws {@link SDKClientErrorCodes.NodeNotAuthenticated} if the node is not authenticated.
39
40
  */
40
- joinCluster(clusterId: string): Promise<ICluster>;
41
+ joinCluster(clusterId: string, standalone?: boolean): Promise<ICluster>;
41
42
  }
@@ -1,3 +1,21 @@
1
+ /**
2
+ * Represents an AI search connector result.
3
+ * @category Connector
4
+ */
5
+ export interface IAISearchConnectorResult {
6
+ /**
7
+ * The output of the search result.
8
+ */
9
+ output: string;
10
+ /**
11
+ * The input tokens used for the search.
12
+ */
13
+ inputTokens: number;
14
+ /**
15
+ * The output tokens used for the search.
16
+ */
17
+ outputTokens: number;
18
+ }
1
19
  /**
2
20
  * Represents an AI search connector.
3
21
  * @category Connector
@@ -10,5 +28,5 @@ export interface IAISearchConnector {
10
28
  * @param apiKey The API key to use for the search.
11
29
  * @returns A promise that resolves with the search result.
12
30
  */
13
- search(query: string, modelId: string): Promise<string>;
31
+ search(query: string, modelId: string): Promise<IAISearchConnectorResult>;
14
32
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@crewdle/web-sdk-types",
3
- "version": "1.0.41",
3
+ "version": "1.0.43",
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",