arbi 0.2.1__py3-none-any.whl → 0.3.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 (47) hide show
  1. arbi/_streaming.py +4 -6
  2. arbi/_version.py +1 -1
  3. arbi/resources/api/__init__.py +0 -14
  4. arbi/resources/api/api.py +0 -32
  5. arbi/resources/api/assistant.py +9 -1
  6. arbi/resources/api/conversation/conversation.py +87 -2
  7. arbi/resources/api/document/annotation.py +9 -1
  8. arbi/resources/api/document/document.py +39 -1
  9. arbi/resources/api/tag.py +13 -1
  10. arbi/resources/api/user/user.py +397 -134
  11. arbi/resources/api/workspace.py +202 -12
  12. arbi/types/api/__init__.py +12 -7
  13. arbi/types/api/assistant_query_params.py +22 -2
  14. arbi/types/api/assistant_retrieve_params.py +22 -2
  15. arbi/types/api/conversation_retrieve_message_response.py +99 -0
  16. arbi/types/api/conversation_retrieve_threads_response.py +16 -0
  17. arbi/types/api/document/annotation_create_params.py +5 -1
  18. arbi/types/api/document/annotation_update_params.py +5 -1
  19. arbi/types/api/document_update_params.py +2 -0
  20. arbi/types/api/document_upload_from_url_params.py +4 -1
  21. arbi/types/api/document_upload_params.py +4 -1
  22. arbi/types/api/document_view_params.py +5 -1
  23. arbi/types/api/tag_create_params.py +5 -1
  24. arbi/types/api/tag_update_params.py +5 -1
  25. arbi/types/api/user_change_password_params.py +16 -0
  26. arbi/types/api/{sso_rotate_passcode_response.py → user_change_password_response.py} +3 -3
  27. arbi/types/api/{sso_login_params.py → user_check_sso_status_params.py} +3 -6
  28. arbi/types/api/{user_response.py → user_check_sso_status_response.py} +4 -6
  29. arbi/types/api/{sso_invite_params.py → user_invite_params.py} +2 -2
  30. arbi/types/api/{sso_invite_response.py → user_invite_response.py} +2 -4
  31. arbi/types/api/user_login_params.py +4 -1
  32. arbi/types/api/user_login_response.py +8 -0
  33. arbi/types/api/user_register_params.py +5 -4
  34. arbi/types/api/workspace_copy_params.py +21 -0
  35. arbi/types/api/workspace_copy_response.py +25 -0
  36. arbi/types/api/workspace_get_stats_response.py +6 -2
  37. arbi/types/api/workspace_get_users_response.py +5 -1
  38. arbi/types/api/workspace_response.py +24 -2
  39. arbi/types/api/workspace_share_params.py +5 -1
  40. arbi/types/api/workspace_update_params.py +5 -1
  41. {arbi-0.2.1.dist-info → arbi-0.3.0.dist-info}/METADATA +1 -1
  42. {arbi-0.2.1.dist-info → arbi-0.3.0.dist-info}/RECORD +44 -42
  43. arbi/resources/api/sso.py +0 -333
  44. arbi/types/api/sso_login_response.py +0 -15
  45. arbi/types/api/token.py +0 -13
  46. {arbi-0.2.1.dist-info → arbi-0.3.0.dist-info}/WHEEL +0 -0
  47. {arbi-0.2.1.dist-info → arbi-0.3.0.dist-info}/licenses/LICENSE +0 -0
