arbi 0.1.1__py3-none-any.whl → 0.2.0__py3-none-any.whl

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.

Potentially problematic release.


This version of arbi might be problematic. Click here for more details.

Files changed (60) hide show
  1. arbi/__init__.py +3 -1
  2. arbi/_base_client.py +12 -12
  3. arbi/_client.py +8 -8
  4. arbi/_compat.py +48 -48
  5. arbi/_models.py +51 -45
  6. arbi/_qs.py +7 -7
  7. arbi/_types.py +53 -12
  8. arbi/_utils/__init__.py +9 -2
  9. arbi/_utils/_compat.py +45 -0
  10. arbi/_utils/_datetime_parse.py +136 -0
  11. arbi/_utils/_transform.py +13 -3
  12. arbi/_utils/_typing.py +6 -1
  13. arbi/_utils/_utils.py +4 -5
  14. arbi/_version.py +1 -1
  15. arbi/resources/api/api.py +3 -3
  16. arbi/resources/api/assistant.py +17 -17
  17. arbi/resources/api/configs.py +41 -33
  18. arbi/resources/api/conversation/conversation.py +11 -11
  19. arbi/resources/api/conversation/user.py +5 -5
  20. arbi/resources/api/document/annotation.py +17 -17
  21. arbi/resources/api/document/document.py +166 -33
  22. arbi/resources/api/health.py +129 -11
  23. arbi/resources/api/sso.py +9 -9
  24. arbi/resources/api/tag.py +26 -26
  25. arbi/resources/api/user/settings.py +28 -20
  26. arbi/resources/api/user/user.py +107 -16
  27. arbi/resources/api/workspace.py +69 -39
  28. arbi/types/api/__init__.py +5 -0
  29. arbi/types/api/assistant_query_params.py +16 -4
  30. arbi/types/api/assistant_retrieve_params.py +16 -4
  31. arbi/types/api/config_create_params.py +67 -2
  32. arbi/types/api/config_retrieve_response.py +98 -2
  33. arbi/types/api/conversation_retrieve_threads_response.py +13 -2
  34. arbi/types/api/document_date_extractor_llm_config.py +3 -3
  35. arbi/types/api/document_date_extractor_llm_config_param.py +3 -3
  36. arbi/types/api/document_upload_from_url_params.py +23 -0
  37. arbi/types/api/document_upload_params.py +3 -3
  38. arbi/types/api/embedder_config.py +12 -0
  39. arbi/types/api/embedder_config_param.py +12 -0
  40. arbi/types/api/health_check_app_response.py +6 -0
  41. arbi/types/api/health_retrieve_status_response.py +45 -0
  42. arbi/types/api/health_retrieve_version_response.py +8 -0
  43. arbi/types/api/query_llm_config.py +1 -1
  44. arbi/types/api/query_llm_config_param.py +1 -1
  45. arbi/types/api/tag_apply_to_docs_params.py +3 -2
  46. arbi/types/api/tag_remove_from_docs_params.py +3 -2
  47. arbi/types/api/title_llm_config.py +1 -1
  48. arbi/types/api/title_llm_config_param.py +1 -1
  49. arbi/types/api/user/setting_retrieve_response.py +10 -1
  50. arbi/types/api/user/setting_update_params.py +8 -2
  51. arbi/types/api/user_register_params.py +2 -0
  52. arbi/types/api/user_verify_email_params.py +11 -0
  53. arbi/types/api/user_verify_email_response.py +9 -0
  54. arbi/types/api/workspace_create_protected_params.py +2 -0
  55. arbi/types/api/workspace_response.py +2 -0
  56. arbi/types/api/workspace_update_params.py +2 -0
  57. {arbi-0.1.1.dist-info → arbi-0.2.0.dist-info}/METADATA +3 -3
  58. {arbi-0.1.1.dist-info → arbi-0.2.0.dist-info}/RECORD +60 -53
  59. {arbi-0.1.1.dist-info → arbi-0.2.0.dist-info}/WHEEL +0 -0
  60. {arbi-0.1.1.dist-info → arbi-0.2.0.dist-info}/licenses/LICENSE +0 -0
