arbi 0.1.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.
- arbi/__init__.py +90 -0
- arbi/_base_client.py +1995 -0
- arbi/_client.py +394 -0
- arbi/_compat.py +219 -0
- arbi/_constants.py +14 -0
- arbi/_exceptions.py +108 -0
- arbi/_files.py +123 -0
- arbi/_models.py +829 -0
- arbi/_qs.py +150 -0
- arbi/_resource.py +43 -0
- arbi/_response.py +830 -0
- arbi/_streaming.py +333 -0
- arbi/_types.py +219 -0
- arbi/_utils/__init__.py +57 -0
- arbi/_utils/_logs.py +25 -0
- arbi/_utils/_proxy.py +65 -0
- arbi/_utils/_reflection.py +42 -0
- arbi/_utils/_resources_proxy.py +24 -0
- arbi/_utils/_streams.py +12 -0
- arbi/_utils/_sync.py +86 -0
- arbi/_utils/_transform.py +447 -0
- arbi/_utils/_typing.py +151 -0
- arbi/_utils/_utils.py +422 -0
- arbi/_version.py +4 -0
- arbi/lib/.keep +4 -0
- arbi/py.typed +0 -0
- arbi/resources/__init__.py +19 -0
- arbi/resources/api/__init__.py +145 -0
- arbi/resources/api/api.py +422 -0
- arbi/resources/api/assistant.py +300 -0
- arbi/resources/api/configs.py +499 -0
- arbi/resources/api/conversation/__init__.py +33 -0
- arbi/resources/api/conversation/conversation.py +555 -0
- arbi/resources/api/conversation/user.py +270 -0
- arbi/resources/api/document/__init__.py +33 -0
- arbi/resources/api/document/annotation.py +384 -0
- arbi/resources/api/document/document.py +873 -0
- arbi/resources/api/health.py +304 -0
- arbi/resources/api/sso.py +333 -0
- arbi/resources/api/tag.py +614 -0
- arbi/resources/api/user/__init__.py +33 -0
- arbi/resources/api/user/settings.py +251 -0
- arbi/resources/api/user/user.py +532 -0
- arbi/resources/api/workspace.py +1061 -0
- arbi/types/__init__.py +8 -0
- arbi/types/api/__init__.py +84 -0
- arbi/types/api/assistant_query_params.py +59 -0
- arbi/types/api/assistant_retrieve_params.py +59 -0
- arbi/types/api/chunker_config_param.py +9 -0
- arbi/types/api/config_create_params.py +45 -0
- arbi/types/api/config_create_response.py +15 -0
- arbi/types/api/config_delete_response.py +11 -0
- arbi/types/api/config_get_versions_response.py +19 -0
- arbi/types/api/config_retrieve_response.py +46 -0
- arbi/types/api/conversation/__init__.py +8 -0
- arbi/types/api/conversation/user_add_params.py +11 -0
- arbi/types/api/conversation/user_add_response.py +11 -0
- arbi/types/api/conversation/user_remove_params.py +11 -0
- arbi/types/api/conversation/user_remove_response.py +11 -0
- arbi/types/api/conversation_delete_message_response.py +11 -0
- arbi/types/api/conversation_delete_response.py +11 -0
- arbi/types/api/conversation_retrieve_threads_response.py +91 -0
- arbi/types/api/conversation_share_response.py +11 -0
- arbi/types/api/conversation_update_title_params.py +12 -0
- arbi/types/api/conversation_update_title_response.py +13 -0
- arbi/types/api/doc_response.py +48 -0
- arbi/types/api/document/__init__.py +8 -0
- arbi/types/api/document/annotation_create_params.py +16 -0
- arbi/types/api/document/annotation_delete_response.py +11 -0
- arbi/types/api/document/annotation_update_params.py +16 -0
- arbi/types/api/document/doc_tag_response.py +26 -0
- arbi/types/api/document_date_extractor_llm_config.py +29 -0
- arbi/types/api/document_date_extractor_llm_config_param.py +28 -0
- arbi/types/api/document_delete_response.py +11 -0
- arbi/types/api/document_get_parsed_response.py +26 -0
- arbi/types/api/document_get_tags_response.py +10 -0
- arbi/types/api/document_update_params.py +19 -0
- arbi/types/api/document_update_response.py +22 -0
- arbi/types/api/document_upload_params.py +23 -0
- arbi/types/api/document_view_params.py +13 -0
- arbi/types/api/embedder_config.py +18 -0
- arbi/types/api/embedder_config_param.py +17 -0
- arbi/types/api/health_check_app_response.py +9 -0
- arbi/types/api/health_check_models_response.py +21 -0
- arbi/types/api/health_check_services_response.py +23 -0
- arbi/types/api/health_get_models_response.py +19 -0
- arbi/types/api/model_citation_config.py +23 -0
- arbi/types/api/model_citation_config_param.py +23 -0
- arbi/types/api/parser_config_param.py +9 -0
- arbi/types/api/query_llm_config.py +30 -0
- arbi/types/api/query_llm_config_param.py +29 -0
- arbi/types/api/reranker_config.py +21 -0
- arbi/types/api/reranker_config_param.py +20 -0
- arbi/types/api/retriever_config.py +23 -0
- arbi/types/api/retriever_config_param.py +23 -0
- arbi/types/api/sso_invite_params.py +11 -0
- arbi/types/api/sso_invite_response.py +11 -0
- arbi/types/api/sso_login_params.py +16 -0
- arbi/types/api/sso_login_response.py +15 -0
- arbi/types/api/sso_rotate_passcode_response.py +11 -0
- arbi/types/api/tag_apply_to_docs_params.py +12 -0
- arbi/types/api/tag_apply_to_docs_response.py +13 -0
- arbi/types/api/tag_create_params.py +18 -0
- arbi/types/api/tag_create_response.py +11 -0
- arbi/types/api/tag_delete_response.py +9 -0
- arbi/types/api/tag_get_docs_response.py +10 -0
- arbi/types/api/tag_remove_from_docs_params.py +12 -0
- arbi/types/api/tag_remove_from_docs_response.py +13 -0
- arbi/types/api/tag_update_params.py +14 -0
- arbi/types/api/tag_update_response.py +17 -0
- arbi/types/api/title_llm_config.py +29 -0
- arbi/types/api/title_llm_config_param.py +28 -0
- arbi/types/api/token.py +13 -0
- arbi/types/api/user/__init__.py +6 -0
- arbi/types/api/user/setting_retrieve_response.py +36 -0
- arbi/types/api/user/setting_update_params.py +24 -0
- arbi/types/api/user_list_workspaces_response.py +10 -0
- arbi/types/api/user_login_params.py +13 -0
- arbi/types/api/user_logout_response.py +9 -0
- arbi/types/api/user_register_params.py +17 -0
- arbi/types/api/user_response.py +19 -0
- arbi/types/api/workspace_create_protected_params.py +14 -0
- arbi/types/api/workspace_delete_response.py +9 -0
- arbi/types/api/workspace_get_conversations_response.py +28 -0
- arbi/types/api/workspace_get_doctags_response.py +10 -0
- arbi/types/api/workspace_get_documents_response.py +10 -0
- arbi/types/api/workspace_get_stats_response.py +13 -0
- arbi/types/api/workspace_get_tags_response.py +30 -0
- arbi/types/api/workspace_get_users_response.py +17 -0
- arbi/types/api/workspace_remove_user_params.py +11 -0
- arbi/types/api/workspace_remove_user_response.py +11 -0
- arbi/types/api/workspace_response.py +24 -0
- arbi/types/api/workspace_share_params.py +11 -0
- arbi/types/api/workspace_share_response.py +21 -0
- arbi/types/api/workspace_update_params.py +14 -0
- arbi/types/chunk.py +12 -0
- arbi/types/chunk_metadata.py +31 -0
- arbi/types/chunk_metadata_param.py +32 -0
- arbi/types/chunk_param.py +15 -0
- arbi-0.1.0.dist-info/METADATA +410 -0
- arbi-0.1.0.dist-info/RECORD +143 -0
- arbi-0.1.0.dist-info/WHEEL +4 -0
- arbi-0.1.0.dist-info/licenses/LICENSE +201 -0
|
@@ -0,0 +1,251 @@
|
|
|
1
|
+
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
|
|
3
|
+
from __future__ import annotations
|
|
4
|
+
|
|
5
|
+
from typing import List, Optional
|
|
6
|
+
|
|
7
|
+
import httpx
|
|
8
|
+
|
|
9
|
+
from ...._types import NOT_GIVEN, Body, Query, Headers, NoneType, NotGiven
|
|
10
|
+
from ...._utils import maybe_transform, async_maybe_transform
|
|
11
|
+
from ...._compat import cached_property
|
|
12
|
+
from ...._resource import SyncAPIResource, AsyncAPIResource
|
|
13
|
+
from ...._response import (
|
|
14
|
+
to_raw_response_wrapper,
|
|
15
|
+
to_streamed_response_wrapper,
|
|
16
|
+
async_to_raw_response_wrapper,
|
|
17
|
+
async_to_streamed_response_wrapper,
|
|
18
|
+
)
|
|
19
|
+
from ...._base_client import make_request_options
|
|
20
|
+
from ....types.api.user import setting_update_params
|
|
21
|
+
from ....types.api.user.setting_retrieve_response import SettingRetrieveResponse
|
|
22
|
+
|
|
23
|
+
__all__ = ["SettingsResource", "AsyncSettingsResource"]
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
class SettingsResource(SyncAPIResource):
|
|
27
|
+
@cached_property
|
|
28
|
+
def with_raw_response(self) -> SettingsResourceWithRawResponse:
|
|
29
|
+
"""
|
|
30
|
+
This property can be used as a prefix for any HTTP method call to return
|
|
31
|
+
the raw response object instead of the parsed content.
|
|
32
|
+
|
|
33
|
+
For more information, see https://www.github.com/arbitrationcity/arbi-python#accessing-raw-response-data-eg-headers
|
|
34
|
+
"""
|
|
35
|
+
return SettingsResourceWithRawResponse(self)
|
|
36
|
+
|
|
37
|
+
@cached_property
|
|
38
|
+
def with_streaming_response(self) -> SettingsResourceWithStreamingResponse:
|
|
39
|
+
"""
|
|
40
|
+
An alternative to `.with_raw_response` that doesn't eagerly read the response body.
|
|
41
|
+
|
|
42
|
+
For more information, see https://www.github.com/arbitrationcity/arbi-python#with_streaming_response
|
|
43
|
+
"""
|
|
44
|
+
return SettingsResourceWithStreamingResponse(self)
|
|
45
|
+
|
|
46
|
+
def retrieve(
|
|
47
|
+
self,
|
|
48
|
+
*,
|
|
49
|
+
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
50
|
+
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
51
|
+
extra_headers: Headers | None = None,
|
|
52
|
+
extra_query: Query | None = None,
|
|
53
|
+
extra_body: Body | None = None,
|
|
54
|
+
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
|
55
|
+
) -> SettingRetrieveResponse:
|
|
56
|
+
"""Get current user's settings."""
|
|
57
|
+
return self._get(
|
|
58
|
+
"/api/user/settings",
|
|
59
|
+
options=make_request_options(
|
|
60
|
+
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
|
61
|
+
),
|
|
62
|
+
cast_to=SettingRetrieveResponse,
|
|
63
|
+
)
|
|
64
|
+
|
|
65
|
+
def update(
|
|
66
|
+
self,
|
|
67
|
+
*,
|
|
68
|
+
pinned_workspaces: Optional[List[str]] | NotGiven = NOT_GIVEN,
|
|
69
|
+
show_document_navigator: Optional[bool] | NotGiven = NOT_GIVEN,
|
|
70
|
+
show_help_page: Optional[bool] | NotGiven = NOT_GIVEN,
|
|
71
|
+
show_invite_tab: Optional[bool] | NotGiven = NOT_GIVEN,
|
|
72
|
+
show_security_settings: Optional[bool] | NotGiven = NOT_GIVEN,
|
|
73
|
+
show_smart_search: Optional[bool] | NotGiven = NOT_GIVEN,
|
|
74
|
+
show_thread_visualization: Optional[bool] | NotGiven = NOT_GIVEN,
|
|
75
|
+
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
76
|
+
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
77
|
+
extra_headers: Headers | None = None,
|
|
78
|
+
extra_query: Query | None = None,
|
|
79
|
+
extra_body: Body | None = None,
|
|
80
|
+
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
|
81
|
+
) -> None:
|
|
82
|
+
"""
|
|
83
|
+
Update user's settings (merge with existing).
|
|
84
|
+
|
|
85
|
+
Args:
|
|
86
|
+
extra_headers: Send extra headers
|
|
87
|
+
|
|
88
|
+
extra_query: Add additional query parameters to the request
|
|
89
|
+
|
|
90
|
+
extra_body: Add additional JSON properties to the request
|
|
91
|
+
|
|
92
|
+
timeout: Override the client-level default timeout for this request, in seconds
|
|
93
|
+
"""
|
|
94
|
+
extra_headers = {"Accept": "*/*", **(extra_headers or {})}
|
|
95
|
+
return self._patch(
|
|
96
|
+
"/api/user/settings",
|
|
97
|
+
body=maybe_transform(
|
|
98
|
+
{
|
|
99
|
+
"pinned_workspaces": pinned_workspaces,
|
|
100
|
+
"show_document_navigator": show_document_navigator,
|
|
101
|
+
"show_help_page": show_help_page,
|
|
102
|
+
"show_invite_tab": show_invite_tab,
|
|
103
|
+
"show_security_settings": show_security_settings,
|
|
104
|
+
"show_smart_search": show_smart_search,
|
|
105
|
+
"show_thread_visualization": show_thread_visualization,
|
|
106
|
+
},
|
|
107
|
+
setting_update_params.SettingUpdateParams,
|
|
108
|
+
),
|
|
109
|
+
options=make_request_options(
|
|
110
|
+
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
|
111
|
+
),
|
|
112
|
+
cast_to=NoneType,
|
|
113
|
+
)
|
|
114
|
+
|
|
115
|
+
|
|
116
|
+
class AsyncSettingsResource(AsyncAPIResource):
|
|
117
|
+
@cached_property
|
|
118
|
+
def with_raw_response(self) -> AsyncSettingsResourceWithRawResponse:
|
|
119
|
+
"""
|
|
120
|
+
This property can be used as a prefix for any HTTP method call to return
|
|
121
|
+
the raw response object instead of the parsed content.
|
|
122
|
+
|
|
123
|
+
For more information, see https://www.github.com/arbitrationcity/arbi-python#accessing-raw-response-data-eg-headers
|
|
124
|
+
"""
|
|
125
|
+
return AsyncSettingsResourceWithRawResponse(self)
|
|
126
|
+
|
|
127
|
+
@cached_property
|
|
128
|
+
def with_streaming_response(self) -> AsyncSettingsResourceWithStreamingResponse:
|
|
129
|
+
"""
|
|
130
|
+
An alternative to `.with_raw_response` that doesn't eagerly read the response body.
|
|
131
|
+
|
|
132
|
+
For more information, see https://www.github.com/arbitrationcity/arbi-python#with_streaming_response
|
|
133
|
+
"""
|
|
134
|
+
return AsyncSettingsResourceWithStreamingResponse(self)
|
|
135
|
+
|
|
136
|
+
async def retrieve(
|
|
137
|
+
self,
|
|
138
|
+
*,
|
|
139
|
+
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
140
|
+
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
141
|
+
extra_headers: Headers | None = None,
|
|
142
|
+
extra_query: Query | None = None,
|
|
143
|
+
extra_body: Body | None = None,
|
|
144
|
+
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
|
145
|
+
) -> SettingRetrieveResponse:
|
|
146
|
+
"""Get current user's settings."""
|
|
147
|
+
return await self._get(
|
|
148
|
+
"/api/user/settings",
|
|
149
|
+
options=make_request_options(
|
|
150
|
+
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
|
151
|
+
),
|
|
152
|
+
cast_to=SettingRetrieveResponse,
|
|
153
|
+
)
|
|
154
|
+
|
|
155
|
+
async def update(
|
|
156
|
+
self,
|
|
157
|
+
*,
|
|
158
|
+
pinned_workspaces: Optional[List[str]] | NotGiven = NOT_GIVEN,
|
|
159
|
+
show_document_navigator: Optional[bool] | NotGiven = NOT_GIVEN,
|
|
160
|
+
show_help_page: Optional[bool] | NotGiven = NOT_GIVEN,
|
|
161
|
+
show_invite_tab: Optional[bool] | NotGiven = NOT_GIVEN,
|
|
162
|
+
show_security_settings: Optional[bool] | NotGiven = NOT_GIVEN,
|
|
163
|
+
show_smart_search: Optional[bool] | NotGiven = NOT_GIVEN,
|
|
164
|
+
show_thread_visualization: Optional[bool] | NotGiven = NOT_GIVEN,
|
|
165
|
+
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
166
|
+
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
167
|
+
extra_headers: Headers | None = None,
|
|
168
|
+
extra_query: Query | None = None,
|
|
169
|
+
extra_body: Body | None = None,
|
|
170
|
+
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
|
171
|
+
) -> None:
|
|
172
|
+
"""
|
|
173
|
+
Update user's settings (merge with existing).
|
|
174
|
+
|
|
175
|
+
Args:
|
|
176
|
+
extra_headers: Send extra headers
|
|
177
|
+
|
|
178
|
+
extra_query: Add additional query parameters to the request
|
|
179
|
+
|
|
180
|
+
extra_body: Add additional JSON properties to the request
|
|
181
|
+
|
|
182
|
+
timeout: Override the client-level default timeout for this request, in seconds
|
|
183
|
+
"""
|
|
184
|
+
extra_headers = {"Accept": "*/*", **(extra_headers or {})}
|
|
185
|
+
return await self._patch(
|
|
186
|
+
"/api/user/settings",
|
|
187
|
+
body=await async_maybe_transform(
|
|
188
|
+
{
|
|
189
|
+
"pinned_workspaces": pinned_workspaces,
|
|
190
|
+
"show_document_navigator": show_document_navigator,
|
|
191
|
+
"show_help_page": show_help_page,
|
|
192
|
+
"show_invite_tab": show_invite_tab,
|
|
193
|
+
"show_security_settings": show_security_settings,
|
|
194
|
+
"show_smart_search": show_smart_search,
|
|
195
|
+
"show_thread_visualization": show_thread_visualization,
|
|
196
|
+
},
|
|
197
|
+
setting_update_params.SettingUpdateParams,
|
|
198
|
+
),
|
|
199
|
+
options=make_request_options(
|
|
200
|
+
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
|
201
|
+
),
|
|
202
|
+
cast_to=NoneType,
|
|
203
|
+
)
|
|
204
|
+
|
|
205
|
+
|
|
206
|
+
class SettingsResourceWithRawResponse:
|
|
207
|
+
def __init__(self, settings: SettingsResource) -> None:
|
|
208
|
+
self._settings = settings
|
|
209
|
+
|
|
210
|
+
self.retrieve = to_raw_response_wrapper(
|
|
211
|
+
settings.retrieve,
|
|
212
|
+
)
|
|
213
|
+
self.update = to_raw_response_wrapper(
|
|
214
|
+
settings.update,
|
|
215
|
+
)
|
|
216
|
+
|
|
217
|
+
|
|
218
|
+
class AsyncSettingsResourceWithRawResponse:
|
|
219
|
+
def __init__(self, settings: AsyncSettingsResource) -> None:
|
|
220
|
+
self._settings = settings
|
|
221
|
+
|
|
222
|
+
self.retrieve = async_to_raw_response_wrapper(
|
|
223
|
+
settings.retrieve,
|
|
224
|
+
)
|
|
225
|
+
self.update = async_to_raw_response_wrapper(
|
|
226
|
+
settings.update,
|
|
227
|
+
)
|
|
228
|
+
|
|
229
|
+
|
|
230
|
+
class SettingsResourceWithStreamingResponse:
|
|
231
|
+
def __init__(self, settings: SettingsResource) -> None:
|
|
232
|
+
self._settings = settings
|
|
233
|
+
|
|
234
|
+
self.retrieve = to_streamed_response_wrapper(
|
|
235
|
+
settings.retrieve,
|
|
236
|
+
)
|
|
237
|
+
self.update = to_streamed_response_wrapper(
|
|
238
|
+
settings.update,
|
|
239
|
+
)
|
|
240
|
+
|
|
241
|
+
|
|
242
|
+
class AsyncSettingsResourceWithStreamingResponse:
|
|
243
|
+
def __init__(self, settings: AsyncSettingsResource) -> None:
|
|
244
|
+
self._settings = settings
|
|
245
|
+
|
|
246
|
+
self.retrieve = async_to_streamed_response_wrapper(
|
|
247
|
+
settings.retrieve,
|
|
248
|
+
)
|
|
249
|
+
self.update = async_to_streamed_response_wrapper(
|
|
250
|
+
settings.update,
|
|
251
|
+
)
|