@dxpos/knowledge 0.5.0 → 0.7.0

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 @@ export type ClientOptions = {
2
2
  baseUrl: `${string}://${string}` | (string & {});
3
3
  };
4
4
  export type FileStatus = 'pending' | 'ready' | 'failed';
5
- export type FileScope = 'general' | 'knowledge';
5
+ export type FileScope = 'general' | 'knowledge' | 'chat' | 'rag';
6
6
  export type StoredFile = {
7
7
  id: string;
8
8
  objectKey: string;
@@ -51,29 +51,53 @@ export type CompleteUploadResult = {
51
51
  publicUrl?: string;
52
52
  error?: string;
53
53
  };
54
+ export type BatchDeleteFileResult = {
55
+ id: string;
56
+ status: 'ok' | 'error';
57
+ error?: string;
58
+ };
54
59
  export type MessageRole = 'user' | 'assistant';
60
+ export type MessageAttachment = {
61
+ fileId: string;
62
+ mimeType: string;
63
+ url?: string;
64
+ };
55
65
  export type Message = {
56
66
  id: string;
57
67
  conversationId: string;
58
68
  role: MessageRole;
59
69
  content: string;
70
+ attachments: Array<MessageAttachment>;
60
71
  references: Array<{
61
72
  id: string;
62
73
  filename: string;
63
74
  chunkCount: number;
64
75
  score: number;
65
76
  }>;
77
+ promptTokens: number | null;
78
+ completionTokens: number | null;
79
+ totalTokens: number | null;
80
+ aborted: boolean;
66
81
  createdBy: string | null;
67
82
  createdAt: string;
68
83
  };
69
84
  export type Conversation = {
70
85
  id: string;
71
86
  title: string;
87
+ ragId: number | null;
72
88
  systemPrompt: string | null;
73
89
  splitPrompt: string | null;
74
90
  splitQuery: boolean | null;
75
91
  scoreThreshold: number | null;
76
92
  lowScoreReply: string | null;
93
+ deepThinking: 'default' | 'false' | 'low' | 'medium' | 'high' | null;
94
+ multiTurn: boolean | null;
95
+ contextThreshold: number | null;
96
+ retrieveLimit: number | null;
97
+ imageMaxCount: number | null;
98
+ imageMaxEdge: number | null;
99
+ contextSummary: string | null;
100
+ contextSummaryUpTo: string | null;
77
101
  createdBy: string | null;
78
102
  updatedBy: string | null;
79
103
  createdAt: string;
@@ -108,24 +132,112 @@ export type ChatAnswer = {
108
132
  score: number;
109
133
  }>;
110
134
  };
111
- export type ChatModuleSettings = {
135
+ export type KnowledgeBase = {
136
+ id: number;
137
+ name: string;
138
+ mark: string;
139
+ description: string | null;
140
+ chunkSize: number | null;
141
+ chunkOverlap: number | null;
142
+ createdBy: string | null;
143
+ updatedBy: string | null;
144
+ createdAt: string;
145
+ updatedAt: string;
146
+ };
147
+ export type Rag = {
148
+ id: number;
149
+ name: string;
150
+ description: string | null;
151
+ mark: string | null;
152
+ kbId: number;
112
153
  systemPrompt: string | null;
113
154
  splitPrompt: string | null;
114
155
  splitQuery: boolean | null;
115
156
  scoreThreshold: number | null;
116
157
  lowScoreReply: string | null;
158
+ deepThinking: 'default' | 'false' | 'low' | 'medium' | 'high' | null;
159
+ multiTurn: boolean | null;
160
+ contextThreshold: number | null;
161
+ retrieveLimit: number | null;
162
+ imageMaxCount: number | null;
163
+ imageMaxEdge: number | null;
164
+ welcome: RagWelcomeConfig;
165
+ recommendedQuestions: Array<string> | null;
166
+ createdBy: string | null;
117
167
  updatedBy: string | null;
168
+ createdAt: string;
118
169
  updatedAt: string;
119
170
  };
171
+ export type RagWelcomeConfig = {
172
+ text: string | null;
173
+ images?: Array<RagWelcomeImage>;
174
+ } | null;
175
+ export type RagWelcomeImage = {
176
+ fileId: string;
177
+ mimeType: string;
178
+ url?: string;
179
+ };
120
180
  export type SearchHit = {
121
181
  documentId: string;
122
182
  filename: string;
123
183
  chunkIndex: number;
124
184
  content: string;
125
- headingPath: string;
126
185
  snippet: string;
127
186
  filenameSnippet: string;
128
- headingSnippet: string;
187
+ };
188
+ export type Visibility = 'public' | 'internal' | 'private';
189
+ export type DocumentStatus = 'processing' | 'ready' | 'failed';
190
+ export type Document = {
191
+ id: string;
192
+ kbId: number;
193
+ folderId: string | null;
194
+ filename: string;
195
+ content: string;
196
+ charCount: number;
197
+ chunkCount: number;
198
+ status: DocumentStatus;
199
+ visibility: Visibility;
200
+ chunkSize: number | null;
201
+ chunkOverlap: number | null;
202
+ createdBy: string | null;
203
+ updatedBy: string | null;
204
+ createdAt: string;
205
+ updatedAt: string;
206
+ };
207
+ export type DocumentSummary = {
208
+ id: string;
209
+ kbId: number;
210
+ folderId: string | null;
211
+ filename: string;
212
+ charCount: number;
213
+ chunkCount: number;
214
+ status: DocumentStatus;
215
+ visibility: Visibility;
216
+ chunkSize: number | null;
217
+ chunkOverlap: number | null;
218
+ createdBy: string | null;
219
+ updatedBy: string | null;
220
+ createdAt: string;
221
+ updatedAt: string;
222
+ };
223
+ export type DocumentTreeNode = {
224
+ type: 'folder';
225
+ folder: Folder;
226
+ children: Array<DocumentTreeNode>;
227
+ } | {
228
+ type: 'file';
229
+ document: DocumentSummary;
230
+ };
231
+ export type Folder = {
232
+ id: string;
233
+ kbId: number;
234
+ name: string;
235
+ parentId: string | null;
236
+ visibility: Visibility;
237
+ createdBy: string | null;
238
+ updatedBy: string | null;
239
+ createdAt: string;
240
+ updatedAt: string;
129
241
  };
130
242
  export type ErrorResponse = {
131
243
  /**
@@ -137,15 +249,82 @@ export type ErrorResponse = {
137
249
  [key: string]: unknown;
138
250
  } | Array<unknown> | null;
139
251
  };
252
+ export type RagDetail = {
253
+ id: number;
254
+ name: string;
255
+ mark: string | null;
256
+ welcome: RagWelcomeConfig;
257
+ recommendedQuestions: Array<string> | null;
258
+ };
259
+ export type DeleteApiFilesData = {
260
+ body: {
261
+ ids: Array<string>;
262
+ };
263
+ path?: never;
264
+ query?: never;
265
+ url: '/api/files';
266
+ };
267
+ export type DeleteApiFilesErrors = {
268
+ /**
269
+ * 请求参数无效
270
+ */
271
+ 400: ErrorResponse;
272
+ /**
273
+ * 未登录
274
+ */
275
+ 401: ErrorResponse;
276
+ /**
277
+ * 无权限
278
+ */
279
+ 403: ErrorResponse;
280
+ /**
281
+ * 资源不存在
282
+ */
283
+ 404: ErrorResponse;
284
+ /**
285
+ * LLM 并发已满
286
+ */
287
+ 429: ErrorResponse;
288
+ /**
289
+ * 服务器内部错误
290
+ */
291
+ 500: ErrorResponse;
292
+ };
293
+ export type DeleteApiFilesError = DeleteApiFilesErrors[keyof DeleteApiFilesErrors];
294
+ export type DeleteApiFilesResponses = {
295
+ /**
296
+ * 成功
297
+ */
298
+ 200: {
299
+ /**
300
+ * 业务码,成功为 0
301
+ */
302
+ code: number;
303
+ message: string;
304
+ data: {
305
+ results: Array<BatchDeleteFileResult>;
306
+ };
307
+ };
308
+ };
309
+ export type DeleteApiFilesResponse = DeleteApiFilesResponses[keyof DeleteApiFilesResponses];
140
310
  export type GetApiFilesData = {
141
311
  body?: never;
142
312
  path?: never;
143
313
  query?: {
144
314
  scope?: FileScope;
315
+ status?: FileStatus;
145
316
  /**
146
317
  * 文件名关键词
147
318
  */
148
319
  q?: string;
320
+ /**
321
+ * 创建时间起
322
+ */
323
+ startDate?: string;
324
+ /**
325
+ * 创建时间止
326
+ */
327
+ endDate?: string;
149
328
  limit?: number;
150
329
  offset?: number;
151
330
  };
@@ -209,6 +388,10 @@ export type PostApiFilesErrors = {
209
388
  * 资源不存在
210
389
  */
211
390
  404: ErrorResponse;
391
+ /**
392
+ * LLM 并发已满
393
+ */
394
+ 429: ErrorResponse;
212
395
  /**
213
396
  * 服务器内部错误
214
397
  */
@@ -261,6 +444,10 @@ export type PostApiFilesPresignErrors = {
261
444
  * 资源不存在
262
445
  */
263
446
  404: ErrorResponse;
447
+ /**
448
+ * LLM 并发已满
449
+ */
450
+ 429: ErrorResponse;
264
451
  /**
265
452
  * 服务器内部错误
266
453
  */
@@ -308,6 +495,10 @@ export type PostApiFilesCompleteErrors = {
308
495
  * 资源不存在
309
496
  */
310
497
  404: ErrorResponse;
498
+ /**
499
+ * LLM 并发已满
500
+ */
501
+ 429: ErrorResponse;
311
502
  /**
312
503
  * 服务器内部错误
313
504
  */
@@ -355,6 +546,10 @@ export type DeleteApiFilesByIdErrors = {
355
546
  * 资源不存在
356
547
  */
357
548
  404: ErrorResponse;
549
+ /**
550
+ * LLM 并发已满
551
+ */
552
+ 429: ErrorResponse;
358
553
  /**
359
554
  * 服务器内部错误
360
555
  */
@@ -400,6 +595,10 @@ export type GetApiFilesByIdErrors = {
400
595
  * 资源不存在
401
596
  */
402
597
  404: ErrorResponse;
598
+ /**
599
+ * LLM 并发已满
600
+ */
601
+ 429: ErrorResponse;
403
602
  /**
404
603
  * 服务器内部错误
405
604
  */
@@ -445,6 +644,10 @@ export type GetApiFilesByIdRawErrors = {
445
644
  * 资源不存在
446
645
  */
447
646
  404: ErrorResponse;
647
+ /**
648
+ * LLM 并发已满
649
+ */
650
+ 429: ErrorResponse;
448
651
  /**
449
652
  * 服务器内部错误
450
653
  */
@@ -483,6 +686,10 @@ export type GetApiFilesByIdUrlErrors = {
483
686
  * 资源不存在
484
687
  */
485
688
  404: ErrorResponse;
689
+ /**
690
+ * LLM 并发已满
691
+ */
692
+ 429: ErrorResponse;
486
693
  /**
487
694
  * 服务器内部错误
488
695
  */
@@ -509,6 +716,9 @@ export type PostApiChatData = {
509
716
  body: {
510
717
  conversationId: string;
511
718
  content: string;
719
+ attachments?: Array<{
720
+ fileId: string;
721
+ }>;
512
722
  stream?: boolean;
513
723
  };
514
724
  path?: never;
@@ -532,6 +742,10 @@ export type PostApiChatErrors = {
532
742
  * 资源不存在
533
743
  */
534
744
  404: ErrorResponse;
745
+ /**
746
+ * LLM 并发已满
747
+ */
748
+ 429: ErrorResponse;
535
749
  /**
536
750
  * 服务器内部错误
537
751
  */
@@ -552,54 +766,15 @@ export type PostApiChatResponses = {
552
766
  };
553
767
  };
554
768
  export type PostApiChatResponse = PostApiChatResponses[keyof PostApiChatResponses];
555
- export type GetApiChatSettingsData = {
769
+ export type GetApiChatLimitsData = {
556
770
  body?: never;
557
771
  path?: never;
558
- query?: never;
559
- url: '/api/chat/settings';
560
- };
561
- export type GetApiChatSettingsErrors = {
562
- /**
563
- * 未登录
564
- */
565
- 401: ErrorResponse;
566
- /**
567
- * 无权限
568
- */
569
- 403: ErrorResponse;
570
- /**
571
- * 服务器内部错误
572
- */
573
- 500: ErrorResponse;
574
- };
575
- export type GetApiChatSettingsError = GetApiChatSettingsErrors[keyof GetApiChatSettingsErrors];
576
- export type GetApiChatSettingsResponses = {
577
- /**
578
- * 成功
579
- */
580
- 200: {
581
- /**
582
- * 业务码,成功为 0
583
- */
584
- code: number;
585
- message: string;
586
- data: ChatModuleSettings;
587
- };
588
- };
589
- export type GetApiChatSettingsResponse = GetApiChatSettingsResponses[keyof GetApiChatSettingsResponses];
590
- export type PutApiChatSettingsData = {
591
- body: {
592
- systemPrompt?: string | null;
593
- splitPrompt?: string | null;
594
- splitQuery?: boolean | null;
595
- scoreThreshold?: number | null;
596
- lowScoreReply?: string | null;
772
+ query: {
773
+ conversationId: string;
597
774
  };
598
- path?: never;
599
- query?: never;
600
- url: '/api/chat/settings';
775
+ url: '/api/chat/limits';
601
776
  };
602
- export type PutApiChatSettingsErrors = {
777
+ export type GetApiChatLimitsErrors = {
603
778
  /**
604
779
  * 请求参数无效
605
780
  */
@@ -608,10 +783,6 @@ export type PutApiChatSettingsErrors = {
608
783
  * 未登录
609
784
  */
610
785
  401: ErrorResponse;
611
- /**
612
- * 无权限
613
- */
614
- 403: ErrorResponse;
615
786
  /**
616
787
  * 资源不存在
617
788
  */
@@ -621,8 +792,8 @@ export type PutApiChatSettingsErrors = {
621
792
  */
622
793
  500: ErrorResponse;
623
794
  };
624
- export type PutApiChatSettingsError = PutApiChatSettingsErrors[keyof PutApiChatSettingsErrors];
625
- export type PutApiChatSettingsResponses = {
795
+ export type GetApiChatLimitsError = GetApiChatLimitsErrors[keyof GetApiChatLimitsErrors];
796
+ export type GetApiChatLimitsResponses = {
626
797
  /**
627
798
  * 成功
628
799
  */
@@ -632,14 +803,22 @@ export type PutApiChatSettingsResponses = {
632
803
  */
633
804
  code: number;
634
805
  message: string;
635
- data: ChatModuleSettings;
806
+ data: {
807
+ imageMaxCount: number;
808
+ imageMaxEdge: number;
809
+ welcome: RagWelcomeConfig;
810
+ recommendedQuestions: Array<string>;
811
+ };
636
812
  };
637
813
  };
638
- export type PutApiChatSettingsResponse = PutApiChatSettingsResponses[keyof PutApiChatSettingsResponses];
814
+ export type GetApiChatLimitsResponse = GetApiChatLimitsResponses[keyof GetApiChatLimitsResponses];
639
815
  export type GetApiChatConversationsData = {
640
816
  body?: never;
641
817
  path?: never;
642
- query?: never;
818
+ query?: {
819
+ userId?: string;
820
+ ragId?: number;
821
+ };
643
822
  url: '/api/chat/conversations';
644
823
  };
645
824
  export type GetApiChatConversationsErrors = {
@@ -670,11 +849,19 @@ export type GetApiChatConversationsResponse = GetApiChatConversationsResponses[k
670
849
  export type PostApiChatConversationsData = {
671
850
  body?: {
672
851
  title?: string;
852
+ userId?: string;
853
+ ragId: number;
673
854
  systemPrompt?: string | null;
674
855
  splitPrompt?: string | null;
675
856
  splitQuery?: boolean | null;
676
857
  scoreThreshold?: number | null;
677
858
  lowScoreReply?: string | null;
859
+ deepThinking?: 'default' | 'false' | 'low' | 'medium' | 'high' | null;
860
+ multiTurn?: boolean | null;
861
+ contextThreshold?: number | null;
862
+ retrieveLimit?: number | null;
863
+ imageMaxCount?: number | null;
864
+ imageMaxEdge?: number | null;
678
865
  };
679
866
  path?: never;
680
867
  query?: never;
@@ -697,6 +884,10 @@ export type PostApiChatConversationsErrors = {
697
884
  * 资源不存在
698
885
  */
699
886
  404: ErrorResponse;
887
+ /**
888
+ * LLM 并发已满
889
+ */
890
+ 429: ErrorResponse;
700
891
  /**
701
892
  * 服务器内部错误
702
893
  */
@@ -742,6 +933,10 @@ export type DeleteApiChatConversationsByIdErrors = {
742
933
  * 资源不存在
743
934
  */
744
935
  404: ErrorResponse;
936
+ /**
937
+ * LLM 并发已满
938
+ */
939
+ 429: ErrorResponse;
745
940
  /**
746
941
  * 服务器内部错误
747
942
  */
@@ -787,6 +982,10 @@ export type GetApiChatConversationsByIdErrors = {
787
982
  * 资源不存在
788
983
  */
789
984
  404: ErrorResponse;
985
+ /**
986
+ * LLM 并发已满
987
+ */
988
+ 429: ErrorResponse;
790
989
  /**
791
990
  * 服务器内部错误
792
991
  */
@@ -818,6 +1017,12 @@ export type PatchApiChatConversationsByIdData = {
818
1017
  splitQuery?: boolean | null;
819
1018
  scoreThreshold?: number | null;
820
1019
  lowScoreReply?: string | null;
1020
+ deepThinking?: 'default' | 'false' | 'low' | 'medium' | 'high' | null;
1021
+ multiTurn?: boolean | null;
1022
+ contextThreshold?: number | null;
1023
+ retrieveLimit?: number | null;
1024
+ imageMaxCount?: number | null;
1025
+ imageMaxEdge?: number | null;
821
1026
  };
822
1027
  path: {
823
1028
  id: string;
@@ -842,6 +1047,10 @@ export type PatchApiChatConversationsByIdErrors = {
842
1047
  * 资源不存在
843
1048
  */
844
1049
  404: ErrorResponse;
1050
+ /**
1051
+ * LLM 并发已满
1052
+ */
1053
+ 429: ErrorResponse;
845
1054
  /**
846
1055
  * 服务器内部错误
847
1056
  */
@@ -870,6 +1079,14 @@ export type GetApiSearchData = {
870
1079
  * 关键词
871
1080
  */
872
1081
  q: string;
1082
+ /**
1083
+ * 知识库 ID,与 mark 不能同时为空
1084
+ */
1085
+ kbId?: number;
1086
+ /**
1087
+ * 知识库标识,与 kbId 不能同时为空
1088
+ */
1089
+ mark?: string;
873
1090
  limit?: number;
874
1091
  };
875
1092
  url: '/api/search';
@@ -883,10 +1100,6 @@ export type GetApiSearchErrors = {
883
1100
  * 未登录
884
1101
  */
885
1102
  401: ErrorResponse;
886
- /**
887
- * 无权限
888
- */
889
- 403: ErrorResponse;
890
1103
  /**
891
1104
  * 资源不存在
892
1105
  */
@@ -911,4 +1124,1091 @@ export type GetApiSearchResponses = {
911
1124
  };
912
1125
  };
913
1126
  export type GetApiSearchResponse = GetApiSearchResponses[keyof GetApiSearchResponses];
1127
+ export type PostApiSearchClickData = {
1128
+ body: {
1129
+ /**
1130
+ * 检索词
1131
+ */
1132
+ keyword: string;
1133
+ /**
1134
+ * 点击的文档 ID
1135
+ */
1136
+ documentId: string;
1137
+ };
1138
+ path?: never;
1139
+ query?: never;
1140
+ url: '/api/search/click';
1141
+ };
1142
+ export type PostApiSearchClickErrors = {
1143
+ /**
1144
+ * 请求参数无效
1145
+ */
1146
+ 400: ErrorResponse;
1147
+ /**
1148
+ * 未登录
1149
+ */
1150
+ 401: ErrorResponse;
1151
+ /**
1152
+ * 无权限
1153
+ */
1154
+ 403: ErrorResponse;
1155
+ /**
1156
+ * 资源不存在
1157
+ */
1158
+ 404: ErrorResponse;
1159
+ /**
1160
+ * LLM 并发已满
1161
+ */
1162
+ 429: ErrorResponse;
1163
+ /**
1164
+ * 服务器内部错误
1165
+ */
1166
+ 500: ErrorResponse;
1167
+ };
1168
+ export type PostApiSearchClickError = PostApiSearchClickErrors[keyof PostApiSearchClickErrors];
1169
+ export type PostApiSearchClickResponses = {
1170
+ /**
1171
+ * 成功
1172
+ */
1173
+ 200: {
1174
+ /**
1175
+ * 业务码,成功为 0
1176
+ */
1177
+ code: number;
1178
+ message: string;
1179
+ data: null;
1180
+ };
1181
+ };
1182
+ export type PostApiSearchClickResponse = PostApiSearchClickResponses[keyof PostApiSearchClickResponses];
1183
+ export type GetApiKnowledgeBasesData = {
1184
+ body?: never;
1185
+ path?: never;
1186
+ query?: never;
1187
+ url: '/api/knowledge-bases';
1188
+ };
1189
+ export type GetApiKnowledgeBasesErrors = {
1190
+ /**
1191
+ * 未登录
1192
+ */
1193
+ 401: ErrorResponse;
1194
+ /**
1195
+ * 服务器内部错误
1196
+ */
1197
+ 500: ErrorResponse;
1198
+ };
1199
+ export type GetApiKnowledgeBasesError = GetApiKnowledgeBasesErrors[keyof GetApiKnowledgeBasesErrors];
1200
+ export type GetApiKnowledgeBasesResponses = {
1201
+ /**
1202
+ * 成功
1203
+ */
1204
+ 200: {
1205
+ /**
1206
+ * 业务码,成功为 0
1207
+ */
1208
+ code: number;
1209
+ message: string;
1210
+ data: Array<KnowledgeBase>;
1211
+ };
1212
+ };
1213
+ export type GetApiKnowledgeBasesResponse = GetApiKnowledgeBasesResponses[keyof GetApiKnowledgeBasesResponses];
1214
+ export type PostApiKnowledgeBasesData = {
1215
+ body: {
1216
+ name: string;
1217
+ mark: string;
1218
+ description?: string | null;
1219
+ chunkSize?: number | null;
1220
+ chunkOverlap?: number | null;
1221
+ };
1222
+ path?: never;
1223
+ query?: never;
1224
+ url: '/api/knowledge-bases';
1225
+ };
1226
+ export type PostApiKnowledgeBasesErrors = {
1227
+ /**
1228
+ * 请求参数无效
1229
+ */
1230
+ 400: ErrorResponse;
1231
+ /**
1232
+ * 未登录
1233
+ */
1234
+ 401: ErrorResponse;
1235
+ /**
1236
+ * 无权限
1237
+ */
1238
+ 403: ErrorResponse;
1239
+ /**
1240
+ * 服务器内部错误
1241
+ */
1242
+ 500: ErrorResponse;
1243
+ };
1244
+ export type PostApiKnowledgeBasesError = PostApiKnowledgeBasesErrors[keyof PostApiKnowledgeBasesErrors];
1245
+ export type PostApiKnowledgeBasesResponses = {
1246
+ /**
1247
+ * 成功
1248
+ */
1249
+ 201: {
1250
+ /**
1251
+ * 业务码,成功为 0
1252
+ */
1253
+ code: number;
1254
+ message: string;
1255
+ data: {
1256
+ id: number;
1257
+ };
1258
+ };
1259
+ };
1260
+ export type PostApiKnowledgeBasesResponse = PostApiKnowledgeBasesResponses[keyof PostApiKnowledgeBasesResponses];
1261
+ export type DeleteApiKnowledgeBasesByIdData = {
1262
+ body?: never;
1263
+ path: {
1264
+ id: string;
1265
+ };
1266
+ query?: never;
1267
+ url: '/api/knowledge-bases/{id}';
1268
+ };
1269
+ export type DeleteApiKnowledgeBasesByIdErrors = {
1270
+ /**
1271
+ * 请求参数无效
1272
+ */
1273
+ 400: ErrorResponse;
1274
+ /**
1275
+ * 未登录
1276
+ */
1277
+ 401: ErrorResponse;
1278
+ /**
1279
+ * 无权限
1280
+ */
1281
+ 403: ErrorResponse;
1282
+ /**
1283
+ * 资源不存在
1284
+ */
1285
+ 404: ErrorResponse;
1286
+ /**
1287
+ * LLM 并发已满
1288
+ */
1289
+ 429: ErrorResponse;
1290
+ /**
1291
+ * 服务器内部错误
1292
+ */
1293
+ 500: ErrorResponse;
1294
+ };
1295
+ export type DeleteApiKnowledgeBasesByIdError = DeleteApiKnowledgeBasesByIdErrors[keyof DeleteApiKnowledgeBasesByIdErrors];
1296
+ export type DeleteApiKnowledgeBasesByIdResponses = {
1297
+ /**
1298
+ * 成功
1299
+ */
1300
+ 200: {
1301
+ /**
1302
+ * 业务码,成功为 0
1303
+ */
1304
+ code: number;
1305
+ message: string;
1306
+ data: null;
1307
+ };
1308
+ };
1309
+ export type DeleteApiKnowledgeBasesByIdResponse = DeleteApiKnowledgeBasesByIdResponses[keyof DeleteApiKnowledgeBasesByIdResponses];
1310
+ export type GetApiKnowledgeBasesByIdData = {
1311
+ body?: never;
1312
+ path: {
1313
+ id: string;
1314
+ };
1315
+ query?: never;
1316
+ url: '/api/knowledge-bases/{id}';
1317
+ };
1318
+ export type GetApiKnowledgeBasesByIdErrors = {
1319
+ /**
1320
+ * 请求参数无效
1321
+ */
1322
+ 400: ErrorResponse;
1323
+ /**
1324
+ * 未登录
1325
+ */
1326
+ 401: ErrorResponse;
1327
+ /**
1328
+ * 无权限
1329
+ */
1330
+ 403: ErrorResponse;
1331
+ /**
1332
+ * 资源不存在
1333
+ */
1334
+ 404: ErrorResponse;
1335
+ /**
1336
+ * LLM 并发已满
1337
+ */
1338
+ 429: ErrorResponse;
1339
+ /**
1340
+ * 服务器内部错误
1341
+ */
1342
+ 500: ErrorResponse;
1343
+ };
1344
+ export type GetApiKnowledgeBasesByIdError = GetApiKnowledgeBasesByIdErrors[keyof GetApiKnowledgeBasesByIdErrors];
1345
+ export type GetApiKnowledgeBasesByIdResponses = {
1346
+ /**
1347
+ * 成功
1348
+ */
1349
+ 200: {
1350
+ /**
1351
+ * 业务码,成功为 0
1352
+ */
1353
+ code: number;
1354
+ message: string;
1355
+ data: KnowledgeBase;
1356
+ };
1357
+ };
1358
+ export type GetApiKnowledgeBasesByIdResponse = GetApiKnowledgeBasesByIdResponses[keyof GetApiKnowledgeBasesByIdResponses];
1359
+ export type PatchApiKnowledgeBasesByIdData = {
1360
+ body: {
1361
+ name?: string;
1362
+ mark?: string;
1363
+ description?: string | null;
1364
+ chunkSize?: number | null;
1365
+ chunkOverlap?: number | null;
1366
+ };
1367
+ path: {
1368
+ id: string;
1369
+ };
1370
+ query?: never;
1371
+ url: '/api/knowledge-bases/{id}';
1372
+ };
1373
+ export type PatchApiKnowledgeBasesByIdErrors = {
1374
+ /**
1375
+ * 请求参数无效
1376
+ */
1377
+ 400: ErrorResponse;
1378
+ /**
1379
+ * 未登录
1380
+ */
1381
+ 401: ErrorResponse;
1382
+ /**
1383
+ * 无权限
1384
+ */
1385
+ 403: ErrorResponse;
1386
+ /**
1387
+ * 资源不存在
1388
+ */
1389
+ 404: ErrorResponse;
1390
+ /**
1391
+ * LLM 并发已满
1392
+ */
1393
+ 429: ErrorResponse;
1394
+ /**
1395
+ * 服务器内部错误
1396
+ */
1397
+ 500: ErrorResponse;
1398
+ };
1399
+ export type PatchApiKnowledgeBasesByIdError = PatchApiKnowledgeBasesByIdErrors[keyof PatchApiKnowledgeBasesByIdErrors];
1400
+ export type PatchApiKnowledgeBasesByIdResponses = {
1401
+ /**
1402
+ * 成功
1403
+ */
1404
+ 200: {
1405
+ /**
1406
+ * 业务码,成功为 0
1407
+ */
1408
+ code: number;
1409
+ message: string;
1410
+ data: KnowledgeBase;
1411
+ };
1412
+ };
1413
+ export type PatchApiKnowledgeBasesByIdResponse = PatchApiKnowledgeBasesByIdResponses[keyof PatchApiKnowledgeBasesByIdResponses];
1414
+ export type GetApiRagsData = {
1415
+ body?: never;
1416
+ path?: never;
1417
+ query?: never;
1418
+ url: '/api/rags';
1419
+ };
1420
+ export type GetApiRagsErrors = {
1421
+ /**
1422
+ * 未登录
1423
+ */
1424
+ 401: ErrorResponse;
1425
+ /**
1426
+ * 服务器内部错误
1427
+ */
1428
+ 500: ErrorResponse;
1429
+ };
1430
+ export type GetApiRagsError = GetApiRagsErrors[keyof GetApiRagsErrors];
1431
+ export type GetApiRagsResponses = {
1432
+ /**
1433
+ * 成功
1434
+ */
1435
+ 200: {
1436
+ /**
1437
+ * 业务码,成功为 0
1438
+ */
1439
+ code: number;
1440
+ message: string;
1441
+ data: Array<Rag>;
1442
+ };
1443
+ };
1444
+ export type GetApiRagsResponse = GetApiRagsResponses[keyof GetApiRagsResponses];
1445
+ export type PostApiRagsData = {
1446
+ body: {
1447
+ name: string;
1448
+ description?: string | null;
1449
+ mark?: string | null;
1450
+ kbId: number;
1451
+ systemPrompt?: string | null;
1452
+ splitPrompt?: string | null;
1453
+ splitQuery?: boolean | null;
1454
+ scoreThreshold?: number | null;
1455
+ lowScoreReply?: string | null;
1456
+ deepThinking?: 'default' | 'false' | 'low' | 'medium' | 'high' | null;
1457
+ multiTurn?: boolean | null;
1458
+ contextThreshold?: number | null;
1459
+ retrieveLimit?: number | null;
1460
+ imageMaxCount?: number | null;
1461
+ imageMaxEdge?: number | null;
1462
+ welcome?: RagWelcomeConfig;
1463
+ recommendedQuestions?: Array<string> | null;
1464
+ };
1465
+ path?: never;
1466
+ query?: never;
1467
+ url: '/api/rags';
1468
+ };
1469
+ export type PostApiRagsErrors = {
1470
+ /**
1471
+ * 请求参数无效
1472
+ */
1473
+ 400: ErrorResponse;
1474
+ /**
1475
+ * 未登录
1476
+ */
1477
+ 401: ErrorResponse;
1478
+ /**
1479
+ * 服务器内部错误
1480
+ */
1481
+ 500: ErrorResponse;
1482
+ };
1483
+ export type PostApiRagsError = PostApiRagsErrors[keyof PostApiRagsErrors];
1484
+ export type PostApiRagsResponses = {
1485
+ /**
1486
+ * 成功
1487
+ */
1488
+ 201: {
1489
+ /**
1490
+ * 业务码,成功为 0
1491
+ */
1492
+ code: number;
1493
+ message: string;
1494
+ data: {
1495
+ id: number;
1496
+ };
1497
+ };
1498
+ };
1499
+ export type PostApiRagsResponse = PostApiRagsResponses[keyof PostApiRagsResponses];
1500
+ export type DeleteApiRagsByIdData = {
1501
+ body?: never;
1502
+ path: {
1503
+ id: string;
1504
+ };
1505
+ query?: never;
1506
+ url: '/api/rags/{id}';
1507
+ };
1508
+ export type DeleteApiRagsByIdErrors = {
1509
+ /**
1510
+ * 请求参数无效
1511
+ */
1512
+ 400: ErrorResponse;
1513
+ /**
1514
+ * 未登录
1515
+ */
1516
+ 401: ErrorResponse;
1517
+ /**
1518
+ * 无权限
1519
+ */
1520
+ 403: ErrorResponse;
1521
+ /**
1522
+ * 资源不存在
1523
+ */
1524
+ 404: ErrorResponse;
1525
+ /**
1526
+ * LLM 并发已满
1527
+ */
1528
+ 429: ErrorResponse;
1529
+ /**
1530
+ * 服务器内部错误
1531
+ */
1532
+ 500: ErrorResponse;
1533
+ };
1534
+ export type DeleteApiRagsByIdError = DeleteApiRagsByIdErrors[keyof DeleteApiRagsByIdErrors];
1535
+ export type DeleteApiRagsByIdResponses = {
1536
+ /**
1537
+ * 成功
1538
+ */
1539
+ 200: {
1540
+ /**
1541
+ * 业务码,成功为 0
1542
+ */
1543
+ code: number;
1544
+ message: string;
1545
+ data: null;
1546
+ };
1547
+ };
1548
+ export type DeleteApiRagsByIdResponse = DeleteApiRagsByIdResponses[keyof DeleteApiRagsByIdResponses];
1549
+ export type GetApiRagsByIdData = {
1550
+ body?: never;
1551
+ path: {
1552
+ id: string;
1553
+ };
1554
+ query?: never;
1555
+ url: '/api/rags/{id}';
1556
+ };
1557
+ export type GetApiRagsByIdErrors = {
1558
+ /**
1559
+ * 请求参数无效
1560
+ */
1561
+ 400: ErrorResponse;
1562
+ /**
1563
+ * 未登录
1564
+ */
1565
+ 401: ErrorResponse;
1566
+ /**
1567
+ * 无权限
1568
+ */
1569
+ 403: ErrorResponse;
1570
+ /**
1571
+ * 资源不存在
1572
+ */
1573
+ 404: ErrorResponse;
1574
+ /**
1575
+ * LLM 并发已满
1576
+ */
1577
+ 429: ErrorResponse;
1578
+ /**
1579
+ * 服务器内部错误
1580
+ */
1581
+ 500: ErrorResponse;
1582
+ };
1583
+ export type GetApiRagsByIdError = GetApiRagsByIdErrors[keyof GetApiRagsByIdErrors];
1584
+ export type GetApiRagsByIdResponses = {
1585
+ /**
1586
+ * 成功
1587
+ */
1588
+ 200: {
1589
+ /**
1590
+ * 业务码,成功为 0
1591
+ */
1592
+ code: number;
1593
+ message: string;
1594
+ data: Rag;
1595
+ };
1596
+ };
1597
+ export type GetApiRagsByIdResponse = GetApiRagsByIdResponses[keyof GetApiRagsByIdResponses];
1598
+ export type PatchApiRagsByIdData = {
1599
+ body: {
1600
+ name?: string;
1601
+ description?: string | null;
1602
+ mark?: string | null;
1603
+ kbId?: number;
1604
+ systemPrompt?: string | null;
1605
+ splitPrompt?: string | null;
1606
+ splitQuery?: boolean | null;
1607
+ scoreThreshold?: number | null;
1608
+ lowScoreReply?: string | null;
1609
+ deepThinking?: 'default' | 'false' | 'low' | 'medium' | 'high' | null;
1610
+ multiTurn?: boolean | null;
1611
+ contextThreshold?: number | null;
1612
+ retrieveLimit?: number | null;
1613
+ imageMaxCount?: number | null;
1614
+ imageMaxEdge?: number | null;
1615
+ welcome?: RagWelcomeConfig;
1616
+ recommendedQuestions?: Array<string> | null;
1617
+ };
1618
+ path: {
1619
+ id: string;
1620
+ };
1621
+ query?: never;
1622
+ url: '/api/rags/{id}';
1623
+ };
1624
+ export type PatchApiRagsByIdErrors = {
1625
+ /**
1626
+ * 请求参数无效
1627
+ */
1628
+ 400: ErrorResponse;
1629
+ /**
1630
+ * 未登录
1631
+ */
1632
+ 401: ErrorResponse;
1633
+ /**
1634
+ * 无权限
1635
+ */
1636
+ 403: ErrorResponse;
1637
+ /**
1638
+ * 资源不存在
1639
+ */
1640
+ 404: ErrorResponse;
1641
+ /**
1642
+ * LLM 并发已满
1643
+ */
1644
+ 429: ErrorResponse;
1645
+ /**
1646
+ * 服务器内部错误
1647
+ */
1648
+ 500: ErrorResponse;
1649
+ };
1650
+ export type PatchApiRagsByIdError = PatchApiRagsByIdErrors[keyof PatchApiRagsByIdErrors];
1651
+ export type PatchApiRagsByIdResponses = {
1652
+ /**
1653
+ * 成功
1654
+ */
1655
+ 200: {
1656
+ /**
1657
+ * 业务码,成功为 0
1658
+ */
1659
+ code: number;
1660
+ message: string;
1661
+ data: Rag;
1662
+ };
1663
+ };
1664
+ export type PatchApiRagsByIdResponse = PatchApiRagsByIdResponses[keyof PatchApiRagsByIdResponses];
1665
+ export type GetApiRagsDetailData = {
1666
+ body?: never;
1667
+ path?: never;
1668
+ query?: {
1669
+ id?: number | null;
1670
+ mark?: string;
1671
+ };
1672
+ url: '/api/rags/detail';
1673
+ };
1674
+ export type GetApiRagsDetailErrors = {
1675
+ /**
1676
+ * 请求参数无效
1677
+ */
1678
+ 400: ErrorResponse;
1679
+ /**
1680
+ * 未登录
1681
+ */
1682
+ 401: ErrorResponse;
1683
+ /**
1684
+ * 资源不存在
1685
+ */
1686
+ 404: ErrorResponse;
1687
+ /**
1688
+ * 服务器内部错误
1689
+ */
1690
+ 500: ErrorResponse;
1691
+ };
1692
+ export type GetApiRagsDetailError = GetApiRagsDetailErrors[keyof GetApiRagsDetailErrors];
1693
+ export type GetApiRagsDetailResponses = {
1694
+ /**
1695
+ * 成功
1696
+ */
1697
+ 200: {
1698
+ /**
1699
+ * 业务码,成功为 0
1700
+ */
1701
+ code: number;
1702
+ message: string;
1703
+ data: RagDetail;
1704
+ };
1705
+ };
1706
+ export type GetApiRagsDetailResponse = GetApiRagsDetailResponses[keyof GetApiRagsDetailResponses];
1707
+ export type DeleteApiDocumentsData = {
1708
+ body?: never;
1709
+ path?: never;
1710
+ query: {
1711
+ /**
1712
+ * 知识库 ID
1713
+ */
1714
+ kbId: number;
1715
+ };
1716
+ url: '/api/documents';
1717
+ };
1718
+ export type DeleteApiDocumentsErrors = {
1719
+ /**
1720
+ * 请求参数无效
1721
+ */
1722
+ 400: ErrorResponse;
1723
+ /**
1724
+ * 未登录
1725
+ */
1726
+ 401: ErrorResponse;
1727
+ /**
1728
+ * 无权限
1729
+ */
1730
+ 403: ErrorResponse;
1731
+ /**
1732
+ * 服务器内部错误
1733
+ */
1734
+ 500: ErrorResponse;
1735
+ };
1736
+ export type DeleteApiDocumentsError = DeleteApiDocumentsErrors[keyof DeleteApiDocumentsErrors];
1737
+ export type DeleteApiDocumentsResponses = {
1738
+ /**
1739
+ * 成功
1740
+ */
1741
+ 200: {
1742
+ /**
1743
+ * 业务码,成功为 0
1744
+ */
1745
+ code: number;
1746
+ message: string;
1747
+ data: null;
1748
+ };
1749
+ };
1750
+ export type DeleteApiDocumentsResponse = DeleteApiDocumentsResponses[keyof DeleteApiDocumentsResponses];
1751
+ export type GetApiDocumentsData = {
1752
+ body?: never;
1753
+ path?: never;
1754
+ query: {
1755
+ /**
1756
+ * 知识库 ID
1757
+ */
1758
+ kbId: number;
1759
+ };
1760
+ url: '/api/documents';
1761
+ };
1762
+ export type GetApiDocumentsErrors = {
1763
+ /**
1764
+ * 请求参数无效
1765
+ */
1766
+ 400: ErrorResponse;
1767
+ /**
1768
+ * 未登录
1769
+ */
1770
+ 401: ErrorResponse;
1771
+ /**
1772
+ * 服务器内部错误
1773
+ */
1774
+ 500: ErrorResponse;
1775
+ };
1776
+ export type GetApiDocumentsError = GetApiDocumentsErrors[keyof GetApiDocumentsErrors];
1777
+ export type GetApiDocumentsResponses = {
1778
+ /**
1779
+ * 成功
1780
+ */
1781
+ 200: {
1782
+ /**
1783
+ * 业务码,成功为 0
1784
+ */
1785
+ code: number;
1786
+ message: string;
1787
+ data: Array<DocumentSummary>;
1788
+ };
1789
+ };
1790
+ export type GetApiDocumentsResponse = GetApiDocumentsResponses[keyof GetApiDocumentsResponses];
1791
+ export type PostApiDocumentsData = {
1792
+ body?: {
1793
+ filename: string;
1794
+ folderId?: string | null;
1795
+ visibility?: Visibility;
1796
+ };
1797
+ path?: never;
1798
+ query: {
1799
+ /**
1800
+ * 知识库 ID
1801
+ */
1802
+ kbId: number;
1803
+ };
1804
+ url: '/api/documents';
1805
+ };
1806
+ export type PostApiDocumentsErrors = {
1807
+ /**
1808
+ * 请求参数无效
1809
+ */
1810
+ 400: ErrorResponse;
1811
+ /**
1812
+ * 未登录
1813
+ */
1814
+ 401: ErrorResponse;
1815
+ /**
1816
+ * 无权限
1817
+ */
1818
+ 403: ErrorResponse;
1819
+ /**
1820
+ * 服务器内部错误
1821
+ */
1822
+ 500: ErrorResponse;
1823
+ };
1824
+ export type PostApiDocumentsError = PostApiDocumentsErrors[keyof PostApiDocumentsErrors];
1825
+ export type PostApiDocumentsResponses = {
1826
+ /**
1827
+ * JSON 创建成功返回文档摘要;multipart 返回 NDJSON 进度事件流
1828
+ */
1829
+ 201: {
1830
+ /**
1831
+ * 业务码,成功为 0
1832
+ */
1833
+ code: number;
1834
+ message: string;
1835
+ data: DocumentSummary;
1836
+ };
1837
+ };
1838
+ export type PostApiDocumentsResponse = PostApiDocumentsResponses[keyof PostApiDocumentsResponses];
1839
+ export type GetApiDocumentsTreeData = {
1840
+ body?: never;
1841
+ path?: never;
1842
+ query: {
1843
+ /**
1844
+ * 知识库标识
1845
+ */
1846
+ mark: string;
1847
+ };
1848
+ url: '/api/documents/tree';
1849
+ };
1850
+ export type GetApiDocumentsTreeErrors = {
1851
+ /**
1852
+ * 请求参数无效
1853
+ */
1854
+ 400: ErrorResponse;
1855
+ /**
1856
+ * 未登录
1857
+ */
1858
+ 401: ErrorResponse;
1859
+ /**
1860
+ * 资源不存在
1861
+ */
1862
+ 404: ErrorResponse;
1863
+ /**
1864
+ * 服务器内部错误
1865
+ */
1866
+ 500: ErrorResponse;
1867
+ };
1868
+ export type GetApiDocumentsTreeError = GetApiDocumentsTreeErrors[keyof GetApiDocumentsTreeErrors];
1869
+ export type GetApiDocumentsTreeResponses = {
1870
+ /**
1871
+ * 成功
1872
+ */
1873
+ 200: {
1874
+ /**
1875
+ * 业务码,成功为 0
1876
+ */
1877
+ code: number;
1878
+ message: string;
1879
+ data: Array<DocumentTreeNode>;
1880
+ };
1881
+ };
1882
+ export type GetApiDocumentsTreeResponse = GetApiDocumentsTreeResponses[keyof GetApiDocumentsTreeResponses];
1883
+ export type DeleteApiDocumentsByIdData = {
1884
+ body?: never;
1885
+ path: {
1886
+ id: string;
1887
+ };
1888
+ query?: never;
1889
+ url: '/api/documents/{id}';
1890
+ };
1891
+ export type DeleteApiDocumentsByIdErrors = {
1892
+ /**
1893
+ * 请求参数无效
1894
+ */
1895
+ 400: ErrorResponse;
1896
+ /**
1897
+ * 未登录
1898
+ */
1899
+ 401: ErrorResponse;
1900
+ /**
1901
+ * 无权限
1902
+ */
1903
+ 403: ErrorResponse;
1904
+ /**
1905
+ * 资源不存在
1906
+ */
1907
+ 404: ErrorResponse;
1908
+ /**
1909
+ * LLM 并发已满
1910
+ */
1911
+ 429: ErrorResponse;
1912
+ /**
1913
+ * 服务器内部错误
1914
+ */
1915
+ 500: ErrorResponse;
1916
+ };
1917
+ export type DeleteApiDocumentsByIdError = DeleteApiDocumentsByIdErrors[keyof DeleteApiDocumentsByIdErrors];
1918
+ export type DeleteApiDocumentsByIdResponses = {
1919
+ /**
1920
+ * 成功
1921
+ */
1922
+ 200: {
1923
+ /**
1924
+ * 业务码,成功为 0
1925
+ */
1926
+ code: number;
1927
+ message: string;
1928
+ data: null;
1929
+ };
1930
+ };
1931
+ export type DeleteApiDocumentsByIdResponse = DeleteApiDocumentsByIdResponses[keyof DeleteApiDocumentsByIdResponses];
1932
+ export type GetApiDocumentsByIdData = {
1933
+ body?: never;
1934
+ path: {
1935
+ id: string;
1936
+ };
1937
+ query?: {
1938
+ source?: 'docs' | 'search';
1939
+ };
1940
+ url: '/api/documents/{id}';
1941
+ };
1942
+ export type GetApiDocumentsByIdErrors = {
1943
+ /**
1944
+ * 无权限
1945
+ */
1946
+ 403: ErrorResponse;
1947
+ /**
1948
+ * 资源不存在
1949
+ */
1950
+ 404: ErrorResponse;
1951
+ /**
1952
+ * 服务器内部错误
1953
+ */
1954
+ 500: ErrorResponse;
1955
+ };
1956
+ export type GetApiDocumentsByIdError = GetApiDocumentsByIdErrors[keyof GetApiDocumentsByIdErrors];
1957
+ export type GetApiDocumentsByIdResponses = {
1958
+ /**
1959
+ * 成功
1960
+ */
1961
+ 200: {
1962
+ /**
1963
+ * 业务码,成功为 0
1964
+ */
1965
+ code: number;
1966
+ message: string;
1967
+ data: Document;
1968
+ };
1969
+ };
1970
+ export type GetApiDocumentsByIdResponse = GetApiDocumentsByIdResponses[keyof GetApiDocumentsByIdResponses];
1971
+ export type PatchApiDocumentsByIdData = {
1972
+ body: {
1973
+ filename?: string;
1974
+ content?: string;
1975
+ visibility?: Visibility;
1976
+ chunkSize?: number | null;
1977
+ chunkOverlap?: number | null;
1978
+ };
1979
+ path: {
1980
+ id: string;
1981
+ };
1982
+ query?: never;
1983
+ url: '/api/documents/{id}';
1984
+ };
1985
+ export type PatchApiDocumentsByIdErrors = {
1986
+ /**
1987
+ * 请求参数无效
1988
+ */
1989
+ 400: ErrorResponse;
1990
+ /**
1991
+ * 未登录
1992
+ */
1993
+ 401: ErrorResponse;
1994
+ /**
1995
+ * 无权限
1996
+ */
1997
+ 403: ErrorResponse;
1998
+ /**
1999
+ * 资源不存在
2000
+ */
2001
+ 404: ErrorResponse;
2002
+ /**
2003
+ * LLM 并发已满
2004
+ */
2005
+ 429: ErrorResponse;
2006
+ /**
2007
+ * 服务器内部错误
2008
+ */
2009
+ 500: ErrorResponse;
2010
+ };
2011
+ export type PatchApiDocumentsByIdError = PatchApiDocumentsByIdErrors[keyof PatchApiDocumentsByIdErrors];
2012
+ export type PatchApiDocumentsByIdResponses = {
2013
+ /**
2014
+ * 成功
2015
+ */
2016
+ 200: {
2017
+ /**
2018
+ * 业务码,成功为 0
2019
+ */
2020
+ code: number;
2021
+ message: string;
2022
+ data: Document;
2023
+ };
2024
+ };
2025
+ export type PatchApiDocumentsByIdResponse = PatchApiDocumentsByIdResponses[keyof PatchApiDocumentsByIdResponses];
2026
+ export type GetApiFoldersData = {
2027
+ body?: never;
2028
+ path?: never;
2029
+ query?: {
2030
+ kbId?: number | null;
2031
+ mark?: string;
2032
+ };
2033
+ url: '/api/folders';
2034
+ };
2035
+ export type GetApiFoldersErrors = {
2036
+ /**
2037
+ * 请求参数无效
2038
+ */
2039
+ 400: ErrorResponse;
2040
+ /**
2041
+ * 未登录
2042
+ */
2043
+ 401: ErrorResponse;
2044
+ /**
2045
+ * 资源不存在
2046
+ */
2047
+ 404: ErrorResponse;
2048
+ /**
2049
+ * 服务器内部错误
2050
+ */
2051
+ 500: ErrorResponse;
2052
+ };
2053
+ export type GetApiFoldersError = GetApiFoldersErrors[keyof GetApiFoldersErrors];
2054
+ export type GetApiFoldersResponses = {
2055
+ /**
2056
+ * 成功
2057
+ */
2058
+ 200: {
2059
+ /**
2060
+ * 业务码,成功为 0
2061
+ */
2062
+ code: number;
2063
+ message: string;
2064
+ data: Array<Folder>;
2065
+ };
2066
+ };
2067
+ export type GetApiFoldersResponse = GetApiFoldersResponses[keyof GetApiFoldersResponses];
2068
+ export type PostApiFoldersData = {
2069
+ body: {
2070
+ name: string;
2071
+ parentId?: string | null;
2072
+ visibility?: Visibility;
2073
+ kbId: number;
2074
+ };
2075
+ path?: never;
2076
+ query?: never;
2077
+ url: '/api/folders';
2078
+ };
2079
+ export type PostApiFoldersErrors = {
2080
+ /**
2081
+ * 请求参数无效
2082
+ */
2083
+ 400: ErrorResponse;
2084
+ /**
2085
+ * 未登录
2086
+ */
2087
+ 401: ErrorResponse;
2088
+ /**
2089
+ * 无权限
2090
+ */
2091
+ 403: ErrorResponse;
2092
+ /**
2093
+ * 服务器内部错误
2094
+ */
2095
+ 500: ErrorResponse;
2096
+ };
2097
+ export type PostApiFoldersError = PostApiFoldersErrors[keyof PostApiFoldersErrors];
2098
+ export type PostApiFoldersResponses = {
2099
+ /**
2100
+ * 成功
2101
+ */
2102
+ 201: {
2103
+ /**
2104
+ * 业务码,成功为 0
2105
+ */
2106
+ code: number;
2107
+ message: string;
2108
+ data: Folder;
2109
+ };
2110
+ };
2111
+ export type PostApiFoldersResponse = PostApiFoldersResponses[keyof PostApiFoldersResponses];
2112
+ export type DeleteApiFoldersByIdData = {
2113
+ body?: never;
2114
+ path: {
2115
+ id: string;
2116
+ };
2117
+ query?: never;
2118
+ url: '/api/folders/{id}';
2119
+ };
2120
+ export type DeleteApiFoldersByIdErrors = {
2121
+ /**
2122
+ * 请求参数无效
2123
+ */
2124
+ 400: ErrorResponse;
2125
+ /**
2126
+ * 未登录
2127
+ */
2128
+ 401: ErrorResponse;
2129
+ /**
2130
+ * 无权限
2131
+ */
2132
+ 403: ErrorResponse;
2133
+ /**
2134
+ * 资源不存在
2135
+ */
2136
+ 404: ErrorResponse;
2137
+ /**
2138
+ * LLM 并发已满
2139
+ */
2140
+ 429: ErrorResponse;
2141
+ /**
2142
+ * 服务器内部错误
2143
+ */
2144
+ 500: ErrorResponse;
2145
+ };
2146
+ export type DeleteApiFoldersByIdError = DeleteApiFoldersByIdErrors[keyof DeleteApiFoldersByIdErrors];
2147
+ export type DeleteApiFoldersByIdResponses = {
2148
+ /**
2149
+ * 成功
2150
+ */
2151
+ 200: {
2152
+ /**
2153
+ * 业务码,成功为 0
2154
+ */
2155
+ code: number;
2156
+ message: string;
2157
+ data: null;
2158
+ };
2159
+ };
2160
+ export type DeleteApiFoldersByIdResponse = DeleteApiFoldersByIdResponses[keyof DeleteApiFoldersByIdResponses];
2161
+ export type PatchApiFoldersByIdData = {
2162
+ body: {
2163
+ name?: string;
2164
+ parentId?: string | null;
2165
+ visibility?: Visibility;
2166
+ };
2167
+ path: {
2168
+ id: string;
2169
+ };
2170
+ query?: never;
2171
+ url: '/api/folders/{id}';
2172
+ };
2173
+ export type PatchApiFoldersByIdErrors = {
2174
+ /**
2175
+ * 请求参数无效
2176
+ */
2177
+ 400: ErrorResponse;
2178
+ /**
2179
+ * 未登录
2180
+ */
2181
+ 401: ErrorResponse;
2182
+ /**
2183
+ * 无权限
2184
+ */
2185
+ 403: ErrorResponse;
2186
+ /**
2187
+ * 资源不存在
2188
+ */
2189
+ 404: ErrorResponse;
2190
+ /**
2191
+ * LLM 并发已满
2192
+ */
2193
+ 429: ErrorResponse;
2194
+ /**
2195
+ * 服务器内部错误
2196
+ */
2197
+ 500: ErrorResponse;
2198
+ };
2199
+ export type PatchApiFoldersByIdError = PatchApiFoldersByIdErrors[keyof PatchApiFoldersByIdErrors];
2200
+ export type PatchApiFoldersByIdResponses = {
2201
+ /**
2202
+ * 成功
2203
+ */
2204
+ 200: {
2205
+ /**
2206
+ * 业务码,成功为 0
2207
+ */
2208
+ code: number;
2209
+ message: string;
2210
+ data: Folder;
2211
+ };
2212
+ };
2213
+ export type PatchApiFoldersByIdResponse = PatchApiFoldersByIdResponses[keyof PatchApiFoldersByIdResponses];
914
2214
  //# sourceMappingURL=types.gen.d.ts.map