dochub-sdk 0.1.392 → 0.1.393
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.
- package/interfaces/ai.ts +33 -2
- package/package.json +1 -1
package/interfaces/ai.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { DocHubJSONSchema } from '../schemas/basetypes';
|
|
2
2
|
import { DataLakePath } from './datalake';
|
|
3
3
|
import { DocHubEditorContext } from './editors';
|
|
4
|
-
|
|
4
|
+
|
|
5
5
|
|
|
6
6
|
/**
|
|
7
7
|
* События AI
|
|
@@ -26,6 +26,35 @@ export enum DocHubAIEvents {
|
|
|
26
26
|
*/
|
|
27
27
|
export interface IDocHubAIContextPortion {}
|
|
28
28
|
|
|
29
|
+
/**
|
|
30
|
+
* Причина вывода моделью
|
|
31
|
+
*/
|
|
32
|
+
export enum DocHubAIRequestTypingReason {
|
|
33
|
+
/**
|
|
34
|
+
* Размышления модели
|
|
35
|
+
*/
|
|
36
|
+
thinking = 'thinking',
|
|
37
|
+
/**
|
|
38
|
+
* Использование инструмента
|
|
39
|
+
*/
|
|
40
|
+
command = 'command',
|
|
41
|
+
/**
|
|
42
|
+
* Использование знаний
|
|
43
|
+
*/
|
|
44
|
+
knowledge = 'knowledge',
|
|
45
|
+
/**
|
|
46
|
+
* Ответ модели
|
|
47
|
+
*/
|
|
48
|
+
response = 'response'
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
export interface IDocHubAIRequestTypingMeta {
|
|
52
|
+
reason: DocHubAIRequestTypingReason;
|
|
53
|
+
payload?: IDocHubAIComposerCommandMeta | IDocHubAIComposerKnowledgeMeta;
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
export type DocHubAIRequestTyping = (text: string, meta: IDocHubAIRequestTypingMeta) => void;
|
|
57
|
+
|
|
29
58
|
/**
|
|
30
59
|
* Интерфейс открытого запроса к AI
|
|
31
60
|
*/
|
|
@@ -41,8 +70,9 @@ export interface IDocHubAIRequest {
|
|
|
41
70
|
/**
|
|
42
71
|
* Обрабатывает ответ от AI
|
|
43
72
|
* @param answer - Ответ от AI
|
|
73
|
+
* @param meta - Метаинформация о выводе
|
|
44
74
|
*/
|
|
45
|
-
onTyping?:
|
|
75
|
+
onTyping?: DocHubAIRequestTyping;
|
|
46
76
|
/**
|
|
47
77
|
* Обрабатывает завершение ответа от AI
|
|
48
78
|
*/
|
|
@@ -281,6 +311,7 @@ export interface IDocHubAICapabilities {
|
|
|
281
311
|
[DocHubAICapabilityID.temperature]?: boolean;
|
|
282
312
|
}
|
|
283
313
|
|
|
314
|
+
|
|
284
315
|
/**
|
|
285
316
|
* Интерфейс AI ассистента
|
|
286
317
|
*/
|