@dxpos/knowledge 0.3.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.
- package/README.md +76 -0
- package/dist/generated/client/client.gen.d.ts +3 -0
- package/dist/generated/client/client.gen.d.ts.map +1 -0
- package/dist/generated/client/client.gen.js +216 -0
- package/dist/generated/client/index.d.ts +11 -0
- package/dist/generated/client/index.d.ts.map +1 -0
- package/dist/generated/client/index.js +6 -0
- package/dist/generated/client/types.gen.d.ts +121 -0
- package/dist/generated/client/types.gen.d.ts.map +1 -0
- package/dist/generated/client/types.gen.js +2 -0
- package/dist/generated/client/utils.gen.d.ts +38 -0
- package/dist/generated/client/utils.gen.d.ts.map +1 -0
- package/dist/generated/client/utils.gen.js +228 -0
- package/dist/generated/client.gen.d.ts +13 -0
- package/dist/generated/client.gen.d.ts.map +1 -0
- package/dist/generated/client.gen.js +3 -0
- package/dist/generated/core/auth.gen.d.ts +26 -0
- package/dist/generated/core/auth.gen.d.ts.map +1 -0
- package/dist/generated/core/auth.gen.js +14 -0
- package/dist/generated/core/bodySerializer.gen.d.ts +26 -0
- package/dist/generated/core/bodySerializer.gen.d.ts.map +1 -0
- package/dist/generated/core/bodySerializer.gen.js +57 -0
- package/dist/generated/core/params.gen.d.ts +44 -0
- package/dist/generated/core/params.gen.d.ts.map +1 -0
- package/dist/generated/core/params.gen.js +109 -0
- package/dist/generated/core/pathSerializer.gen.d.ts +34 -0
- package/dist/generated/core/pathSerializer.gen.d.ts.map +1 -0
- package/dist/generated/core/pathSerializer.gen.js +106 -0
- package/dist/generated/core/queryKeySerializer.gen.d.ts +19 -0
- package/dist/generated/core/queryKeySerializer.gen.d.ts.map +1 -0
- package/dist/generated/core/queryKeySerializer.gen.js +92 -0
- package/dist/generated/core/serverSentEvents.gen.d.ts +72 -0
- package/dist/generated/core/serverSentEvents.gen.d.ts.map +1 -0
- package/dist/generated/core/serverSentEvents.gen.js +132 -0
- package/dist/generated/core/types.gen.d.ts +84 -0
- package/dist/generated/core/types.gen.d.ts.map +1 -0
- package/dist/generated/core/types.gen.js +2 -0
- package/dist/generated/core/utils.gen.d.ts +20 -0
- package/dist/generated/core/utils.gen.d.ts.map +1 -0
- package/dist/generated/core/utils.gen.js +87 -0
- package/dist/generated/index.d.ts +3 -0
- package/dist/generated/index.d.ts.map +1 -0
- package/dist/generated/index.js +2 -0
- package/dist/generated/sdk.gen.d.ts +100 -0
- package/dist/generated/sdk.gen.d.ts.map +1 -0
- package/dist/generated/sdk.gen.js +252 -0
- package/dist/generated/types.gen.d.ts +927 -0
- package/dist/generated/types.gen.d.ts.map +1 -0
- package/dist/generated/types.gen.js +2 -0
- package/dist/index.d.ts +35 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +27 -0
- package/package.json +27 -0
|
@@ -0,0 +1,927 @@
|
|
|
1
|
+
export type ClientOptions = {
|
|
2
|
+
baseUrl: `${string}://${string}` | (string & {});
|
|
3
|
+
};
|
|
4
|
+
export type ErrorResponse = {
|
|
5
|
+
/**
|
|
6
|
+
* 业务码,成功为 0
|
|
7
|
+
*/
|
|
8
|
+
code: number;
|
|
9
|
+
message: string;
|
|
10
|
+
data: {
|
|
11
|
+
[key: string]: unknown;
|
|
12
|
+
} | Array<unknown> | null;
|
|
13
|
+
};
|
|
14
|
+
export type FileStatus = 'pending' | 'ready' | 'failed';
|
|
15
|
+
export type FileScope = 'general' | 'knowledge';
|
|
16
|
+
export type StoredFile = {
|
|
17
|
+
id: string;
|
|
18
|
+
objectKey: string;
|
|
19
|
+
filename: string;
|
|
20
|
+
size: number;
|
|
21
|
+
mimeType: string;
|
|
22
|
+
status: 'pending' | 'ready' | 'failed';
|
|
23
|
+
scope: 'general' | 'knowledge';
|
|
24
|
+
createdBy: string | null;
|
|
25
|
+
updatedBy: string | null;
|
|
26
|
+
createdAt: string;
|
|
27
|
+
updatedAt: string;
|
|
28
|
+
};
|
|
29
|
+
export type FileListItem = {
|
|
30
|
+
id: string;
|
|
31
|
+
objectKey: string;
|
|
32
|
+
filename: string;
|
|
33
|
+
size: number;
|
|
34
|
+
mimeType: string;
|
|
35
|
+
status: 'pending' | 'ready' | 'failed';
|
|
36
|
+
scope: 'general' | 'knowledge';
|
|
37
|
+
createdBy: string | null;
|
|
38
|
+
updatedBy: string | null;
|
|
39
|
+
createdAt: string;
|
|
40
|
+
updatedAt: string;
|
|
41
|
+
filenameSnippet: string;
|
|
42
|
+
};
|
|
43
|
+
export type BackendUploadResult = {
|
|
44
|
+
filename: string;
|
|
45
|
+
status: 'ok' | 'error';
|
|
46
|
+
file?: {
|
|
47
|
+
id: string;
|
|
48
|
+
objectKey: string;
|
|
49
|
+
filename: string;
|
|
50
|
+
size: number;
|
|
51
|
+
mimeType: string;
|
|
52
|
+
status: 'pending' | 'ready' | 'failed';
|
|
53
|
+
scope: 'general' | 'knowledge';
|
|
54
|
+
createdBy: string | null;
|
|
55
|
+
updatedBy: string | null;
|
|
56
|
+
createdAt: string;
|
|
57
|
+
updatedAt: string;
|
|
58
|
+
};
|
|
59
|
+
error?: string;
|
|
60
|
+
};
|
|
61
|
+
export type PrepareUploadResult = {
|
|
62
|
+
filename: string;
|
|
63
|
+
status: 'ok' | 'error';
|
|
64
|
+
id?: string;
|
|
65
|
+
objectKey?: string;
|
|
66
|
+
uploadUrl?: string;
|
|
67
|
+
error?: string;
|
|
68
|
+
};
|
|
69
|
+
export type CompleteUploadResult = {
|
|
70
|
+
id: string;
|
|
71
|
+
status: 'ok' | 'error';
|
|
72
|
+
file?: {
|
|
73
|
+
id: string;
|
|
74
|
+
objectKey: string;
|
|
75
|
+
filename: string;
|
|
76
|
+
size: number;
|
|
77
|
+
mimeType: string;
|
|
78
|
+
status: 'pending' | 'ready' | 'failed';
|
|
79
|
+
scope: 'general' | 'knowledge';
|
|
80
|
+
createdBy: string | null;
|
|
81
|
+
updatedBy: string | null;
|
|
82
|
+
createdAt: string;
|
|
83
|
+
updatedAt: string;
|
|
84
|
+
};
|
|
85
|
+
publicUrl?: string;
|
|
86
|
+
error?: string;
|
|
87
|
+
};
|
|
88
|
+
export type MessageRole = 'user' | 'assistant';
|
|
89
|
+
export type Message = {
|
|
90
|
+
id: string;
|
|
91
|
+
conversationId: string;
|
|
92
|
+
role: 'user' | 'assistant';
|
|
93
|
+
content: string;
|
|
94
|
+
createdBy: string | null;
|
|
95
|
+
createdAt: string;
|
|
96
|
+
};
|
|
97
|
+
export type Conversation = {
|
|
98
|
+
id: string;
|
|
99
|
+
title: string;
|
|
100
|
+
systemPrompt: string | null;
|
|
101
|
+
splitPrompt: string | null;
|
|
102
|
+
splitQuery: boolean | null;
|
|
103
|
+
scoreThreshold: number | null;
|
|
104
|
+
lowScoreReply: string | null;
|
|
105
|
+
createdBy: string | null;
|
|
106
|
+
updatedBy: string | null;
|
|
107
|
+
createdAt: string;
|
|
108
|
+
};
|
|
109
|
+
export type ChatEvent = {
|
|
110
|
+
type: 'token';
|
|
111
|
+
content: string;
|
|
112
|
+
} | {
|
|
113
|
+
type: 'node';
|
|
114
|
+
name: string;
|
|
115
|
+
status: 'end';
|
|
116
|
+
} | {
|
|
117
|
+
type: 'references';
|
|
118
|
+
documents: Array<{
|
|
119
|
+
id: string;
|
|
120
|
+
filename: string;
|
|
121
|
+
chunkCount: number;
|
|
122
|
+
score: number;
|
|
123
|
+
}>;
|
|
124
|
+
} | {
|
|
125
|
+
type: 'done';
|
|
126
|
+
} | {
|
|
127
|
+
type: 'error';
|
|
128
|
+
message: string;
|
|
129
|
+
};
|
|
130
|
+
export type ChatAnswer = {
|
|
131
|
+
answer: string;
|
|
132
|
+
references: Array<{
|
|
133
|
+
id: string;
|
|
134
|
+
filename: string;
|
|
135
|
+
chunkCount: number;
|
|
136
|
+
score: number;
|
|
137
|
+
}>;
|
|
138
|
+
};
|
|
139
|
+
export type ChatModuleSettings = {
|
|
140
|
+
systemPrompt: string | null;
|
|
141
|
+
splitPrompt: string | null;
|
|
142
|
+
splitQuery: boolean | null;
|
|
143
|
+
scoreThreshold: number | null;
|
|
144
|
+
lowScoreReply: string | null;
|
|
145
|
+
updatedBy: string | null;
|
|
146
|
+
updatedAt: string;
|
|
147
|
+
};
|
|
148
|
+
export type SearchHit = {
|
|
149
|
+
documentId: string;
|
|
150
|
+
filename: string;
|
|
151
|
+
chunkIndex: number;
|
|
152
|
+
content: string;
|
|
153
|
+
headingPath: string;
|
|
154
|
+
snippet: string;
|
|
155
|
+
filenameSnippet: string;
|
|
156
|
+
headingSnippet: string;
|
|
157
|
+
};
|
|
158
|
+
export type GetApiFilesData = {
|
|
159
|
+
body?: never;
|
|
160
|
+
path?: never;
|
|
161
|
+
query?: {
|
|
162
|
+
scope?: FileScope;
|
|
163
|
+
/**
|
|
164
|
+
* 文件名关键词
|
|
165
|
+
*/
|
|
166
|
+
q?: string;
|
|
167
|
+
};
|
|
168
|
+
url: '/api/files';
|
|
169
|
+
};
|
|
170
|
+
export type GetApiFilesErrors = {
|
|
171
|
+
/**
|
|
172
|
+
* 请求参数无效
|
|
173
|
+
*/
|
|
174
|
+
400: ErrorResponse;
|
|
175
|
+
/**
|
|
176
|
+
* 未登录
|
|
177
|
+
*/
|
|
178
|
+
401: ErrorResponse;
|
|
179
|
+
/**
|
|
180
|
+
* 服务器内部错误
|
|
181
|
+
*/
|
|
182
|
+
500: ErrorResponse;
|
|
183
|
+
};
|
|
184
|
+
export type GetApiFilesError = GetApiFilesErrors[keyof GetApiFilesErrors];
|
|
185
|
+
export type GetApiFilesResponses = {
|
|
186
|
+
/**
|
|
187
|
+
* 成功
|
|
188
|
+
*/
|
|
189
|
+
200: {
|
|
190
|
+
/**
|
|
191
|
+
* 业务码,成功为 0
|
|
192
|
+
*/
|
|
193
|
+
code: number;
|
|
194
|
+
message: string;
|
|
195
|
+
data: Array<FileListItem>;
|
|
196
|
+
};
|
|
197
|
+
};
|
|
198
|
+
export type GetApiFilesResponse = GetApiFilesResponses[keyof GetApiFilesResponses];
|
|
199
|
+
export type PostApiFilesData = {
|
|
200
|
+
body: {
|
|
201
|
+
files: Array<Blob | File>;
|
|
202
|
+
scope: FileScope;
|
|
203
|
+
};
|
|
204
|
+
path?: never;
|
|
205
|
+
query?: never;
|
|
206
|
+
url: '/api/files';
|
|
207
|
+
};
|
|
208
|
+
export type PostApiFilesErrors = {
|
|
209
|
+
/**
|
|
210
|
+
* 请求参数无效
|
|
211
|
+
*/
|
|
212
|
+
400: ErrorResponse;
|
|
213
|
+
/**
|
|
214
|
+
* 未登录
|
|
215
|
+
*/
|
|
216
|
+
401: ErrorResponse;
|
|
217
|
+
/**
|
|
218
|
+
* 无权限
|
|
219
|
+
*/
|
|
220
|
+
403: ErrorResponse;
|
|
221
|
+
/**
|
|
222
|
+
* 资源不存在
|
|
223
|
+
*/
|
|
224
|
+
404: ErrorResponse;
|
|
225
|
+
/**
|
|
226
|
+
* 服务器内部错误
|
|
227
|
+
*/
|
|
228
|
+
500: ErrorResponse;
|
|
229
|
+
};
|
|
230
|
+
export type PostApiFilesError = PostApiFilesErrors[keyof PostApiFilesErrors];
|
|
231
|
+
export type PostApiFilesResponses = {
|
|
232
|
+
/**
|
|
233
|
+
* 部分或全部成功
|
|
234
|
+
*/
|
|
235
|
+
201: {
|
|
236
|
+
/**
|
|
237
|
+
* 业务码,成功为 0
|
|
238
|
+
*/
|
|
239
|
+
code: number;
|
|
240
|
+
message: string;
|
|
241
|
+
data: {
|
|
242
|
+
results?: Array<BackendUploadResult>;
|
|
243
|
+
};
|
|
244
|
+
};
|
|
245
|
+
};
|
|
246
|
+
export type PostApiFilesResponse = PostApiFilesResponses[keyof PostApiFilesResponses];
|
|
247
|
+
export type PostApiFilesPresignData = {
|
|
248
|
+
body: {
|
|
249
|
+
items: Array<{
|
|
250
|
+
filename: string;
|
|
251
|
+
size: number;
|
|
252
|
+
mimeType: string;
|
|
253
|
+
scope: FileScope;
|
|
254
|
+
}>;
|
|
255
|
+
};
|
|
256
|
+
path?: never;
|
|
257
|
+
query?: never;
|
|
258
|
+
url: '/api/files/presign';
|
|
259
|
+
};
|
|
260
|
+
export type PostApiFilesPresignErrors = {
|
|
261
|
+
/**
|
|
262
|
+
* 请求参数无效
|
|
263
|
+
*/
|
|
264
|
+
400: ErrorResponse;
|
|
265
|
+
/**
|
|
266
|
+
* 未登录
|
|
267
|
+
*/
|
|
268
|
+
401: ErrorResponse;
|
|
269
|
+
/**
|
|
270
|
+
* 无权限
|
|
271
|
+
*/
|
|
272
|
+
403: ErrorResponse;
|
|
273
|
+
/**
|
|
274
|
+
* 资源不存在
|
|
275
|
+
*/
|
|
276
|
+
404: ErrorResponse;
|
|
277
|
+
/**
|
|
278
|
+
* 服务器内部错误
|
|
279
|
+
*/
|
|
280
|
+
500: ErrorResponse;
|
|
281
|
+
};
|
|
282
|
+
export type PostApiFilesPresignError = PostApiFilesPresignErrors[keyof PostApiFilesPresignErrors];
|
|
283
|
+
export type PostApiFilesPresignResponses = {
|
|
284
|
+
/**
|
|
285
|
+
* 成功
|
|
286
|
+
*/
|
|
287
|
+
201: {
|
|
288
|
+
/**
|
|
289
|
+
* 业务码,成功为 0
|
|
290
|
+
*/
|
|
291
|
+
code: number;
|
|
292
|
+
message: string;
|
|
293
|
+
data: {
|
|
294
|
+
results?: Array<PrepareUploadResult>;
|
|
295
|
+
};
|
|
296
|
+
};
|
|
297
|
+
};
|
|
298
|
+
export type PostApiFilesPresignResponse = PostApiFilesPresignResponses[keyof PostApiFilesPresignResponses];
|
|
299
|
+
export type PostApiFilesCompleteData = {
|
|
300
|
+
body: {
|
|
301
|
+
ids: Array<string>;
|
|
302
|
+
};
|
|
303
|
+
path?: never;
|
|
304
|
+
query?: never;
|
|
305
|
+
url: '/api/files/complete';
|
|
306
|
+
};
|
|
307
|
+
export type PostApiFilesCompleteErrors = {
|
|
308
|
+
/**
|
|
309
|
+
* 请求参数无效
|
|
310
|
+
*/
|
|
311
|
+
400: ErrorResponse;
|
|
312
|
+
/**
|
|
313
|
+
* 未登录
|
|
314
|
+
*/
|
|
315
|
+
401: ErrorResponse;
|
|
316
|
+
/**
|
|
317
|
+
* 无权限
|
|
318
|
+
*/
|
|
319
|
+
403: ErrorResponse;
|
|
320
|
+
/**
|
|
321
|
+
* 资源不存在
|
|
322
|
+
*/
|
|
323
|
+
404: ErrorResponse;
|
|
324
|
+
/**
|
|
325
|
+
* 服务器内部错误
|
|
326
|
+
*/
|
|
327
|
+
500: ErrorResponse;
|
|
328
|
+
};
|
|
329
|
+
export type PostApiFilesCompleteError = PostApiFilesCompleteErrors[keyof PostApiFilesCompleteErrors];
|
|
330
|
+
export type PostApiFilesCompleteResponses = {
|
|
331
|
+
/**
|
|
332
|
+
* 成功
|
|
333
|
+
*/
|
|
334
|
+
200: {
|
|
335
|
+
/**
|
|
336
|
+
* 业务码,成功为 0
|
|
337
|
+
*/
|
|
338
|
+
code: number;
|
|
339
|
+
message: string;
|
|
340
|
+
data: {
|
|
341
|
+
results?: Array<CompleteUploadResult>;
|
|
342
|
+
};
|
|
343
|
+
};
|
|
344
|
+
};
|
|
345
|
+
export type PostApiFilesCompleteResponse = PostApiFilesCompleteResponses[keyof PostApiFilesCompleteResponses];
|
|
346
|
+
export type DeleteApiFilesByIdData = {
|
|
347
|
+
body?: never;
|
|
348
|
+
path: {
|
|
349
|
+
id: string;
|
|
350
|
+
};
|
|
351
|
+
query?: never;
|
|
352
|
+
url: '/api/files/{id}';
|
|
353
|
+
};
|
|
354
|
+
export type DeleteApiFilesByIdErrors = {
|
|
355
|
+
/**
|
|
356
|
+
* 请求参数无效
|
|
357
|
+
*/
|
|
358
|
+
400: ErrorResponse;
|
|
359
|
+
/**
|
|
360
|
+
* 未登录
|
|
361
|
+
*/
|
|
362
|
+
401: ErrorResponse;
|
|
363
|
+
/**
|
|
364
|
+
* 无权限
|
|
365
|
+
*/
|
|
366
|
+
403: ErrorResponse;
|
|
367
|
+
/**
|
|
368
|
+
* 资源不存在
|
|
369
|
+
*/
|
|
370
|
+
404: ErrorResponse;
|
|
371
|
+
/**
|
|
372
|
+
* 服务器内部错误
|
|
373
|
+
*/
|
|
374
|
+
500: ErrorResponse;
|
|
375
|
+
};
|
|
376
|
+
export type DeleteApiFilesByIdError = DeleteApiFilesByIdErrors[keyof DeleteApiFilesByIdErrors];
|
|
377
|
+
export type DeleteApiFilesByIdResponses = {
|
|
378
|
+
/**
|
|
379
|
+
* 成功
|
|
380
|
+
*/
|
|
381
|
+
200: {
|
|
382
|
+
/**
|
|
383
|
+
* 业务码,成功为 0
|
|
384
|
+
*/
|
|
385
|
+
code: number;
|
|
386
|
+
message: string;
|
|
387
|
+
data: null;
|
|
388
|
+
};
|
|
389
|
+
};
|
|
390
|
+
export type DeleteApiFilesByIdResponse = DeleteApiFilesByIdResponses[keyof DeleteApiFilesByIdResponses];
|
|
391
|
+
export type GetApiFilesByIdData = {
|
|
392
|
+
body?: never;
|
|
393
|
+
path: {
|
|
394
|
+
id: string;
|
|
395
|
+
};
|
|
396
|
+
query?: never;
|
|
397
|
+
url: '/api/files/{id}';
|
|
398
|
+
};
|
|
399
|
+
export type GetApiFilesByIdErrors = {
|
|
400
|
+
/**
|
|
401
|
+
* 请求参数无效
|
|
402
|
+
*/
|
|
403
|
+
400: ErrorResponse;
|
|
404
|
+
/**
|
|
405
|
+
* 未登录
|
|
406
|
+
*/
|
|
407
|
+
401: ErrorResponse;
|
|
408
|
+
/**
|
|
409
|
+
* 无权限
|
|
410
|
+
*/
|
|
411
|
+
403: ErrorResponse;
|
|
412
|
+
/**
|
|
413
|
+
* 资源不存在
|
|
414
|
+
*/
|
|
415
|
+
404: ErrorResponse;
|
|
416
|
+
/**
|
|
417
|
+
* 服务器内部错误
|
|
418
|
+
*/
|
|
419
|
+
500: ErrorResponse;
|
|
420
|
+
};
|
|
421
|
+
export type GetApiFilesByIdError = GetApiFilesByIdErrors[keyof GetApiFilesByIdErrors];
|
|
422
|
+
export type GetApiFilesByIdResponses = {
|
|
423
|
+
/**
|
|
424
|
+
* 成功
|
|
425
|
+
*/
|
|
426
|
+
200: {
|
|
427
|
+
/**
|
|
428
|
+
* 业务码,成功为 0
|
|
429
|
+
*/
|
|
430
|
+
code: number;
|
|
431
|
+
message: string;
|
|
432
|
+
data: StoredFile;
|
|
433
|
+
};
|
|
434
|
+
};
|
|
435
|
+
export type GetApiFilesByIdResponse = GetApiFilesByIdResponses[keyof GetApiFilesByIdResponses];
|
|
436
|
+
export type GetApiFilesByIdRawData = {
|
|
437
|
+
body?: never;
|
|
438
|
+
path: {
|
|
439
|
+
id: string;
|
|
440
|
+
};
|
|
441
|
+
query?: never;
|
|
442
|
+
url: '/api/files/{id}/raw';
|
|
443
|
+
};
|
|
444
|
+
export type GetApiFilesByIdRawErrors = {
|
|
445
|
+
/**
|
|
446
|
+
* 请求参数无效
|
|
447
|
+
*/
|
|
448
|
+
400: ErrorResponse;
|
|
449
|
+
/**
|
|
450
|
+
* 未登录
|
|
451
|
+
*/
|
|
452
|
+
401: ErrorResponse;
|
|
453
|
+
/**
|
|
454
|
+
* 无权限
|
|
455
|
+
*/
|
|
456
|
+
403: ErrorResponse;
|
|
457
|
+
/**
|
|
458
|
+
* 资源不存在
|
|
459
|
+
*/
|
|
460
|
+
404: ErrorResponse;
|
|
461
|
+
/**
|
|
462
|
+
* 服务器内部错误
|
|
463
|
+
*/
|
|
464
|
+
500: ErrorResponse;
|
|
465
|
+
};
|
|
466
|
+
export type GetApiFilesByIdRawError = GetApiFilesByIdRawErrors[keyof GetApiFilesByIdRawErrors];
|
|
467
|
+
export type GetApiFilesByIdRawResponses = {
|
|
468
|
+
/**
|
|
469
|
+
* 文件二进制流,Content-Type 为文件 MIME
|
|
470
|
+
*/
|
|
471
|
+
200: Blob | File;
|
|
472
|
+
};
|
|
473
|
+
export type GetApiFilesByIdRawResponse = GetApiFilesByIdRawResponses[keyof GetApiFilesByIdRawResponses];
|
|
474
|
+
export type GetApiFilesByIdUrlData = {
|
|
475
|
+
body?: never;
|
|
476
|
+
path: {
|
|
477
|
+
id: string;
|
|
478
|
+
};
|
|
479
|
+
query?: never;
|
|
480
|
+
url: '/api/files/{id}/url';
|
|
481
|
+
};
|
|
482
|
+
export type GetApiFilesByIdUrlErrors = {
|
|
483
|
+
/**
|
|
484
|
+
* 请求参数无效
|
|
485
|
+
*/
|
|
486
|
+
400: ErrorResponse;
|
|
487
|
+
/**
|
|
488
|
+
* 未登录
|
|
489
|
+
*/
|
|
490
|
+
401: ErrorResponse;
|
|
491
|
+
/**
|
|
492
|
+
* 无权限
|
|
493
|
+
*/
|
|
494
|
+
403: ErrorResponse;
|
|
495
|
+
/**
|
|
496
|
+
* 资源不存在
|
|
497
|
+
*/
|
|
498
|
+
404: ErrorResponse;
|
|
499
|
+
/**
|
|
500
|
+
* 服务器内部错误
|
|
501
|
+
*/
|
|
502
|
+
500: ErrorResponse;
|
|
503
|
+
};
|
|
504
|
+
export type GetApiFilesByIdUrlError = GetApiFilesByIdUrlErrors[keyof GetApiFilesByIdUrlErrors];
|
|
505
|
+
export type GetApiFilesByIdUrlResponses = {
|
|
506
|
+
/**
|
|
507
|
+
* 成功
|
|
508
|
+
*/
|
|
509
|
+
200: {
|
|
510
|
+
/**
|
|
511
|
+
* 业务码,成功为 0
|
|
512
|
+
*/
|
|
513
|
+
code: number;
|
|
514
|
+
message: string;
|
|
515
|
+
data: {
|
|
516
|
+
url: string;
|
|
517
|
+
};
|
|
518
|
+
};
|
|
519
|
+
};
|
|
520
|
+
export type GetApiFilesByIdUrlResponse = GetApiFilesByIdUrlResponses[keyof GetApiFilesByIdUrlResponses];
|
|
521
|
+
export type PostApiChatData = {
|
|
522
|
+
body: {
|
|
523
|
+
conversationId: string;
|
|
524
|
+
content: string;
|
|
525
|
+
stream?: boolean;
|
|
526
|
+
};
|
|
527
|
+
path?: never;
|
|
528
|
+
query?: never;
|
|
529
|
+
url: '/api/chat';
|
|
530
|
+
};
|
|
531
|
+
export type PostApiChatErrors = {
|
|
532
|
+
/**
|
|
533
|
+
* 请求参数无效
|
|
534
|
+
*/
|
|
535
|
+
400: ErrorResponse;
|
|
536
|
+
/**
|
|
537
|
+
* 未登录
|
|
538
|
+
*/
|
|
539
|
+
401: ErrorResponse;
|
|
540
|
+
/**
|
|
541
|
+
* 无权限
|
|
542
|
+
*/
|
|
543
|
+
403: ErrorResponse;
|
|
544
|
+
/**
|
|
545
|
+
* 资源不存在
|
|
546
|
+
*/
|
|
547
|
+
404: ErrorResponse;
|
|
548
|
+
/**
|
|
549
|
+
* 服务器内部错误
|
|
550
|
+
*/
|
|
551
|
+
500: ErrorResponse;
|
|
552
|
+
};
|
|
553
|
+
export type PostApiChatError = PostApiChatErrors[keyof PostApiChatErrors];
|
|
554
|
+
export type PostApiChatResponses = {
|
|
555
|
+
/**
|
|
556
|
+
* stream=true 为 NDJSON 事件;stream=false 为 JSON 信封
|
|
557
|
+
*/
|
|
558
|
+
200: {
|
|
559
|
+
/**
|
|
560
|
+
* 业务码,成功为 0
|
|
561
|
+
*/
|
|
562
|
+
code: number;
|
|
563
|
+
message: string;
|
|
564
|
+
data: ChatAnswer;
|
|
565
|
+
};
|
|
566
|
+
};
|
|
567
|
+
export type PostApiChatResponse = PostApiChatResponses[keyof PostApiChatResponses];
|
|
568
|
+
export type GetApiChatSettingsData = {
|
|
569
|
+
body?: never;
|
|
570
|
+
path?: never;
|
|
571
|
+
query?: never;
|
|
572
|
+
url: '/api/chat/settings';
|
|
573
|
+
};
|
|
574
|
+
export type GetApiChatSettingsErrors = {
|
|
575
|
+
/**
|
|
576
|
+
* 未登录
|
|
577
|
+
*/
|
|
578
|
+
401: ErrorResponse;
|
|
579
|
+
/**
|
|
580
|
+
* 无权限
|
|
581
|
+
*/
|
|
582
|
+
403: ErrorResponse;
|
|
583
|
+
/**
|
|
584
|
+
* 服务器内部错误
|
|
585
|
+
*/
|
|
586
|
+
500: ErrorResponse;
|
|
587
|
+
};
|
|
588
|
+
export type GetApiChatSettingsError = GetApiChatSettingsErrors[keyof GetApiChatSettingsErrors];
|
|
589
|
+
export type GetApiChatSettingsResponses = {
|
|
590
|
+
/**
|
|
591
|
+
* 成功
|
|
592
|
+
*/
|
|
593
|
+
200: {
|
|
594
|
+
/**
|
|
595
|
+
* 业务码,成功为 0
|
|
596
|
+
*/
|
|
597
|
+
code: number;
|
|
598
|
+
message: string;
|
|
599
|
+
data: ChatModuleSettings;
|
|
600
|
+
};
|
|
601
|
+
};
|
|
602
|
+
export type GetApiChatSettingsResponse = GetApiChatSettingsResponses[keyof GetApiChatSettingsResponses];
|
|
603
|
+
export type PutApiChatSettingsData = {
|
|
604
|
+
body: {
|
|
605
|
+
systemPrompt?: string | null;
|
|
606
|
+
splitPrompt?: string | null;
|
|
607
|
+
splitQuery?: boolean | null;
|
|
608
|
+
scoreThreshold?: number | null;
|
|
609
|
+
lowScoreReply?: string | null;
|
|
610
|
+
};
|
|
611
|
+
path?: never;
|
|
612
|
+
query?: never;
|
|
613
|
+
url: '/api/chat/settings';
|
|
614
|
+
};
|
|
615
|
+
export type PutApiChatSettingsErrors = {
|
|
616
|
+
/**
|
|
617
|
+
* 请求参数无效
|
|
618
|
+
*/
|
|
619
|
+
400: ErrorResponse;
|
|
620
|
+
/**
|
|
621
|
+
* 未登录
|
|
622
|
+
*/
|
|
623
|
+
401: ErrorResponse;
|
|
624
|
+
/**
|
|
625
|
+
* 无权限
|
|
626
|
+
*/
|
|
627
|
+
403: ErrorResponse;
|
|
628
|
+
/**
|
|
629
|
+
* 资源不存在
|
|
630
|
+
*/
|
|
631
|
+
404: ErrorResponse;
|
|
632
|
+
/**
|
|
633
|
+
* 服务器内部错误
|
|
634
|
+
*/
|
|
635
|
+
500: ErrorResponse;
|
|
636
|
+
};
|
|
637
|
+
export type PutApiChatSettingsError = PutApiChatSettingsErrors[keyof PutApiChatSettingsErrors];
|
|
638
|
+
export type PutApiChatSettingsResponses = {
|
|
639
|
+
/**
|
|
640
|
+
* 成功
|
|
641
|
+
*/
|
|
642
|
+
200: {
|
|
643
|
+
/**
|
|
644
|
+
* 业务码,成功为 0
|
|
645
|
+
*/
|
|
646
|
+
code: number;
|
|
647
|
+
message: string;
|
|
648
|
+
data: ChatModuleSettings;
|
|
649
|
+
};
|
|
650
|
+
};
|
|
651
|
+
export type PutApiChatSettingsResponse = PutApiChatSettingsResponses[keyof PutApiChatSettingsResponses];
|
|
652
|
+
export type GetApiChatConversationsData = {
|
|
653
|
+
body?: never;
|
|
654
|
+
path?: never;
|
|
655
|
+
query?: never;
|
|
656
|
+
url: '/api/chat/conversations';
|
|
657
|
+
};
|
|
658
|
+
export type GetApiChatConversationsErrors = {
|
|
659
|
+
/**
|
|
660
|
+
* 未登录
|
|
661
|
+
*/
|
|
662
|
+
401: ErrorResponse;
|
|
663
|
+
/**
|
|
664
|
+
* 服务器内部错误
|
|
665
|
+
*/
|
|
666
|
+
500: ErrorResponse;
|
|
667
|
+
};
|
|
668
|
+
export type GetApiChatConversationsError = GetApiChatConversationsErrors[keyof GetApiChatConversationsErrors];
|
|
669
|
+
export type GetApiChatConversationsResponses = {
|
|
670
|
+
/**
|
|
671
|
+
* 成功
|
|
672
|
+
*/
|
|
673
|
+
200: {
|
|
674
|
+
/**
|
|
675
|
+
* 业务码,成功为 0
|
|
676
|
+
*/
|
|
677
|
+
code: number;
|
|
678
|
+
message: string;
|
|
679
|
+
data: Array<Conversation>;
|
|
680
|
+
};
|
|
681
|
+
};
|
|
682
|
+
export type GetApiChatConversationsResponse = GetApiChatConversationsResponses[keyof GetApiChatConversationsResponses];
|
|
683
|
+
export type PostApiChatConversationsData = {
|
|
684
|
+
body?: {
|
|
685
|
+
title?: string;
|
|
686
|
+
systemPrompt?: string | null;
|
|
687
|
+
splitPrompt?: string | null;
|
|
688
|
+
splitQuery?: boolean | null;
|
|
689
|
+
scoreThreshold?: number | null;
|
|
690
|
+
lowScoreReply?: string | null;
|
|
691
|
+
};
|
|
692
|
+
path?: never;
|
|
693
|
+
query?: never;
|
|
694
|
+
url: '/api/chat/conversations';
|
|
695
|
+
};
|
|
696
|
+
export type PostApiChatConversationsErrors = {
|
|
697
|
+
/**
|
|
698
|
+
* 请求参数无效
|
|
699
|
+
*/
|
|
700
|
+
400: ErrorResponse;
|
|
701
|
+
/**
|
|
702
|
+
* 未登录
|
|
703
|
+
*/
|
|
704
|
+
401: ErrorResponse;
|
|
705
|
+
/**
|
|
706
|
+
* 无权限
|
|
707
|
+
*/
|
|
708
|
+
403: ErrorResponse;
|
|
709
|
+
/**
|
|
710
|
+
* 资源不存在
|
|
711
|
+
*/
|
|
712
|
+
404: ErrorResponse;
|
|
713
|
+
/**
|
|
714
|
+
* 服务器内部错误
|
|
715
|
+
*/
|
|
716
|
+
500: ErrorResponse;
|
|
717
|
+
};
|
|
718
|
+
export type PostApiChatConversationsError = PostApiChatConversationsErrors[keyof PostApiChatConversationsErrors];
|
|
719
|
+
export type PostApiChatConversationsResponses = {
|
|
720
|
+
/**
|
|
721
|
+
* 成功
|
|
722
|
+
*/
|
|
723
|
+
201: {
|
|
724
|
+
/**
|
|
725
|
+
* 业务码,成功为 0
|
|
726
|
+
*/
|
|
727
|
+
code: number;
|
|
728
|
+
message: string;
|
|
729
|
+
data: Conversation;
|
|
730
|
+
};
|
|
731
|
+
};
|
|
732
|
+
export type PostApiChatConversationsResponse = PostApiChatConversationsResponses[keyof PostApiChatConversationsResponses];
|
|
733
|
+
export type DeleteApiChatConversationsByIdData = {
|
|
734
|
+
body?: never;
|
|
735
|
+
path: {
|
|
736
|
+
id: string;
|
|
737
|
+
};
|
|
738
|
+
query?: never;
|
|
739
|
+
url: '/api/chat/conversations/{id}';
|
|
740
|
+
};
|
|
741
|
+
export type DeleteApiChatConversationsByIdErrors = {
|
|
742
|
+
/**
|
|
743
|
+
* 请求参数无效
|
|
744
|
+
*/
|
|
745
|
+
400: ErrorResponse;
|
|
746
|
+
/**
|
|
747
|
+
* 未登录
|
|
748
|
+
*/
|
|
749
|
+
401: ErrorResponse;
|
|
750
|
+
/**
|
|
751
|
+
* 无权限
|
|
752
|
+
*/
|
|
753
|
+
403: ErrorResponse;
|
|
754
|
+
/**
|
|
755
|
+
* 资源不存在
|
|
756
|
+
*/
|
|
757
|
+
404: ErrorResponse;
|
|
758
|
+
/**
|
|
759
|
+
* 服务器内部错误
|
|
760
|
+
*/
|
|
761
|
+
500: ErrorResponse;
|
|
762
|
+
};
|
|
763
|
+
export type DeleteApiChatConversationsByIdError = DeleteApiChatConversationsByIdErrors[keyof DeleteApiChatConversationsByIdErrors];
|
|
764
|
+
export type DeleteApiChatConversationsByIdResponses = {
|
|
765
|
+
/**
|
|
766
|
+
* 成功
|
|
767
|
+
*/
|
|
768
|
+
200: {
|
|
769
|
+
/**
|
|
770
|
+
* 业务码,成功为 0
|
|
771
|
+
*/
|
|
772
|
+
code: number;
|
|
773
|
+
message: string;
|
|
774
|
+
data: null;
|
|
775
|
+
};
|
|
776
|
+
};
|
|
777
|
+
export type DeleteApiChatConversationsByIdResponse = DeleteApiChatConversationsByIdResponses[keyof DeleteApiChatConversationsByIdResponses];
|
|
778
|
+
export type GetApiChatConversationsByIdData = {
|
|
779
|
+
body?: never;
|
|
780
|
+
path: {
|
|
781
|
+
id: string;
|
|
782
|
+
};
|
|
783
|
+
query?: never;
|
|
784
|
+
url: '/api/chat/conversations/{id}';
|
|
785
|
+
};
|
|
786
|
+
export type GetApiChatConversationsByIdErrors = {
|
|
787
|
+
/**
|
|
788
|
+
* 请求参数无效
|
|
789
|
+
*/
|
|
790
|
+
400: ErrorResponse;
|
|
791
|
+
/**
|
|
792
|
+
* 未登录
|
|
793
|
+
*/
|
|
794
|
+
401: ErrorResponse;
|
|
795
|
+
/**
|
|
796
|
+
* 无权限
|
|
797
|
+
*/
|
|
798
|
+
403: ErrorResponse;
|
|
799
|
+
/**
|
|
800
|
+
* 资源不存在
|
|
801
|
+
*/
|
|
802
|
+
404: ErrorResponse;
|
|
803
|
+
/**
|
|
804
|
+
* 服务器内部错误
|
|
805
|
+
*/
|
|
806
|
+
500: ErrorResponse;
|
|
807
|
+
};
|
|
808
|
+
export type GetApiChatConversationsByIdError = GetApiChatConversationsByIdErrors[keyof GetApiChatConversationsByIdErrors];
|
|
809
|
+
export type GetApiChatConversationsByIdResponses = {
|
|
810
|
+
/**
|
|
811
|
+
* 成功
|
|
812
|
+
*/
|
|
813
|
+
200: {
|
|
814
|
+
/**
|
|
815
|
+
* 业务码,成功为 0
|
|
816
|
+
*/
|
|
817
|
+
code: number;
|
|
818
|
+
message: string;
|
|
819
|
+
data: {
|
|
820
|
+
conversation: Conversation;
|
|
821
|
+
messages: Array<Message>;
|
|
822
|
+
};
|
|
823
|
+
};
|
|
824
|
+
};
|
|
825
|
+
export type GetApiChatConversationsByIdResponse = GetApiChatConversationsByIdResponses[keyof GetApiChatConversationsByIdResponses];
|
|
826
|
+
export type PatchApiChatConversationsByIdData = {
|
|
827
|
+
body: {
|
|
828
|
+
title?: string;
|
|
829
|
+
systemPrompt?: string | null;
|
|
830
|
+
splitPrompt?: string | null;
|
|
831
|
+
splitQuery?: boolean | null;
|
|
832
|
+
scoreThreshold?: number | null;
|
|
833
|
+
lowScoreReply?: string | null;
|
|
834
|
+
};
|
|
835
|
+
path: {
|
|
836
|
+
id: string;
|
|
837
|
+
};
|
|
838
|
+
query?: never;
|
|
839
|
+
url: '/api/chat/conversations/{id}';
|
|
840
|
+
};
|
|
841
|
+
export type PatchApiChatConversationsByIdErrors = {
|
|
842
|
+
/**
|
|
843
|
+
* 请求参数无效
|
|
844
|
+
*/
|
|
845
|
+
400: ErrorResponse;
|
|
846
|
+
/**
|
|
847
|
+
* 未登录
|
|
848
|
+
*/
|
|
849
|
+
401: ErrorResponse;
|
|
850
|
+
/**
|
|
851
|
+
* 无权限
|
|
852
|
+
*/
|
|
853
|
+
403: ErrorResponse;
|
|
854
|
+
/**
|
|
855
|
+
* 资源不存在
|
|
856
|
+
*/
|
|
857
|
+
404: ErrorResponse;
|
|
858
|
+
/**
|
|
859
|
+
* 服务器内部错误
|
|
860
|
+
*/
|
|
861
|
+
500: ErrorResponse;
|
|
862
|
+
};
|
|
863
|
+
export type PatchApiChatConversationsByIdError = PatchApiChatConversationsByIdErrors[keyof PatchApiChatConversationsByIdErrors];
|
|
864
|
+
export type PatchApiChatConversationsByIdResponses = {
|
|
865
|
+
/**
|
|
866
|
+
* 成功
|
|
867
|
+
*/
|
|
868
|
+
200: {
|
|
869
|
+
/**
|
|
870
|
+
* 业务码,成功为 0
|
|
871
|
+
*/
|
|
872
|
+
code: number;
|
|
873
|
+
message: string;
|
|
874
|
+
data: Conversation;
|
|
875
|
+
};
|
|
876
|
+
};
|
|
877
|
+
export type PatchApiChatConversationsByIdResponse = PatchApiChatConversationsByIdResponses[keyof PatchApiChatConversationsByIdResponses];
|
|
878
|
+
export type GetApiSearchData = {
|
|
879
|
+
body?: never;
|
|
880
|
+
path?: never;
|
|
881
|
+
query: {
|
|
882
|
+
/**
|
|
883
|
+
* 关键词
|
|
884
|
+
*/
|
|
885
|
+
q: string;
|
|
886
|
+
limit?: number;
|
|
887
|
+
};
|
|
888
|
+
url: '/api/search';
|
|
889
|
+
};
|
|
890
|
+
export type GetApiSearchErrors = {
|
|
891
|
+
/**
|
|
892
|
+
* 请求参数无效
|
|
893
|
+
*/
|
|
894
|
+
400: ErrorResponse;
|
|
895
|
+
/**
|
|
896
|
+
* 未登录
|
|
897
|
+
*/
|
|
898
|
+
401: ErrorResponse;
|
|
899
|
+
/**
|
|
900
|
+
* 无权限
|
|
901
|
+
*/
|
|
902
|
+
403: ErrorResponse;
|
|
903
|
+
/**
|
|
904
|
+
* 资源不存在
|
|
905
|
+
*/
|
|
906
|
+
404: ErrorResponse;
|
|
907
|
+
/**
|
|
908
|
+
* 服务器内部错误
|
|
909
|
+
*/
|
|
910
|
+
500: ErrorResponse;
|
|
911
|
+
};
|
|
912
|
+
export type GetApiSearchError = GetApiSearchErrors[keyof GetApiSearchErrors];
|
|
913
|
+
export type GetApiSearchResponses = {
|
|
914
|
+
/**
|
|
915
|
+
* 成功
|
|
916
|
+
*/
|
|
917
|
+
200: {
|
|
918
|
+
/**
|
|
919
|
+
* 业务码,成功为 0
|
|
920
|
+
*/
|
|
921
|
+
code: number;
|
|
922
|
+
message: string;
|
|
923
|
+
data: Array<SearchHit>;
|
|
924
|
+
};
|
|
925
|
+
};
|
|
926
|
+
export type GetApiSearchResponse = GetApiSearchResponses[keyof GetApiSearchResponses];
|
|
927
|
+
//# sourceMappingURL=types.gen.d.ts.map
|