@@ -2,13 +2,23 @@
2
2
 
3
3
  from __future__ import annotations
4
4
 
5
- from typing import List, Union, Mapping, Optional, cast
5
+ from typing import Union, Mapping, Optional, cast
6
6
  from datetime import date
7
7
  from typing_extensions import Literal
8
8
 
9
9
  import httpx
10
10
 
11
- from ...._types import NOT_GIVEN, Body, Query, Headers, NotGiven, FileTypes
11
+ from ...._types import (
12
+ Body,
13
+ Omit,
14
+ Query,
15
+ Headers,
16
+ NotGiven,
17
+ FileTypes,
18
+ SequenceNotStr,
19
+ omit,
20
+ not_given,
21
+ )
12
22
  from ...._utils import extract_files, maybe_transform, deepcopy_minimal, async_maybe_transform
13
23
  from ...._compat import cached_property
14
24
  from .annotation import (
@@ -26,7 +36,12 @@ from ...._response import (
26
36
  async_to_raw_response_wrapper,
27
37
  async_to_streamed_response_wrapper,
28
38
  )
29
- from ....types.api import document_view_params, document_update_params, document_upload_params
39
+ from ....types.api import (
40
+ document_view_params,
41
+ document_update_params,
42
+ document_upload_params,
43
+ document_upload_from_url_params,
44
+ )
30
45
  from ...._base_client import make_request_options
31
46
  from ....types.api.doc_response import DocResponse
32
47
  from ....types.api.document_delete_response import DocumentDeleteResponse
@@ -65,15 +80,15 @@ class DocumentResource(SyncAPIResource):
65
80
  self,
66
81
  document_ext_id: str,
67
82
  *,
68
- doc_date: Union[str, date, None] | NotGiven = NOT_GIVEN,
69
- shared: Optional[bool] | NotGiven = NOT_GIVEN,
70
- title: Optional[str] | NotGiven = NOT_GIVEN,
83
+ doc_date: Union[str, date, None] | Omit = omit,
84
+ shared: Optional[bool] | Omit = omit,
85
+ title: Optional[str] | Omit = omit,
71
86
  # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
72
87
  # The extra values given here take precedence over values defined on the client or passed to this method.
73
88
  extra_headers: Headers | None = None,
74
89
  extra_query: Query | None = None,
75
90
  extra_body: Body | None = None,
76
- timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
91
+ timeout: float | httpx.Timeout | None | NotGiven = not_given,
77
92
  ) -> DocumentUpdateResponse:
78
93
  """Update document metadata such as title, date, or sharing status.
79
94
 
@@ -116,7 +131,7 @@ class DocumentResource(SyncAPIResource):
116
131
  extra_headers: Headers | None = None,
117
132
  extra_query: Query | None = None,
118
133
  extra_body: Body | None = None,
119
- timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
134
+ timeout: float | httpx.Timeout | None | NotGiven = not_given,
120
135
  ) -> DocumentDeleteResponse:
121
136
  """Delete a document by its external ID.
122
137
 
@@ -151,7 +166,7 @@ class DocumentResource(SyncAPIResource):
151
166
  extra_headers: Headers | None = None,
152
167
  extra_query: Query | None = None,
153
168
  extra_body: Body | None = None,
154
- timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
169
+ timeout: float | httpx.Timeout | None | NotGiven = not_given,
155
170
  ) -> object:
156
171
  """Download a document by its external ID.
157
172
 
@@ -186,7 +201,7 @@ class DocumentResource(SyncAPIResource):
186
201
  extra_headers: Headers | None = None,
187
202
  extra_query: Query | None = None,
188
203
  extra_body: Body | None = None,
189
- timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
204
+ timeout: float | httpx.Timeout | None | NotGiven = not_given,
190
205
  ) -> DocResponse:
191
206
  """Retrieve document metadata by its external ID.
192
207
 
@@ -222,7 +237,7 @@ class DocumentResource(SyncAPIResource):
222
237
  extra_headers: Headers | None = None,
