@glodon-aiot/apis 2.4.7

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 (64) hide show
  1. package/README.git.md +73 -0
  2. package/README.lib.md +135 -0
  3. package/dist/es/aecpilot/cosntant.mjs +5 -0
  4. package/dist/es/aecpilot/index.mjs +510 -0
  5. package/dist/es/aecpilot/model.mjs +9 -0
  6. package/dist/es/aecpilotui/index.mjs +607 -0
  7. package/dist/es/agentcliui/index.mjs +418 -0
  8. package/dist/es/aishop/index.mjs +97 -0
  9. package/dist/es/aishop/model.mjs +5 -0
  10. package/dist/es/auth/index.mjs +52 -0
  11. package/dist/es/base/index.mjs +158 -0
  12. package/dist/es/contralyze/index.mjs +91 -0
  13. package/dist/es/cvforce/index.mjs +431 -0
  14. package/dist/es/cvforce/model.mjs +12 -0
  15. package/dist/es/cvforce-datahub/index.mjs +435 -0
  16. package/dist/es/cvforce-datahub/model.mjs +8 -0
  17. package/dist/es/cvforce-modelservice/index.mjs +114 -0
  18. package/dist/es/cvforce-modelservice/model.mjs +4 -0
  19. package/dist/es/index.mjs +62 -0
  20. package/dist/es/node_modules/uuid/dist/esm-browser/native.mjs +6 -0
  21. package/dist/es/node_modules/uuid/dist/esm-browser/rng.mjs +10 -0
  22. package/dist/es/node_modules/uuid/dist/esm-browser/stringify.mjs +9 -0
  23. package/dist/es/node_modules/uuid/dist/esm-browser/v4.mjs +19 -0
  24. package/dist/es/panorama/index.mjs +136 -0
  25. package/dist/es/panorama/model.mjs +5 -0
  26. package/dist/es/pluginmgr/index.mjs +85 -0
  27. package/dist/es/user/index.mjs +193 -0
  28. package/dist/es/utils/fetchEventSource/fetch.mjs +112 -0
  29. package/dist/es/utils/fetchEventSource/parse.mjs +97 -0
  30. package/dist/es/utils/index.mjs +9 -0
  31. package/dist/lib/index.js +3 -0
  32. package/dist/src/aecpilot/cosntant.d.ts +8 -0
  33. package/dist/src/aecpilot/index.d.ts +79 -0
  34. package/dist/src/aecpilot/model.d.ts +350 -0
  35. package/dist/src/aecpilotui/index.d.ts +72 -0
  36. package/dist/src/aecpilotui/model.d.ts +63 -0
  37. package/dist/src/agentcliui/index.d.ts +72 -0
  38. package/dist/src/agentcliui/model.d.ts +39 -0
  39. package/dist/src/aishop/index.d.ts +26 -0
  40. package/dist/src/aishop/model.d.ts +111 -0
  41. package/dist/src/auth/index.d.ts +17 -0
  42. package/dist/src/auth/model.d.ts +24 -0
  43. package/dist/src/base/index.d.ts +41 -0
  44. package/dist/src/base/model.d.ts +20 -0
  45. package/dist/src/contralyze/index.d.ts +24 -0
  46. package/dist/src/contralyze/model.d.ts +75 -0
  47. package/dist/src/cvforce/index.d.ts +130 -0
  48. package/dist/src/cvforce/model.d.ts +519 -0
  49. package/dist/src/cvforce-datahub/index.d.ts +186 -0
  50. package/dist/src/cvforce-datahub/model.d.ts +438 -0
  51. package/dist/src/cvforce-modelservice/index.d.ts +23 -0
  52. package/dist/src/cvforce-modelservice/model.d.ts +156 -0
  53. package/dist/src/index.d.ts +19 -0
  54. package/dist/src/panorama/index.d.ts +42 -0
  55. package/dist/src/panorama/model.d.ts +263 -0
  56. package/dist/src/pluginmgr/index.d.ts +28 -0
  57. package/dist/src/pluginmgr/model.d.ts +48 -0
  58. package/dist/src/user/index.d.ts +42 -0
  59. package/dist/src/user/model.d.ts +247 -0
  60. package/dist/src/utils/fetchEventSource/fetch.d.ts +44 -0
  61. package/dist/src/utils/fetchEventSource/index.d.ts +1 -0
  62. package/dist/src/utils/fetchEventSource/parse.d.ts +36 -0
  63. package/dist/src/utils/index.d.ts +1 -0
  64. package/package.json +88 -0
