plugin-ai-api 1.0.2 → 1.0.3

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 (53) hide show
  1. package/dist/client/{2c126424a58bcb27.js → 23.e96ecf13e6072dce.js} +9 -0
  2. package/dist/client/{824c2f7487ee05fd.js → 503.29bcdb426b01e715.js} +10 -1
  3. package/dist/client/index.js +10 -1
  4. package/dist/externalVersion.js +18 -8
  5. package/dist/index.js +9 -0
  6. package/dist/locale/en-US.json +10 -10
  7. package/dist/locale/zh-CN.json +10 -10
  8. package/dist/server/collections/ai-api-config.js +9 -0
  9. package/dist/server/collections/ai-api-role-permissions.js +9 -0
  10. package/dist/server/index.js +9 -0
  11. package/dist/server/middleware/rate-limit.js +9 -0
  12. package/dist/server/middleware/role-permission.js +9 -0
  13. package/dist/server/plugin.js +14 -0
  14. package/dist/server/resource/ai-api-config.js +9 -0
  15. package/dist/server/routes/agent-completions.js +21 -4
  16. package/dist/server/routes/auth.js +11 -12
  17. package/dist/server/routes/chat-completions.js +16 -4
  18. package/dist/server/routes/completions.js +16 -4
  19. package/dist/server/routes/embeddings.js +10 -3
  20. package/dist/server/routes/models.js +11 -8
  21. package/dist/server/routes/router.js +20 -4
  22. package/dist/server/utils/openai-format.js +9 -0
  23. package/dist/server/utils/rate-limiter.js +9 -0
  24. package/dist/server/utils/resolve-service.js +9 -0
  25. package/dist/swagger.js +10 -4
  26. package/package.json +14 -14
  27. package/dist/client/AiApiConfigPage.d.ts +0 -3
  28. package/dist/client/components/AiApiRolePermissions.d.ts +0 -8
  29. package/dist/client/index.d.ts +0 -1
  30. package/dist/client/locale.d.ts +0 -10
  31. package/dist/client/models/index.d.ts +0 -10
  32. package/dist/client/plugin.d.ts +0 -6
  33. package/dist/index.d.ts +0 -2
  34. package/dist/server/collections/ai-api-config.d.ts +0 -2
  35. package/dist/server/collections/ai-api-role-permissions.d.ts +0 -2
  36. package/dist/server/index.d.ts +0 -1
  37. package/dist/server/middleware/rate-limit.d.ts +0 -18
  38. package/dist/server/middleware/role-permission.d.ts +0 -21
  39. package/dist/server/plugin.d.ts +0 -18
  40. package/dist/server/resource/ai-api-config.d.ts +0 -10
  41. package/dist/server/routes/agent-completions.d.ts +0 -34
  42. package/dist/server/routes/auth.d.ts +0 -8
  43. package/dist/server/routes/chat-completions.d.ts +0 -9
  44. package/dist/server/routes/completions.d.ts +0 -10
  45. package/dist/server/routes/embeddings.d.ts +0 -22
  46. package/dist/server/routes/models.d.ts +0 -21
  47. package/dist/server/routes/router.d.ts +0 -25
  48. package/dist/server/utils/openai-format.d.ts +0 -99
  49. package/dist/server/utils/rate-limiter.d.ts +0 -35
  50. package/dist/server/utils/resolve-service.d.ts +0 -19
  51. package/dist/swagger.d.ts +0 -472
  52. package/plugin-ai-api-1.0.1.tgz +0 -0
  53. package/plugin-ai-api-1.0.2.tgz +0 -0