@@ -0,0 +1,99 @@
1
+ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
+
3
+ from typing import Dict, List, Union, Optional
4
+ from datetime import datetime
5
+ from typing_extensions import Literal, Annotated, TypeAlias
6
+
7
+ from ..chunk import Chunk
8
+ from ..._utils import PropertyInfo
9
+ from ..._models import BaseModel
10
+
11
+ __all__ = [
12
+ "ConversationRetrieveMessageResponse",
13
+ "Tools",
14
+ "ToolsModelCitationTool",
15
+ "ToolsModelCitationToolToolResponses",
16
+ "ToolsRetrievalChunkToolOutput",
17
+ "ToolsRetrievalFullContextToolOutput",
18
+ "ToolsTraceTool",
19
+ ]
20
+
21
+
22
+ class ToolsModelCitationToolToolResponses(BaseModel):
23
+ chunk_ids: List[str]
24
+
25
+ offset_end: int
26
+
27
+ offset_start: int
28
+
29
+ statement: str
30
+
31
+
32
+ class ToolsModelCitationTool(BaseModel):
33
+ description: Optional[str] = None
34
+
35
+ name: Optional[Literal["model_citation"]] = None
36
+
37
+ tool_responses: Optional[Dict[str, ToolsModelCitationToolToolResponses]] = None
38
+
39
+
40
+ class ToolsRetrievalChunkToolOutput(BaseModel):
41
+ description: Optional[str] = None
42
+
43
+ name: Optional[Literal["retrieval_chunk"]] = None
44
+
45
+ tool_args: Optional[Dict[str, List[str]]] = None
46
+
47
+ tool_responses: Optional[Dict[str, List[Chunk]]] = None
48
+
49
+
50
+ class ToolsRetrievalFullContextToolOutput(BaseModel):
51
+ description: Optional[str] = None
52
+
53
+ name: Optional[Literal["retrieval_full_context"]] = None
54
+
55
+ tool_args: Optional[Dict[str, object]] = None
56
+
57
+ tool_responses: Optional[Dict[str, List[Chunk]]] = None
58
+
59
+
60
+ class ToolsTraceTool(BaseModel):
61
+ description: Optional[str] = None
62
+
63
+ duration_seconds: Optional[float] = None
64
+
65
+ name: Optional[Literal["trace"]] = None
66
+
67
+ start_time: Optional[float] = None
68
+
69
+ steps: Optional[List[Dict[str, object]]] = None
70
+
71
+ trace_id: Optional[str] = None
72
+
73
+
74
+ Tools: TypeAlias = Annotated[
75
+ Union[ToolsModelCitationTool, ToolsRetrievalChunkToolOutput, ToolsRetrievalFullContextToolOutput, ToolsTraceTool],
76
+ PropertyInfo(discriminator="name"),
77
+ ]
78
+
79
+
80
+ class ConversationRetrieveMessageResponse(BaseModel):
81
+ content: str
82
+
83
+ conversation_ext_id: str
84
+
85
+ created_at: datetime
86
+
87
+ created_by_ext_id: str
88
+
89
+ external_id: str
90
+
91
+ role: Literal["user", "assistant", "system"]
92
+
93
+ config_ext_id: Optional[str] = None
94
+
95
+ parent_message_ext_id: Optional[str] = None
96
+
97
+ shared: Optional[bool] = None
98
+
99
+ tools: Optional[Dict[str, Tools]] = None
@@ -17,6 +17,7 @@ __all__ = [
17
17
  "ThreadHistoryToolsModelCitationToolToolResponses",
18
18
  "ThreadHistoryToolsRetrievalChunkToolOutput",
19
19
  "ThreadHistoryToolsRetrievalFullContextToolOutput",
20
+ "ThreadHistoryToolsTraceTool",
20
21
  ]
21
22
 
22
23
 
@@ -58,11 +59,26 @@ class ThreadHistoryToolsRetrievalFullContextToolOutput(BaseModel):
58
59
  tool_responses: Optional[Dict[str, List[Chunk]]] = None
59
60
 
60
61
 
