@crewdle/web-sdk-types 1.0.23 → 1.0.24

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.
Files changed (147) hide show
  1. package/dist/core/cluster/Cluster.d.ts +16 -1
  2. package/dist/core/sdk/SDKOptions.d.ts +6 -1
  3. package/dist/core/stream/ContentType.d.ts +5 -1
  4. package/dist/core/stream/ContentType.js +4 -0
  5. package/dist/external-storage/ExternalStorageConnection.d.ts +54 -0
  6. package/dist/external-storage/ExternalStorageConnection.js +10 -0
  7. package/dist/external-storage/ExternalStorageConnectionConnector.d.ts +25 -0
  8. package/dist/external-storage/ExternalStorageConnectionConnectorConstructor.d.ts +6 -0
  9. package/dist/external-storage/ExternalStorageListOptions.d.ts +10 -0
  10. package/dist/external-storage/index.d.ts +4 -0
  11. package/dist/external-storage/index.js +4 -0
  12. package/dist/generative-ai/GenerativeAIContext.d.ts +42 -0
  13. package/dist/generative-ai/GenerativeAIJobType.d.ts +18 -0
  14. package/dist/{ai → generative-ai}/GenerativeAIWorkerConnector.d.ts +3 -1
  15. package/dist/generative-ai/IIndex.d.ts +18 -0
  16. package/dist/generative-ai/IIndex.js +1 -0
  17. package/dist/generative-ai/NLPLibraryConnector.js +1 -0
  18. package/dist/generative-ai/NLPLibraryConnectorConstructor.js +1 -0
  19. package/dist/{ai → generative-ai}/index.d.ts +6 -3
  20. package/dist/{ai → generative-ai}/index.js +6 -3
  21. package/dist/generative-ai/job/JobParametersGenerativeAI.d.ts +15 -0
  22. package/dist/generative-ai/job/JobParametersGenerativeAI.js +1 -0
  23. package/dist/generative-ai/job/JobResultGenerativeAI.d.ts +17 -0
  24. package/dist/generative-ai/job/JobResultGenerativeAI.js +1 -0
  25. package/dist/generative-ai/job/index.d.ts +2 -0
  26. package/dist/generative-ai/job/index.js +2 -0
  27. package/dist/generative-ai/jobs/download-document/GenerativeAIDownloadDocumentCreateJobParameters.d.ts +20 -0
  28. package/dist/generative-ai/jobs/download-document/GenerativeAIDownloadDocumentCreateJobParameters.js +1 -0
  29. package/dist/generative-ai/jobs/download-document/GenerativeAIDownloadDocumentJob.d.ts +25 -0
  30. package/dist/generative-ai/jobs/download-document/GenerativeAIDownloadDocumentJob.js +1 -0
  31. package/dist/generative-ai/jobs/download-document/GenerativeAIDownloadDocumentResult.d.ts +24 -0
  32. package/dist/generative-ai/jobs/download-document/GenerativeAIDownloadDocumentResult.js +1 -0
  33. package/dist/generative-ai/jobs/download-document/GenerativeAIDownloadDocumentWorkerParameters.d.ts +20 -0
  34. package/dist/generative-ai/jobs/download-document/GenerativeAIDownloadDocumentWorkerParameters.js +1 -0
  35. package/dist/generative-ai/jobs/download-document/index.d.ts +4 -0
  36. package/dist/generative-ai/jobs/download-document/index.js +4 -0
  37. package/dist/generative-ai/jobs/generic/GenerativeAICreateJobParameters.d.ts +11 -0
  38. package/dist/generative-ai/jobs/generic/GenerativeAICreateJobParameters.js +1 -0
  39. package/dist/generative-ai/jobs/generic/GenerativeAIJob.d.ts +10 -0
  40. package/dist/generative-ai/jobs/generic/GenerativeAIJob.js +1 -0
  41. package/dist/generative-ai/jobs/generic/GenerativeAIOptions.d.ts +7 -0
  42. package/dist/generative-ai/jobs/generic/GenerativeAIOptions.js +6 -0
  43. package/dist/generative-ai/jobs/generic/GenerativeAIWorkerConnectorParameters.d.ts +11 -0
  44. package/dist/generative-ai/jobs/generic/GenerativeAIWorkerConnectorParameters.js +1 -0
  45. package/dist/generative-ai/jobs/generic/GenerativeAIWorkerParameters.d.ts +12 -0
  46. package/dist/generative-ai/jobs/generic/GenerativeAIWorkerParameters.js +1 -0
  47. package/dist/generative-ai/jobs/generic/index.d.ts +5 -0
  48. package/dist/generative-ai/jobs/generic/index.js +5 -0
  49. package/dist/generative-ai/jobs/index.d.ts +4 -0
  50. package/dist/generative-ai/jobs/index.js +4 -0
  51. package/dist/generative-ai/jobs/prompt/GenerativeAIPromptCreateJobParameters.d.ts +21 -0
  52. package/dist/generative-ai/jobs/prompt/GenerativeAIPromptCreateJobParameters.js +1 -0
  53. package/dist/generative-ai/jobs/prompt/GenerativeAIPromptJob.d.ts +26 -0
  54. package/dist/generative-ai/jobs/prompt/GenerativeAIPromptJob.js +1 -0
  55. package/dist/generative-ai/jobs/prompt/GenerativeAIPromptOptions.d.ts +33 -0
  56. package/dist/generative-ai/jobs/prompt/GenerativeAIPromptOptions.js +1 -0
  57. package/dist/generative-ai/jobs/prompt/GenerativeAIPromptResult.d.ts +31 -0
  58. package/dist/generative-ai/jobs/prompt/GenerativeAIPromptResult.js +1 -0
  59. package/dist/generative-ai/jobs/prompt/GenerativeAIPromptWorkerConnectorParameters.d.ts +17 -0
  60. package/dist/generative-ai/jobs/prompt/GenerativeAIPromptWorkerConnectorParameters.js +1 -0
  61. package/dist/generative-ai/jobs/prompt/GenerativeAIPromptWorkerParameters.d.ts +20 -0
  62. package/dist/generative-ai/jobs/prompt/GenerativeAIPromptWorkerParameters.js +1 -0
  63. package/dist/generative-ai/jobs/prompt/GenerativeAIWorkerConnectorPromptResult.d.ts +7 -0
  64. package/dist/generative-ai/jobs/prompt/GenerativeAIWorkerConnectorPromptResult.js +1 -0
  65. package/dist/generative-ai/jobs/prompt/index.d.ts +9 -0
  66. package/dist/generative-ai/jobs/prompt/index.js +9 -0
  67. package/dist/generative-ai/jobs/prompt/options/PromptFunction.d.ts +22 -0
  68. package/dist/generative-ai/jobs/prompt/options/PromptFunction.js +1 -0
  69. package/dist/generative-ai/jobs/prompt/options/PromptFunctionParams.d.ts +11 -0
  70. package/dist/generative-ai/jobs/prompt/options/PromptFunctionParams.js +1 -0
  71. package/dist/generative-ai/jobs/prompt/options/PromptFunctionParamsType.d.ts +17 -0
  72. package/dist/generative-ai/jobs/prompt/options/PromptFunctionParamsType.js +18 -0
  73. package/dist/generative-ai/jobs/prompt/options/PromptHistory.d.ts +16 -0
  74. package/dist/generative-ai/jobs/prompt/options/PromptHistory.js +2 -0
  75. package/dist/generative-ai/jobs/prompt/options/PromptSource.d.ts +14 -0
  76. package/dist/generative-ai/jobs/prompt/options/PromptSource.js +16 -0
  77. package/dist/generative-ai/jobs/prompt/options/index.d.ts +5 -0
  78. package/dist/generative-ai/jobs/prompt/options/index.js +5 -0
  79. package/dist/generative-ai/jobs/prompt/result/PromptTypeText.d.ts +4 -0
  80. package/dist/generative-ai/jobs/prompt/result/PromptTypeText.js +1 -0
  81. package/dist/generative-ai/jobs/prompt/result/PromptTypeVector.d.ts +4 -0
  82. package/dist/generative-ai/jobs/prompt/result/PromptTypeVector.js +1 -0
  83. package/dist/generative-ai/jobs/prompt/result/index.d.ts +2 -0
  84. package/dist/generative-ai/jobs/prompt/result/index.js +2 -0
  85. package/dist/generative-ai/jobs/rating/GenerativeAIRating.d.ts +8 -0
  86. package/dist/generative-ai/jobs/rating/GenerativeAIRating.js +9 -0
  87. package/dist/generative-ai/jobs/rating/GenerativeAIRatingCreateJobParameters.d.ts +26 -0
  88. package/dist/generative-ai/jobs/rating/GenerativeAIRatingCreateJobParameters.js +1 -0
  89. package/dist/generative-ai/jobs/rating/GenerativeAIRatingJob.d.ts +25 -0
  90. package/dist/generative-ai/jobs/rating/GenerativeAIRatingJob.js +1 -0
  91. package/dist/generative-ai/jobs/rating/GenerativeAIRatingOptions.d.ts +16 -0
  92. package/dist/generative-ai/jobs/rating/GenerativeAIRatingOptions.js +1 -0
  93. package/dist/generative-ai/jobs/rating/GenerativeAIRatingResult.d.ts +18 -0
  94. package/dist/generative-ai/jobs/rating/GenerativeAIRatingResult.js +1 -0
  95. package/dist/generative-ai/jobs/rating/GenerativeAIRatingStatus.d.ts +8 -0
  96. package/dist/generative-ai/jobs/rating/GenerativeAIRatingStatus.js +9 -0
  97. package/dist/generative-ai/jobs/rating/GenerativeAIRatingWorkerParameters.d.ts +29 -0
  98. package/dist/generative-ai/jobs/rating/GenerativeAIRatingWorkerParameters.js +1 -0
  99. package/dist/generative-ai/jobs/rating/index.d.ts +7 -0
  100. package/dist/generative-ai/jobs/rating/index.js +7 -0
  101. package/dist/generative-ai/search/SearchConnector.js +1 -0
  102. package/dist/generative-ai/search/SearchConnectorConstructor.js +1 -0
  103. package/dist/generative-ai/search/SearchResult.d.ts +19 -0
  104. package/dist/generative-ai/search/SearchResult.js +5 -0
  105. package/dist/generative-ai/search/index.d.ts +3 -0
  106. package/dist/generative-ai/search/index.js +3 -0
  107. package/dist/generative-ai/union-types/CreateAIJobParameters.d.ts +8 -0
  108. package/dist/generative-ai/union-types/CreateAIJobParameters.js +1 -0
  109. package/dist/generative-ai/union-types/GenerativeAIJob.d.ts +8 -0
  110. package/dist/generative-ai/union-types/GenerativeAIJob.js +1 -0
  111. package/dist/generative-ai/union-types/GenerativeAIJobOptions.d.ts +7 -0
  112. package/dist/generative-ai/union-types/GenerativeAIJobOptions.js +1 -0
  113. package/dist/generative-ai/union-types/GenerativeAIJobResult.d.ts +9 -0
  114. package/dist/generative-ai/union-types/GenerativeAIJobResult.js +1 -0
  115. package/dist/generative-ai/union-types/GenerativeAIWorkerConnectorParameters.d.ts +6 -0
  116. package/dist/generative-ai/union-types/GenerativeAIWorkerConnectorParameters.js +1 -0
  117. package/dist/generative-ai/union-types/GenerativeAIWorkerConnectorResult.d.ts +12 -0
  118. package/dist/generative-ai/union-types/GenerativeAIWorkerConnectorResult.js +1 -0
  119. package/dist/generative-ai/union-types/GenerativeAIWorkerParameters.d.ts +8 -0
  120. package/dist/generative-ai/union-types/GenerativeAIWorkerParameters.js +1 -0
  121. package/dist/generative-ai/union-types/index.d.ts +7 -0
  122. package/dist/generative-ai/union-types/index.js +7 -0
  123. package/dist/graph-database/GraphDatabase.d.ts +1 -1
  124. package/dist/graph-database/GraphDatabaseConnector.d.ts +1 -1
  125. package/dist/index.d.ts +2 -1
  126. package/dist/index.js +2 -1
  127. package/dist/object-storage/ObjectStoreBucket.d.ts +1 -1
  128. package/dist/vector-database/VectorDatabase.d.ts +1 -1
  129. package/dist/vector-database/VectorDatabaseConnector.d.ts +1 -1
  130. package/package.json +1 -1
  131. package/dist/ai/GenerativeAI.d.ts +0 -328
  132. package/dist/ai/GenerativeAI.js +0 -53
  133. package/dist/ai/GenerativeAIContext.d.ts +0 -132
  134. /package/dist/{ai/GenerativeAIContext.js → external-storage/ExternalStorageConnectionConnector.js} +0 -0
  135. /package/dist/{ai/GenerativeAIWorker.js → external-storage/ExternalStorageConnectionConnectorConstructor.js} +0 -0
  136. /package/dist/{ai/GenerativeAIWorkerConnectorConstructor.js → external-storage/ExternalStorageListOptions.js} +0 -0
  137. /package/dist/{ai/NLPLibraryConnector.js → generative-ai/GenerativeAIContext.js} +0 -0
  138. /package/dist/{ai/NLPLibraryConnectorConstructor.js → generative-ai/GenerativeAIJobType.js} +0 -0
  139. /package/dist/{ai → generative-ai}/GenerativeAIWorker.d.ts +0 -0
  140. /package/dist/{ai/SearchConnector.js → generative-ai/GenerativeAIWorker.js} +0 -0
  141. /package/dist/{ai → generative-ai}/GenerativeAIWorkerConnector.js +0 -0
  142. /package/dist/{ai → generative-ai}/GenerativeAIWorkerConnectorConstructor.d.ts +0 -0
  143. /package/dist/{ai/SearchConnectorConstructor.js → generative-ai/GenerativeAIWorkerConnectorConstructor.js} +0 -0
  144. /package/dist/{ai → generative-ai}/NLPLibraryConnector.d.ts +0 -0
  145. /package/dist/{ai → generative-ai}/NLPLibraryConnectorConstructor.d.ts +0 -0
  146. /package/dist/{ai → generative-ai/search}/SearchConnector.d.ts +0 -0
  147. /package/dist/{ai → generative-ai/search}/SearchConnectorConstructor.d.ts +0 -0
