arbi 0.1.0__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.
- arbi/__init__.py +3 -1
- arbi/_base_client.py +12 -12
- arbi/_client.py +8 -8
- arbi/_compat.py +48 -48
- arbi/_models.py +51 -45
- arbi/_qs.py +7 -7
- arbi/_types.py +53 -12
- arbi/_utils/__init__.py +9 -2
- arbi/_utils/_compat.py +45 -0
- arbi/_utils/_datetime_parse.py +136 -0
- arbi/_utils/_transform.py +13 -3
- arbi/_utils/_typing.py +6 -1
- arbi/_utils/_utils.py +4 -5
- arbi/_version.py +1 -1
- arbi/resources/api/api.py +3 -3
- arbi/resources/api/assistant.py +17 -17
- arbi/resources/api/configs.py +41 -33
- arbi/resources/api/conversation/conversation.py +11 -11
- arbi/resources/api/conversation/user.py +5 -5
- arbi/resources/api/document/annotation.py +17 -17
- arbi/resources/api/document/document.py +166 -33
- arbi/resources/api/health.py +129 -11
- arbi/resources/api/sso.py +9 -9
- arbi/resources/api/tag.py +26 -26
- arbi/resources/api/user/settings.py +28 -20
- arbi/resources/api/user/user.py +107 -16
- arbi/resources/api/workspace.py +69 -39
- arbi/types/api/__init__.py +5 -0
- arbi/types/api/assistant_query_params.py +16 -4
- arbi/types/api/assistant_retrieve_params.py +16 -4
- arbi/types/api/config_create_params.py +67 -2
- arbi/types/api/config_retrieve_response.py +98 -2
- arbi/types/api/conversation_retrieve_threads_response.py +13 -2
- arbi/types/api/document_date_extractor_llm_config.py +3 -3
- arbi/types/api/document_date_extractor_llm_config_param.py +3 -3
- arbi/types/api/document_upload_from_url_params.py +23 -0
- arbi/types/api/document_upload_params.py +3 -3
- arbi/types/api/embedder_config.py +12 -0
- arbi/types/api/embedder_config_param.py +12 -0
- arbi/types/api/health_check_app_response.py +6 -0
- arbi/types/api/health_retrieve_status_response.py +45 -0
- arbi/types/api/health_retrieve_version_response.py +8 -0
- arbi/types/api/query_llm_config.py +1 -1
- arbi/types/api/query_llm_config_param.py +1 -1
- arbi/types/api/tag_apply_to_docs_params.py +3 -2
- arbi/types/api/tag_remove_from_docs_params.py +3 -2
- arbi/types/api/title_llm_config.py +1 -1
- arbi/types/api/title_llm_config_param.py +1 -1
- arbi/types/api/user/setting_retrieve_response.py +10 -1
- arbi/types/api/user/setting_update_params.py +8 -2
- arbi/types/api/user_register_params.py +2 -0
- arbi/types/api/user_verify_email_params.py +11 -0
- arbi/types/api/user_verify_email_response.py +9 -0
- arbi/types/api/workspace_create_protected_params.py +2 -0
- arbi/types/api/workspace_response.py +2 -0
- arbi/types/api/workspace_update_params.py +2 -0
- {arbi-0.1.0.dist-info → arbi-0.2.0.dist-info}/METADATA +3 -3
- {arbi-0.1.0.dist-info → arbi-0.2.0.dist-info}/RECORD +60 -53
- {arbi-0.1.0.dist-info → arbi-0.2.0.dist-info}/WHEEL +0 -0
- {arbi-0.1.0.dist-info → arbi-0.2.0.dist-info}/licenses/LICENSE +0 -0
arbi/resources/api/workspace.py
CHANGED
|
@@ -6,7 +6,7 @@ from typing import Optional
|
|
|
6
6
|
|
|
7
7
|
import httpx
|
|
8
8
|
|
|
9
|
-
from ..._types import
|
|
9
|
+
from ..._types import Body, Omit, Query, Headers, NotGiven, omit, not_given
|
|
10
10
|
from ..._utils import maybe_transform, async_maybe_transform
|
|
11
11
|
from ..._compat import cached_property
|
|
12
12
|
from ..._resource import SyncAPIResource, AsyncAPIResource
|
|
@@ -61,19 +61,22 @@ class WorkspaceResource(SyncAPIResource):
|
|
|
61
61
|
self,
|
|
62
62
|
workspace_ext_id: str,
|
|
63
63
|
*,
|
|
64
|
-
description: Optional[str] |
|
|
65
|
-
|
|
64
|
+
description: Optional[str] | Omit = omit,
|
|
65
|
+
is_public: Optional[bool] | Omit = omit,
|
|
66
|
+
name: Optional[str] | Omit = omit,
|
|
66
67
|
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
67
68
|
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
68
69
|
extra_headers: Headers | None = None,
|
|
69
70
|
extra_query: Query | None = None,
|
|
70
71
|
extra_body: Body | None = None,
|
|
71
|
-
timeout: float | httpx.Timeout | None | NotGiven =
|
|
72
|
+
timeout: float | httpx.Timeout | None | NotGiven = not_given,
|
|
72
73
|
) -> WorkspaceResponse:
|
|
73
|
-
"""Update workspace metadata such as name or
|
|
74
|
+
"""Update workspace metadata such as name, description, or public status.
|
|
74
75
|
|
|
75
|
-
Changes
|
|
76
|
-
the database.
|
|
76
|
+
Changes
|
|
77
|
+
are persisted to the database.
|
|
78
|
+
|
|
79
|
+
Only developers can change the is_public field.
|
|
77
80
|
|
|
78
81
|
Args:
|
|
79
82
|
extra_headers: Send extra headers
|
|
@@ -91,6 +94,7 @@ class WorkspaceResource(SyncAPIResource):
|
|
|
91
94
|
body=maybe_transform(
|
|
92
95
|
{
|
|
93
96
|
"description": description,
|
|
97
|
+
"is_public": is_public,
|
|
94
98
|
"name": name,
|
|
95
99
|
},
|
|
96
100
|
workspace_update_params.WorkspaceUpdateParams,
|
|
@@ -110,7 +114,7 @@ class WorkspaceResource(SyncAPIResource):
|
|
|
110
114
|
extra_headers: Headers | None = None,
|
|
111
115
|
extra_query: Query | None = None,
|
|
112
116
|
extra_body: Body | None = None,
|
|
113
|
-
timeout: float | httpx.Timeout | None | NotGiven =
|
|
117
|
+
timeout: float | httpx.Timeout | None | NotGiven = not_given,
|
|
114
118
|
) -> WorkspaceDeleteResponse:
|
|
115
119
|
"""Delete a workspace.
|
|
116
120
|
|
|
@@ -142,19 +146,29 @@ class WorkspaceResource(SyncAPIResource):
|
|
|
142
146
|
self,
|
|
143
147
|
*,
|
|
144
148
|
name: str,
|
|
145
|
-
description: Optional[str] |
|
|
149
|
+
description: Optional[str] | Omit = omit,
|
|
150
|
+
is_public: bool | Omit = omit,
|
|
146
151
|
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
147
152
|
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
148
153
|
extra_headers: Headers | None = None,
|
|
149
154
|
extra_query: Query | None = None,
|
|
150
155
|
extra_body: Body | None = None,
|
|
151
|
-
timeout: float | httpx.Timeout | None | NotGiven =
|
|
156
|
+
timeout: float | httpx.Timeout | None | NotGiven = not_given,
|
|
152
157
|
) -> WorkspaceResponse:
|
|
153
158
|
"""Create a new workspace with encryption and access controls.
|
|
154
159
|
|
|
155
160
|
Sets up vector
|
|
156
161
|
storage and associates the creator as the initial workspace user.
|
|
157
162
|
|
|
163
|
+
Public workspaces are visible to all users and grant non-members limited access:
|
|
164
|
+
|
|
165
|
+
- Non-members can view shared documents and tags
|
|
166
|
+
- Non-members can create conversations and send messages
|
|
167
|
+
- Only members can upload documents
|
|
168
|
+
- Only members can see the member list
|
|
169
|
+
|
|
170
|
+
Only users with developer flag can create public workspaces.
|
|
171
|
+
|
|
158
172
|
Args:
|
|
159
173
|
extra_headers: Send extra headers
|
|
160
174
|
|
|
@@ -170,6 +184,7 @@ class WorkspaceResource(SyncAPIResource):
|
|
|
170
184
|
{
|
|
171
185
|
"name": name,
|
|
172
186
|
"description": description,
|
|
187
|
+
"is_public": is_public,
|
|
173
188
|
},
|
|
174
189
|
workspace_create_protected_params.WorkspaceCreateProtectedParams,
|
|
175
190
|
),
|
|
@@ -188,7 +203,7 @@ class WorkspaceResource(SyncAPIResource):
|
|
|
188
203
|
extra_headers: Headers | None = None,
|
|
189
204
|
extra_query: Query | None = None,
|
|
190
205
|
extra_body: Body | None = None,
|
|
191
|
-
timeout: float | httpx.Timeout | None | NotGiven =
|
|
206
|
+
timeout: float | httpx.Timeout | None | NotGiven = not_given,
|
|
192
207
|
) -> WorkspaceGetConversationsResponse:
|
|
193
208
|
"""
|
|
194
209
|
Retrieve conversations for a workspace where the current user is:
|
|
@@ -232,7 +247,7 @@ class WorkspaceResource(SyncAPIResource):
|
|
|
232
247
|
extra_headers: Headers | None = None,
|
|
233
248
|
extra_query: Query | None = None,
|
|
234
249
|
extra_body: Body | None = None,
|
|
235
|
-
timeout: float | httpx.Timeout | None | NotGiven =
|
|
250
|
+
timeout: float | httpx.Timeout | None | NotGiven = not_given,
|
|
236
251
|
) -> WorkspaceGetDoctagsResponse:
|
|
237
252
|
"""Get all doctags (document-tag associations) in a given workspace.
|
|
238
253
|
|
|
@@ -267,7 +282,7 @@ class WorkspaceResource(SyncAPIResource):
|
|
|
267
282
|
extra_headers: Headers | None = None,
|
|
268
283
|
extra_query: Query | None = None,
|
|
269
284
|
extra_body: Body | None = None,
|
|
270
|
-
timeout: float | httpx.Timeout | None | NotGiven =
|
|
285
|
+
timeout: float | httpx.Timeout | None | NotGiven = not_given,
|
|
271
286
|
) -> WorkspaceGetDocumentsResponse:
|
|
272
287
|
"""Retrieve all documents in a workspace with proper access controls.
|
|
273
288
|
|
|
@@ -302,7 +317,7 @@ class WorkspaceResource(SyncAPIResource):
|
|
|
302
317
|
extra_headers: Headers | None = None,
|
|
303
318
|
extra_query: Query | None = None,
|
|
304
319
|
extra_body: Body | None = None,
|
|
305
|
-
timeout: float | httpx.Timeout | None | NotGiven =
|
|
320
|
+
timeout: float | httpx.Timeout | None | NotGiven = not_given,
|
|
306
321
|
) -> WorkspaceGetStatsResponse:
|
|
307
322
|
"""
|
|
308
323
|
Retrieves conversation and document counts for a specific workspace.
|
|
@@ -335,7 +350,7 @@ class WorkspaceResource(SyncAPIResource):
|
|
|
335
350
|
extra_headers: Headers | None = None,
|
|
336
351
|
extra_query: Query | None = None,
|
|
337
352
|
extra_body: Body | None = None,
|
|
338
|
-
timeout: float | httpx.Timeout | None | NotGiven =
|
|
353
|
+
timeout: float | httpx.Timeout | None | NotGiven = not_given,
|
|
339
354
|
) -> WorkspaceGetTagsResponse:
|
|
340
355
|
"""
|
|
341
356
|
Get all tags in a given workspace created by the current user.
|
|
@@ -368,12 +383,12 @@ class WorkspaceResource(SyncAPIResource):
|
|
|
368
383
|
extra_headers: Headers | None = None,
|
|
369
384
|
extra_query: Query | None = None,
|
|
370
385
|
extra_body: Body | None = None,
|
|
371
|
-
timeout: float | httpx.Timeout | None | NotGiven =
|
|
386
|
+
timeout: float | httpx.Timeout | None | NotGiven = not_given,
|
|
372
387
|
) -> WorkspaceGetUsersResponse:
|
|
373
388
|
"""Retrieve users with access to a specific workspace.
|
|
374
389
|
|
|
375
|
-
|
|
376
|
-
|
|
390
|
+
RLS handles access control:
|
|
391
|
+
members can view private workspaces, anyone can view public workspaces.
|
|
377
392
|
|
|
378
393
|
Args:
|
|
379
394
|
extra_headers: Send extra headers
|
|
@@ -404,7 +419,7 @@ class WorkspaceResource(SyncAPIResource):
|
|
|
404
419
|
extra_headers: Headers | None = None,
|
|
405
420
|
extra_query: Query | None = None,
|
|
406
421
|
extra_body: Body | None = None,
|
|
407
|
-
timeout: float | httpx.Timeout | None | NotGiven =
|
|
422
|
+
timeout: float | httpx.Timeout | None | NotGiven = not_given,
|
|
408
423
|
) -> WorkspaceRemoveUserResponse:
|
|
409
424
|
"""
|
|
410
425
|
Remove a user from a workspace.
|
|
@@ -441,7 +456,7 @@ class WorkspaceResource(SyncAPIResource):
|
|
|
441
456
|
extra_headers: Headers | None = None,
|
|
442
457
|
extra_query: Query | None = None,
|
|
443
458
|
extra_body: Body | None = None,
|
|
444
|
-
timeout: float | httpx.Timeout | None | NotGiven =
|
|
459
|
+
timeout: float | httpx.Timeout | None | NotGiven = not_given,
|
|
445
460
|
) -> WorkspaceShareResponse:
|
|
446
461
|
"""Share a workspace with another user via their email address.
|
|
447
462
|
|
|
@@ -493,19 +508,22 @@ class AsyncWorkspaceResource(AsyncAPIResource):
|
|
|
493
508
|
self,
|
|
494
509
|
workspace_ext_id: str,
|
|
495
510
|
*,
|
|
496
|
-
description: Optional[str] |
|
|
497
|
-
|
|
511
|
+
description: Optional[str] | Omit = omit,
|
|
512
|
+
is_public: Optional[bool] | Omit = omit,
|
|
513
|
+
name: Optional[str] | Omit = omit,
|
|
498
514
|
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
499
515
|
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
500
516
|
extra_headers: Headers | None = None,
|
|
501
517
|
extra_query: Query | None = None,
|
|
502
518
|
extra_body: Body | None = None,
|
|
503
|
-
timeout: float | httpx.Timeout | None | NotGiven =
|
|
519
|
+
timeout: float | httpx.Timeout | None | NotGiven = not_given,
|
|
504
520
|
) -> WorkspaceResponse:
|
|
505
|
-
"""Update workspace metadata such as name or
|
|
521
|
+
"""Update workspace metadata such as name, description, or public status.
|
|
506
522
|
|
|
507
|
-
Changes
|
|
508
|
-
the database.
|
|
523
|
+
Changes
|
|
524
|
+
are persisted to the database.
|
|
525
|
+
|
|
526
|
+
Only developers can change the is_public field.
|
|
509
527
|
|
|
510
528
|
Args:
|
|
511
529
|
extra_headers: Send extra headers
|
|
@@ -523,6 +541,7 @@ class AsyncWorkspaceResource(AsyncAPIResource):
|
|
|
523
541
|
body=await async_maybe_transform(
|
|
524
542
|
{
|
|
525
543
|
"description": description,
|
|
544
|
+
"is_public": is_public,
|
|
526
545
|
"name": name,
|
|
527
546
|
},
|
|
528
547
|
workspace_update_params.WorkspaceUpdateParams,
|
|
@@ -542,7 +561,7 @@ class AsyncWorkspaceResource(AsyncAPIResource):
|
|
|
542
561
|
extra_headers: Headers | None = None,
|
|
543
562
|
extra_query: Query | None = None,
|
|
544
563
|
extra_body: Body | None = None,
|
|
545
|
-
timeout: float | httpx.Timeout | None | NotGiven =
|
|
564
|
+
timeout: float | httpx.Timeout | None | NotGiven = not_given,
|
|
546
565
|
) -> WorkspaceDeleteResponse:
|
|
547
566
|
"""Delete a workspace.
|
|
548
567
|
|
|
@@ -574,19 +593,29 @@ class AsyncWorkspaceResource(AsyncAPIResource):
|
|
|
574
593
|
self,
|
|
575
594
|
*,
|
|
576
595
|
name: str,
|
|
577
|
-
description: Optional[str] |
|
|
596
|
+
description: Optional[str] | Omit = omit,
|
|
597
|
+
is_public: bool | Omit = omit,
|
|
578
598
|
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
579
599
|
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
580
600
|
extra_headers: Headers | None = None,
|
|
581
601
|
extra_query: Query | None = None,
|
|
582
602
|
extra_body: Body | None = None,
|
|
583
|
-
timeout: float | httpx.Timeout | None | NotGiven =
|
|
603
|
+
timeout: float | httpx.Timeout | None | NotGiven = not_given,
|
|
584
604
|
) -> WorkspaceResponse:
|
|
585
605
|
"""Create a new workspace with encryption and access controls.
|
|
586
606
|
|
|
587
607
|
Sets up vector
|
|
588
608
|
storage and associates the creator as the initial workspace user.
|
|
589
609
|
|
|
610
|
+
Public workspaces are visible to all users and grant non-members limited access:
|
|
611
|
+
|
|
612
|
+
- Non-members can view shared documents and tags
|
|
613
|
+
- Non-members can create conversations and send messages
|
|
614
|
+
- Only members can upload documents
|
|
615
|
+
- Only members can see the member list
|
|
616
|
+
|
|
617
|
+
Only users with developer flag can create public workspaces.
|
|
618
|
+
|
|
590
619
|
Args:
|
|
591
620
|
extra_headers: Send extra headers
|
|
592
621
|
|
|
@@ -602,6 +631,7 @@ class AsyncWorkspaceResource(AsyncAPIResource):
|
|
|
602
631
|
{
|
|
603
632
|
"name": name,
|
|
604
633
|
"description": description,
|
|
634
|
+
"is_public": is_public,
|
|
605
635
|
},
|
|
606
636
|
workspace_create_protected_params.WorkspaceCreateProtectedParams,
|
|
607
637
|
),
|
|
@@ -620,7 +650,7 @@ class AsyncWorkspaceResource(AsyncAPIResource):
|
|
|
620
650
|
extra_headers: Headers | None = None,
|
|
621
651
|
extra_query: Query | None = None,
|
|
622
652
|
extra_body: Body | None = None,
|
|
623
|
-
timeout: float | httpx.Timeout | None | NotGiven =
|
|
653
|
+
timeout: float | httpx.Timeout | None | NotGiven = not_given,
|
|
624
654
|
) -> WorkspaceGetConversationsResponse:
|
|
625
655
|
"""
|
|
626
656
|
Retrieve conversations for a workspace where the current user is:
|
|
@@ -664,7 +694,7 @@ class AsyncWorkspaceResource(AsyncAPIResource):
|
|
|
664
694
|
extra_headers: Headers | None = None,
|
|
665
695
|
extra_query: Query | None = None,
|
|
666
696
|
extra_body: Body | None = None,
|
|
667
|
-
timeout: float | httpx.Timeout | None | NotGiven =
|
|
697
|
+
timeout: float | httpx.Timeout | None | NotGiven = not_given,
|
|
668
698
|
) -> WorkspaceGetDoctagsResponse:
|
|
669
699
|
"""Get all doctags (document-tag associations) in a given workspace.
|
|
670
700
|
|
|
@@ -699,7 +729,7 @@ class AsyncWorkspaceResource(AsyncAPIResource):
|
|
|
699
729
|
extra_headers: Headers | None = None,
|
|
700
730
|
extra_query: Query | None = None,
|
|
701
731
|
extra_body: Body | None = None,
|
|
702
|
-
timeout: float | httpx.Timeout | None | NotGiven =
|
|
732
|
+
timeout: float | httpx.Timeout | None | NotGiven = not_given,
|
|
703
733
|
) -> WorkspaceGetDocumentsResponse:
|
|
704
734
|
"""Retrieve all documents in a workspace with proper access controls.
|
|
705
735
|
|
|
@@ -734,7 +764,7 @@ class AsyncWorkspaceResource(AsyncAPIResource):
|
|
|
734
764
|
extra_headers: Headers | None = None,
|
|
735
765
|
extra_query: Query | None = None,
|
|
736
766
|
extra_body: Body | None = None,
|
|
737
|
-
timeout: float | httpx.Timeout | None | NotGiven =
|
|
767
|
+
timeout: float | httpx.Timeout | None | NotGiven = not_given,
|
|
738
768
|
) -> WorkspaceGetStatsResponse:
|
|
739
769
|
"""
|
|
740
770
|
Retrieves conversation and document counts for a specific workspace.
|
|
@@ -767,7 +797,7 @@ class AsyncWorkspaceResource(AsyncAPIResource):
|
|
|
767
797
|
extra_headers: Headers | None = None,
|
|
768
798
|
extra_query: Query | None = None,
|
|
769
799
|
extra_body: Body | None = None,
|
|
770
|
-
timeout: float | httpx.Timeout | None | NotGiven =
|
|
800
|
+
timeout: float | httpx.Timeout | None | NotGiven = not_given,
|
|
771
801
|
) -> WorkspaceGetTagsResponse:
|
|
772
802
|
"""
|
|
773
803
|
Get all tags in a given workspace created by the current user.
|
|
@@ -800,12 +830,12 @@ class AsyncWorkspaceResource(AsyncAPIResource):
|
|
|
800
830
|
extra_headers: Headers | None = None,
|
|
801
831
|
extra_query: Query | None = None,
|
|
802
832
|
extra_body: Body | None = None,
|
|
803
|
-
timeout: float | httpx.Timeout | None | NotGiven =
|
|
833
|
+
timeout: float | httpx.Timeout | None | NotGiven = not_given,
|
|
804
834
|
) -> WorkspaceGetUsersResponse:
|
|
805
835
|
"""Retrieve users with access to a specific workspace.
|
|
806
836
|
|
|
807
|
-
|
|
808
|
-
|
|
837
|
+
RLS handles access control:
|
|
838
|
+
members can view private workspaces, anyone can view public workspaces.
|
|
809
839
|
|
|
810
840
|
Args:
|
|
811
841
|
extra_headers: Send extra headers
|
|
@@ -836,7 +866,7 @@ class AsyncWorkspaceResource(AsyncAPIResource):
|
|
|
836
866
|
extra_headers: Headers | None = None,
|
|
837
867
|
extra_query: Query | None = None,
|
|
838
868
|
extra_body: Body | None = None,
|
|
839
|
-
timeout: float | httpx.Timeout | None | NotGiven =
|
|
869
|
+
timeout: float | httpx.Timeout | None | NotGiven = not_given,
|
|
840
870
|
) -> WorkspaceRemoveUserResponse:
|
|
841
871
|
"""
|
|
842
872
|
Remove a user from a workspace.
|
|
@@ -875,7 +905,7 @@ class AsyncWorkspaceResource(AsyncAPIResource):
|
|
|
875
905
|
extra_headers: Headers | None = None,
|
|
876
906
|
extra_query: Query | None = None,
|
|
877
907
|
extra_body: Body | None = None,
|
|
878
|
-
timeout: float | httpx.Timeout | None | NotGiven =
|
|
908
|
+
timeout: float | httpx.Timeout | None | NotGiven = not_given,
|
|
879
909
|
) -> WorkspaceShareResponse:
|
|
880
910
|
"""Share a workspace with another user via their email address.
|
|
881
911
|
|
arbi/types/api/__init__.py
CHANGED
|
@@ -45,6 +45,7 @@ from .config_retrieve_response import ConfigRetrieveResponse as ConfigRetrieveRe
|
|
|
45
45
|
from .document_delete_response import DocumentDeleteResponse as DocumentDeleteResponse
|
|
46
46
|
from .document_update_response import DocumentUpdateResponse as DocumentUpdateResponse
|
|
47
47
|
from .tag_apply_to_docs_params import TagApplyToDocsParams as TagApplyToDocsParams
|
|
48
|
+
from .user_verify_email_params import UserVerifyEmailParams as UserVerifyEmailParams
|
|
48
49
|
from .workspace_share_response import WorkspaceShareResponse as WorkspaceShareResponse
|
|
49
50
|
from .assistant_retrieve_params import AssistantRetrieveParams as AssistantRetrieveParams
|
|
50
51
|
from .health_check_app_response import HealthCheckAppResponse as HealthCheckAppResponse
|
|
@@ -52,6 +53,7 @@ from .workspace_delete_response import WorkspaceDeleteResponse as WorkspaceDelet
|
|
|
52
53
|
from .document_get_tags_response import DocumentGetTagsResponse as DocumentGetTagsResponse
|
|
53
54
|
from .health_get_models_response import HealthGetModelsResponse as HealthGetModelsResponse
|
|
54
55
|
from .tag_apply_to_docs_response import TagApplyToDocsResponse as TagApplyToDocsResponse
|
|
56
|
+
from .user_verify_email_response import UserVerifyEmailResponse as UserVerifyEmailResponse
|
|
55
57
|
from .conversation_share_response import ConversationShareResponse as ConversationShareResponse
|
|
56
58
|
from .model_citation_config_param import ModelCitationConfigParam as ModelCitationConfigParam
|
|
57
59
|
from .tag_remove_from_docs_params import TagRemoveFromDocsParams as TagRemoveFromDocsParams
|
|
@@ -69,7 +71,10 @@ from .user_list_workspaces_response import UserListWorkspacesResponse as UserLis
|
|
|
69
71
|
from .health_check_services_response import HealthCheckServicesResponse as HealthCheckServicesResponse
|
|
70
72
|
from .workspace_get_doctags_response import WorkspaceGetDoctagsResponse as WorkspaceGetDoctagsResponse
|
|
71
73
|
from .workspace_remove_user_response import WorkspaceRemoveUserResponse as WorkspaceRemoveUserResponse
|
|
74
|
+
from .document_upload_from_url_params import DocumentUploadFromURLParams as DocumentUploadFromURLParams
|
|
75
|
+
from .health_retrieve_status_response import HealthRetrieveStatusResponse as HealthRetrieveStatusResponse
|
|
72
76
|
from .conversation_update_title_params import ConversationUpdateTitleParams as ConversationUpdateTitleParams
|
|
77
|
+
from .health_retrieve_version_response import HealthRetrieveVersionResponse as HealthRetrieveVersionResponse
|
|
73
78
|
from .workspace_get_documents_response import WorkspaceGetDocumentsResponse as WorkspaceGetDocumentsResponse
|
|
74
79
|
from .workspace_create_protected_params import WorkspaceCreateProtectedParams as WorkspaceCreateProtectedParams
|
|
75
80
|
from .conversation_update_title_response import ConversationUpdateTitleResponse as ConversationUpdateTitleResponse
|
|
@@ -2,15 +2,17 @@
|
|
|
2
2
|
|
|
3
3
|
from __future__ import annotations
|
|
4
4
|
|
|
5
|
-
from typing import Dict,
|
|
5
|
+
from typing import Dict, Union, Iterable, Optional
|
|
6
6
|
from typing_extensions import Literal, Required, TypeAlias, TypedDict
|
|
7
7
|
|
|
8
|
+
from ..._types import SequenceNotStr
|
|
8
9
|
from ..chunk_param import ChunkParam
|
|
9
10
|
|
|
10
11
|
__all__ = [
|
|
11
12
|
"AssistantQueryParams",
|
|
12
13
|
"Tools",
|
|
13
14
|
"ToolsModelCitationTool",
|
|
15
|
+
"ToolsModelCitationToolToolResponses",
|
|
14
16
|
"ToolsRetrievalChunkToolInput",
|
|
15
17
|
"ToolsRetrievalFullContextToolInput",
|
|
16
18
|
]
|
|
@@ -28,12 +30,22 @@ class AssistantQueryParams(TypedDict, total=False):
|
|
|
28
30
|
tools: Dict[str, Tools]
|
|
29
31
|
|
|
30
32
|
|
|
33
|
+
class ToolsModelCitationToolToolResponses(TypedDict, total=False):
|
|
34
|
+
chunk_ids: Required[SequenceNotStr[str]]
|
|
35
|
+
|
|
36
|
+
offset_end: Required[int]
|
|
37
|
+
|
|
38
|
+
offset_start: Required[int]
|
|
39
|
+
|
|
40
|
+
statement: Required[str]
|
|
41
|
+
|
|
42
|
+
|
|
31
43
|
class ToolsModelCitationTool(TypedDict, total=False):
|
|
32
44
|
description: str
|
|
33
45
|
|
|
34
46
|
name: Literal["model_citation"]
|
|
35
47
|
|
|
36
|
-
tool_responses: Dict[str,
|
|
48
|
+
tool_responses: Dict[str, ToolsModelCitationToolToolResponses]
|
|
37
49
|
|
|
38
50
|
|
|
39
51
|
class ToolsRetrievalChunkToolInput(TypedDict, total=False):
|
|
@@ -41,7 +53,7 @@ class ToolsRetrievalChunkToolInput(TypedDict, total=False):
|
|
|
41
53
|
|
|
42
54
|
name: Literal["retrieval_chunk"]
|
|
43
55
|
|
|
44
|
-
tool_args: Dict[str,
|
|
56
|
+
tool_args: Dict[str, SequenceNotStr[str]]
|
|
45
57
|
|
|
46
58
|
tool_responses: Dict[str, Iterable[ChunkParam]]
|
|
47
59
|
|
|
@@ -51,7 +63,7 @@ class ToolsRetrievalFullContextToolInput(TypedDict, total=False):
|
|
|
51
63
|
|
|
52
64
|
name: Literal["retrieval_full_context"]
|
|
53
65
|
|
|
54
|
-
tool_args: Dict[str,
|
|
66
|
+
tool_args: Dict[str, object]
|
|
55
67
|
|
|
56
68
|
tool_responses: Dict[str, Iterable[ChunkParam]]
|
|
57
69
|
|
|
@@ -2,15 +2,17 @@
|
|
|
2
2
|
|
|
3
3
|
from __future__ import annotations
|
|
4
4
|
|
|
5
|
-
from typing import Dict,
|
|
5
|
+
from typing import Dict, Union, Iterable, Optional
|
|
6
6
|
from typing_extensions import Literal, Required, TypeAlias, TypedDict
|
|
7
7
|
|
|
8
|
+
from ..._types import SequenceNotStr
|
|
8
9
|
from ..chunk_param import ChunkParam
|
|
9
10
|
|
|
10
11
|
__all__ = [
|
|
11
12
|
"AssistantRetrieveParams",
|
|
12
13
|
"Tools",
|
|
13
14
|
"ToolsModelCitationTool",
|
|
15
|
+
"ToolsModelCitationToolToolResponses",
|
|
14
16
|
"ToolsRetrievalChunkToolInput",
|
|
15
17
|
"ToolsRetrievalFullContextToolInput",
|
|
16
18
|
]
|
|
@@ -28,12 +30,22 @@ class AssistantRetrieveParams(TypedDict, total=False):
|
|
|
28
30
|
tools: Dict[str, Tools]
|
|
29
31
|
|
|
30
32
|
|
|
33
|
+
class ToolsModelCitationToolToolResponses(TypedDict, total=False):
|
|
34
|
+
chunk_ids: Required[SequenceNotStr[str]]
|
|
35
|
+
|
|
36
|
+
offset_end: Required[int]
|
|
37
|
+
|
|
38
|
+
offset_start: Required[int]
|
|
39
|
+
|
|
40
|
+
statement: Required[str]
|
|
41
|
+
|
|
42
|
+
|
|
31
43
|
class ToolsModelCitationTool(TypedDict, total=False):
|
|
32
44
|
description: str
|
|
33
45
|
|
|
34
46
|
name: Literal["model_citation"]
|
|
35
47
|
|
|
36
|
-
tool_responses: Dict[str,
|
|
48
|
+
tool_responses: Dict[str, ToolsModelCitationToolToolResponses]
|
|
37
49
|
|
|
38
50
|
|
|
39
51
|
class ToolsRetrievalChunkToolInput(TypedDict, total=False):
|
|
@@ -41,7 +53,7 @@ class ToolsRetrievalChunkToolInput(TypedDict, total=False):
|
|
|
41
53
|
|
|
42
54
|
name: Literal["retrieval_chunk"]
|
|
43
55
|
|
|
44
|
-
tool_args: Dict[str,
|
|
56
|
+
tool_args: Dict[str, SequenceNotStr[str]]
|
|
45
57
|
|
|
46
58
|
tool_responses: Dict[str, Iterable[ChunkParam]]
|
|
47
59
|
|
|
@@ -51,7 +63,7 @@ class ToolsRetrievalFullContextToolInput(TypedDict, total=False):
|
|
|
51
63
|
|
|
52
64
|
name: Literal["retrieval_full_context"]
|
|
53
65
|
|
|
54
|
-
tool_args: Dict[str,
|
|
66
|
+
tool_args: Dict[str, object]
|
|
55
67
|
|
|
56
68
|
tool_responses: Dict[str, Iterable[ChunkParam]]
|
|
57
69
|
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
from __future__ import annotations
|
|
4
4
|
|
|
5
5
|
from typing import Optional
|
|
6
|
-
from typing_extensions import Annotated, TypedDict
|
|
6
|
+
from typing_extensions import Literal, Annotated, TypedDict
|
|
7
7
|
|
|
8
8
|
from ..._utils import PropertyInfo
|
|
9
9
|
from .parser_config_param import ParserConfigParam
|
|
@@ -16,10 +16,14 @@ from .title_llm_config_param import TitleLlmConfigParam
|
|
|
16
16
|
from .model_citation_config_param import ModelCitationConfigParam
|
|
17
17
|
from .document_date_extractor_llm_config_param import DocumentDateExtractorLlmConfigParam
|
|
18
18
|
|
|
19
|
-
__all__ = ["ConfigCreateParams"]
|
|
19
|
+
__all__ = ["ConfigCreateParams", "AgentLlm", "Agents"]
|
|
20
20
|
|
|
21
21
|
|
|
22
22
|
class ConfigCreateParams(TypedDict, total=False):
|
|
23
|
+
agent_llm: Annotated[Optional[AgentLlm], PropertyInfo(alias="AgentLLM")]
|
|
24
|
+
|
|
25
|
+
agents: Annotated[Optional[Agents], PropertyInfo(alias="Agents")]
|
|
26
|
+
|
|
23
27
|
chunker: Annotated[Optional[ChunkerConfigParam], PropertyInfo(alias="Chunker")]
|
|
24
28
|
|
|
25
29
|
document_date_extractor_llm: Annotated[
|
|
@@ -43,3 +47,64 @@ class ConfigCreateParams(TypedDict, total=False):
|
|
|
43
47
|
title: str
|
|
44
48
|
|
|
45
49
|
title_llm: Annotated[Optional[TitleLlmConfigParam], PropertyInfo(alias="TitleLLM")]
|
|
50
|
+
|
|
51
|
+
|
|
52
|
+
class AgentLlm(TypedDict, total=False):
|
|
53
|
+
api_type: Annotated[Literal["local", "remote"], PropertyInfo(alias="API_TYPE")]
|
|
54
|
+
"""The inference type (local or remote)."""
|
|
55
|
+
|
|
56
|
+
enabled: Annotated[bool, PropertyInfo(alias="ENABLED")]
|
|
57
|
+
"""Whether to use agent mode for queries."""
|
|
58
|
+
|
|
59
|
+
max_char_size_to_answer: Annotated[int, PropertyInfo(alias="MAX_CHAR_SIZE_TO_ANSWER")]
|
|
60
|
+
"""Maximum character size for history."""
|
|
61
|
+
|
|
62
|
+
max_context_tokens: Annotated[int, PropertyInfo(alias="MAX_CONTEXT_TOKENS")]
|
|
63
|
+
"""
|
|
64
|
+
Maximum tokens for gathered context (applies to evidence buffer and final
|
|
65
|
+
query).
|
|
66
|
+
"""
|
|
67
|
+
|
|
68
|
+
max_iterations: Annotated[int, PropertyInfo(alias="MAX_ITERATIONS")]
|
|
69
|
+
"""Maximum agent loop iterations."""
|
|
70
|
+
|
|
71
|
+
max_tokens: Annotated[int, PropertyInfo(alias="MAX_TOKENS")]
|
|
72
|
+
"""Maximum tokens for planning decisions."""
|
|
73
|
+
|
|
74
|
+
model_name: Annotated[str, PropertyInfo(alias="MODEL_NAME")]
|
|
75
|
+
"""The name of the model to be used."""
|
|
76
|
+
|
|
77
|
+
show_interim_steps: Annotated[bool, PropertyInfo(alias="SHOW_INTERIM_STEPS")]
|
|
78
|
+
"""Whether to show agent's intermediate steps."""
|
|
79
|
+
|
|
80
|
+
system_instruction: Annotated[str, PropertyInfo(alias="SYSTEM_INSTRUCTION")]
|
|
81
|
+
"""The system instruction for agent planning."""
|
|
82
|
+
|
|
83
|
+
temperature: Annotated[float, PropertyInfo(alias="TEMPERATURE")]
|
|
84
|
+
"""Temperature for agent decisions."""
|
|
85
|
+
|
|
86
|
+
|
|
87
|
+
class Agents(TypedDict, total=False):
|
|
88
|
+
agent_model_name: Annotated[str, PropertyInfo(alias="AGENT_MODEL_NAME")]
|
|
89
|
+
"""The name of the model to be used for the agent."""
|
|
90
|
+
|
|
91
|
+
agent_prompt: Annotated[str, PropertyInfo(alias="AGENT_PROMPT")]
|
|
92
|
+
|
|
93
|
+
enabled: Annotated[bool, PropertyInfo(alias="ENABLED")]
|
|
94
|
+
"""Whether to use agents mode for queries."""
|
|
95
|
+
|
|
96
|
+
llm_page_filter_model_name: Annotated[str, PropertyInfo(alias="LLM_PAGE_FILTER_MODEL_NAME")]
|
|
97
|
+
"""The name of the model to be used for the llm page filter model."""
|
|
98
|
+
|
|
99
|
+
llm_page_filter_prompt: Annotated[str, PropertyInfo(alias="LLM_PAGE_FILTER_PROMPT")]
|
|
100
|
+
|
|
101
|
+
llm_page_filter_temperature: Annotated[float, PropertyInfo(alias="LLM_PAGE_FILTER_TEMPERATURE")]
|
|
102
|
+
"""Temperature value for randomness."""
|
|
103
|
+
|
|
104
|
+
llm_summarise_model_name: Annotated[str, PropertyInfo(alias="LLM_SUMMARISE_MODEL_NAME")]
|
|
105
|
+
"""The name of the model to be used for the llm summarise model."""
|
|
106
|
+
|
|
107
|
+
llm_summarise_prompt: Annotated[str, PropertyInfo(alias="LLM_SUMMARISE_PROMPT")]
|
|
108
|
+
|
|
109
|
+
llm_summarise_temperature: Annotated[float, PropertyInfo(alias="LLM_SUMMARISE_TEMPERATURE")]
|
|
110
|
+
"""Temperature value for randomness."""
|