62
+ class ThreadHistoryToolsTraceTool(BaseModel):
63
+ description: Optional[str] = None
64
+
65
+ duration_seconds: Optional[float] = None
66
+
67
+ name: Optional[Literal["trace"]] = None
68
+
69
+ start_time: Optional[float] = None
70
+
71
+ steps: Optional[List[Dict[str, object]]] = None
72
+
73
+ trace_id: Optional[str] = None
74
+
75
+
61
76
  ThreadHistoryTools: TypeAlias = Annotated[
62
77
  Union[
63
78
  ThreadHistoryToolsModelCitationTool,
64
79
  ThreadHistoryToolsRetrievalChunkToolOutput,
65
80
  ThreadHistoryToolsRetrievalFullContextToolOutput,
81
+ ThreadHistoryToolsTraceTool,
66
82
  ],
67
83
  PropertyInfo(discriminator="name"),
68
84
  ]
@@ -3,7 +3,9 @@
3
3
  from __future__ import annotations
4
4
 
5
5
  from typing import Optional
6
- from typing_extensions import TypedDict
6
+ from typing_extensions import Annotated, TypedDict
7
+
8
+ from ...._utils import PropertyInfo
7
9
 
8
10
  __all__ = ["AnnotationCreateParams"]
9
11
 
@@ -14,3 +16,5 @@ class AnnotationCreateParams(TypedDict, total=False):
14
16
  page_ref: Optional[int]
15
17
 
16
18
  tag_name: Optional[str]
19
+
20
+ workspace_key: Annotated[str, PropertyInfo(alias="workspace-key")]
@@ -3,7 +3,9 @@
3
3
  from __future__ import annotations
4
4
 
5
5
  from typing import Optional
6
- from typing_extensions import Required, TypedDict
6
+ from typing_extensions import Required, Annotated, TypedDict
7
+
8
+ from ...._utils import PropertyInfo
7
9
 
8
10
  __all__ = ["AnnotationUpdateParams"]
9
11
 
@@ -14,3 +16,5 @@ class AnnotationUpdateParams(TypedDict, total=False):
14
16
  note: Optional[str]
15
17
 
16
18
  page_ref: Optional[int]
19
+
20
+ workspace_key: Annotated[str, PropertyInfo(alias="workspace-key")]
@@ -17,3 +17,5 @@ class DocumentUpdateParams(TypedDict, total=False):
17
17
  shared: Optional[bool]
18
18
 
19
19
  title: Optional[str]
20
+
21
+ workspace_key: Annotated[str, PropertyInfo(alias="workspace-key")]
@@ -3,9 +3,10 @@
3
3
  from __future__ import annotations
4
4
 
5
5
  from typing import Optional
6
- from typing_extensions import Required, TypedDict
6
+ from typing_extensions import Required, Annotated, TypedDict
7
7
 
8
8
  from ..._types import SequenceNotStr
9
+ from ..._utils import PropertyInfo
9
10
 
10
11
  __all__ = ["DocumentUploadFromURLParams"]
11
12
 
@@ -21,3 +22,5 @@ class DocumentUploadFromURLParams(TypedDict, total=False):
21
22
 
22
23
  shared: bool
23
24
  """Whether the document should be shared with workspace members"""
25
+
26
+ workspace_key: Annotated[str, PropertyInfo(alias="workspace-key")]
@@ -3,9 +3,10 @@
3
3
  from __future__ import annotations
4
4
 
5
5
  from typing import Optional
6
- from typing_extensions import Required, TypedDict
6
+ from typing_extensions import Required, Annotated, TypedDict
7
7
 
8
8
  from ..._types import FileTypes, SequenceNotStr
9
+ from ..._utils import PropertyInfo
9
10
 
10
11
  __all__ = ["DocumentUploadParams"]
11
12
 
@@ -21,3 +22,5 @@ class DocumentUploadParams(TypedDict, total=False):
21
22
 
22
23
  shared: bool
23
24
  """Whether the document should be shared with workspace members"""
25
+
26
+ workspace_key: Annotated[str, PropertyInfo(alias="workspace-key")]
@@ -3,7 +3,9 @@
3
3
  from __future__ import annotations
4
4
 
5
5
  from typing import Optional
6
- from typing_extensions import TypedDict
6
+ from typing_extensions import Annotated, TypedDict
7
+
8
+ from ..._utils import PropertyInfo
7
9
 
