@bodhiapp/ts-client 0.1.3 → 0.1.5

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.
@@ -1,1327 +0,0 @@
1
- /**
2
- * This file was auto-generated by openapi-typescript.
3
- * Do not make direct changes to the file.
4
- */
5
-
6
-
7
- /** OneOf type helpers */
8
- type Without<T, U> = { [P in Exclude<keyof T, keyof U>]?: never };
9
- type XOR<T, U> = (T | U) extends object ? (Without<T, U> & U) | (Without<U, T> & T) : T | U;
10
- type OneOf<T extends any[]> = T extends [infer Only] ? Only : T extends [infer A, infer B, ...infer Rest] ? OneOf<[XOR<A, B>, ...Rest]> : never;
11
-
12
- export type paths = {
13
- "/api/chat": {
14
- /** Chat with a model using Ollama format */
15
- post: operations["chatOllamaModel"];
16
- };
17
- "/api/show": {
18
- /** Get detailed information about a model in Ollama format */
19
- post: operations["showOllamaModel"];
20
- };
21
- "/api/tags": {
22
- /** List available models in Ollama format */
23
- get: operations["listOllamaModels"];
24
- };
25
- "/bodhi/v1/chat_templates": {
26
- /** List available chat templates (both built-in and from repositories) */
27
- get: operations["listChatTemplates"];
28
- };
29
- "/bodhi/v1/info": {
30
- get: operations["getAppInfo"];
31
- };
32
- "/bodhi/v1/logout": {
33
- /** Logout the current user by destroying their session */
34
- post: operations["logoutUser"];
35
- };
36
- "/bodhi/v1/modelfiles": {
37
- /** List available model files in GGUF format from HuggingFace cache */
38
- get: operations["listModelFiles"];
39
- };
40
- "/bodhi/v1/modelfiles/pull": {
41
- /** List all model download requests */
42
- get: operations["listDownloads"];
43
- /** Start a new model file download */
44
- post: operations["pullModelFile"];
45
- };
46
- "/bodhi/v1/modelfiles/pull/{alias}": {
47
- /** Start a model file download using a predefined alias */
48
- post: operations["pullModelByAlias"];
49
- };
50
- "/bodhi/v1/modelfiles/pull/{id}": {
51
- /** Get the status of a specific download request */
52
- get: operations["getDownloadStatus"];
53
- };
54
- "/bodhi/v1/models": {
55
- /** List configured model aliases */
56
- get: operations["listModelAliases"];
57
- };
58
- "/bodhi/v1/models/{alias}": {
59
- /** Get details for a specific model alias */
60
- get: operations["getAlias"];
61
- };
62
- "/bodhi/v1/settings": {
63
- /** List all application settings */
64
- get: operations["listSettings"];
65
- };
66
- "/bodhi/v1/settings/{key}": {
67
- /** Update a specific setting */
68
- put: operations["updateSetting"];
69
- /** Reset a setting to its default value */
70
- delete: operations["deleteSetting"];
71
- };
72
- "/bodhi/v1/setup": {
73
- post: operations["setupApp"];
74
- };
75
- "/bodhi/v1/tokens": {
76
- /** List all API tokens for the current user */
77
- get: operations["listApiTokens"];
78
- /** Create a new API token */
79
- post: operations["createApiToken"];
80
- };
81
- "/bodhi/v1/tokens/{id}": {
82
- /** Update an existing API token */
83
- put: operations["updateApiToken"];
84
- };
85
- "/bodhi/v1/user": {
86
- /** Get information about the currently logged in user */
87
- get: operations["getCurrentUser"];
88
- };
89
- "/ping": {
90
- /** Simple health check endpoint */
91
- get: operations["pingServer"];
92
- };
93
- "/v1/chat/completions": {
94
- /** Create a chat completion */
95
- post: operations["createChatCompletion"];
96
- };
97
- "/v1/models": {
98
- /** List available models */
99
- get: operations["listModels"];
100
- };
101
- };
102
-
103
- export type webhooks = Record<string, never>;
104
-
105
- export type components = {
106
- schemas: {
107
- AliasResponse: {
108
- alias: string;
109
- chat_template: string;
110
- context_params: components["schemas"]["GptContextParams"];
111
- filename: string;
112
- model_params: {
113
- [key: string]: unknown;
114
- };
115
- repo: string;
116
- request_params: components["schemas"]["OAIRequestParams"];
117
- snapshot: string;
118
- source: string;
119
- };
120
- ApiToken: {
121
- /**
122
- * Format: date-time
123
- * @example 2024-11-10T04:52:06.786Z
124
- */
125
- created_at: string;
126
- id: string;
127
- name: string;
128
- status: components["schemas"]["TokenStatus"];
129
- token_hash: string;
130
- token_id: string;
131
- /**
132
- * Format: date-time
133
- * @example 2024-11-10T04:52:06.786Z
134
- */
135
- updated_at: string;
136
- user_id: string;
137
- };
138
- ApiTokenResponse: {
139
- /** @description Offline token that can be used as API Token */
140
- offline_token: string;
141
- };
142
- /**
143
- * @description Application information and status
144
- * @example {
145
- * "authz": true,
146
- * "status": "ready",
147
- * "version": "0.1.0"
148
- * }
149
- */
150
- AppInfo: {
151
- /** @description Whether authentication is enabled */
152
- authz: boolean;
153
- /** @description Current application status */
154
- status: components["schemas"]["AppStatus"];
155
- /** @description Application version */
156
- version: string;
157
- };
158
- /**
159
- * @example ready
160
- * @enum {string}
161
- */
162
- AppStatus: "setup" | "ready" | "resource-admin";
163
- ChatRequest: {
164
- format?: string | null;
165
- keep_alive?: null | components["schemas"]["Duration"];
166
- messages: components["schemas"]["Message"][];
167
- model: string;
168
- options?: null | components["schemas"]["Options"];
169
- stream?: boolean | null;
170
- };
171
- /**
172
- * @description Chat template identifier for built-in templates
173
- * @enum {string}
174
- */
175
- ChatTemplateId: "llama3" | "llama2" | "llama2-legacy" | "phi3" | "gemma" | "deepseek" | "command-r" | "openchat" | "tinyllama";
176
- /** @description Chat template type that can be either built-in or from a repository */
177
- ChatTemplateType: OneOf<["Embedded", {
178
- /** @description Built-in chat template using Id */
179
- Id: components["schemas"]["ChatTemplateId"];
180
- }, {
181
- /** @description Custom chat template from a repository */
182
- Repo: components["schemas"]["Repo"];
183
- }]>;
184
- /**
185
- * @description Request to create a new API token
186
- * @example {
187
- * "name": "My API Token"
188
- * }
189
- */
190
- CreateApiTokenRequest: {
191
- /** @description Optional name for the API token */
192
- name?: string | null;
193
- };
194
- DownloadRequest: {
195
- /**
196
- * Format: date-time
197
- * @example 2024-11-10T04:52:06.786Z
198
- */
199
- created_at: string;
200
- error?: string | null;
201
- filename: string;
202
- id: string;
203
- repo: string;
204
- status: components["schemas"]["DownloadStatus"];
205
- /**
206
- * Format: date-time
207
- * @example 2024-11-10T04:52:06.786Z
208
- */
209
- updated_at: string;
210
- };
211
- /** @enum {string} */
212
- DownloadStatus: "pending" | "completed" | "error";
213
- Duration: string;
214
- ErrorBody: {
215
- code?: string | null;
216
- message: string;
217
- param?: string | null;
218
- type: string;
219
- };
220
- GptContextParams: {
221
- /** Format: int32 */
222
- n_ctx?: number | null;
223
- /** Format: int32 */
224
- n_keep?: number | null;
225
- /** Format: int32 */
226
- n_parallel?: number | null;
227
- /** Format: int32 */
228
- n_predict?: number | null;
229
- /** Format: int32 */
230
- n_seed?: number | null;
231
- /** Format: int32 */
232
- n_threads?: number | null;
233
- };
234
- ListModelResponseWrapper: {
235
- data: {
236
- /**
237
- * Format: int32
238
- * @description The Unix timestamp (in seconds) when the model was created.
239
- */
240
- created: number;
241
- /** @description The model identifier, which can be referenced in the API endpoints. */
242
- id: string;
243
- /** @description The object type, which is always "model". */
244
- object: string;
245
- /** @description The organization that owns the model. */
246
- owned_by: string;
247
- }[];
248
- object: string;
249
- };
250
- LocalModelResponse: {
251
- filename: string;
252
- model_params: {
253
- [key: string]: unknown;
254
- };
255
- repo: string;
256
- /** Format: int64 */
257
- size?: number | null;
258
- snapshot: string;
259
- };
260
- Message: {
261
- content: string;
262
- images?: string[] | null;
263
- role: string;
264
- };
265
- Model: {
266
- details: components["schemas"]["ModelDetails"];
267
- digest: string;
268
- model: string;
269
- /** Format: int32 */
270
- modified_at: number;
271
- /** Format: int64 */
272
- size: number;
273
- };
274
- ModelDetails: {
275
- families?: string[] | null;
276
- family: string;
277
- format: string;
278
- parameter_size: string;
279
- parent_model?: string | null;
280
- quantization_level: string;
281
- };
282
- ModelsResponse: {
283
- models: components["schemas"]["Model"][];
284
- };
285
- /**
286
- * @description Request to pull a model file from HuggingFace
287
- * @example {
288
- * "filename": "mistral-7b-instruct-v0.1.Q4_K_M.gguf",
289
- * "repo": "TheBloke/Mistral-7B-Instruct-v0.1-GGUF"
290
- * }
291
- */
292
- NewDownloadRequest: {
293
- /** @description Model file name to pull */
294
- filename: string;
295
- /** @description HuggingFace repository name */
296
- repo: string;
297
- };
298
- OAIRequestParams: {
299
- /** Format: float */
300
- frequency_penalty?: number | null;
301
- /** Format: int32 */
302
- max_tokens?: number | null;
303
- /** Format: float */
304
- presence_penalty?: number | null;
305
- /** Format: int64 */
306
- seed?: number | null;
307
- stop?: string[];
308
- /** Format: float */
309
- temperature?: number | null;
310
- /** Format: float */
311
- top_p?: number | null;
312
- user?: string | null;
313
- };
314
- OllamaError: {
315
- error: string;
316
- };
317
- OpenAIApiError: {
318
- error: components["schemas"]["ErrorBody"];
319
- };
320
- Options: {
321
- f16_kv?: boolean | null;
322
- /** Format: float */
323
- frequency_penalty?: number | null;
324
- logits_all?: boolean | null;
325
- low_vram?: boolean | null;
326
- /** Format: int32 */
327
- main_gpu?: number | null;
328
- /** Format: float */
329
- mirostat?: number | null;
330
- /** Format: float */
331
- mirostat_eta?: number | null;
332
- /** Format: float */
333
- mirostat_tau?: number | null;
334
- /** Format: int32 */
335
- num_batch?: number | null;
336
- /** Format: int32 */
337
- num_ctx?: number | null;
338
- /** Format: int32 */
339
- num_gpu?: number | null;
340
- /** Format: int32 */
341
- num_keep?: number | null;
342
- /** Format: int32 */
343
- num_predict?: number | null;
344
- /** Format: int32 */
345
- num_thread?: number | null;
346
- numa?: boolean | null;
347
- penalize_newline?: boolean | null;
348
- /** Format: float */
349
- presence_penalty?: number | null;
350
- /** Format: int32 */
351
- repeat_last_n?: number | null;
352
- /** Format: float */
353
- repeat_penalty?: number | null;
354
- /** Format: int64 */
355
- seed?: number | null;
356
- stop?: string[] | null;
357
- /** Format: float */
358
- temperature?: number | null;
359
- /** Format: float */
360
- tfs_z?: number | null;
361
- /** Format: int32 */
362
- top_k?: number | null;
363
- /** Format: float */
364
- top_p?: number | null;
365
- /** Format: float */
366
- typical_p?: number | null;
367
- use_mlock?: boolean | null;
368
- use_mmap?: boolean | null;
369
- vocab_only?: boolean | null;
370
- };
371
- PaginatedResponse_AliasResponse: {
372
- data: {
373
- alias: string;
374
- chat_template: string;
375
- context_params: components["schemas"]["GptContextParams"];
376
- filename: string;
377
- model_params: {
378
- [key: string]: unknown;
379
- };
380
- repo: string;
381
- request_params: components["schemas"]["OAIRequestParams"];
382
- snapshot: string;
383
- source: string;
384
- }[];
385
- page: number;
386
- page_size: number;
387
- total: number;
388
- };
389
- PaginatedResponse_ApiToken: {
390
- data: {
391
- /**
392
- * Format: date-time
393
- * @example 2024-11-10T04:52:06.786Z
394
- */
395
- created_at: string;
396
- id: string;
397
- name: string;
398
- status: components["schemas"]["TokenStatus"];
399
- token_hash: string;
400
- token_id: string;
401
- /**
402
- * Format: date-time
403
- * @example 2024-11-10T04:52:06.786Z
404
- */
405
- updated_at: string;
406
- user_id: string;
407
- }[];
408
- page: number;
409
- page_size: number;
410
- total: number;
411
- };
412
- PaginatedResponse_DownloadRequest: {
413
- data: ({
414
- /**
415
- * Format: date-time
416
- * @example 2024-11-10T04:52:06.786Z
417
- */
418
- created_at: string;
419
- error?: string | null;
420
- filename: string;
421
- id: string;
422
- repo: string;
423
- status: components["schemas"]["DownloadStatus"];
424
- /**
425
- * Format: date-time
426
- * @example 2024-11-10T04:52:06.786Z
427
- */
428
- updated_at: string;
429
- })[];
430
- page: number;
431
- page_size: number;
432
- total: number;
433
- };
434
- PaginatedResponse_LocalModelResponse: {
435
- data: ({
436
- filename: string;
437
- model_params: {
438
- [key: string]: unknown;
439
- };
440
- repo: string;
441
- /** Format: int64 */
442
- size?: number | null;
443
- snapshot: string;
444
- })[];
445
- page: number;
446
- page_size: number;
447
- total: number;
448
- };
449
- /** @description Response to the ping endpoint */
450
- PingResponse: {
451
- /** @description always returns "pong" */
452
- message: string;
453
- };
454
- Repo: {
455
- name: string;
456
- user: string;
457
- };
458
- SettingInfo: {
459
- current_value: unknown;
460
- default_value: unknown;
461
- key: string;
462
- metadata: components["schemas"]["SettingMetadata"];
463
- source: components["schemas"]["SettingSource"];
464
- };
465
- SettingMetadata: OneOf<[{
466
- /** @enum {string} */
467
- type: "string";
468
- }, {
469
- /** Format: int64 */
470
- max: number;
471
- /** Format: int64 */
472
- min: number;
473
- /** @enum {string} */
474
- type: "number";
475
- }, {
476
- /** @enum {string} */
477
- type: "boolean";
478
- }, {
479
- options: string[];
480
- /** @enum {string} */
481
- type: "option";
482
- }]>;
483
- /** @enum {string} */
484
- SettingSource: "system" | "command_line" | "environment" | "settings_file" | "default";
485
- /**
486
- * @description Request to setup the application in authenticated or non-authenticated mode
487
- * @example {
488
- * "authz": true
489
- * }
490
- */
491
- SetupRequest: {
492
- /**
493
- * @description Whether to enable authentication
494
- * - true: Setup app in authenticated mode with role-based access
495
- * - false: Setup app in non-authenticated mode for open access
496
- */
497
- authz: boolean;
498
- };
499
- /**
500
- * @description Response containing the updated application status after setup
501
- * @example {
502
- * "status": "resource-admin"
503
- * }
504
- */
505
- SetupResponse: {
506
- /**
507
- * @description New application status after setup
508
- * - resource-admin: When setup in authenticated mode
509
- * - ready: When setup in non-authenticated mode
510
- */
511
- status: components["schemas"]["AppStatus"];
512
- };
513
- ShowRequest: {
514
- name: string;
515
- };
516
- ShowResponse: {
517
- details: components["schemas"]["ModelDetails"];
518
- license: string;
519
- model_info: {
520
- [key: string]: unknown;
521
- };
522
- modelfile: string;
523
- /** Format: int32 */
524
- modified_at: number;
525
- parameters: string;
526
- template: string;
527
- };
528
- /** @enum {string} */
529
- TokenStatus: "active" | "inactive";
530
- /**
531
- * @description Request to update an existing API token
532
- * @example {
533
- * "name": "Updated Token Name",
534
- * "status": "inactive"
535
- * }
536
- */
537
- UpdateApiTokenRequest: {
538
- /** @description New name for the token */
539
- name: string;
540
- /** @description New status for the token (active/inactive) */
541
- status: components["schemas"]["TokenStatus"];
542
- };
543
- /**
544
- * @description Request to update a setting value
545
- * @example {
546
- * "value": "debug"
547
- * }
548
- */
549
- UpdateSettingRequest: {
550
- value: unknown;
551
- };
552
- /**
553
- * @description Information about the currently logged in user
554
- * @example {
555
- * "email": "user@example.com",
556
- * "logged_in": true,
557
- * "roles": [
558
- * "admin",
559
- * "user"
560
- * ]
561
- * }
562
- */
563
- UserInfo: {
564
- /** @description User's email address */
565
- email?: string | null;
566
- /** @description If user is logged in */
567
- logged_in: boolean;
568
- /** @description List of roles assigned to the user */
569
- roles: string[];
570
- };
571
- };
572
- responses: never;
573
- parameters: never;
574
- requestBodies: never;
575
- headers: never;
576
- pathItems: never;
577
- };
578
-
579
- export type $defs = Record<string, never>;
580
-
581
- export type external = Record<string, never>;
582
-
583
- export type operations = {
584
-
585
- /** Chat with a model using Ollama format */
586
- chatOllamaModel: {
587
- /** @description Chat request in Ollama format */
588
- requestBody: {
589
- content: {
590
- /**
591
- * @example {
592
- * "messages": [
593
- * {
594
- * "content": "You are a helpful assistant.",
595
- * "role": "system"
596
- * },
597
- * {
598
- * "content": "Hello!",
599
- * "role": "user"
600
- * }
601
- * ],
602
- * "model": "llama2:chat",
603
- * "options": {
604
- * "num_predict": 100,
605
- * "temperature": 0.7
606
- * },
607
- * "stream": true
608
- * }
609
- */
610
- "application/json": components["schemas"]["ChatRequest"];
611
- };
612
- };
613
- responses: {
614
- /** @description Chat response */
615
- 200: {
616
- content: {
617
- "application/json": unknown;
618
- };
619
- };
620
- /** @description Invalid request */
621
- 400: {
622
- content: {
623
- "application/json": components["schemas"]["OllamaError"];
624
- };
625
- };
626
- /** @description Model not found */
627
- 404: {
628
- content: {
629
- "application/json": components["schemas"]["OllamaError"];
630
- };
631
- };
632
- /** @description Internal server error */
633
- 500: {
634
- content: {
635
- "application/json": components["schemas"]["OllamaError"];
636
- };
637
- };
638
- };
639
- };
640
- /** Get detailed information about a model in Ollama format */
641
- showOllamaModel: {
642
- /** @description Model name to get details for */
643
- requestBody: {
644
- content: {
645
- /**
646
- * @example {
647
- * "name": "llama2:chat"
648
- * }
649
- */
650
- "application/json": components["schemas"]["ShowRequest"];
651
- };
652
- };
653
- responses: {
654
- /** @description Model details */
655
- 200: {
656
- content: {
657
- "application/json": components["schemas"]["ShowResponse"];
658
- };
659
- };
660
- /** @description Model not found */
661
- 404: {
662
- content: {
663
- "application/json": components["schemas"]["OllamaError"];
664
- };
665
- };
666
- /** @description Internal server error */
667
- 500: {
668
- content: {
669
- "application/json": components["schemas"]["OllamaError"];
670
- };
671
- };
672
- };
673
- };
674
- /** List available models in Ollama format */
675
- listOllamaModels: {
676
- responses: {
677
- /** @description List of available models */
678
- 200: {
679
- content: {
680
- "application/json": components["schemas"]["ModelsResponse"];
681
- };
682
- };
683
- /** @description Internal server error */
684
- 500: {
685
- content: {
686
- "application/json": components["schemas"]["OllamaError"];
687
- };
688
- };
689
- };
690
- };
691
- /** List available chat templates (both built-in and from repositories) */
692
- listChatTemplates: {
693
- responses: {
694
- /** @description List of available chat templates */
695
- 200: {
696
- content: {
697
- "application/json": components["schemas"]["ChatTemplateType"][];
698
- };
699
- };
700
- /** @description Internal server error */
701
- 500: {
702
- content: {
703
- "application/json": components["schemas"]["OpenAIApiError"];
704
- };
705
- };
706
- };
707
- };
708
- getAppInfo: {
709
- responses: {
710
- /** @description Returns the status information about the Application */
711
- 200: {
712
- content: {
713
- "application/json": components["schemas"]["AppInfo"];
714
- };
715
- };
716
- /** @description Internal server error */
717
- 500: {
718
- content: {
719
- "application/json": components["schemas"]["OpenAIApiError"];
720
- };
721
- };
722
- };
723
- };
724
- /** Logout the current user by destroying their session */
725
- logoutUser: {
726
- responses: {
727
- /** @description Logout successful, redirects to login page */
728
- 200: {
729
- headers: {
730
- /** @description Frontend login page URL */
731
- Location?: string;
732
- };
733
- content: never;
734
- };
735
- /** @description Session deletion failed */
736
- 500: {
737
- content: {
738
- "application/json": components["schemas"]["OpenAIApiError"];
739
- };
740
- };
741
- };
742
- };
743
- /** List available model files in GGUF format from HuggingFace cache */
744
- listModelFiles: {
745
- parameters: {
746
- query?: {
747
- /** @description Page number (1-based) */
748
- page?: number;
749
- /** @description Number of items per page (max 100) */
750
- page_size?: number;
751
- /** @description Field to sort by (repo, filename, size, updated_at, snapshot) */
752
- sort?: string | null;
753
- /** @description Sort order (asc or desc) */
754
- sort_order?: string;
755
- };
756
- };
757
- responses: {
758
- /** @description List of supported model files from local HuggingFace cache folder */
759
- 200: {
760
- content: {
761
- "application/json": components["schemas"]["PaginatedResponse_LocalModelResponse"];
762
- };
763
- };
764
- /** @description Internal server error */
765
- 500: {
766
- content: {
767
- "application/json": components["schemas"]["OpenAIApiError"];
768
- };
769
- };
770
- };
771
- };
772
- /** List all model download requests */
773
- listDownloads: {
774
- parameters: {
775
- query?: {
776
- /** @description Page number (1-based) */
777
- page?: number;
778
- /** @description Number of items per page (max 100) */
779
- page_size?: number;
780
- /** @description Field to sort by (repo, filename, size, updated_at, snapshot) */
781
- sort?: string | null;
782
- /** @description Sort order (asc or desc) */
783
- sort_order?: string;
784
- };
785
- };
786
- responses: {
787
- /** @description List of download requests */
788
- 200: {
789
- content: {
790
- "application/json": components["schemas"]["PaginatedResponse_DownloadRequest"];
791
- };
792
- };
793
- /** @description Internal server error */
794
- 500: {
795
- content: {
796
- "application/json": components["schemas"]["OpenAIApiError"];
797
- };
798
- };
799
- };
800
- };
801
- /** Start a new model file download */
802
- pullModelFile: {
803
- /** @description Model file download request */
804
- requestBody: {
805
- content: {
806
- /**
807
- * @example {
808
- * "filename": "mistral-7b-instruct-v0.1.Q8_0.gguf",
809
- * "repo": "TheBloke/Mistral-7B-Instruct-v0.1-GGUF"
810
- * }
811
- */
812
- "application/json": components["schemas"]["NewDownloadRequest"];
813
- };
814
- };
815
- responses: {
816
- /** @description Existing download request found */
817
- 200: {
818
- content: {
819
- "application/json": components["schemas"]["DownloadRequest"];
820
- };
821
- };
822
- /** @description Download request created */
823
- 201: {
824
- content: {
825
- "application/json": components["schemas"]["DownloadRequest"];
826
- };
827
- };
828
- /** @description File already exists or invalid input */
829
- 400: {
830
- content: {
831
- "application/json": components["schemas"]["OpenAIApiError"];
832
- };
833
- };
834
- /** @description Internal server error */
835
- 500: {
836
- content: {
837
- "application/json": components["schemas"]["OpenAIApiError"];
838
- };
839
- };
840
- };
841
- };
842
- /** Start a model file download using a predefined alias */
843
- pullModelByAlias: {
844
- parameters: {
845
- path: {
846
- /**
847
- * @description Available model aliases:
848
- * - llama3:instruct - Meta Llama 3 8B Instruct
849
- * - llama3:70b-instruct - Meta Llama 3 70B Instruct
850
- * - llama2:chat - Llama 2 7B Chat
851
- * - llama2:13b-chat - Llama 2 13B Chat
852
- * - llama2:70b-chat - Llama 2 70B Chat
853
- * - phi3:mini - Phi 3 Mini
854
- * - mistral:instruct - Mistral 7B Instruct
855
- * - mixtral:instruct - Mixtral 8x7B Instruct
856
- * - gemma:instruct - Gemma 7B Instruct
857
- * - gemma:7b-instruct-v1.1-q8_0 - Gemma 1.1 7B Instruct
858
- * @example llama2:chat
859
- */
860
- alias: string;
861
- };
862
- };
863
- responses: {
864
- /** @description Existing download request found */
865
- 200: {
866
- content: {
867
- "application/json": components["schemas"]["DownloadRequest"];
868
- };
869
- };
870
- /** @description Download request created */
871
- 201: {
872
- content: {
873
- "application/json": components["schemas"]["DownloadRequest"];
874
- };
875
- };
876
- /** @description File already exists */
877
- 400: {
878
- content: {
879
- "application/json": components["schemas"]["OpenAIApiError"];
880
- };
881
- };
882
- /** @description Alias not found */
883
- 404: {
884
- content: {
885
- "application/json": components["schemas"]["OpenAIApiError"];
886
- };
887
- };
888
- /** @description Internal server error */
889
- 500: {
890
- content: {
891
- "application/json": components["schemas"]["OpenAIApiError"];
892
- };
893
- };
894
- };
895
- };
896
- /** Get the status of a specific download request */
897
- getDownloadStatus: {
898
- parameters: {
899
- path: {
900
- /**
901
- * @description Download request identifier
902
- * @example 550e8400-e29b-41d4-a716-446655440000
903
- */
904
- id: string;
905
- };
906
- };
907
- responses: {
908
- /** @description Download request found */
909
- 200: {
910
- content: {
911
- "application/json": components["schemas"]["DownloadRequest"];
912
- };
913
- };
914
- /** @description Download request not found */
915
- 404: {
916
- content: {
917
- "application/json": components["schemas"]["OpenAIApiError"];
918
- };
919
- };
920
- /** @description Internal server error */
921
- 500: {
922
- content: {
923
- "application/json": components["schemas"]["OpenAIApiError"];
924
- };
925
- };
926
- };
927
- };
928
- /** List configured model aliases */
929
- listModelAliases: {
930
- parameters: {
931
- query?: {
932
- /** @description Page number (1-based) */
933
- page?: number;
934
- /** @description Number of items per page (max 100) */
935
- page_size?: number;
936
- /** @description Field to sort by (repo, filename, size, updated_at, snapshot) */
937
- sort?: string | null;
938
- /** @description Sort order (asc or desc) */
939
- sort_order?: string;
940
- };
941
- };
942
- responses: {
943
- /** @description List of configured model aliases */
944
- 200: {
945
- content: {
946
- "application/json": components["schemas"]["PaginatedResponse_AliasResponse"];
947
- };
948
- };
949
- /** @description Internal server error */
950
- 500: {
951
- content: {
952
- "application/json": components["schemas"]["OpenAIApiError"];
953
- };
954
- };
955
- };
956
- };
957
- /** Get details for a specific model alias */
958
- getAlias: {
959
- parameters: {
960
- path: {
961
- /** @description Alias identifier for the model */
962
- alias: string;
963
- };
964
- };
965
- responses: {
966
- /** @description Model alias details */
967
- 200: {
968
- content: {
969
- "application/json": components["schemas"]["AliasResponse"];
970
- };
971
- };
972
- /** @description Alias not found */
973
- 404: {
974
- content: {
975
- "application/json": components["schemas"]["OpenAIApiError"];
976
- };
977
- };
978
- /** @description Internal server error */
979
- 500: {
980
- content: {
981
- "application/json": components["schemas"]["OpenAIApiError"];
982
- };
983
- };
984
- };
985
- };
986
- /** List all application settings */
987
- listSettings: {
988
- responses: {
989
- /** @description List of application settings */
990
- 200: {
991
- content: {
992
- "application/json": components["schemas"]["SettingInfo"][];
993
- };
994
- };
995
- /** @description Unauthorized - User is not an admin */
996
- 401: {
997
- content: {
998
- "application/json": components["schemas"]["OpenAIApiError"];
999
- };
1000
- };
1001
- /** @description Internal server error */
1002
- 500: {
1003
- content: {
1004
- "application/json": components["schemas"]["OpenAIApiError"];
1005
- };
1006
- };
1007
- };
1008
- };
1009
- /** Update a specific setting */
1010
- updateSetting: {
1011
- parameters: {
1012
- path: {
1013
- /** @description Setting key to update */
1014
- key: string;
1015
- };
1016
- };
1017
- /** @description New setting value */
1018
- requestBody: {
1019
- content: {
1020
- /**
1021
- * @example {
1022
- * "value": "debug"
1023
- * }
1024
- */
1025
- "application/json": {
1026
- value: unknown;
1027
- };
1028
- };
1029
- };
1030
- responses: {
1031
- /** @description Setting updated successfully */
1032
- 200: {
1033
- content: {
1034
- "application/json": components["schemas"]["SettingInfo"];
1035
- };
1036
- };
1037
- /** @description Invalid setting or value */
1038
- 400: {
1039
- content: {
1040
- "application/json": components["schemas"]["OpenAIApiError"];
1041
- };
1042
- };
1043
- /** @description Setting not found */
1044
- 404: {
1045
- content: {
1046
- "application/json": components["schemas"]["OpenAIApiError"];
1047
- };
1048
- };
1049
- };
1050
- };
1051
- /** Reset a setting to its default value */
1052
- deleteSetting: {
1053
- parameters: {
1054
- path: {
1055
- /** @description Setting key to reset */
1056
- key: string;
1057
- };
1058
- };
1059
- responses: {
1060
- /** @description Setting reset to default successfully */
1061
- 200: {
1062
- content: {
1063
- "application/json": components["schemas"]["SettingInfo"];
1064
- };
1065
- };
1066
- /** @description Setting not found */
1067
- 404: {
1068
- content: {
1069
- "application/json": components["schemas"]["OpenAIApiError"];
1070
- };
1071
- };
1072
- };
1073
- };
1074
- setupApp: {
1075
- requestBody: {
1076
- content: {
1077
- "application/json": components["schemas"]["SetupRequest"];
1078
- };
1079
- };
1080
- responses: {
1081
- /** @description Application setup successful */
1082
- 200: {
1083
- content: {
1084
- "application/json": components["schemas"]["SetupResponse"];
1085
- };
1086
- };
1087
- /** @description Application is already setup */
1088
- 400: {
1089
- content: {
1090
- "application/json": components["schemas"]["OpenAIApiError"];
1091
- };
1092
- };
1093
- /** @description Internal server error */
1094
- 500: {
1095
- content: {
1096
- "application/json": components["schemas"]["OpenAIApiError"];
1097
- };
1098
- };
1099
- };
1100
- };
1101
- /** List all API tokens for the current user */
1102
- listApiTokens: {
1103
- parameters: {
1104
- query?: {
1105
- /** @description Page number (1-based) */
1106
- page?: number;
1107
- /** @description Number of items per page (max 100) */
1108
- page_size?: number;
1109
- /** @description Field to sort by (repo, filename, size, updated_at, snapshot) */
1110
- sort?: string | null;
1111
- /** @description Sort order (asc or desc) */
1112
- sort_order?: string;
1113
- };
1114
- };
1115
- responses: {
1116
- /** @description List of API tokens */
1117
- 200: {
1118
- content: {
1119
- "application/json": components["schemas"]["PaginatedResponse_ApiToken"];
1120
- };
1121
- };
1122
- /** @description Unauthorized - Token missing or invalid */
1123
- 401: {
1124
- content: {
1125
- "application/json": components["schemas"]["OpenAIApiError"];
1126
- };
1127
- };
1128
- /** @description Internal server error */
1129
- 500: {
1130
- content: {
1131
- "application/json": components["schemas"]["OpenAIApiError"];
1132
- };
1133
- };
1134
- };
1135
- };
1136
- /** Create a new API token */
1137
- createApiToken: {
1138
- requestBody: {
1139
- content: {
1140
- "application/json": components["schemas"]["CreateApiTokenRequest"];
1141
- };
1142
- };
1143
- responses: {
1144
- /** @description API token created successfully */
1145
- 201: {
1146
- content: {
1147
- "application/json": components["schemas"]["ApiTokenResponse"];
1148
- };
1149
- };
1150
- /** @description Invalid request */
1151
- 400: {
1152
- content: {
1153
- "application/json": components["schemas"]["OpenAIApiError"];
1154
- };
1155
- };
1156
- /** @description Internal server error */
1157
- 500: {
1158
- content: {
1159
- "application/json": components["schemas"]["OpenAIApiError"];
1160
- };
1161
- };
1162
- };
1163
- };
1164
- /** Update an existing API token */
1165
- updateApiToken: {
1166
- parameters: {
1167
- path: {
1168
- /**
1169
- * @description Token identifier
1170
- * @example 550e8400-e29b-41d4-a716-446655440000
1171
- */
1172
- id: string;
1173
- };
1174
- };
1175
- /** @description Token update request */
1176
- requestBody: {
1177
- content: {
1178
- /**
1179
- * @example {
1180
- * "name": "Updated Token Name",
1181
- * "status": "inactive"
1182
- * }
1183
- */
1184
- "application/json": components["schemas"]["UpdateApiTokenRequest"];
1185
- };
1186
- };
1187
- responses: {
1188
- /** @description Token updated successfully */
1189
- 200: {
1190
- content: {
1191
- "application/json": components["schemas"]["ApiToken"];
1192
- };
1193
- };
1194
- /** @description Unauthorized - Token missing or invalid */
1195
- 401: {
1196
- content: {
1197
- "application/json": components["schemas"]["OpenAIApiError"];
1198
- };
1199
- };
1200
- /** @description Token not found */
1201
- 404: {
1202
- content: {
1203
- "application/json": components["schemas"]["OpenAIApiError"];
1204
- };
1205
- };
1206
- /** @description Internal server error */
1207
- 500: {
1208
- content: {
1209
- "application/json": components["schemas"]["OpenAIApiError"];
1210
- };
1211
- };
1212
- };
1213
- };
1214
- /** Get information about the currently logged in user */
1215
- getCurrentUser: {
1216
- responses: {
1217
- /** @description Returns current user information */
1218
- 200: {
1219
- content: {
1220
- "application/json": components["schemas"]["UserInfo"];
1221
- };
1222
- };
1223
- /** @description Error in extracting user info from token */
1224
- 500: {
1225
- content: {
1226
- "application/json": components["schemas"]["OpenAIApiError"];
1227
- };
1228
- };
1229
- };
1230
- };
1231
- /** Simple health check endpoint */
1232
- pingServer: {
1233
- responses: {
1234
- /** @description Server is healthy */
1235
- 200: {
1236
- content: {
1237
- "application/json": components["schemas"]["PingResponse"];
1238
- };
1239
- };
1240
- };
1241
- };
1242
- /** Create a chat completion */
1243
- createChatCompletion: {
1244
- requestBody: {
1245
- content: {
1246
- /**
1247
- * @example {
1248
- * "max_tokens": 100,
1249
- * "messages": [
1250
- * {
1251
- * "content": "You are a helpful assistant.",
1252
- * "role": "system"
1253
- * },
1254
- * {
1255
- * "content": "Hello!",
1256
- * "role": "user"
1257
- * }
1258
- * ],
1259
- * "model": "llama2:chat",
1260
- * "stream": false,
1261
- * "temperature": 0.7
1262
- * }
1263
- */
1264
- "application/json": unknown;
1265
- };
1266
- };
1267
- responses: {
1268
- /** @description Chat completion response */
1269
- 200: {
1270
- content: {
1271
- "application/json": unknown;
1272
- };
1273
- };
1274
- /** @description Chat completion stream, the status is 200, using 201 to avoid OpenAPI format limitation. */
1275
- 201: {
1276
- headers: {
1277
- /** @description No-cache directive */
1278
- "Cache-Control"?: string;
1279
- };
1280
- content: {
1281
- "text/event-stream": unknown;
1282
- };
1283
- };
1284
- /** @description Invalid request parameters */
1285
- 400: {
1286
- content: {
1287
- "application/json": components["schemas"]["OpenAIApiError"];
1288
- };
1289
- };
1290
- /** @description Invalid authentication */
1291
- 401: {
1292
- content: {
1293
- "application/json": components["schemas"]["OpenAIApiError"];
1294
- };
1295
- };
1296
- /** @description Internal server error */
1297
- 500: {
1298
- content: {
1299
- "application/json": components["schemas"]["OpenAIApiError"];
1300
- };
1301
- };
1302
- };
1303
- };
1304
- /** List available models */
1305
- listModels: {
1306
- responses: {
1307
- /** @description List of available models */
1308
- 200: {
1309
- content: {
1310
- "application/json": components["schemas"]["ListModelResponseWrapper"];
1311
- };
1312
- };
1313
- /** @description Invalid authentication */
1314
- 401: {
1315
- content: {
1316
- "application/json": components["schemas"]["OpenAIApiError"];
1317
- };
1318
- };
1319
- /** @description Internal server error */
1320
- 500: {
1321
- content: {
1322
- "application/json": components["schemas"]["OpenAIApiError"];
1323
- };
1324
- };
1325
- };
1326
- };
1327
- };