@crewdle/web-sdk-types 1.0.28 → 1.0.30

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, GenerativeAIWorkerConnectorConstructor, NLPLibraryConnectorConstructor, SearchConnectorConstructor } from '../../generative-ai';
5
+ import { AISearchConnectorConstructor, 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';
@@ -74,6 +74,10 @@ export interface ISDKOptions {
74
74
  * The custom AI search connector to use for AI search tasks.
75
75
  */
76
76
  aiSearchConnector?: AISearchConnectorConstructor;
77
+ /**
78
+ * The custom query file connector to use for querying files.
79
+ */
80
+ queryFileConnector?: QueryFileConnectorConstructor;
77
81
  /**
78
82
  * The maximum number of outgoing subscriptions.
79
83
  */
@@ -71,6 +71,7 @@ export interface IGenerativeAIModel {
71
71
  id: string;
72
72
  engineType: GenerativeAIEngineType;
73
73
  taskType: GenerativeAITaskType;
74
+ knowledgeCutoffDate?: string;
74
75
  inputType: GenerativeAIModelInputType;
75
76
  outputType: GenerativeAIModelOutputType;
76
77
  sourceUrl: string;
@@ -1,5 +1,6 @@
1
1
  export * from './job';
2
2
  export * from './jobs';
3
+ export * from './query';
3
4
  export * from './search';
4
5
  export * from './union-types';
5
6
  export * from './GenerativeAIContext';
@@ -1,5 +1,6 @@
1
1
  export * from './job';
2
2
  export * from './jobs';
3
+ export * from './query';
3
4
  export * from './search';
4
5
  export * from './union-types';
5
6
  export * from './GenerativeAIContext';
@@ -1,5 +1,19 @@
1
1
  import { IGenerativeAIOptions } from '../generic/GenerativeAIOptions';
2
2
  import { IPromptFunction, IPromptHistory } from './options';
3
+ export interface IGenerativeAIPromptFile {
4
+ /**
5
+ * The name of the file.
6
+ */
7
+ name: string;
8
+ /**
9
+ * The type of the file.
10
+ */
11
+ type: string;
12
+ /**
13
+ * The content of the file.
14
+ */
15
+ content: string;
16
+ }
3
17
  /**
4
18
  * The AI prompt options Interface
5
19
  * Represents the options for an AI prompt.
@@ -40,4 +54,8 @@ export interface IGenerativeAIPromptOptions extends IGenerativeAIOptions {
40
54
  * The functions that can be called by the LLM.
41
55
  */
42
56
  functions?: Map<string, IPromptFunction>;
57
+ /**
58
+ * The files that will be used by the LLM.
59
+ */
60
+ files?: IGenerativeAIPromptFile[];
43
61
  }
@@ -0,0 +1,15 @@
1
+ import { IQueryFileOptions } from './QueryFileOptions';
2
+ /**
3
+ * Interface for the QueryFileConnector.
4
+ * @category Connector
5
+ */
6
+ export interface IQueryFileConnector {
7
+ /**
8
+ * Executes a query.
9
+ * @param fileContent The content of the file.
10
+ * @param query The query to execute.
11
+ * @param options The options for the query.
12
+ * @returns A promise that resolves with the result of the query.
13
+ */
14
+ executeQuery(fileContent: string, query: string, options: IQueryFileOptions): Promise<string>;
15
+ }
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,6 @@
1
+ import { IQueryFileConnector } from './QueryFileConnector';
2
+ /**
3
+ * Constructor for the QueryFileConnector.
4
+ * @category AI
5
+ */
6
+ export type QueryFileConnectorConstructor = new () => IQueryFileConnector;
@@ -0,0 +1,18 @@
1
+ /**
2
+ * Options for the QueryFile function
3
+ * @category AI
4
+ */
5
+ export interface IQueryFileOptions {
6
+ /**
7
+ * Whether the file has headers.
8
+ */
9
+ headers?: boolean;
10
+ /**
11
+ * The quote character.
12
+ */
13
+ quote?: string;
14
+ /**
15
+ * The delimiter.
16
+ */
17
+ separator?: string;
18
+ }
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,3 @@
1
+ export * from './QueryFileConnector';
2
+ export * from './QueryFileConnectorConstructor';
3
+ export * from './QueryFileOptions';
@@ -0,0 +1,3 @@
1
+ export * from './QueryFileConnector';
2
+ export * from './QueryFileConnectorConstructor';
3
+ export * from './QueryFileOptions';
@@ -9,7 +9,7 @@ export interface IDocumentParserConnector {
9
9
  * @param file The file to parse.
10
10
  * @returns A promise that resolves with the parsed document.
11
11
  */
12
- parse(file: IFile): Promise<string>;
12
+ parse(file: IFile | File): Promise<string>;
13
13
  /**
14
14
  * Get the supported file types.
15
15
  * @returns The supported file types.
@@ -20,5 +20,5 @@ export interface IDocumentParserConnector {
20
20
  * @param file The file to check.
21
21
  * @returns Whether the connector supports the file.
22
22
  */
23
- supports(file: IFile): boolean;
23
+ supports(file: IFile | File): boolean;
24
24
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@crewdle/web-sdk-types",
3
- "version": "1.0.28",
3
+ "version": "1.0.30",
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",