8
10
  __all__ = ["DocumentViewParams"]
9
11
 
@@ -11,3 +13,5 @@ __all__ = ["DocumentViewParams"]
11
13
  class DocumentViewParams(TypedDict, total=False):
12
14
  page: Optional[int]
13
15
  """Optional page to open on load"""
16
+
17
+ workspace_key: Annotated[str, PropertyInfo(alias="workspace-key")]
@@ -3,7 +3,9 @@
3
3
  from __future__ import annotations
4
4
 
5
5
  from typing import Optional
6
- from typing_extensions import Required, TypedDict
6
+ from typing_extensions import Required, Annotated, TypedDict
7
+
8
+ from ..._utils import PropertyInfo
7
9
 
8
10
  __all__ = ["TagCreateParams"]
9
11
 
@@ -16,3 +18,5 @@ class TagCreateParams(TypedDict, total=False):
16
18
  parent_ext_id: Optional[str]
17
19
 
18
20
  shared: Optional[bool]
21
+
22
+ workspace_key: Annotated[str, PropertyInfo(alias="workspace-key")]
@@ -3,7 +3,9 @@
3
3
  from __future__ import annotations
4
4
 
5
5
  from typing import Optional
6
- from typing_extensions import TypedDict
6
+ from typing_extensions import Annotated, TypedDict
7
+
8
+ from ..._utils import PropertyInfo
7
9
 
8
10
  __all__ = ["TagUpdateParams"]
9
11
 
@@ -12,3 +14,5 @@ class TagUpdateParams(TypedDict, total=False):
12
14
  name: Optional[str]
13
15
 
14
16
  shared: Optional[bool]
17
+
18
+ workspace_key: Annotated[str, PropertyInfo(alias="workspace-key")]
@@ -0,0 +1,16 @@
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 Dict
6
+ from typing_extensions import Required, TypedDict
7
+
8
+ __all__ = ["UserChangePasswordParams"]
9
+
10
+
11
+ class UserChangePasswordParams(TypedDict, total=False):
12
+ current_public_key: Required[str]
13
+
14
+ new_public_key: Required[str]
15
+
16
+ rewrapped_workspace_keys: Required[Dict[str, str]]
@@ -2,10 +2,10 @@
2
2
 
3
3
  from ..._models import BaseModel
4
4
 
5
- __all__ = ["SSORotatePasscodeResponse"]
5
+ __all__ = ["UserChangePasswordResponse"]
6
6
 
7
7
 
8
- class SSORotatePasscodeResponse(BaseModel):
8
+ class UserChangePasswordResponse(BaseModel):
9
9
  detail: str
10
10
 
11
- new_passcode: str
11
+ workspaces_updated: int
@@ -2,15 +2,12 @@
2
2
 
3
3
  from __future__ import annotations
4
4
 
5
- from typing import Optional
6
5
  from typing_extensions import Required, TypedDict
7
6
 
8
- __all__ = ["SSOLoginParams"]
7
+ __all__ = ["UserCheckSSOStatusParams"]
9
8
 
10
9
 
11
- class SSOLoginParams(TypedDict, total=False):
12
- token: Required[str]
13
-
10
+ class UserCheckSSOStatusParams(TypedDict, total=False):
14
11
  email: Required[str]
15
12
 
16
- passcode: Optional[str]
13
+ sso_token: Required[str]
@@ -4,16 +4,14 @@ from typing import Optional
4
4
 
5
5
  from ..._models import BaseModel
6
6
 
7
- __all__ = ["UserResponse"]
7
+ __all__ = ["UserCheckSSOStatusResponse"]
8
8
 
9
9
 
10
- class UserResponse(BaseModel):
11
- email: Optional[str] = None
10
+ class UserCheckSSOStatusResponse(BaseModel):
11
+ email: str
12
12
 
13
- external_id: Optional[str] = None
13
+ status: str
14
14
 
15
15
  last_name: Optional[str] = None
16
16
 
17
17
  name: Optional[str] = None