223
238
  extra_query: Query | None = None,
224
239
  extra_body: Body | None = None,
225
- timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
240
+ timeout: float | httpx.Timeout | None | NotGiven = not_given,
226
241
  ) -> DocumentGetParsedResponse:
227
242
  """Retrieve the full parsed document to be handled by the frontend.
228
243
 
@@ -259,7 +274,7 @@ class DocumentResource(SyncAPIResource):
259
274
  extra_headers: Headers | None = None,
260
275
  extra_query: Query | None = None,
261
276
  extra_body: Body | None = None,
262
- timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
277
+ timeout: float | httpx.Timeout | None | NotGiven = not_given,
263
278
  ) -> DocumentGetTagsResponse:
264
279
  """
265
280
  Get all tags applied to a specific document along with doctag metadata.
@@ -287,15 +302,15 @@ class DocumentResource(SyncAPIResource):
287
302
  self,
288
303
  *,
289
304
  workspace_ext_id: str,
290
- files: List[FileTypes],
291
- config_ext_id: Optional[str] | NotGiven = NOT_GIVEN,
292
- shared: bool | NotGiven = NOT_GIVEN,
305
+ files: SequenceNotStr[FileTypes],
306
+ config_ext_id: Optional[str] | Omit = omit,
307
+ shared: bool | Omit = omit,
293
308
  # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
294
309
  # The extra values given here take precedence over values defined on the client or passed to this method.
295
310
  extra_headers: Headers | None = None,
296
311
  extra_query: Query | None = None,
297
312
  extra_body: Body | None = None,
298
- timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
313
+ timeout: float | httpx.Timeout | None | NotGiven = not_given,
299
314
  ) -> object:
300
315
  """Upload multiple documents to a workspace with encryption.
301
316
 
@@ -344,17 +359,70 @@ class DocumentResource(SyncAPIResource):
344
359
  cast_to=object,
345
360
  )
346
361
 
362
+ def upload_from_url(
363
+ self,
364
+ *,
365
+ urls: SequenceNotStr[str],
366
+ workspace_ext_id: str,
367
+ config_ext_id: Optional[str] | Omit = omit,
368
+ shared: bool | Omit = omit,
369
+ # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
370
+ # The extra values given here take precedence over values defined on the client or passed to this method.
371
+ extra_headers: Headers | None = None,
372
+ extra_query: Query | None = None,
373
+ extra_body: Body | None = None,
374
+ timeout: float | httpx.Timeout | None | NotGiven = not_given,
375
+ ) -> object:
376
+ """
377
+ Download and upload documents from URLs to a workspace with encryption.
378
+ Documents are queued for processing, parsed, and indexed for vector search.
379
+
380
+ Args:
381
+ urls: URLs to download documents from
382
+
383
+ config_ext_id: Configuration to use for processing
384
+
385
+ shared: Whether the document should be shared with workspace members
386
+
387
+ extra_headers: Send extra headers
388
+
389
+ extra_query: Add additional query parameters to the request
390
+
391
+ extra_body: Add additional JSON properties to the request
392
+
393
+ timeout: Override the client-level default timeout for this request, in seconds
394
+ """
395
+ return self._post(
396
+ "/api/document/upload-url",
397
+ options=make_request_options(
398
+ extra_headers=extra_headers,
399
+ extra_query=extra_query,
400
+ extra_body=extra_body,
401
+ timeout=timeout,
402
+ query=maybe_transform(
403
+ {
404
+ "urls": urls,
405
+ "workspace_ext_id": workspace_ext_id,
406
+ "config_ext_id": config_ext_id,
407
+ "shared": shared,
408
+ },
409
+ document_upload_from_url_params.DocumentUploadFromURLParams,
410
+ ),
411
+ ),
412
+ cast_to=object,
413
+ )
414
+
347
415
  def view(
348
416
  self,
349
417
  document_ext_id: str,
350
418
  *,
351
- page: Optional[int] | NotGiven = NOT_GIVEN,
419
+ page: Optional[int] | Omit = omit,
352
420
  # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
353
421
  # The extra values given here take precedence over values defined on the client or passed to this method.
354
422
  extra_headers: Headers | None = None,
355
423
  extra_query: Query | None = None,
356
424
  extra_body: Body | None = None,
357
- timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
425
+ timeout: float | httpx.Timeout | None | NotGiven = not_given,
358
426
  ) -> object:
359
427
  """View a document inline in the browser.
