@bodhiapp/ts-client 0.1.3 → 0.1.4

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