18
-
19
- public_key: Optional[str] = None
@@ -4,8 +4,8 @@ from __future__ import annotations
4
4
 
5
5
  from typing_extensions import Required, TypedDict
6
6
 
7
- __all__ = ["SSOInviteParams"]
7
+ __all__ = ["UserInviteParams"]
8
8
 
9
9
 
10
- class SSOInviteParams(TypedDict, total=False):
10
+ class UserInviteParams(TypedDict, total=False):
11
11
  email: Required[str]
@@ -2,10 +2,8 @@
2
2
 
3
3
  from ..._models import BaseModel
4
4
 
5
- __all__ = ["SSOInviteResponse"]
5
+ __all__ = ["UserInviteResponse"]
6
6
 
7
7
 
8
- class SSOInviteResponse(BaseModel):
8
+ class UserInviteResponse(BaseModel):
9
9
  detail: str
10
-
11
- user_ext_id: str
@@ -2,6 +2,7 @@
2
2
 
3
3
  from __future__ import annotations
4
4
 
5
+ from typing import Optional
5
6
  from typing_extensions import Required, TypedDict
6
7
 
7
8
  __all__ = ["UserLoginParams"]
@@ -10,4 +11,6 @@ __all__ = ["UserLoginParams"]
10
11
  class UserLoginParams(TypedDict, total=False):
11
12
  email: Required[str]
12
13
 
13
- password: Required[str]
14
+ public_key: Required[str]
15
+
16
+ sso_token: Optional[str]
@@ -0,0 +1,8 @@
1
+ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
+
3
+ from typing import Dict
4
+ from typing_extensions import TypeAlias
5
+
6
+ __all__ = ["UserLoginResponse"]
7
+
8
+ UserLoginResponse: TypeAlias = Dict[str, object]
@@ -2,6 +2,7 @@
2
2
 
3
3
  from __future__ import annotations
4
4
 
5
+ from typing import Optional
5
6
  from typing_extensions import Required, TypedDict
6
7
 
7
8
  __all__ = ["UserRegisterParams"]
@@ -10,10 +11,10 @@ __all__ = ["UserRegisterParams"]
10
11
  class UserRegisterParams(TypedDict, total=False):
11
12
  email: Required[str]
12
13
 
13
- last_name: Required[str]
14
+ public_key: Required[str]
14
15
 
15
- name: Required[str]
16
+ verification_credential: Required[str]
16
17
 
17
- password: Required[str]
18
+ last_name: Optional[str]
18
19
 
19
- verification_code: Required[str]
20
+ name: Optional[str]
@@ -0,0 +1,21 @@
1
+ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
+
3
+ from __future__ import annotations
4
+
5
+ from typing_extensions import Required, Annotated, TypedDict
6
+
7
+ from ..._types import SequenceNotStr
8
+ from ..._utils import PropertyInfo
9
+
10
+ __all__ = ["WorkspaceCopyParams"]
11
+
12
+
13
+ class WorkspaceCopyParams(TypedDict, total=False):
14
+ items: Required[SequenceNotStr[str]]
15
+ """List of document external IDs to copy (e.g., ['doc-a1b2c3d4', 'doc-e5f6g7h8'])"""
16
+
17
+ target_workspace_ext_id: Required[str]
18
+
19
+ target_workspace_key: Annotated[str, PropertyInfo(alias="target-workspace-key")]
20
+
21
+ workspace_key: Annotated[str, PropertyInfo(alias="workspace-key")]
@@ -0,0 +1,25 @@
1
+ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
+
3
+ from typing import List, Optional
4
+
5
+ from ..._models import BaseModel
6
+
7
+ __all__ = ["WorkspaceCopyResponse", "Result"]
8
+
9
+
10
+ class Result(BaseModel):
11
+ source_doc_ext_id: str
12
+
13
+ success: bool
14
+
15
+ error: Optional[str] = None
16
+
17
+ new_doc_ext_id: Optional[str] = None
18
+
19
+
20
+ class WorkspaceCopyResponse(BaseModel):
21
+ detail: str
22
+
23
+ documents_copied: Optional[int] = None
24
+
25
+ results: Optional[List[Result]] = None
@@ -8,6 +8,10 @@ __all__ = ["WorkspaceGetStatsResponse"]
8
8
 