360
428
 
@@ -415,15 +483,15 @@ class AsyncDocumentResource(AsyncAPIResource):
415
483
  self,
416
484
  document_ext_id: str,
417
485
  *,
418
- doc_date: Union[str, date, None] | NotGiven = NOT_GIVEN,
419
- shared: Optional[bool] | NotGiven = NOT_GIVEN,
420
- title: Optional[str] | NotGiven = NOT_GIVEN,
486
+ doc_date: Union[str, date, None] | Omit = omit,
487
+ shared: Optional[bool] | Omit = omit,
488
+ title: Optional[str] | Omit = omit,
421
489
  # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
422
490
  # The extra values given here take precedence over values defined on the client or passed to this method.
423
491
  extra_headers: Headers | None = None,
424
492
  extra_query: Query | None = None,
425
493
  extra_body: Body | None = None,
426
- timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
494
+ timeout: float | httpx.Timeout | None | NotGiven = not_given,
427
495
  ) -> DocumentUpdateResponse:
428
496
  """Update document metadata such as title, date, or sharing status.
429
497
 
@@ -466,7 +534,7 @@ class AsyncDocumentResource(AsyncAPIResource):
466
534
  extra_headers: Headers | None = None,
467
535
  extra_query: Query | None = None,
468
536
  extra_body: Body | None = None,
469
- timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
537
+ timeout: float | httpx.Timeout | None | NotGiven = not_given,
470
538
  ) -> DocumentDeleteResponse:
471
539
  """Delete a document by its external ID.
472
540
 
@@ -501,7 +569,7 @@ class AsyncDocumentResource(AsyncAPIResource):
501
569
  extra_headers: Headers | None = None,
502
570
  extra_query: Query | None = None,
503
571
  extra_body: Body | None = None,
504
- timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
572
+ timeout: float | httpx.Timeout | None | NotGiven = not_given,
505
573
  ) -> object:
506
574
  """Download a document by its external ID.
507
575
 
@@ -536,7 +604,7 @@ class AsyncDocumentResource(AsyncAPIResource):
536
604
  extra_headers: Headers | None = None,
537
605
  extra_query: Query | None = None,
538
606
  extra_body: Body | None = None,
539
- timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
607
+ timeout: float | httpx.Timeout | None | NotGiven = not_given,
540
608
  ) -> DocResponse:
541
609
  """Retrieve document metadata by its external ID.
542
610
 
@@ -572,7 +640,7 @@ class AsyncDocumentResource(AsyncAPIResource):
572
640
  extra_headers: Headers | None = None,
573
641
  extra_query: Query | None = None,
574
642
  extra_body: Body | None = None,
575
- timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
643
+ timeout: float | httpx.Timeout | None | NotGiven = not_given,
576
644
  ) -> DocumentGetParsedResponse:
577
645
  """Retrieve the full parsed document to be handled by the frontend.
578
646
 
@@ -609,7 +677,7 @@ class AsyncDocumentResource(AsyncAPIResource):
609
677
  extra_headers: Headers | None = None,
610
678
  extra_query: Query | None = None,
611
679
  extra_body: Body | None = None,
612
- timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
680
+ timeout: float | httpx.Timeout | None | NotGiven = not_given,
613
681
  ) -> DocumentGetTagsResponse:
614
682
  """
615
683
  Get all tags applied to a specific document along with doctag metadata.
@@ -637,15 +705,15 @@ class AsyncDocumentResource(AsyncAPIResource):
637
705
  self,
638
706
  *,
639
707
  workspace_ext_id: str,