@@ -0,0 +1,21 @@
1
+ import { GenerativeAIJobType } from '../../GenerativeAIJobType';
2
+ import { IGenerativeAICreateJobParameters } from '../generic';
3
+ import { IGenerativeAIPromptOptions } from './GenerativeAIPromptOptions';
4
+ /**
5
+ * Represents the parameters of a prompt job.
6
+ * @category AI
7
+ */
8
+ export interface IGenerativeAIPromptCreateJobParameters extends IGenerativeAICreateJobParameters {
9
+ /**
10
+ * The prompt job type.
11
+ */
12
+ type: GenerativeAIJobType.Prompt;
13
+ /**
14
+ * The prompt to be processed.
15
+ */
16
+ prompt: string;
17
+ /**
18
+ * The options for the prompt.
19
+ */
20
+ options?: IGenerativeAIPromptOptions;
21
+ }
@@ -0,0 +1,26 @@
1
+ import { IGenerativeAIPromptOptions, IGenerativeAIPromptResult } from '.';
2
+ import { IGenerativeAIJob } from '../generic';
3
+ /**
4
+ * Represents bounded prompt job ready to be run or streamed.
5
+ * @category AI
6
+ */
7
+ export interface IGenerativeAIPromptJob extends IGenerativeAIJob {
8
+ /**
9
+ * The prompt to be processed
10
+ */
11
+ prompt: string;
12
+ /**
13
+ * The options for the prompt.
14
+ */
15
+ options: IGenerativeAIPromptOptions;
16
+ /**
17
+ * Run the prompt job.
18
+ * @returns A promise that resolves with the result
19
+ */
20
+ run: () => Promise<IGenerativeAIPromptResult>;
21
+ /**
22
+ * Stream the prompt job.
23
+ * @returns An async generator that yields the result
24
+ */
25
+ stream: () => AsyncGenerator<IGenerativeAIPromptResult>;
26
+ }
@@ -0,0 +1,33 @@
1
+ import { IGenerativeAIOptions } from '../generic/GenerativeAIOptions';
2
+ import { IPromptFunction, IPromptHistory } from './options';
3
+ /**
4
+ * The AI prompt options Interface
5
+ * Represents the options for an AI prompt.
6
+ * @category AI
7
+ */
8
+ export interface IGenerativeAIPromptOptions extends IGenerativeAIOptions {
9
+ /**
10
+ * The thread id
11
+ */
12
+ threadId: string;
13
+ /**
14
+ * The instructions for the AI job.
15
+ */
16
+ instructions?: string;
17
+ /**
18
+ * The context for the AI job.
19
+ */
20
+ history?: IPromptHistory[];
21
+ /**
22
+ * The maximum number of tokens to generate.
23
+ */
24
+ maxTokens?: number;
25
+ /**
26
+ * The temperature for the LLM.
27
+ */
28
+ temperature?: number;
29
+ /**
30
+ * The functions that can be called by the LLM.
31
+ */
32
+ functions?: Map<string, IPromptFunction>;
33
+ }
@@ -0,0 +1,31 @@
1
+ import { GenerativeAIJobType } from '../../GenerativeAIJobType';
2
+ import { IJobResultGenerativeAI } from '../../job/JobResultGenerativeAI';
3
+ import { ISearchResult } from '../../search';
4
+ import { PromptTypeText, PromptTypeVector } from './result';
5
+ /**
6
+ * The AI prompt result Interface
7
+ * Represents the result of an AI prompt.
8
+ * @category AI
9
+ */
10
+ export interface IGenerativeAIPromptResult extends IJobResultGenerativeAI {
11
+ /**
12
+ * The prompt AI job type.
13
+ */
14
+ type: GenerativeAIJobType.Prompt;
15
+ /**
16
+ * The output of the AI job.
17
+ */
18
+ output?: PromptTypeText | PromptTypeVector;
19
+ /**
20
+ * The relevant context used by the AI job.
21
+ */
22
+ context?: ISearchResult[];
23
+ /**
24
+ * The tokens used by the AI job.
25
+ */
26
+ inputTokens?: number;
27
+ /**
28
+ * The tokens generated by the AI job.
29
+ */
30
+ outputTokens?: number;
31
+ }
@@ -0,0 +1,17 @@
1
+ import { GenerativeAIJobType } from '../../GenerativeAIJobType';
2
+ import { IGenerativeAIWorkerConnectorParameters } from '../generic/GenerativeAIWorkerConnectorParameters';
3
+ import { IGenerativeAIPromptOptions } from './GenerativeAIPromptOptions';
4
+ /**
5
+ * AI prompt worker connector parameters Interface
6
+ * @category AI
7
+ */
8
+ export interface IGenerativeAIPromptWorkerConnectorParameters extends IGenerativeAIWorkerConnectorParameters, IGenerativeAIPromptOptions {
9
+ /**
10
+ * The AI job type.
11
+ */
12
+ type: GenerativeAIJobType.Prompt;
13
+ /**
14
+ * The prompt for the AI job.
15
+ */
16
+ prompt: string;
17
+ }
@@ -0,0 +1,20 @@
1
+ import { GenerativeAIJobType } from '../../GenerativeAIJobType';
2
+ import { IGenerativeAIWorkerParameters } from '../generic/GenerativeAIWorkerParameters';
3
+ /**
4
+ * AI prompt job parameters Interface
5
+ * @category AI
6
+ */
7
+ export interface IGenerativeAIPromptWorkerParameters extends IGenerativeAIWorkerParameters {
8
+ /**
9
+ * The AI job type.
10
+ */
11
+ type: GenerativeAIJobType.Prompt;
12
+ /**
13
+ * The prompt for the AI job.
14
+ */
15
+ prompt: string;
16
+ /**
17
+ * The thread ID
18
+ */
19
+ threadId: string;
20
+ }
@@ -0,0 +1,7 @@
1
+ import { IGenerativeAIPromptResult } from './GenerativeAIPromptResult';
2
+ /**
3
+ * AI worker connector prompt result Interface
4
+ * @category AI
5
+ */
6
+ export interface IGenerativeAIWorkerConnectorPromptResult extends IGenerativeAIPromptResult {
7
+ }
@@ -0,0 +1,9 @@
1
+ export * from './options';
2
+ export * from './result';
3
+ export * from './GenerativeAIPromptCreateJobParameters';
4
+ export * from './GenerativeAIPromptJob';
5
+ export * from './GenerativeAIPromptOptions';
6
+ export * from './GenerativeAIPromptResult';
7
+ export * from './GenerativeAIPromptWorkerConnectorParameters';
8
+ export * from './GenerativeAIPromptWorkerParameters';
9
+ export * from './GenerativeAIWorkerConnectorPromptResult';
@@ -0,0 +1,9 @@
1
+ export * from './options';
2
+ export * from './result';
3
+ export * from './GenerativeAIPromptCreateJobParameters';
4
+ export * from './GenerativeAIPromptJob';
5
+ export * from './GenerativeAIPromptOptions';
6
+ export * from './GenerativeAIPromptResult';
7
+ export * from './GenerativeAIPromptWorkerConnectorParameters';
8
+ export * from './GenerativeAIPromptWorkerParameters';
9
+ export * from './GenerativeAIWorkerConnectorPromptResult';
@@ -0,0 +1,22 @@
1
+ import { IPromptFunctionParams } from './PromptFunctionParams';
2
+ /**
3
+ * The AI prompt function Interface
4
+ * Represents a function that can be called by the LLM.
5
+ * @category AI
6
+ */
7
+ export interface IPromptFunction {
8
+ /**
9
+ * The function description.
10
+ */
11
+ description: string;
12
+ /**
13
+ * The function parameters.
14
+ */
15
+ params?: IPromptFunctionParams;
16
+ /**
17
+ * The function callback.
18
+ */
19
+ callback: (params?: {
20
+ [key: string]: string | number | boolean;
21
+ }) => string | Promise<string>;
22
+ }
@@ -0,0 +1,11 @@
1
+ import { PromptFunctionParamsType } from './PromptFunctionParamsType';
2
+ /**
3
+ * The AI prompt function parameters Interface
4
+ * Represents the parameters for a prompt function.
5
+ * @category AI
6
+ */
7
+ export interface IPromptFunctionParams {
8
+ [key: string]: {
9
+ type: PromptFunctionParamsType;
10
+ };
11
+ }
@@ -0,0 +1,17 @@
1
+ /**
2
+ * The type of parameters supported for agentic functions
3
+ */
4
+ export declare enum PromptFunctionParamsType {
5
+ /**
6
+ * The parameter is a string.
7
+ */
8
+ String = "string",
9
+ /**
10
+ * The parameter is a number.
11
+ */
12
+ Number = "number",
13
+ /**
14
+ * The parameter is a boolean.
15
+ */
16
+ Boolean = "boolean"
17
+ }
@@ -0,0 +1,18 @@
1
+ /**
2
+ * The type of parameters supported for agentic functions
3
+ */
4
+ export var PromptFunctionParamsType;
5
+ (function (PromptFunctionParamsType) {
6
+ /**
7
+ * The parameter is a string.
8
+ */
9
+ PromptFunctionParamsType["String"] = "string";
10
+ /**
11
+ * The parameter is a number.
12
+ */
13
+ PromptFunctionParamsType["Number"] = "number";
14
+ /**
15
+ * The parameter is a boolean.
16
+ */
17
+ PromptFunctionParamsType["Boolean"] = "boolean";
18
+ })(PromptFunctionParamsType || (PromptFunctionParamsType = {}));
@@ -0,0 +1,16 @@
1
+ import { PromptSource } from './PromptSource';
2
+ /**
3
+ * The AI prompt history Interface
4
+ * Represents the history of a prompt.
5
+ * @category AI
6
+ */
7
+ export interface IPromptHistory {
8
+ /**
9
+ * The source of the prompt.
10
+ */
11
+ source: PromptSource;
12
+ /**
13
+ * The prompt.
14
+ */
15
+ message: string;
16
+ }
@@ -0,0 +1,2 @@
1
+ ;
2
+ export {};
@@ -0,0 +1,14 @@
1
+ /**
2
+ * The AI prompt source Enum
3
+ * @category AI
4
+ */
5
+ export declare enum PromptSource {
6
+ /**
7
+ * The prompt was generated by the AI.
8
+ */
9
+ AI = "ai",
10
+ /**
11
+ * The prompt was generated by a human.
12
+ */
13
+ Human = "human"
14
+ }
@@ -0,0 +1,16 @@
1
+ /**
2
+ * The AI prompt source Enum
3
+ * @category AI
4
+ */
5
+ export var PromptSource;
6
+ (function (PromptSource) {
7
+ /**
8
+ * The prompt was generated by the AI.
9
+ */
10
+ PromptSource["AI"] = "ai";
11
+ /**
12
+ * The prompt was generated by a human.
13
+ */
14
+ PromptSource["Human"] = "human";
15
+ })(PromptSource || (PromptSource = {}));
16
+ ;
@@ -0,0 +1,5 @@
1
+ export * from './PromptFunction';
2
+ export * from './PromptFunctionParams';
3
+ export * from './PromptFunctionParamsType';
4
+ export * from './PromptHistory';
5
+ export * from './PromptSource';
@@ -0,0 +1,5 @@
1
+ export * from './PromptFunction';
2
+ export * from './PromptFunctionParams';
3
+ export * from './PromptFunctionParamsType';
4
+ export * from './PromptHistory';
5
+ export * from './PromptSource';
@@ -0,0 +1,4 @@
1
+ /**
2
+ * The AI prompt type text
3
+ */
4
+ export type PromptTypeText = string | string[];
@@ -0,0 +1,4 @@
1
+ /**
2
+ * The AI prompt type vector
3
+ */
4
+ export type PromptTypeVector = number[];
@@ -0,0 +1,2 @@
1
+ export * from './PromptTypeText';
2
+ export * from './PromptTypeVector';
@@ -0,0 +1,2 @@
1
+ export * from './PromptTypeText';
2
+ export * from './PromptTypeVector';
@@ -0,0 +1,8 @@
1
+ /**
2
+ * The AI prompt rating Enum
3
+ * @category AI
4
+ */
5
+ export declare enum GenerativeAIRating {
6
+ Up = "up",
7
+ Down = "down"
8
+ }
@@ -0,0 +1,9 @@
1
+ /**
2
+ * The AI prompt rating Enum
3
+ * @category AI
4
+ */
5
+ export var GenerativeAIRating;
6
+ (function (GenerativeAIRating) {
7
+ GenerativeAIRating["Up"] = "up";
8
+ GenerativeAIRating["Down"] = "down";
9
+ })(GenerativeAIRating || (GenerativeAIRating = {}));
@@ -0,0 +1,26 @@
1
+ import { GenerativeAIJobType } from '../../GenerativeAIJobType';
2
+ import { IGenerativeAICreateJobParameters } from '../generic';
3
+ import { GenerativeAIRating } from './GenerativeAIRating';
4
+ import { IGenerativeAIRatingOptions } from './GenerativeAIRatingOptions';
5
+ /**
6
+ * Represents the parameters of a rating job.
7
+ * @category AI
8
+ */
9
+ export interface IGenerativeAIRatingCreateJobParameters extends IGenerativeAICreateJobParameters {
10
+ /**
11
+ * The rating job type.
12
+ */
13
+ type: GenerativeAIJobType.Rating;
14
+ /**
15
+ * The job ID associated with the message.
16
+ */
17
+ jobId: string;
18
+ /**
19
+ * The rating of the prompt.
20
+ */
21
+ rating: GenerativeAIRating;
22
+ /**
23
+ * The options for the rating.
24
+ */
25
+ options: IGenerativeAIRatingOptions;
26
+ }
@@ -0,0 +1,25 @@
1
+ import { IGenerativeAIRatingOptions, IGenerativeAIRatingResult, GenerativeAIRating } from '.';
2
+ import { IGenerativeAIJob } from '../generic';
3
+ /**
4
+ * Represents bounded rating job ready to be run or streamed.
5
+ * @category AI
6
+ */
7
+ export interface IGenerativeAIRatingJob extends IGenerativeAIJob {
8
+ /**
9
+ * The job ID.
10
+ */
11
+ id: string;
12
+ /**
13
+ * The rating for the job.
14
+ */
15
+ rating: GenerativeAIRating;
16
+ /**
17
+ * The options for the rating.
18
+ */
19
+ options: IGenerativeAIRatingOptions;
20
+ /**
21
+ * Run the rating job.
22
+ * @returns A promise that resolves with the result
23
+ */
24
+ rate: () => Promise<IGenerativeAIRatingResult>;
25
+ }
@@ -0,0 +1,16 @@
1
+ import { IGenerativeAIOptions } from '../generic/GenerativeAIOptions';
2
+ /**
3
+ * The AI rating options Interface
4
+ * Represents the options for an AI rating.
5
+ * @category AI
6
+ */
7
+ export interface IGenerativeAIRatingOptions extends IGenerativeAIOptions {
8
+ /**
9
+ * The thread id
10
+ */
11
+ threadId: string;
12
+ /**
13
+ * The user feedback for the AI job.
14
+ */
15
+ feedback?: string;
16
+ }
@@ -0,0 +1,18 @@
1
+ import { GenerativeAIJobType } from '../../GenerativeAIJobType';
2
+ import { IJobResultGenerativeAI } from '../../job/JobResultGenerativeAI';
3
+ import { GenerativeAIRatingStatus } from './GenerativeAIRatingStatus';
4
+ /**
5
+ * The AI rating result Interface
6
+ * Represents the result of an AI rating.
7
+ * @category AI
8
+ */
9
+ export interface IGenerativeAIRatingResult extends IJobResultGenerativeAI {
10
+ /**
11
+ * The rating AI job type.
12
+ */
13
+ type: GenerativeAIJobType.Rating;
14
+ /**
15
+ * The status of the rating.
16
+ */
17
+ status: GenerativeAIRatingStatus;
18
+ }
@@ -0,0 +1,8 @@
1
+ /**
2
+ * The AI rating status Enum
3
+ * @category AI
4
+ */
5
+ export declare enum GenerativeAIRatingStatus {
6
+ Success = "success",
7
+ Error = "error"
8
+ }
@@ -0,0 +1,9 @@
1
+ /**
2
+ * The AI rating status Enum
3
+ * @category AI
4
+ */
5
+ export var GenerativeAIRatingStatus;
6
+ (function (GenerativeAIRatingStatus) {
7
+ GenerativeAIRatingStatus["Success"] = "success";
8
+ GenerativeAIRatingStatus["Error"] = "error";
9
+ })(GenerativeAIRatingStatus || (GenerativeAIRatingStatus = {}));
@@ -0,0 +1,29 @@
1
+ import { GenerativeAIJobType } from '../../GenerativeAIJobType';
2
+ import { GenerativeAIRating } from './GenerativeAIRating';
3
+ import { IGenerativeAIWorkerParameters } from '../generic/GenerativeAIWorkerParameters';
4
+ /**
5
+ * AI rating job parameters Interface
6
+ * @category AI
7
+ */
8
+ export interface IGenerativeAIRatingWorkerParameters extends IGenerativeAIWorkerParameters {
9
+ /**
10
+ * The AI job type.
11
+ */
12
+ type: GenerativeAIJobType.Rating;
13
+ /**
14
+ * The job ID.
15
+ */
16
+ jobId: string;
17
+ /**
18
+ * The rating for the AI prompt.
19
+ */
20
+ rating: GenerativeAIRating;
21
+ /**
22
+ * The thread ID
23
+ */
24
+ threadId: string;
25
+ /**
26
+ * The feedback for the AI prompt
27
+ */
28
+ feedback?: string;
29
+ }
@@ -0,0 +1,7 @@
1
+ export * from './GenerativeAIRatingCreateJobParameters';
2
+ export * from './GenerativeAIRatingJob';
3
+ export * from './GenerativeAIRatingStatus';
4
+ export * from './GenerativeAIRating';
5
+ export * from './GenerativeAIRatingOptions';
6
+ export * from './GenerativeAIRatingWorkerParameters';
7
+ export * from './GenerativeAIRatingResult';
@@ -0,0 +1,7 @@
1
+ export * from './GenerativeAIRatingCreateJobParameters';
2
+ export * from './GenerativeAIRatingJob';
3
+ export * from './GenerativeAIRatingStatus';
4
+ export * from './GenerativeAIRating';
5
+ export * from './GenerativeAIRatingOptions';
6
+ export * from './GenerativeAIRatingWorkerParameters';
7
+ export * from './GenerativeAIRatingResult';
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,19 @@
1
+ /**
2
+ * Represents a search result.
3
+ * @category AI
4
+ */
5
+ export interface ISearchResult {
6
+ /**
7
+ * The content of the search result.
8
+ */
9
+ content: string;
10
+ /**
11
+ * The relevance of the search result.
12
+ * The relevance is a number between 0 and 1, where 1 is the most relevant.
13
+ */
14
+ relevance: number;
15
+ /**
16
+ * The path name of the document containing the search result.
17
+ */
18
+ pathName: string;
19
+ }
@@ -0,0 +1,5 @@
1
+ /**
2
+ * Represents a search result.
3
+ * @category AI
4
+ */
5
+ export {};
@@ -0,0 +1,3 @@
1
+ export * from './SearchConnector';
2
+ export * from './SearchConnectorConstructor';
3
+ export * from './SearchResult';
@@ -0,0 +1,3 @@
1
+ export * from './SearchConnector';
2
+ export * from './SearchConnectorConstructor';
3
+ export * from './SearchResult';
@@ -0,0 +1,8 @@
1
+ import { IGenerativeAIDownloadDocumentCreateJobParameters } from '../jobs/download-document';
2
+ import { IGenerativeAIPromptCreateJobParameters } from '../jobs/prompt';
3
+ import { IGenerativeAIRatingCreateJobParameters } from '../jobs/rating';
4
+ /**
5
+ * Represents the parameters of an AI job.
6
+ * @category AI
7
+ */
8
+ export type CreateAIJobParameters = IGenerativeAIPromptCreateJobParameters | IGenerativeAIRatingCreateJobParameters | IGenerativeAIDownloadDocumentCreateJobParameters;