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