@@ -0,0 +1,130 @@
1
+ import { AxiosInstance } from 'axios';
2
+ import { ApiErrorHandler, BaseApi } from '../base';
3
+ import { IKnowledge, IKnowledgeParam, IFileParam, IFile, IUploadParam, IUploadTicket, ISessionParam, ISession, ICommentParam, IChatMessage, IHistory, IApplication, IApplicationParam, IFileNameParam, IResource, IResourceParam, IComposedFile, IAppToken, IEmbeddingData, IAppList, MinioConfig, KnowledgeFileMetadata, KnowledgeFileMetadataParams, IAecModel, IPrompt, ISessionPrompt, IAppGetParam, IPresetApplication, IKnowledgeConfig, IFileData, IFileDataParam, IResourceTokenParam, IResourceToken, IPresetKnowledge, IMetaData, IGeneques, SessionQueryParams, ChatHistoryParams } from './model';
4
+ import { PageQueryParams } from '../base/model';
5
+ import { IBaseModel } from '../agentcliui/model';
6
+ export declare class CVForceApi extends BaseApi {
7
+ constructor(axiosInstance?: AxiosInstance, errorHandler?: ApiErrorHandler);
8
+ getKnowledge(docId?: string, name?: string): Promise<IKnowledge[]>;
9
+ postKnowledge(params: IKnowledgeParam): Promise<string>;
10
+ getKnowledgeId(id: string): Promise<IKnowledge>;
11
+ patchKnowledgeId(id: string, params: IKnowledgeParam): Promise<string>;
12
+ delKnowledgeId(id: string): Promise<{
13
+ id: string;
14
+ }>;
15
+ getKnowledgeIdFile(id: string): Promise<IFile[]>;
16
+ getKnowledgeIdFileList(id: string, params: PageQueryParams & {
17
+ enabled?: number;
18
+ }): Promise<import('../base').Paged<IFile>>;
19
+ postKnowledgeIdFile(id: string, params: IFileParam): Promise<{
20
+ id: string;
21
+ }>;
22
+ getUploadTicket(params: IUploadParam): Promise<IUploadTicket>;
23
+ delKnowledgeIdFileFid(id: string, fid: string): Promise<{
24
+ id: string;
25
+ }>;
26
+ patchKnowledgeIdFileFid(id: string, fileId: string, params: IFileNameParam): Promise<IFile[]>;
27
+ listSessions(appId: string, params?: SessionQueryParams): Promise<ISession[]>;
28
+ postSession(appId: string, params: ISessionParam): Promise<ISession>;
29
+ getSession(appId: string, id: string): Promise<ISession>;
30
+ patchSessionsId(appId: string, id: string, params: ISessionParam): Promise<ISession>;
31
+ delSessionsId(appId: string, id: string): Promise<ISession>;
32
+ getSessionKnowledgeFile(appId: string, sessionId: string, fileId: string): Promise<KnowledgeFileMetadata>;
33
+ postSessionKnowledgeFile(appId: string, sessionId: string, params: KnowledgeFileMetadataParams): Promise<string>;
34
+ postComments(params: ICommentParam): Promise<unknown>;
35
+ /**
36
+ * 查询会话记录
37
+ * 规则:
38
+ * 1. startTime + pageSize:向后查询
39
+ * 2. startTime + pageSize:向前查询
40
+ * 3. startTIme + endTime :查询区间(忽略pageSize)
41
+ * 4. pageSize 必须是偶数,问答必须一同查询。不严谨,但前端没有办法😭
42
+ * 5. 这里的time对应的是对话记录里的messageTime字段,该字段只精确到秒,并不严谨,导致规则4的出现
43
+ **/
44
+ getChatHistorySessionId(applicationId: string, sessionId: string, params?: ChatHistoryParams): Promise<IChatMessage[]>;
45
+ postChatHistorySessionId(sessionId: string, params: {
46
+ history: IHistory[];
47
+ }): Promise<unknown>;
48
+ getApplications(params?: IAppGetParam): Promise<IApplication[]>;
49
+ postApplication(params: IApplicationParam): Promise<IApplication>;
50
+ getApplicationId(id: string): Promise<IApplication>;
51
+ patchApplicationId(id: string, params: IApplicationParam): Promise<IApplication>;
52
+ delApplicationId(id: string): Promise<unknown>;
53
+ getApplicationIdSessions(id: string): Promise<ISession[]>;
54
+ patchFileId(id: string, params: IFileNameParam): Promise<unknown>;
55
+ getCvforceResource(params: IResourceParam): Promise<IResource[]>;
56
+ postKnowledgeIdComposedFiles(id: string, params: IComposedFile): Promise<unknown>;
57
+ getTokensApplicationId(id: string, params: IAppToken): Promise<IEmbeddingData[]>;
58
+ getTokens(params: IAppToken): Promise<IAppList[]>;
59
+ uploadMinioFile(minioConfig: MinioConfig, file: File): Promise<string>;
60
+ uploadFile(path: string, file: File): Promise<string>;
61
+ uploadFiles(path: string, files: File[]): Promise<string[]>;
62
+ getAecModels(): Promise<IAecModel[]>;
63
+ postTextFilter(params: {
64
+ text: string;
65
+ }): Promise<{
66
+ pass: boolean;
67
+ }>;
68
+ getTenantModel(): Promise<{
69
+ defaultModel: string;
70
+ }>;
71
+ getPrompts(applicationId: string, params?: {
72
+ status: number;
73
+ }): Promise<IPrompt[]>;
74
+ postPrompt(applicationId: string, params: IPrompt): Promise<IPrompt[]>;
75
+ patchPromptId(applicationId: string, id: string, params: IPrompt): Promise<IPrompt[]>;
76
+ delPromptId(applicationId: string, id: string): Promise<unknown>;
77
+ getSessionPrompts(sessionId: string): Promise<ISessionPrompt[]>;
78
+ patchSessionPromptId(id: string, sessionId: string, params: ISessionPrompt): Promise<IPrompt[]>;
79
+ getApplicationIdSessionIdPromptVariables(appId: string, sessionId: string): Promise<ISessionPrompt[]>;
80
+ patchApplicationIdSessionpromptVariablesId(appId: string, sid: string, id: string, params: Partial<ISessionPrompt>): Promise<IPrompt[]>;
81
+ getPresetApplication(params: {
82
+ name?: string;
83
+ type?: number;
84
+ }): Promise<IPresetApplication[]>;
85
+ postKnowledgeConfig(params: IKnowledgeConfig): Promise<IPrompt[]>;
86
+ getKnowledgeConfig(id: string): Promise<IKnowledgeConfig>;
87
+ patchKnowledgeConfig(id: string, params: IKnowledgeConfig): Promise<IKnowledgeConfig>;
88
+ getKnowledgeIdFileId(id: string, fid: string): Promise<IFile>;
89
+ getKnowledgeIdFileIdData(id: string, fid: string, params: PageQueryParams & {
90
+ key?: string;
91
+ value?: string;
92
+ enabled?: number;
93
+ }): Promise<import('../base').Paged<IFileData>>;
94
+ postKnowledgeIdFileIdData(id: string, fid: string, params: IFileDataParam[]): Promise<{
95
+ id: string;
96
+ }>;
97
+ patchKnowledgeIdFileIdData(id: string, fid: string, did: string, params: IFileDataParam[]): Promise<{
98
+ id: string;
99
+ }>;
100
+ delKnowledgeIdFileIdDataDid(id: string, fid: string, did: string): Promise<{
101
+ id: string;
102
+ }>;
103
+ getPresetKnowledge(params: {
104
+ name: string;
105
+ }): Promise<IPresetKnowledge[]>;
106
+ patchSessionsIdContext(sid: string): Promise<unknown>;
107
+ postResourceToken(params: IResourceTokenParam): Promise<IResourceToken>;
108
+ getApplicationIdSession(id: string): Promise<ISession[]>;
109
+ patchApplicationIdSessionsIdContext(id: string, sid: string): Promise<unknown>;
110
+ postApplicationIdSessions(appId: string, params: {
111
+ name: string;
112
+ }): Promise<ISession>;
113
+ getApplicationIdChatHistorySessionId(id: string, sessionId: string): Promise<IChatMessage[]>;
114
+ postApplicationIdChatHistorySessionIdComments(id: string, sid: string, params: ICommentParam): Promise<unknown>;
115
+ getApplicationIdPrompts(id: string, params?: {
116
+ status: number;
117
+ }): Promise<IPrompt[]>;
118
+ postKnowledgeSourceFile(id: string, fid: string, params: {
119
+ name: string;
120
+ url: string;
121
+ }): Promise<unknown>;
122
+ getMetadata(params?: {
123
+ type: string;
124
+ }): Promise<IMetaData[]>;
125
+ postGeneques(params: {
126
+ content: string;
127
+ }): Promise<IGeneques>;
128
+ getBaseModel(serviceId: string): Promise<IBaseModel>;
129
+ }
130
+ export * from './model';
@@ -0,0 +1,519 @@
1
+ import { IversionInfo } from '../aecpilot/model';
2
+ export declare enum ChatMode {
3
+ Dialog = 0,
4
+ TextGenerate = 1,
5
+ FileSummery = 2
6
+ }
7
+ export interface IKnowledge {
8
+ id: string;
9
+ name: string;
10
+ description: string;
11
+ fileSize: number;
12
+ createdAt: string;
13
+ tenantCode: string;
14
+ isReady: boolean;
15
+ fileName: string;
16
+ knowledgeType: KnowledgeType;
17
+ fileCount: number;
18
+ knowledgeApplicationCount: number;
19
+ usedType: number;
20
+ dataFormat: IDataFormat[];
21
+ nickname: string;
22
+ }
23
+ export interface IKnowledgeParam {
24
+ name: string;
25
+ description?: string;
26
+ knowledgeType?: KnowledgeType;
27
+ }
28
+ export interface IFileParam {
29
+ name: string;
30
+ url: string;
31
+ size: number;
32
+ ext?: string;
33
+ }
34
+ export interface IFile {
35
+ id: string;
36
+ knowledgeId: string;
37
+ size: number;
38
+ name: string;
39
+ originalName: string;
40
+ status: number;
41
+ url: string;
42
+ ext: string;
43
+ creator: string;
44
+ chromaFileIds: string;
45
+ description: string;
46
+ wordCount: number;
47
+ createdAt: string;
48
+ wordNumber: number;
49
+ updatedAt: string;
50
+ source: number;
51
+ originalFile: string;
52
+ downloadOriginalFileUrl: string;
53
+ enabled: number;
54
+ datasetData: {
55
+ datasetId: string;
56
+ versionId: string;
57
+ sampleId: string;
58
+ };
59
+ knowledgeSourceName: string;
60
+ sourceType: number;
61
+ sourceFileName: string;
62
+ sourceFileUrl: string;
63
+ webLink: string;
64
+ nickname: string;
65
+ createName: string;
66
+ createUsername: string;
67
+ updateName: string;
68
+ updateUsername: string;
69
+ versionInfo: IversionInfo;
70
+ }
71
+ export interface IUploadProgress {
72
+ knowledgeId?: string;
73
+ name: string;
74
+ size: number;
75
+ progress: number;
76
+ }
77
+ export interface IUploadParam {
78
+ files: string[];
79
+ isv: string;
80
+ knowledgeId: string;
81
+ }
82
+ export interface MinioConfig {
83
+ accessKey: string;
84
+ secretKey: string;
85
+ bucket: string;
86
+ expiredAt: number;
87
+ prefix: string;
88
+ endpoints: string[];
89
+ region: string;
90
+ useSSL: boolean;
91
+ fileKeys: string[];
92
+ }
93
+ export interface IUploadTicket {
94
+ minio: {
95
+ accessKey: string;
96
+ secretKey: string;
97
+ bucket: string;
98
+ expiredAt: number;
99
+ prefix: string;
100
+ endpoints: string[];
101
+ region: string;
102
+ useSSL: boolean;
103
+ fileKeys: string[];
104
+ };
105
+ }
106
+ export interface ISession {
107
+ id: string;
108
+ name: string;
109
+ knowledges?: IKnowledge[];
110
+ createdAt: string;
111
+ finialMessage: string;
112
+ applicationId: string;
113
+ labels: {
114
+ key: string;
115
+ value: string;
116
+ }[];
117
+ netOpen: boolean;
118
+ enableNetOpen: boolean;
119
+ lastFileName: string;
120
+ fileStatus: number;
121
+ fileCount: number;
122
+ top: boolean;
123
+ topTime: number;
124
+ deletedAt: string;
125
+ updatedAt: string;
126
+ selectedKnowledges?: IKnowledge[];
127
+ lastRelatedQuestion?: string[];
128
+ }
129
+ export interface SessionQueryParams {
130
+ order: string;
131
+ }
132
+ export interface ISessionParam {
133
+ name?: string;
134
+ knowledges?: IKnowledge[];
135
+ knowledgeList?: string[];
136
+ finialMessage?: string;
137
+ applicationId?: string;
138
+ lastRelatedQuestion?: string[];
139
+ top?: boolean;
140
+ }
141
+ export interface ICommentParam {
142
+ messageId?: string;
143
+ isAgree: number;
144
+ againstReason?: string[];
145
+ }
146
+ export declare enum ChatMessageRole {
147
+ Robot = 1,
148
+ User = 2,
149
+ System = 3
150
+ }
151
+ export interface PluginFunctionBasic {
152
+ pluginName: string;
153
+ pluginCode: string;
154
+ funcCode: string;
155
+ funcName: string;
156
+ parameters?: {
157
+ header: any;
158
+ query: any;
159
+ };
160
+ requestBody?: any;
161
+ runnerIsClient?: boolean;
162
+ result?: {
163
+ code: number;
164
+ message: string;
165
+ data: any;
166
+ };
167
+ }
168
+ export interface Thought {
169
+ step: number;
170
+ thought?: string;
171
+ observation?: string;
172
+ }
173
+ export interface ActionPayload<T> {
174
+ type: 'BEFORE_CALL' | 'FUNCTION_CALL' | 'RESULT' | 'AFTER_CALL' | 'ABORT';
175
+ data?: T;
176
+ }
177
+ export declare enum FileProccessStatus {
178
+ Processing = 1,
179
+ Done = 2,
180
+ Failed = 3
181
+ }
182
+ export declare enum SourceType {
183
+ File = 0,
184
+ WebLink = 1
185
+ }
186
+ export interface ChatMessageFile {
187
+ id: number;
188
+ baseId: number;
189
+ size: number;
190
+ name: string;
191
+ status: FileProccessStatus;
192
+ url: string;
193
+ ext: string;
194
+ description: string;
195
+ wordCount: number;
196
+ createdAt: string;
197
+ wordNumber: number;
198
+ updatedAt: string;
199
+ source: string;
200
+ originalFile: string;
201
+ downloadOriginalFileUrl: string;
202
+ datasetData: {
203
+ datasetId: string;
204
+ versionId: string;
205
+ sampleId: string;
206
+ };
207
+ knowledgeSourceName: string;
208
+ sourceType: SourceType;
209
+ sourceFileName: string;
210
+ sourceFileUrl: string;
211
+ webLink: string;
212
+ nickname: string;
213
+ createUsername: string;
214
+ createName: string;
215
+ updateUsername: string;
216
+ updateName: string;
217
+ enabled: 0 | 1;
218
+ versionInfo: string;
219
+ }
220
+ export interface IChatMessage {
221
+ ts?: string;
222
+ messageId: string;
223
+ content: string;
224
+ role: ChatMessageRole;
225
+ userId?: string;
226
+ sessionId: string;
227
+ reference: IReference[];
228
+ searchReference: ISearchRefernce[];
229
+ comment?: ICommentParam;
230
+ knowledges?: IKnowledge[];
231
+ isLoading?: boolean;
232
+ messageTime: string;
233
+ fileId?: string;
234
+ file?: KnowledgeFileMetadata;
235
+ chatMode?: ChatMode;
236
+ llmModel?: string;
237
+ isContext?: boolean;
238
+ index?: number;
239
+ actions?: ActionPayload<PluginFunctionBasic & Thought>[][];
240
+ agentHistoryList?: {
241
+ agentList: string;
242
+ createdAt: string;
243
+ creator: string;
244
+ deletedAt: string;
245
+ id: string;
246
+ updatedAt: string;
247
+ };
248
+ finish?: boolean;
249
+ code?: number;
250
+ isSensitive?: boolean;
251
+ message?: string;
252
+ stream?: boolean;
253
+ fileIds?: string[];
254
+ relatedQuesion?: string[];
255
+ isReplying?: boolean;
256
+ files?: ChatMessageFile[];
257
+ thinkingSecs?: number;
258
+ thinkingStatus?: "end" | "start";
259
+ reasoningContent?: string;
260
+ }
261
+ export interface IReference {
262
+ text: string;
263
+ docId: string;
264
+ fileId: string;
265
+ fileName: string;
266
+ knowledgeId: string;
267
+ knowledgeName: string;
268
+ score: number;
269
+ nickname: string;
270
+ knowledgeSourceName: string;
271
+ }
272
+ export interface ISearchRefernce {
273
+ link: string;
274
+ title: string;
275
+ snippet: string;
276
+ }
277
+ export interface IHistory {
278
+ role: number;
279
+ content: string;
280
+ messageId?: string;
281
+ knowledges: {
282
+ id: string;
283
+ name: string;
284
+ }[];
285
+ messageTime?: string;
286
+ reference?: IReference[];
287
+ fileId?: string;
288
+ }
289
+ export interface IArrange {
290
+ llmModel: string;
291
+ prePrompt: string;
292
+ knowledges: any;
293
+ temperature: number;
294
+ score: number;
295
+ topK: number;
296
+ textFilter: number;
297
+ roleCognition: string;
298
+ repetitionPenalty: number;
299
+ rerankMode: number;
300
+ embeddingService: string;
301
+ enableNetOpen: boolean;
302
+ }
303
+ export interface IApplication {
304
+ id: string;
305
+ name: string;
306
+ description: string;
307
+ logo: string;
308
+ createdAt: string;
309
+ updatedAt: string;
310
+ embeddings: string[];
311
+ arrange: IArrange[];
312
+ type: number;
313
+ createName: string;
314
+ createUsername: string;
315
+ updateName: string;
316
+ updateUsername: string;
317
+ }
318
+ export interface IApplicationParam {
319
+ name?: string;
320
+ description?: string;
321
+ logo?: string;
322
+ arrange?: IArrange[];
323
+ type?: number;
324
+ }
325
+ export interface IFileNameParam {
326
+ name?: string;
327
+ description?: string;
328
+ enabled?: number;
329
+ nickname?: string;
330
+ webLink?: string;
331
+ knowledgeSourceName?: string;
332
+ sourceFileName?: string;
333
+ sourceType?: number;
334
+ versionInfo?: IversionInfo;
335
+ }
336
+ export interface IResource {
337
+ id: string;
338
+ name: string;
339
+ statusSubsection?: boolean;
340
+ url?: string;
341
+ size?: number;
342
+ }
343
+ export interface IResourceParam {
344
+ type?: string;
345
+ datasetId?: string;
346
+ id?: string;
347
+ sampleId?: string;
348
+ versionId?: string;
349
+ }
350
+ export interface IComposedFile {
351
+ fileList: IFileList[];
352
+ importType: number;
353
+ }
354
+ export interface IFileList {
355
+ url: string;
356
+ statusSubsection: boolean;
357
+ sampleId: string;
358
+ name: string;
359
+ description: string;
360
+ versionId: string;
361
+ datasetId: string;
362
+ size: number;
363
+ fieldMapping: IFieldMappingKeys[];
364
+ datasetType: number;
365
+ }
366
+ export interface IFieldMappingKeys {
367
+ fileKey: string;
368
+ knowledgeKey: string;
369
+ }
370
+ export interface IAppToken {
371
+ startDate?: string;
372
+ endDate?: string;
373
+ llmModel: string;
374
+ }
375
+ export interface IAppList {
376
+ appName: string;
377
+ list: IEmbeddingData[];
378
+ }
379
+ export interface IEmbeddingData {
380
+ appName: string;
381
+ llmModel: string;
382
+ totleCount: number;
383
+ inputCount: number;
384
+ outputCount: number;
385
+ embeddingCount: number;
386
+ date: string;
387
+ }
388
+ export interface KnowledgeFileMetadataParams {
389
+ name: string;
390
+ url: string;
391
+ size: number;
392
+ }
393
+ export declare enum KnowledgeFileStatus {
394
+ Processing = 1,
395
+ Success = 2,
396
+ Failed = 3
397
+ }
398
+ export interface KnowledgeFileMetadata {
399
+ id: string;
400
+ baseId: number;
401
+ size: number;
402
+ name: string;
403
+ status: KnowledgeFileStatus;
404
+ url: string;
405
+ ext: string;
406
+ description: string;
407
+ }
408
+ export interface IAecModel {
409
+ key: string;
410
+ name: string;
411
+ sort: number;
412
+ isDefault: number;
413
+ }
414
+ export declare enum ArchiGptUIKeys {
415
+ InputFile = "ui.input.file",// 对话中添加文件
416
+ LLMModel = "ui.llm.model"
417
+ }
418
+ export declare enum PromptStatus {
419
+ Idle = 0,
420
+ Quoted = 1
421
+ }
422
+ export interface IPrompt {
423
+ id?: string;
424
+ key?: string;
425
+ name?: string;
426
+ status?: PromptStatus;
427
+ }
428
+ export interface ISessionPrompt {
429
+ id?: string;
430
+ key: string;
431
+ name?: string;
432
+ value: string;
433
+ }
434
+ export interface IAppGetParam {
435
+ available?: boolean;
436
+ type?: number;
437
+ }
438
+ export interface IPresetApplication {
439
+ id: string;
440
+ applicationId: string;
441
+ applicationName: string;
442
+ type: number;
443
+ }
444
+ export declare enum KnowledgeType {
445
+ Basic = 0,
446
+ Pro = 1
447
+ }
448
+ export interface IKnowledgeConfig {
449
+ id?: string;
450
+ dataFormat: IDataFormat[];
451
+ embeddingTemplate: string;
452
+ knowledgeBaseReference: string;
453
+ embeddingShowTemplate: string;
454
+ }
455
+ export interface IDataFormat {
456
+ key: string;
457
+ name: string;
458
+ }
459
+ export interface IFileData {
460
+ key: string;
461
+ name: string;
462
+ values: {
463
+ keyhwdSyyIdCode: string;
464
+ content: string;
465
+ did: string;
466
+ enabled: number;
467
+ }[];
468
+ }
469
+ export interface IFileDataParam {
470
+ key: string;
471
+ value: string;
472
+ }
473
+ export interface IFileDataRow extends Record<string, any> {
474
+ keyhwdSyyIdCode: string;
475
+ }
476
+ export interface IPresetKnowledge {
477
+ id: string;
478
+ knowledgeId: string;
479
+ name: string;
480
+ isOpen: boolean;
481
+ description: string;
482
+ }
483
+ export interface IResourceTokenParam {
484
+ type: string;
485
+ applicationId: string;
486
+ }
487
+ export interface IResourceToken {
488
+ token: string;
489
+ expiredAt: number;
490
+ }
491
+ export interface ILogExportParam {
492
+ agree: number;
493
+ beginTime: string;
494
+ endTime: string;
495
+ labels?: string;
496
+ userAccount?: string;
497
+ }
498
+ export interface IMetaData {
499
+ code: string;
500
+ value: string;
501
+ }
502
+ export interface IGeneques {
503
+ content: string;
504
+ llmModel: string;
505
+ messageId: string;
506
+ messageTime: string;
507
+ }
508
+ export declare enum ApplicationTypes {
509
+ Dialog = 0,
510
+ Text = 1,
511
+ Agent = 2,
512
+ All = 3
513
+ }
514
+ export interface ChatHistoryParams {
515
+ endTime?: string;
516
+ startTime?: string;
517
+ pageSize?: number;
518
+ contextOnly?: boolean;
519
+ }