640
- files: List[FileTypes],
641
- config_ext_id: Optional[str] | NotGiven = NOT_GIVEN,
642
- shared: bool | NotGiven = NOT_GIVEN,
708
+ files: SequenceNotStr[FileTypes],
709
+ config_ext_id: Optional[str] | Omit = omit,
710
+ shared: bool | Omit = omit,
643
711
  # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
644
712
  # The extra values given here take precedence over values defined on the client or passed to this method.
645
713
  extra_headers: Headers | None = None,
646
714
  extra_query: Query | None = None,
647
715
  extra_body: Body | None = None,
648
- timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
716
+ timeout: float | httpx.Timeout | None | NotGiven = not_given,
649
717
  ) -> object:
650
718
  """Upload multiple documents to a workspace with encryption.
651
719
 
@@ -694,17 +762,70 @@ class AsyncDocumentResource(AsyncAPIResource):
694
762
  cast_to=object,
695
763
  )
696
764
 
765
+ async def upload_from_url(
766
+ self,
767
+ *,
768
+ urls: SequenceNotStr[str],
769
+ workspace_ext_id: str,
770
+ config_ext_id: Optional[str] | Omit = omit,
771
+ shared: bool | Omit = omit,
772
+ # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
773
+ # The extra values given here take precedence over values defined on the client or passed to this method.
774
+ extra_headers: Headers | None = None,
775
+ extra_query: Query | None = None,
776
+ extra_body: Body | None = None,
777
+ timeout: float | httpx.Timeout | None | NotGiven = not_given,
778
+ ) -> object:
779
+ """
780
+ Download and upload documents from URLs to a workspace with encryption.
781
+ Documents are queued for processing, parsed, and indexed for vector search.
782
+
783
+ Args:
784
+ urls: URLs to download documents from
785
+
786
+ config_ext_id: Configuration to use for processing
787
+
788
+ shared: Whether the document should be shared with workspace members
789
+
790
+ extra_headers: Send extra headers
791
+
792
+ extra_query: Add additional query parameters to the request
793
+
794
+ extra_body: Add additional JSON properties to the request
795
+
796
+ timeout: Override the client-level default timeout for this request, in seconds
797
+ """
798
+ return await self._post(
799
+ "/api/document/upload-url",
800
+ options=make_request_options(
801
+ extra_headers=extra_headers,
802
+ extra_query=extra_query,
803
+ extra_body=extra_body,
804
+ timeout=timeout,
805
+ query=await async_maybe_transform(
806
+ {
807
+ "urls": urls,
808
+ "workspace_ext_id": workspace_ext_id,
809
+ "config_ext_id": config_ext_id,
810
+ "shared": shared,
811
+ },
812
+ document_upload_from_url_params.DocumentUploadFromURLParams,
813
+ ),
814
+ ),
815
+ cast_to=object,
816
+ )
817
+
697
818
  async def view(
698
819
  self,
699
820
  document_ext_id: str,
700
821
  *,
701
- page: Optional[int] | NotGiven = NOT_GIVEN,
822
+ page: Optional[int] | Omit = omit,
702
823
  # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
703
824
  # The extra values given here take precedence over values defined on the client or passed to this method.
704
825
  extra_headers: Headers | None = None,
705
826
  extra_query: Query | None = None,
706
827
  extra_body: Body | None = None,
707
- timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
828
+ timeout: float | httpx.Timeout | None | NotGiven = not_given,
708
829
  ) -> object:
709
830
  """View a document inline in the browser.
710
831
 
@@ -762,6 +883,9 @@ class DocumentResourceWithRawResponse:
762
883
  self.upload = to_raw_response_wrapper(
763
884
  document.upload,
764
885
  )
886
+ self.upload_from_url = to_raw_response_wrapper(
887
+ document.upload_from_url,
888
+ )
765
889
  self.view = to_raw_response_wrapper(
766
890
  document.view,
767
891
  )
@@ -796,6 +920,9 @@ class AsyncDocumentResourceWithRawResponse:
796
920
  self.upload = async_to_raw_response_wrapper(
797
921
  document.upload,
798
922
  )