package/dist/swagger.d.ts DELETED
@@ -1,472 +0,0 @@
1
- declare const _default: {
2
- info: {
3
- title: string;
4
- description: string;
5
- };
6
- tags: {
7
- name: string;
8
- description: string;
9
- }[];
10
- paths: {
11
- '/aiApiConfig:get': {
12
- get: {
13
- tags: string[];
14
- summary: string;
15
- security: {
16
- BearerAuth: any[];
17
- }[];
18
- responses: {
19
- 200: {
20
- description: string;
21
- content: {
22
- 'application/json': {
23
- schema: {
24
- $ref: string;
25
- };
26
- };
27
- };
28
- };
29
- };
30
- };
31
- };
32
- '/aiApiConfig:save': {
33
- post: {
34
- tags: string[];
35
- summary: string;
36
- security: {
37
- BearerAuth: any[];
38
- }[];
39
- requestBody: {
40
- required: boolean;
41
- content: {
42
- 'application/json': {
43
- schema: {
44
- $ref: string;
45
- };
46
- };
47
- };
48
- };
49
- responses: {
50
- 200: {
51
- description: string;
52
- };
53
- };
54
- };
55
- };
56
- '/ai-llm/v1/models': {
57
- get: {
58
- tags: string[];
59
- summary: string;
60
- description: string;
61
- security: {
62
- BearerAuth: any[];
63
- }[];
64
- responses: {
65
- 200: {
66
- description: string;
67
- content: {
68
- 'application/json': {
69
- schema: {
70
- type: string;
71
- properties: {
72
- object: {
73
- type: string;
74
- example: string;
75
- };
76
- data: {
77
- type: string;
78
- items: {
79
- $ref: string;
80
- };
81
- };
82
- };
83
- };
84
- };
85
- };
86
- };
87
- };
88
- };
89
- };
90
- '/ai-llm/v1/models/{id}': {
91
- get: {
92
- tags: string[];
93
- summary: string;
94
- security: {
95
- BearerAuth: any[];
96
- }[];
97
- parameters: {
98
- name: string;
99
- in: string;
100
- required: boolean;
101
- description: string;
102
- schema: {
103
- type: string;
104
- example: string;
105
- };
106
- }[];
107
- responses: {
108
- 200: {
109
- description: string;
110
- content: {
111
- 'application/json': {
112
- schema: {
113
- $ref: string;
114
- };
115
- };
116
- };
117
- };
118
- 404: {
119
- description: string;
120
- };
121
- };
122
- };
123
- };
124
- '/ai-llm/v1/chat/completions': {
125
- post: {
126
- tags: string[];
127
- summary: string;
128
- description: string;
129
- security: {
130
- BearerAuth: any[];
131
- }[];
132
- parameters: {
133
- name: string;
134
- in: string;
135
- required: boolean;
136
- description: string;
137
- schema: {
138
- type: string;
139
- enum: string[];
140
- default: string;
141
- };
142
- }[];
143
- requestBody: {
144
- required: boolean;
145
- content: {
146
- 'application/json': {
147
- schema: {
148
- $ref: string;
149
- };
150
- };
151
- };
152
- };
153
- responses: {
154
- 200: {
155
- description: string;
156
- content: {
157
- 'application/json': {
158
- schema: {
159
- $ref: string;
160
- };
161
- };
162
- 'text/event-stream': {
163
- schema: {
164
- type: string;
165
- description: string;
166
- };
167
- };
168
- };
169
- };
170
- 429: {
171
- description: string;
172
- };
173
- };
174
- };
175
- };
176
- '/ai-llm/v1/completions': {
177
- post: {
178
- tags: string[];
179
- summary: string;
180
- description: string;
181
- security: {
182
- BearerAuth: any[];
183
- }[];
184
- requestBody: {
185
- required: boolean;
186
- content: {
187
- 'application/json': {
188
- schema: {
189
- type: string;
190
- properties: {
191
- model: {
192
- type: string;
193
- };
194
- prompt: {
195
- type: string;
196
- };
197
- max_tokens: {
198
- type: string;
199
- };
200
- stream: {
201
- type: string;
202
- default: boolean;
203
- };
204
- };
205
- required: string[];
206
- };
207
- };
208
- };
209
- };
210
- responses: {
211
- 200: {
212
- description: string;
213
- };
214
- 429: {
215
- description: string;
216
- };
217
- };
218
- };
219
- };
220
- '/ai-llm/v1/embeddings': {
221
- post: {
222
- tags: string[];
223
- summary: string;
224
- description: string;
225
- security: {
226
- BearerAuth: any[];
227
- }[];
228
- requestBody: {
229
- required: boolean;
230
- content: {
231
- 'application/json': {
232
- schema: {
233
- type: string;
234
- properties: {
235
- model: {
236
- type: string;
237
- example: string;
238
- };
239
- input: {
240
- oneOf: ({
241
- type: string;
242
- items?: undefined;
243
- } | {
244
- type: string;
245
- items: {
246
- type: string;
247
- };
248
- })[];
249
- };
250
- };
251
- required: string[];
252
- };
253
- };
254
- };
255
- };
256
- responses: {
257
- 200: {
258
- description: string;
259
- content: {
260
- 'application/json': {
261
- schema: {
262
- type: string;
263
- properties: {
264
- object: {
265
- type: string;
266
- example: string;
267
- };
268
- data: {
269
- type: string;
270
- items: {
271
- type: string;
272
- properties: {
273
- object: {
274
- type: string;
275
- example: string;
276
- };
277
- embedding: {
278
- type: string;
279
- items: {
280
- type: string;
281
- };
282
- };
283
- index: {
284
- type: string;
285
- };
286
- };
287
- };
288
- };
289
- model: {
290
- type: string;
291
- };
292
- usage: {
293
- type: string;
294
- properties: {
295
- prompt_tokens: {
296
- type: string;
297
- };
298
- total_tokens: {
299
- type: string;
300
- };
301
- };
302
- };
303
- };
304
- };
305
- };
306
- };
307
- };
308
- 429: {
309
- description: string;
310
- };
311
- };
312
- };
313
- };
314
- };
315
- components: {
316
- schemas: {
317
- AiApiConfig: {
318
- type: string;
319
- properties: {
320
- mode: {
321
- type: string;
322
- enum: string[];
323
- description: string;
324
- };
325
- defaultAiEmployee: {
326
- type: string;
327
- description: string;
328
- };
329
- defaultLlmService: {
330
- type: string;
331
- description: string;
332
- };
333
- enabledLlmServices: {
334
- type: string;
335
- items: {
336
- type: string;
337
- };
338
- description: string;
339
- };
340
- rateLimitPerMinute: {
341
- type: string;
342
- description: string;
343
- };
344
- };
345
- };
346
- ModelObject: {
347
- type: string;
348
- properties: {
349
- id: {
350
- type: string;
351
- example: string;
352
- description: string;
353
- };
354
- object: {
355
- type: string;
356
- example: string;
357
- };
358
- created: {
359
- type: string;
360
- };
361
- owned_by: {
362
- type: string;
363
- };
364
- };
365
- };
366
- ChatMessage: {
367
- type: string;
368
- properties: {
369
- role: {
370
- type: string;
371
- enum: string[];
372
- };
373
- content: {
374
- type: string;
375
- };
376
- name: {
377
- type: string;
378
- };
379
- };
380
- required: string[];
381
- };
382
- ChatCompletionRequest: {
383
- type: string;
384
- properties: {
385
- model: {
386
- type: string;
387
- example: string;
388
- };
389
- messages: {
390
- type: string;
391
- items: {
392
- $ref: string;
393
- };
394
- };
395
- stream: {
396
- type: string;
397
- default: boolean;
398
- };
399
- temperature: {
400
- type: string;
401
- minimum: number;
402
- maximum: number;
403
- };
404
- max_tokens: {
405
- type: string;
406
- };
407
- top_p: {
408
- type: string;
409
- };
410
- frequency_penalty: {
411
- type: string;
412
- };
413
- presence_penalty: {
414
- type: string;
415
- };
416
- };
417
- required: string[];
418
- };
419
- ChatCompletionResponse: {
420
- type: string;
421
- properties: {
422
- id: {
423
- type: string;
424
- };
425
- object: {
426
- type: string;
427
- example: string;
428
- };
429
- created: {
430
- type: string;
431
- };
432
- model: {
433
- type: string;
434
- };
435
- choices: {
436
- type: string;
437
- items: {
438
- type: string;
439
- properties: {
440
- index: {
441
- type: string;
442
- };
443
- message: {
444
- $ref: string;
445
- };
446
- finish_reason: {
447
- type: string;
448
- enum: string[];
449
- };
450
- };
451
- };
452
- };
453
- usage: {
454
- type: string;
455
- properties: {
456
- prompt_tokens: {
457
- type: string;
458
- };
459
- completion_tokens: {
460
- type: string;
461
- };
462
- total_tokens: {
463
- type: string;
464
- };
465
- };
466
- };
467
- };
468
- };
469
- };
470
- };
471
- };
472
- export default _default;
Binary file
Binary file