@crewdle/web-sdk-types 1.0.34 → 1.0.35

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.
@@ -2,7 +2,7 @@ import { KeyValueDatabaseConnectorConstructor } from '../../key-value-database';
2
2
  import { ILoggingConnector } from '.';
3
3
  import { DocumentParserConnectorConstructor, ObjectStoreConnectorConstructor } from '../../object-storage';
4
4
  import { PeerConnectionConnectorConstructor } from '../connection';
5
- import { AISearchConnectorConstructor, GenerativeAIEngineType, GenerativeAIRagConnectorConstructor, GenerativeAIWorkerConnectorConstructor, NLPLibraryConnectorConstructor, QueryFileConnectorConstructor, SearchConnectorConstructor } from '../../generative-ai';
5
+ import { AISearchConnectorConstructor, GenerativeAIEngineType, GenerativeAIFileConnectorConstructor, GenerativeAIRagConnectorConstructor, GenerativeAIWorkerConnectorConstructor, NLPLibraryConnectorConstructor, QueryFileConnectorConstructor, SearchConnectorConstructor } from '../../generative-ai';
6
6
  import { VectorDatabaseConnectorConstructor } from '../../vector-database';
7
7
  import { GraphDatabaseConnectorConstructor } from '../../graph-database';
8
8
  import { ExternalStorageConnectionConnectorConstructor, ExternalStorageType } from '../../external-storage';
@@ -58,6 +58,10 @@ export interface ISDKOptions {
58
58
  * The custom document parser connector to use for parsing documents.
59
59
  */
60
60
  documentParserConnector?: DocumentParserConnectorConstructor;
61
+ /**
62
+ * The custom file connector to use for file tasks.
63
+ */
64
+ fileConnector?: GenerativeAIFileConnectorConstructor;
61
65
  /**
62
66
  * The custom natural language processing connector to use for natural language processing tasks.
63
67
  */
@@ -0,0 +1,13 @@
1
+ /**
2
+ * Interface for a file connector.
3
+ */
4
+ export interface IGenerativeAIFileConnector {
5
+ /**
6
+ * Write a file.
7
+ */
8
+ writeFile(file: File): Promise<string>;
9
+ /**
10
+ * Delete a file.
11
+ */
12
+ deleteFile(fileId: string): Promise<void>;
13
+ }
@@ -0,0 +1,5 @@
1
+ import { IGenerativeAIFileConnector } from './GenerativeAIFileConnector';
2
+ /**
3
+ * The constructor for the GenerativeAI File Connector.
4
+ */
5
+ export type GenerativeAIFileConnectorConstructor = new (apiKey: string) => IGenerativeAIFileConnector;
@@ -0,0 +1,2 @@
1
+ export * from './GenerativeAIFileConnector';
2
+ export * from './GenerativeAIFileConnectorConstructor';
@@ -0,0 +1,2 @@
1
+ export * from './GenerativeAIFileConnector';
2
+ export * from './GenerativeAIFileConnectorConstructor';
@@ -1,12 +1,12 @@
1
+ export * from './file';
1
2
  export * from './job';
2
3
  export * from './jobs';
3
4
  export * from './query';
5
+ export * from './rag';
4
6
  export * from './search';
5
7
  export * from './union-types';
6
8
  export * from './GenerativeAIContext';
7
9
  export * from './GenerativeAIJobType';
8
- export * from './GenerativeAIRagConnector';
9
- export * from './GenerativeAIRagConnectorConstructor';
10
10
  export * from './GenerativeAIWorker';
11
11
  export * from './GenerativeAIWorkerConnector';
12
12
  export * from './GenerativeAIWorkerConnectorConstructor';
@@ -1,12 +1,12 @@
1
+ export * from './file';
1
2
  export * from './job';
2
3
  export * from './jobs';
3
4
  export * from './query';
5
+ export * from './rag';
4
6
  export * from './search';
5
7
  export * from './union-types';
6
8
  export * from './GenerativeAIContext';
7
9
  export * from './GenerativeAIJobType';
8
- export * from './GenerativeAIRagConnector';
9
- export * from './GenerativeAIRagConnectorConstructor';
10
10
  export * from './GenerativeAIWorker';
11
11
  export * from './GenerativeAIWorkerConnector';
12
12
  export * from './GenerativeAIWorkerConnectorConstructor';
@@ -1,5 +1,6 @@
1
1
  import { GenerativeAIJobType } from '../../GenerativeAIJobType';
2
2
  import { IGenerativeAICreateJobParameters } from '../generic';
3
+ import { IGenerativeAIPromptFile } from './GenerativeAIPromptOptions';
3
4
  import { IPromptHistory } from './options';
4
5
  /**
5
6
  * Represents the parameters of a prompt job.
@@ -32,4 +33,8 @@ export interface IGenerativeAIPromptCreateJobParameters extends IGenerativeAICre
32
33
  internalContext?: {
33
34
  [key: string]: string;
34
35
  };
36
+ /**
37
+ * The files that will be used by the LLM.
38
+ */
39
+ files?: IGenerativeAIPromptFile[];
35
40
  }
@@ -1,4 +1,4 @@
1
- import { IGenerativeAIPromptResult, IPromptHistory } from '.';
1
+ import { IGenerativeAIPromptFile, IGenerativeAIPromptResult, IPromptHistory } from '.';
2
2
  import { IGenerativeAIJob } from '../generic';
3
3
  /**
4
4
  * Represents bounded prompt job ready to be run or streamed.
@@ -27,6 +27,10 @@ export interface IGenerativeAIPromptJob extends IGenerativeAIJob {
27
27
  internalContext?: {
28
28
  [key: string]: string;
29
29
  };
30
+ /**
31
+ * The files that will be used by the LLM.
32
+ */
33
+ files?: IGenerativeAIPromptFile[];
30
34
  /**
31
35
  * Run the prompt job.
32
36
  * @returns A promise that resolves with the result
@@ -1,5 +1,5 @@
1
- import { IGenerativeAIFile } from './jobs';
2
- import { ISearchResult } from './search';
1
+ import { IGenerativeAIFile } from '../jobs';
2
+ import { ISearchResult } from '../search';
3
3
  /**
4
4
  * Generative AI Rag Connector Interface
5
5
  * @category AI
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,2 @@
1
+ export * from './GenerativeAIRagConnector';
2
+ export * from './GenerativeAIRagConnectorConstructor';
@@ -0,0 +1,2 @@
1
+ export * from './GenerativeAIRagConnector';
2
+ export * from './GenerativeAIRagConnectorConstructor';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@crewdle/web-sdk-types",
3
- "version": "1.0.34",
3
+ "version": "1.0.35",
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",