923
+ self.upload_from_url = async_to_raw_response_wrapper(
924
+ document.upload_from_url,
925
+ )
799
926
  self.view = async_to_raw_response_wrapper(
800
927
  document.view,
801
928
  )
@@ -830,6 +957,9 @@ class DocumentResourceWithStreamingResponse:
830
957
  self.upload = to_streamed_response_wrapper(
831
958
  document.upload,
832
959
  )
960
+ self.upload_from_url = to_streamed_response_wrapper(
961
+ document.upload_from_url,
962
+ )
833
963
  self.view = to_streamed_response_wrapper(
834
964
  document.view,
835
965
  )
@@ -864,6 +994,9 @@ class AsyncDocumentResourceWithStreamingResponse:
864
994
  self.upload = async_to_streamed_response_wrapper(
865
995
  document.upload,
866
996
  )
997
+ self.upload_from_url = async_to_streamed_response_wrapper(
998
+ document.upload_from_url,
999
+ )
867
1000
  self.view = async_to_streamed_response_wrapper(
868
1001
  document.view,
869
1002
  )
@@ -4,7 +4,7 @@ from __future__ import annotations
4
4
 
5
5
  import httpx
6
6
 
7
- from ..._types import NOT_GIVEN, Body, Query, Headers, NotGiven
7
+ from ..._types import Body, Query, Headers, NotGiven, not_given
8
8
  from ..._compat import cached_property
9
9
  from ..._resource import SyncAPIResource, AsyncAPIResource
10
10
  from ..._response import (
@@ -18,6 +18,8 @@ from ...types.api.health_check_app_response import HealthCheckAppResponse
18
18
  from ...types.api.health_get_models_response import HealthGetModelsResponse
19
19
  from ...types.api.health_check_models_response import HealthCheckModelsResponse
20
20
  from ...types.api.health_check_services_response import HealthCheckServicesResponse
21
+ from ...types.api.health_retrieve_status_response import HealthRetrieveStatusResponse
22
+ from ...types.api.health_retrieve_version_response import HealthRetrieveVersionResponse
21
23
 
22
24
  __all__ = ["HealthResource", "AsyncHealthResource"]
23
25
 
@@ -50,9 +52,13 @@ class HealthResource(SyncAPIResource):
50
52
  extra_headers: Headers | None = None,
51
53
  extra_query: Query | None = None,
52
54
  extra_body: Body | None = None,
53
- timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
55
+ timeout: float | httpx.Timeout | None | NotGiven = not_given,
54
56
  ) -> HealthCheckAppResponse:
55
- """Lightweight health check endpoint for the arbi-app itself."""
57
+ """Lightweight health check endpoint for the arbi-app itself.
58
+
59
+ Returns version
60
+ information along with health status.
61
+ """
56
62
  return self._get(
57
63
  "/api/health/app",
58
64
  options=make_request_options(
@@ -69,7 +75,7 @@ class HealthResource(SyncAPIResource):
69
75
  extra_headers: Headers | None = None,
70
76
  extra_query: Query | None = None,
71
77
  extra_body: Body | None = None,
72
- timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
78
+ timeout: float | httpx.Timeout | None | NotGiven = not_given,
73
79
  ) -> HealthCheckModelsResponse:
74
80
  """
75
81
  Endpoint to check the health of various models hosted on the LiteLLM platform.
@@ -92,7 +98,7 @@ class HealthResource(SyncAPIResource):
92
98
  extra_headers: Headers | None = None,
93
99
  extra_query: Query | None = None,
94
100
  extra_body: Body | None = None,
95
- timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
101
+ timeout: float | httpx.Timeout | None | NotGiven = not_given,
96
102
  ) -> HealthCheckServicesResponse:
97
103
  """
98
104
  Health check endpoint that verifies the status of the application and external
@@ -115,7 +121,7 @@ class HealthResource(SyncAPIResource):
115
121
  extra_headers: Headers | None = None,
116
122
  extra_query: Query | None = None,
117
123
  extra_body: Body | None = None,
118
- timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
124
+ timeout: float | httpx.Timeout | None | NotGiven = not_given,
119
125
  ) -> HealthGetModelsResponse:
