@crewdle/web-sdk-types 1.0.27 → 1.0.29

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 { GenerativeAIWorkerConnectorConstructor, NLPLibraryConnectorConstructor, SearchConnectorConstructor } from '../../generative-ai';
5
+ import { AISearchConnectorConstructor, GenerativeAIWorkerConnectorConstructor, NLPLibraryConnectorConstructor, 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';
@@ -70,6 +70,10 @@ export interface ISDKOptions {
70
70
  * The custom search connector to use for searching the web.
71
71
  */
72
72
  searchConnector?: SearchConnectorConstructor;
73
+ /**
74
+ * The custom AI search connector to use for AI search tasks.
75
+ */
76
+ aiSearchConnector?: AISearchConnectorConstructor;
73
77
  /**
74
78
  * The maximum number of outgoing subscriptions.
75
79
  */
@@ -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,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,13 @@
1
+ /**
2
+ * Represents an AI search connector.
3
+ * @category Connector
4
+ */
5
+ export interface IAISearchConnector {
6
+ /**
7
+ * Searches for the query.
8
+ * @param query The query to search for.
9
+ * @param apiKey The API key to use for the search.
10
+ * @returns A promise that resolves with the search result.
11
+ */
12
+ search(query: string, apiKey: string): Promise<string>;
13
+ }
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,6 @@
1
+ import { IAISearchConnector } from './AISearchConnector';
2
+ /**
3
+ * Represents an AI search connector constructor.
4
+ * @category AI
5
+ */
6
+ export type AISearchConnectorConstructor = new () => IAISearchConnector;
@@ -1,3 +1,5 @@
1
+ export * from './AISearchConnector';
2
+ export * from './AISearchConnectorConstructor';
1
3
  export * from './SearchConnector';
2
4
  export * from './SearchConnectorConstructor';
3
5
  export * from './SearchResult';
@@ -1,3 +1,5 @@
1
+ export * from './AISearchConnector';
2
+ export * from './AISearchConnectorConstructor';
1
3
  export * from './SearchConnector';
2
4
  export * from './SearchConnectorConstructor';
3
5
  export * from './SearchResult';
@@ -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.27",
3
+ "version": "1.0.29",
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",