9
9
 
10
10
  class WorkspaceGetStatsResponse(BaseModel):
11
- conversation_count: Optional[int] = None
11
+ private_conversation_count: Optional[int] = None
12
12
 
13
- document_count: Optional[int] = None
13
+ private_document_count: Optional[int] = None
14
+
15
+ shared_conversation_count: Optional[int] = None
16
+
17
+ shared_document_count: Optional[int] = None
@@ -9,7 +9,11 @@ __all__ = ["WorkspaceGetUsersResponse", "WorkspaceGetUsersResponseItem"]
9
9
 
10
10
 
11
11
  class WorkspaceGetUsersResponseItem(BaseModel):
12
- user_email: str
12
+ email: str
13
+
14
+ last_name: str
15
+
16
+ name: str
13
17
 
14
18
  user_ext_id: str
15
19
 
@@ -1,11 +1,21 @@
1
1
  # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
2
 
3
- from typing import Optional
3
+ from typing import List, Optional
4
4
  from datetime import datetime
5
5
 
6
6
  from ..._models import BaseModel
7
7
 
8
- __all__ = ["WorkspaceResponse"]
8
+ __all__ = ["WorkspaceResponse", "User"]
9
+
10
+
11
+ class User(BaseModel):
12
+ email: str
13
+
14
+ last_name: str
15
+
16
+ name: str
17
+
18
+ user_ext_id: str
9
19
 
10
20
 
11
21
  class WorkspaceResponse(BaseModel):
@@ -24,3 +34,15 @@ class WorkspaceResponse(BaseModel):
24
34
  updated_at: datetime
25
35
 
26
36
  updated_by_ext_id: Optional[str] = None
37
+
38
+ private_conversation_count: Optional[int] = None
39
+
40
+ private_document_count: Optional[int] = None
41
+
42
+ shared_conversation_count: Optional[int] = None
43
+
44
+ shared_document_count: Optional[int] = None
45
+
46
+ users: Optional[List[User]] = None
47
+
48
+ wrapped_key: Optional[str] = None
@@ -2,10 +2,14 @@
2
2
 
3
3
  from __future__ import annotations
4
4
 
5
- from typing_extensions import Required, TypedDict
5
+ from typing_extensions import Required, Annotated, TypedDict
6
+
7
+ from ..._utils import PropertyInfo
6
8
 
7
9
  __all__ = ["WorkspaceShareParams"]
8
10
 
9
11
 
10
12
  class WorkspaceShareParams(TypedDict, total=False):
11
13
  recipient_email: Required[str]
14
+
15
+ workspace_key: Annotated[str, PropertyInfo(alias="workspace-key")]
@@ -3,7 +3,9 @@
3
3
  from __future__ import annotations
4
4
 
5
5
  from typing import Optional
6
- from typing_extensions import TypedDict
6
+ from typing_extensions import Annotated, TypedDict
7
+
8
+ from ..._utils import PropertyInfo
7
9
 
8
10
  __all__ = ["WorkspaceUpdateParams"]
9
11
 
@@ -14,3 +16,5 @@ class WorkspaceUpdateParams(TypedDict, total=False):
14
16
  is_public: Optional[bool]
15
17
 
16
18
  name: Optional[str]
19
+
20
+ workspace_key: Annotated[str, PropertyInfo(alias="workspace-key")]
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: arbi
3
- Version: 0.2.1
3
+ Version: 0.3.0
4
4
  Summary: The official Python library for the arbi API
5
5
  Project-URL: Homepage, https://github.com/arbitrationcity/arbi-python
6
6
  Project-URL: Repository, https://github.com/arbitrationcity/arbi-python