120
126
  """Returns available models with model_name and api_type fields"""
121
127
  return self._get(
@@ -126,6 +132,48 @@ class HealthResource(SyncAPIResource):
126
132
  cast_to=HealthGetModelsResponse,
127
133
  )
128
134
 
135
+ def retrieve_status(
136
+ self,
137
+ *,
138
+ # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
139
+ # The extra values given here take precedence over values defined on the client or passed to this method.
140
+ extra_headers: Headers | None = None,
141
+ extra_query: Query | None = None,
142
+ extra_body: Body | None = None,
143
+ timeout: float | httpx.Timeout | None | NotGiven = not_given,
144
+ ) -> HealthRetrieveStatusResponse:
145
+ """
146
+ Consolidated health endpoint that returns status, version information, and
147
+ service health. This combines the functionality of /app, /version, and /services
148
+ endpoints.
149
+ """
150
+ return self._get(
151
+ "/api/health/",
152
+ options=make_request_options(
153
+ extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
154
+ ),
155
+ cast_to=HealthRetrieveStatusResponse,
156
+ )
157
+
158
+ def retrieve_version(
159
+ self,
160
+ *,
161
+ # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
162
+ # The extra values given here take precedence over values defined on the client or passed to this method.
163
+ extra_headers: Headers | None = None,
164
+ extra_query: Query | None = None,
165
+ extra_body: Body | None = None,
166
+ timeout: float | httpx.Timeout | None | NotGiven = not_given,
167
+ ) -> HealthRetrieveVersionResponse:
168
+ """Get version information for backend and frontend components."""
169
+ return self._get(
170
+ "/api/health/version",
171
+ options=make_request_options(
172
+ extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
173
+ ),
174
+ cast_to=HealthRetrieveVersionResponse,
175
+ )
176
+
129
177
 
130
178
  class AsyncHealthResource(AsyncAPIResource):
131
179
  @cached_property
@@ -155,9 +203,13 @@ class AsyncHealthResource(AsyncAPIResource):
155
203
  extra_headers: Headers | None = None,
156
204
  extra_query: Query | None = None,
157
205
  extra_body: Body | None = None,
158
- timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
206
+ timeout: float | httpx.Timeout | None | NotGiven = not_given,
159
207
  ) -> HealthCheckAppResponse:
160
- """Lightweight health check endpoint for the arbi-app itself."""
208
+ """Lightweight health check endpoint for the arbi-app itself.
209
+
210
+ Returns version
211
+ information along with health status.
212
+ """
161
213
  return await self._get(
162
214
  "/api/health/app",
163
215
  options=make_request_options(
@@ -174,7 +226,7 @@ class AsyncHealthResource(AsyncAPIResource):
174
226
  extra_headers: Headers | None = None,
175
227
  extra_query: Query | None = None,
176
228
  extra_body: Body | None = None,
177
- timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
229
+ timeout: float | httpx.Timeout | None | NotGiven = not_given,
178
230
  ) -> HealthCheckModelsResponse:
179
231
  """
180
232
  Endpoint to check the health of various models hosted on the LiteLLM platform.
@@ -197,7 +249,7 @@ class AsyncHealthResource(AsyncAPIResource):
197
249
  extra_headers: Headers | None = None,
198
250
  extra_query: Query | None = None,
199
251
  extra_body: Body | None = None,
200
- timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
252
+ timeout: float | httpx.Timeout | None | NotGiven = not_given,
201
253
  ) -> HealthCheckServicesResponse:
202
254
  """
203
255
  Health check endpoint that verifies the status of the application and external
@@ -220,7 +272,7 @@ class AsyncHealthResource(AsyncAPIResource):
220
272
  extra_headers: Headers | None = None,
221
273
  extra_query: Query | None = None,
222
274
  extra_body: Body | None = None,
223
- timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
275
+ timeout: float | httpx.Timeout | None | NotGiven = not_given,
224
276
  ) -> HealthGetModelsResponse:
225
277
  """Returns available models with model_name and api_type fields"""
226
278
  return await self._get(
@@ -231,6 +283,48 @@ class AsyncHealthResource(AsyncAPIResource):
231
283
  cast_to=HealthGetModelsResponse,
232
284
  )
233
285
 
286
+ async def retrieve_status(
287
+ self,
288
+ *,
289
+ # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
290
+ # The extra values given here take precedence over values defined on the client or passed to this method.
291
+ extra_headers: Headers | None = None,
292
+ extra_query: Query | None = None,
293
+ extra_body: Body | None = None,
294
+ timeout: float | httpx.Timeout | None | NotGiven = not_given,
295
+ ) -> HealthRetrieveStatusResponse:
296
+ """
297
+ Consolidated health endpoint that returns status, version information, and
298
+ service health. This combines the functionality of /app, /version, and /services
299
+ endpoints.
300
+ """
301
+ return await self._get(
302
+ "/api/health/",
303
+ options=make_request_options(
304
+ extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
305
+ ),
306
+ cast_to=HealthRetrieveStatusResponse,
307
+ )
308
+
309
+ async def retrieve_version(
310
+ self,
311
+ *,
312
+ # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
313
+ # The extra values given here take precedence over values defined on the client or passed to this method.
314
+ extra_headers: Headers | None = None,
315
+ extra_query: Query | None = None,
316
+ extra_body: Body | None = None,
317
+ timeout: float | httpx.Timeout | None | NotGiven = not_given,
318
+ ) -> HealthRetrieveVersionResponse:
319
+ """Get version information for backend and frontend components."""
320
+ return await self._get(
321
+ "/api/health/version",
322
+ options=make_request_options(
323
+ extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
324
+ ),
325
+ cast_to=HealthRetrieveVersionResponse,
326
+ )
327
+
234
328
 
235
329
  class HealthResourceWithRawResponse:
236
330
  def __init__(self, health: HealthResource) -> None:
@@ -248,6 +342,12 @@ class HealthResourceWithRawResponse:
248
342
  self.get_models = to_raw_response_wrapper(
249
343
  health.get_models,
250
344
  )
345
+ self.retrieve_status = to_raw_response_wrapper(
346
+ health.retrieve_status,
347
+ )
348
+ self.retrieve_version = to_raw_response_wrapper(
349
+ health.retrieve_version,
350
+ )
251
351
 
252
352
 
253
353
  class AsyncHealthResourceWithRawResponse:
@@ -266,6 +366,12 @@ class AsyncHealthResourceWithRawResponse:
266
366
  self.get_models = async_to_raw_response_wrapper(
267
367
  health.get_models,
268
368
  )
369
+ self.retrieve_status = async_to_raw_response_wrapper(
370
+ health.retrieve_status,
371
+ )
372
+ self.retrieve_version = async_to_raw_response_wrapper(
373
+ health.retrieve_version,
374
+ )
269
375
 
270
376
 
271
377
  class HealthResourceWithStreamingResponse:
@@ -284,6 +390,12 @@ class HealthResourceWithStreamingResponse:
284
390
  self.get_models = to_streamed_response_wrapper(
285
391
  health.get_models,
286
392
  )
393
+ self.retrieve_status = to_streamed_response_wrapper(
394
+ health.retrieve_status,
395
+ )
396
+ self.retrieve_version = to_streamed_response_wrapper(
397
+ health.retrieve_version,
398
+ )
287
399
 
288
400
 
289
401
  class AsyncHealthResourceWithStreamingResponse:
@@ -302,3 +414,9 @@ class AsyncHealthResourceWithStreamingResponse:
302
414
  self.get_models = async_to_streamed_response_wrapper(
303
415
  health.get_models,
304
416
  )
417
+ self.retrieve_status = async_to_streamed_response_wrapper(
418
+ health.retrieve_status,
419
+ )
420
+ self.retrieve_version = async_to_streamed_response_wrapper(
421
+ health.retrieve_version,
422
+ )