arbi 0.18.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.
Files changed (165) hide show
  1. arbi/__init__.py +92 -0
  2. arbi/_base_client.py +2124 -0
  3. arbi/_client.py +442 -0
  4. arbi/_compat.py +219 -0
  5. arbi/_constants.py +14 -0
  6. arbi/_exceptions.py +108 -0
  7. arbi/_files.py +123 -0
  8. arbi/_models.py +872 -0
  9. arbi/_qs.py +150 -0
  10. arbi/_resource.py +43 -0
  11. arbi/_response.py +830 -0
  12. arbi/_streaming.py +333 -0
  13. arbi/_types.py +270 -0
  14. arbi/_utils/__init__.py +64 -0
  15. arbi/_utils/_compat.py +45 -0
  16. arbi/_utils/_datetime_parse.py +136 -0
  17. arbi/_utils/_logs.py +25 -0
  18. arbi/_utils/_proxy.py +65 -0
  19. arbi/_utils/_reflection.py +42 -0
  20. arbi/_utils/_resources_proxy.py +24 -0
  21. arbi/_utils/_streams.py +12 -0
  22. arbi/_utils/_sync.py +58 -0
  23. arbi/_utils/_transform.py +457 -0
  24. arbi/_utils/_typing.py +156 -0
  25. arbi/_utils/_utils.py +421 -0
  26. arbi/_version.py +4 -0
  27. arbi/lib/.keep +4 -0
  28. arbi/py.typed +0 -0
  29. arbi/resources/__init__.py +19 -0
  30. arbi/resources/api/__init__.py +145 -0
  31. arbi/resources/api/api.py +422 -0
  32. arbi/resources/api/assistant.py +312 -0
  33. arbi/resources/api/configs.py +533 -0
  34. arbi/resources/api/conversation/__init__.py +33 -0
  35. arbi/resources/api/conversation/conversation.py +648 -0
  36. arbi/resources/api/conversation/user.py +270 -0
  37. arbi/resources/api/document/__init__.py +33 -0
  38. arbi/resources/api/document/doctag.py +516 -0
  39. arbi/resources/api/document/document.py +929 -0
  40. arbi/resources/api/health.py +253 -0
  41. arbi/resources/api/notifications.py +478 -0
  42. arbi/resources/api/tag.py +409 -0
  43. arbi/resources/api/user/__init__.py +61 -0
  44. arbi/resources/api/user/contacts.py +322 -0
  45. arbi/resources/api/user/settings.py +283 -0
  46. arbi/resources/api/user/subscription.py +230 -0
  47. arbi/resources/api/user/user.py +943 -0
  48. arbi/resources/api/workspace.py +1198 -0
  49. arbi/types/__init__.py +8 -0
  50. arbi/types/api/__init__.py +94 -0
  51. arbi/types/api/assistant_query_params.py +95 -0
  52. arbi/types/api/assistant_retrieve_params.py +95 -0
  53. arbi/types/api/chunker_config_param.py +9 -0
  54. arbi/types/api/config_create_params.py +227 -0
  55. arbi/types/api/config_create_response.py +17 -0
  56. arbi/types/api/config_delete_response.py +11 -0
  57. arbi/types/api/config_get_versions_response.py +19 -0
  58. arbi/types/api/config_retrieve_response.py +234 -0
  59. arbi/types/api/conversation/__init__.py +8 -0
  60. arbi/types/api/conversation/user_add_params.py +11 -0
  61. arbi/types/api/conversation/user_add_response.py +11 -0
  62. arbi/types/api/conversation/user_remove_params.py +11 -0
  63. arbi/types/api/conversation/user_remove_response.py +11 -0
  64. arbi/types/api/conversation_delete_message_response.py +11 -0
  65. arbi/types/api/conversation_delete_response.py +11 -0
  66. arbi/types/api/conversation_retrieve_message_response.py +105 -0
  67. arbi/types/api/conversation_retrieve_threads_response.py +124 -0
  68. arbi/types/api/conversation_share_response.py +11 -0
  69. arbi/types/api/conversation_update_title_params.py +16 -0
  70. arbi/types/api/conversation_update_title_response.py +13 -0
  71. arbi/types/api/doc_response.py +66 -0
  72. arbi/types/api/document/__init__.py +11 -0
  73. arbi/types/api/document/doc_tag_response.py +40 -0
  74. arbi/types/api/document/doctag_create_params.py +35 -0
  75. arbi/types/api/document/doctag_create_response.py +10 -0
  76. arbi/types/api/document/doctag_delete_params.py +15 -0
  77. arbi/types/api/document/doctag_generate_params.py +22 -0
  78. arbi/types/api/document/doctag_generate_response.py +20 -0
  79. arbi/types/api/document/doctag_update_params.py +35 -0
  80. arbi/types/api/document_date_extractor_llm_config.py +29 -0
  81. arbi/types/api/document_date_extractor_llm_config_param.py +28 -0
  82. arbi/types/api/document_delete_params.py +13 -0
  83. arbi/types/api/document_get_parsed_response.py +26 -0
  84. arbi/types/api/document_retrieve_params.py +16 -0
  85. arbi/types/api/document_retrieve_response.py +10 -0
  86. arbi/types/api/document_update_params.py +42 -0
  87. arbi/types/api/document_update_response.py +10 -0
  88. arbi/types/api/document_upload_from_url_params.py +26 -0
  89. arbi/types/api/document_upload_from_url_response.py +16 -0
  90. arbi/types/api/document_upload_params.py +26 -0
  91. arbi/types/api/document_upload_response.py +16 -0
  92. arbi/types/api/embedder_config.py +30 -0
  93. arbi/types/api/embedder_config_param.py +29 -0
  94. arbi/types/api/health_check_models_response.py +21 -0
  95. arbi/types/api/health_get_models_response.py +19 -0
  96. arbi/types/api/health_retrieve_status_response.py +49 -0
  97. arbi/types/api/model_citation_config.py +20 -0
  98. arbi/types/api/model_citation_config_param.py +20 -0
  99. arbi/types/api/notification_create_params.py +20 -0
  100. arbi/types/api/notification_create_response.py +47 -0
  101. arbi/types/api/notification_delete_params.py +13 -0
  102. arbi/types/api/notification_get_schemas_response.py +197 -0
  103. arbi/types/api/notification_list_response.py +47 -0
  104. arbi/types/api/notification_update_params.py +27 -0
  105. arbi/types/api/notification_update_response.py +47 -0
  106. arbi/types/api/parser_config_param.py +9 -0
  107. arbi/types/api/query_llm_config.py +30 -0
  108. arbi/types/api/query_llm_config_param.py +29 -0
  109. arbi/types/api/reranker_config.py +21 -0
  110. arbi/types/api/reranker_config_param.py +20 -0
  111. arbi/types/api/retriever_config.py +39 -0
  112. arbi/types/api/retriever_config_param.py +38 -0
  113. arbi/types/api/tag_create_params.py +49 -0
  114. arbi/types/api/tag_create_response.py +57 -0
  115. arbi/types/api/tag_delete_response.py +9 -0
  116. arbi/types/api/tag_update_params.py +22 -0
  117. arbi/types/api/tag_update_response.py +57 -0
  118. arbi/types/api/title_llm_config.py +29 -0
  119. arbi/types/api/title_llm_config_param.py +28 -0
  120. arbi/types/api/user/__init__.py +13 -0
  121. arbi/types/api/user/contact_create_params.py +13 -0
  122. arbi/types/api/user/contact_create_response.py +30 -0
  123. arbi/types/api/user/contact_delete_params.py +13 -0
  124. arbi/types/api/user/contact_list_response.py +30 -0
  125. arbi/types/api/user/setting_retrieve_response.py +89 -0
  126. arbi/types/api/user/setting_update_params.py +60 -0
  127. arbi/types/api/user/subscription_create_params.py +13 -0
  128. arbi/types/api/user/subscription_create_response.py +11 -0
  129. arbi/types/api/user/subscription_retrieve_response.py +48 -0
  130. arbi/types/api/user_change_password_params.py +18 -0
  131. arbi/types/api/user_change_password_response.py +11 -0
  132. arbi/types/api/user_check_sso_status_params.py +20 -0
  133. arbi/types/api/user_check_sso_status_response.py +25 -0
  134. arbi/types/api/user_list_products_response.py +37 -0
  135. arbi/types/api/user_list_workspaces_response.py +10 -0
  136. arbi/types/api/user_login_params.py +18 -0
  137. arbi/types/api/user_login_response.py +23 -0
  138. arbi/types/api/user_logout_response.py +9 -0
  139. arbi/types/api/user_register_params.py +22 -0
  140. arbi/types/api/user_response.py +26 -0
  141. arbi/types/api/user_verify_email_params.py +11 -0
  142. arbi/types/api/user_verify_email_response.py +9 -0
  143. arbi/types/api/workspace_copy_params.py +21 -0
  144. arbi/types/api/workspace_copy_response.py +25 -0
  145. arbi/types/api/workspace_create_protected_params.py +16 -0
  146. arbi/types/api/workspace_delete_response.py +9 -0
  147. arbi/types/api/workspace_get_conversations_response.py +30 -0
  148. arbi/types/api/workspace_get_documents_response.py +10 -0
  149. arbi/types/api/workspace_get_stats_response.py +17 -0
  150. arbi/types/api/workspace_get_tags_response.py +60 -0
  151. arbi/types/api/workspace_get_users_response.py +10 -0
  152. arbi/types/api/workspace_remove_user_params.py +11 -0
  153. arbi/types/api/workspace_remove_user_response.py +11 -0
  154. arbi/types/api/workspace_response.py +41 -0
  155. arbi/types/api/workspace_share_params.py +15 -0
  156. arbi/types/api/workspace_share_response.py +13 -0
  157. arbi/types/api/workspace_update_params.py +20 -0
  158. arbi/types/chunk.py +12 -0
  159. arbi/types/chunk_metadata.py +31 -0
  160. arbi/types/chunk_metadata_param.py +32 -0
  161. arbi/types/chunk_param.py +15 -0
  162. arbi-0.18.0.dist-info/METADATA +410 -0
  163. arbi-0.18.0.dist-info/RECORD +165 -0
  164. arbi-0.18.0.dist-info/WHEEL +4 -0
  165. arbi-0.18.0.dist-info/licenses/LICENSE +201 -0
@@ -0,0 +1,47 @@
1
+ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
+
3
+ from typing import List, Optional
4
+ from datetime import datetime
5
+ from typing_extensions import TypeAlias
6
+
7
+ from ..._models import BaseModel
8
+ from .user_response import UserResponse
9
+
10
+ __all__ = ["NotificationCreateResponse", "NotificationCreateResponseItem"]
11
+
12
+
13
+ class NotificationCreateResponseItem(BaseModel):
14
+ """Notification response model for API and WebSocket.
15
+
16
+ Bilateral: both sender and recipient see the same row.
17
+ Client determines perspective: sender == me → I sent it, else I received it.
18
+ """
19
+
20
+ created_at: datetime
21
+
22
+ external_id: str
23
+
24
+ recipient: UserResponse
25
+ """Standard user representation used across all endpoints.
26
+
27
+ Used for: login response, workspace users, contacts (when registered).
28
+ """
29
+
30
+ sender: UserResponse
31
+ """Standard user representation used across all endpoints.
32
+
33
+ Used for: login response, workspace users, contacts (when registered).
34
+ """
35
+
36
+ type: str
37
+
38
+ updated_at: datetime
39
+
40
+ content: Optional[str] = None
41
+
42
+ new: Optional[bool] = None
43
+
44
+ workspace_ext_id: Optional[str] = None
45
+
46
+
47
+ NotificationCreateResponse: TypeAlias = List[NotificationCreateResponseItem]
@@ -0,0 +1,13 @@
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, TypedDict
6
+
7
+ from ..._types import SequenceNotStr
8
+
9
+ __all__ = ["NotificationDeleteParams"]
10
+
11
+
12
+ class NotificationDeleteParams(TypedDict, total=False):
13
+ external_ids: Required[SequenceNotStr[str]]
@@ -0,0 +1,197 @@
1
+ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
+
3
+ from typing import List, Union, Optional
4
+ from datetime import datetime
5
+ from typing_extensions import Literal, TypeAlias
6
+
7
+ from ..._models import BaseModel
8
+ from .user_response import UserResponse
9
+
10
+ __all__ = [
11
+ "NotificationGetSchemasResponse",
12
+ "ClientMessage",
13
+ "ServerMessage",
14
+ "ServerMessageAuthResultMessage",
15
+ "ServerMessageConnectionClosedMessage",
16
+ "ServerMessagePresenceUpdateMessage",
17
+ "ServerMessageErrorMessage",
18
+ "ServerMessageTaskUpdateMessage",
19
+ "ServerMessageUserMessageNotification",
20
+ "ServerMessageWorkspaceShareNotification",
21
+ "ServerMessageContactAcceptedNotification",
22
+ ]
23
+
24
+
25
+ class ClientMessage(BaseModel):
26
+ """Client authentication message."""
27
+
28
+ token: str
29
+
30
+ type: Optional[Literal["auth"]] = None
31
+
32
+
33
+ class ServerMessageAuthResultMessage(BaseModel):
34
+ """Server response to authentication."""
35
+
36
+ success: bool
37
+
38
+ reason: Optional[str] = None
39
+
40
+ type: Optional[Literal["auth_result"]] = None
41
+
42
+
43
+ class ServerMessageConnectionClosedMessage(BaseModel):
44
+ """Sent when connection is closed (e.g., another tab opened)."""
45
+
46
+ message: str
47
+
48
+ type: Optional[Literal["connection_closed"]] = None
49
+
50
+
51
+ class ServerMessagePresenceUpdateMessage(BaseModel):
52
+ """Sent when a contact's online status changes or is no longer tracked."""
53
+
54
+ status: Literal["online", "unknown"]
55
+
56
+ timestamp: str
57
+
58
+ user_id: str
59
+
60
+ type: Optional[Literal["presence_update"]] = None
61
+
62
+
63
+ class ServerMessageErrorMessage(BaseModel):
64
+ """Sent when server fails to process a client message."""
65
+
66
+ message: str
67
+
68
+ type: Optional[Literal["error"]] = None
69
+
70
+
71
+ class ServerMessageTaskUpdateMessage(BaseModel):
72
+ """Document processing progress update."""
73
+
74
+ doc_ext_id: str
75
+
76
+ file_name: str
77
+
78
+ progress: int
79
+
80
+ status: Literal["queued", "processing", "completed", "failed"]
81
+
82
+ workspace_ext_id: str
83
+
84
+ type: Optional[Literal["task_update"]] = None
85
+
86
+
87
+ class ServerMessageUserMessageNotification(BaseModel):
88
+ """E2E encrypted message (bilateral).
89
+
90
+ One row, both parties see it via RLS.
91
+ Client: sender == me → I sent it, else I received it.
92
+ """
93
+
94
+ content: str
95
+
96
+ created_at: datetime
97
+
98
+ external_id: str
99
+
100
+ new: bool
101
+
102
+ recipient: UserResponse
103
+ """Standard user representation used across all endpoints.
104
+
105
+ Used for: login response, workspace users, contacts (when registered).
106
+ """
107
+
108
+ sender: UserResponse
109
+ """Standard user representation used across all endpoints.
110
+
111
+ Used for: login response, workspace users, contacts (when registered).
112
+ """
113
+
114
+ updated_at: datetime
115
+
116
+ type: Optional[Literal["user_message"]] = None
117
+
118
+
119
+ class ServerMessageWorkspaceShareNotification(BaseModel):
120
+ """Workspace shared (bilateral).
121
+
122
+ One row, both parties see it via RLS.
123
+ """
124
+
125
+ created_at: datetime
126
+
127
+ external_id: str
128
+
129
+ new: bool
130
+
131
+ recipient: UserResponse
132
+ """Standard user representation used across all endpoints.
133
+
134
+ Used for: login response, workspace users, contacts (when registered).
135
+ """
136
+
137
+ sender: UserResponse
138
+ """Standard user representation used across all endpoints.
139
+
140
+ Used for: login response, workspace users, contacts (when registered).
141
+ """
142
+
143
+ updated_at: datetime
144
+
145
+ workspace_ext_id: str
146
+
147
+ type: Optional[Literal["workspace_share"]] = None
148
+
149
+
150
+ class ServerMessageContactAcceptedNotification(BaseModel):
151
+ """Contact invitation accepted.
152
+
153
+ Sent to inviter when their invited contact registers.
154
+ sender = new user who registered, recipient = inviter.
155
+ """
156
+
157
+ created_at: datetime
158
+
159
+ external_id: str
160
+
161
+ new: bool
162
+
163
+ recipient: UserResponse
164
+ """Standard user representation used across all endpoints.
165
+
166
+ Used for: login response, workspace users, contacts (when registered).
167
+ """
168
+
169
+ sender: UserResponse
170
+ """Standard user representation used across all endpoints.
171
+
172
+ Used for: login response, workspace users, contacts (when registered).
173
+ """
174
+
175
+ updated_at: datetime
176
+
177
+ type: Optional[Literal["contact_accepted"]] = None
178
+
179
+
180
+ ServerMessage: TypeAlias = Union[
181
+ ServerMessageAuthResultMessage,
182
+ ServerMessageConnectionClosedMessage,
183
+ ServerMessagePresenceUpdateMessage,
184
+ ServerMessageErrorMessage,
185
+ ServerMessageTaskUpdateMessage,
186
+ ServerMessageUserMessageNotification,
187
+ ServerMessageWorkspaceShareNotification,
188
+ ServerMessageContactAcceptedNotification,
189
+ ]
190
+
191
+
192
+ class NotificationGetSchemasResponse(BaseModel):
193
+ """Container for all WebSocket message schemas."""
194
+
195
+ client_messages: Optional[List[ClientMessage]] = None
196
+
197
+ server_messages: Optional[List[ServerMessage]] = None
@@ -0,0 +1,47 @@
1
+ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
+
3
+ from typing import List, Optional
4
+ from datetime import datetime
5
+ from typing_extensions import TypeAlias
6
+
7
+ from ..._models import BaseModel
8
+ from .user_response import UserResponse
9
+
10
+ __all__ = ["NotificationListResponse", "NotificationListResponseItem"]
11
+
12
+
13
+ class NotificationListResponseItem(BaseModel):
14
+ """Notification response model for API and WebSocket.
15
+
16
+ Bilateral: both sender and recipient see the same row.
17
+ Client determines perspective: sender == me → I sent it, else I received it.
18
+ """
19
+
20
+ created_at: datetime
21
+
22
+ external_id: str
23
+
24
+ recipient: UserResponse
25
+ """Standard user representation used across all endpoints.
26
+
27
+ Used for: login response, workspace users, contacts (when registered).
28
+ """
29
+
30
+ sender: UserResponse
31
+ """Standard user representation used across all endpoints.
32
+
33
+ Used for: login response, workspace users, contacts (when registered).
34
+ """
35
+
36
+ type: str
37
+
38
+ updated_at: datetime
39
+
40
+ content: Optional[str] = None
41
+
42
+ new: Optional[bool] = None
43
+
44
+ workspace_ext_id: Optional[str] = None
45
+
46
+
47
+ NotificationListResponse: TypeAlias = List[NotificationListResponseItem]
@@ -0,0 +1,27 @@
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 Iterable, Optional
6
+ from typing_extensions import Required, TypedDict
7
+
8
+ __all__ = ["NotificationUpdateParams", "Update"]
9
+
10
+
11
+ class NotificationUpdateParams(TypedDict, total=False):
12
+ updates: Required[Iterable[Update]]
13
+
14
+
15
+ class Update(TypedDict, total=False):
16
+ """Single notification update for bulk PATCH.
17
+
18
+ Supports two operations:
19
+ - content: Re-encrypt content (key rotation)
20
+ - read: Mark as read (only recipient can do this)
21
+ """
22
+
23
+ external_id: Required[str]
24
+
25
+ content: Optional[str]
26
+
27
+ read: Optional[bool]
@@ -0,0 +1,47 @@
1
+ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
+
3
+ from typing import List, Optional
4
+ from datetime import datetime
5
+ from typing_extensions import TypeAlias
6
+
7
+ from ..._models import BaseModel
8
+ from .user_response import UserResponse
9
+
10
+ __all__ = ["NotificationUpdateResponse", "NotificationUpdateResponseItem"]
11
+
12
+
13
+ class NotificationUpdateResponseItem(BaseModel):
14
+ """Notification response model for API and WebSocket.
15
+
16
+ Bilateral: both sender and recipient see the same row.
17
+ Client determines perspective: sender == me → I sent it, else I received it.
18
+ """
19
+
20
+ created_at: datetime
21
+
22
+ external_id: str
23
+
24
+ recipient: UserResponse
25
+ """Standard user representation used across all endpoints.
26
+
27
+ Used for: login response, workspace users, contacts (when registered).
28
+ """
29
+
30
+ sender: UserResponse
31
+ """Standard user representation used across all endpoints.
32
+
33
+ Used for: login response, workspace users, contacts (when registered).
34
+ """
35
+
36
+ type: str
37
+
38
+ updated_at: datetime
39
+
40
+ content: Optional[str] = None
41
+
42
+ new: Optional[bool] = None
43
+
44
+ workspace_ext_id: Optional[str] = None
45
+
46
+
47
+ NotificationUpdateResponse: TypeAlias = List[NotificationUpdateResponseItem]
@@ -0,0 +1,9 @@
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 TypeAlias
6
+
7
+ __all__ = ["ParserConfigParam"]
8
+
9
+ ParserConfigParam: TypeAlias = object
@@ -0,0 +1,30 @@
1
+ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
+
3
+ from typing import Optional
4
+ from typing_extensions import Literal
5
+
6
+ from pydantic import Field as FieldInfo
7
+
8
+ from ..._models import BaseModel
9
+
10
+ __all__ = ["QueryLlmConfig"]
11
+
12
+
13
+ class QueryLlmConfig(BaseModel):
14
+ api_type: Optional[Literal["local", "remote"]] = FieldInfo(alias="API_TYPE", default=None)
15
+ """The inference type (local or remote)."""
16
+
17
+ max_char_size_to_answer: Optional[int] = FieldInfo(alias="MAX_CHAR_SIZE_TO_ANSWER", default=None)
18
+ """Maximum character size to answer."""
19
+
20
+ max_tokens: Optional[int] = FieldInfo(alias="MAX_TOKENS", default=None)
21
+ """Maximum number of tokens allowed."""
22
+
23
+ api_model_name: Optional[str] = FieldInfo(alias="MODEL_NAME", default=None)
24
+ """The name of the non-reasoning model to be used."""
25
+
26
+ system_instruction: Optional[str] = FieldInfo(alias="SYSTEM_INSTRUCTION", default=None)
27
+ """The system instruction string."""
28
+
29
+ temperature: Optional[float] = FieldInfo(alias="TEMPERATURE", default=None)
30
+ """Temperature value for randomness."""
@@ -0,0 +1,29 @@
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 Literal, Annotated, TypedDict
6
+
7
+ from ..._utils import PropertyInfo
8
+
9
+ __all__ = ["QueryLlmConfigParam"]
10
+
11
+
12
+ class QueryLlmConfigParam(TypedDict, total=False):
13
+ api_type: Annotated[Literal["local", "remote"], PropertyInfo(alias="API_TYPE")]
14
+ """The inference type (local or remote)."""
15
+
16
+ max_char_size_to_answer: Annotated[int, PropertyInfo(alias="MAX_CHAR_SIZE_TO_ANSWER")]
17
+ """Maximum character size to answer."""
18
+
19
+ max_tokens: Annotated[int, PropertyInfo(alias="MAX_TOKENS")]
20
+ """Maximum number of tokens allowed."""
21
+
22
+ model_name: Annotated[str, PropertyInfo(alias="MODEL_NAME")]
23
+ """The name of the non-reasoning model to be used."""
24
+
25
+ system_instruction: Annotated[str, PropertyInfo(alias="SYSTEM_INSTRUCTION")]
26
+ """The system instruction string."""
27
+
28
+ temperature: Annotated[float, PropertyInfo(alias="TEMPERATURE")]
29
+ """Temperature value for randomness."""
@@ -0,0 +1,21 @@
1
+ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
+
3
+ from typing import Optional
4
+ from typing_extensions import Literal
5
+
6
+ from pydantic import Field as FieldInfo
7
+
8
+ from ..._models import BaseModel
9
+
10
+ __all__ = ["RerankerConfig"]
11
+
12
+
13
+ class RerankerConfig(BaseModel):
14
+ api_type: Optional[Literal["local", "remote"]] = FieldInfo(alias="API_TYPE", default=None)
15
+ """The inference type (local or remote)."""
16
+
17
+ max_numb_of_chunks: Optional[int] = FieldInfo(alias="MAX_NUMB_OF_CHUNKS", default=None)
18
+ """Maximum number of chunks to return after reranking."""
19
+
20
+ api_model_name: Optional[str] = FieldInfo(alias="MODEL_NAME", default=None)
21
+ """Name of the reranking model to use."""
@@ -0,0 +1,20 @@
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 Literal, Annotated, TypedDict
6
+
7
+ from ..._utils import PropertyInfo
8
+
9
+ __all__ = ["RerankerConfigParam"]
10
+
11
+
12
+ class RerankerConfigParam(TypedDict, total=False):
13
+ api_type: Annotated[Literal["local", "remote"], PropertyInfo(alias="API_TYPE")]
14
+ """The inference type (local or remote)."""
15
+
16
+ max_numb_of_chunks: Annotated[int, PropertyInfo(alias="MAX_NUMB_OF_CHUNKS")]
17
+ """Maximum number of chunks to return after reranking."""
18
+
19
+ model_name: Annotated[str, PropertyInfo(alias="MODEL_NAME")]
20
+ """Name of the reranking model to use."""
@@ -0,0 +1,39 @@
1
+ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
+
3
+ from typing import Optional
4
+ from typing_extensions import Literal
5
+
6
+ from pydantic import Field as FieldInfo
7
+
8
+ from ..._models import BaseModel
9
+
10
+ __all__ = ["RetrieverConfig"]
11
+
12
+
13
+ class RetrieverConfig(BaseModel):
14
+ group_size: Optional[int] = FieldInfo(alias="GROUP_SIZE", default=None)
15
+ """Maximum number of chunks per document for retrieval."""
16
+
17
+ hybrid_dense_weight: Optional[float] = FieldInfo(alias="HYBRID_DENSE_WEIGHT", default=None)
18
+ """Weight for dense vectors in hybrid mode"""
19
+
20
+ hybrid_reranker_weight: Optional[float] = FieldInfo(alias="HYBRID_RERANKER_WEIGHT", default=None)
21
+ """Weight for reranker score in hybrid mode score blending (0-1).
22
+
23
+ RRF weight = 1 - this value
24
+ """
25
+
26
+ hybrid_sparse_weight: Optional[float] = FieldInfo(alias="HYBRID_SPARSE_WEIGHT", default=None)
27
+ """Weight for sparse vectors in hybrid mode"""
28
+
29
+ max_distinct_documents: Optional[int] = FieldInfo(alias="MAX_DISTINCT_DOCUMENTS", default=None)
30
+ """Maximum number of distinct documents to search for."""
31
+
32
+ max_total_chunks_to_retrieve: Optional[int] = FieldInfo(alias="MAX_TOTAL_CHUNKS_TO_RETRIEVE", default=None)
33
+ """Maximum total number of chunks to retrieve for all documents retrieved."""
34
+
35
+ min_retrieval_sim_score: Optional[float] = FieldInfo(alias="MIN_RETRIEVAL_SIM_SCORE", default=None)
36
+ """Minimum similarity score for retrieval of a chunk."""
37
+
38
+ search_mode: Optional[Literal["semantic", "keyword", "hybrid"]] = FieldInfo(alias="SEARCH_MODE", default=None)
39
+ """Search mode: semantic (dense), keyword (sparse), or hybrid"""
@@ -0,0 +1,38 @@
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 Literal, Annotated, TypedDict
6
+
7
+ from ..._utils import PropertyInfo
8
+
9
+ __all__ = ["RetrieverConfigParam"]
10
+
11
+
12
+ class RetrieverConfigParam(TypedDict, total=False):
13
+ group_size: Annotated[int, PropertyInfo(alias="GROUP_SIZE")]
14
+ """Maximum number of chunks per document for retrieval."""
15
+
16
+ hybrid_dense_weight: Annotated[float, PropertyInfo(alias="HYBRID_DENSE_WEIGHT")]
17
+ """Weight for dense vectors in hybrid mode"""
18
+
19
+ hybrid_reranker_weight: Annotated[float, PropertyInfo(alias="HYBRID_RERANKER_WEIGHT")]
20
+ """Weight for reranker score in hybrid mode score blending (0-1).
21
+
22
+ RRF weight = 1 - this value
23
+ """
24
+
25
+ hybrid_sparse_weight: Annotated[float, PropertyInfo(alias="HYBRID_SPARSE_WEIGHT")]
26
+ """Weight for sparse vectors in hybrid mode"""
27
+
28
+ max_distinct_documents: Annotated[int, PropertyInfo(alias="MAX_DISTINCT_DOCUMENTS")]
29
+ """Maximum number of distinct documents to search for."""
30
+
31
+ max_total_chunks_to_retrieve: Annotated[int, PropertyInfo(alias="MAX_TOTAL_CHUNKS_TO_RETRIEVE")]
32
+ """Maximum total number of chunks to retrieve for all documents retrieved."""
33
+
34
+ min_retrieval_sim_score: Annotated[float, PropertyInfo(alias="MIN_RETRIEVAL_SIM_SCORE")]
35
+ """Minimum similarity score for retrieval of a chunk."""
36
+
37
+ search_mode: Annotated[Literal["semantic", "keyword", "hybrid"], PropertyInfo(alias="SEARCH_MODE")]
38
+ """Search mode: semantic (dense), keyword (sparse), or hybrid"""
@@ -0,0 +1,49 @@
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 Optional
6
+ from typing_extensions import Literal, Required, Annotated, TypedDict
7
+
8
+ from ..._types import SequenceNotStr
9
+ from ..._utils import PropertyInfo
10
+
11
+ __all__ = ["TagCreateParams", "TagType"]
12
+
13
+
14
+ class TagCreateParams(TypedDict, total=False):
15
+ name: Required[str]
16
+
17
+ workspace_ext_id: Required[str]
18
+
19
+ instruction: Optional[str]
20
+
21
+ parent_ext_id: Optional[str]
22
+
23
+ shared: Optional[bool]
24
+
25
+ tag_type: TagType
26
+ """Tag format configuration stored as JSONB.
27
+
28
+ Type-specific fields:
29
+
30
+ - select: options (list of choices, can be single or multi-select)
31
+ - search: tag name is the query, chunks include relevance scores
32
+ - checkbox, text, number, folder: type only
33
+ """
34
+
35
+ workspace_key: Annotated[str, PropertyInfo(alias="workspace-key")]
36
+
37
+
38
+ class TagType(TypedDict, total=False):
39
+ """Tag format configuration stored as JSONB.
40
+
41
+ Type-specific fields:
42
+ - select: options (list of choices, can be single or multi-select)
43
+ - search: tag name is the query, chunks include relevance scores
44
+ - checkbox, text, number, folder: type only
45
+ """
46
+
47
+ options: SequenceNotStr[str]
48
+
49
+ type: Literal["checkbox", "text", "number", "select", "folder", "search"]
@@ -0,0 +1,57 @@
1
+ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
+
3
+ from typing import List, Optional
4
+ from datetime import datetime
5
+ from typing_extensions import Literal
6
+
7
+ from ..._models import BaseModel
8
+
9
+ __all__ = ["TagCreateResponse", "TagType"]
10
+
11
+
12
+ class TagType(BaseModel):
13
+ """Tag format configuration stored as JSONB.
14
+
15
+ Type-specific fields:
16
+ - select: options (list of choices, can be single or multi-select)
17
+ - search: tag name is the query, chunks include relevance scores
18
+ - checkbox, text, number, folder: type only
19
+ """
20
+
21
+ options: Optional[List[str]] = None
22
+
23
+ type: Optional[Literal["checkbox", "text", "number", "select", "folder", "search"]] = None
24
+
25
+
26
+ class TagCreateResponse(BaseModel):
27
+ created_at: datetime
28
+
29
+ created_by_ext_id: str
30
+
31
+ doctag_count: int
32
+
33
+ external_id: str
34
+
35
+ name: str
36
+
37
+ shared: bool
38
+
39
+ tag_type: TagType
40
+ """Tag format configuration stored as JSONB.
41
+
42
+ Type-specific fields:
43
+
44
+ - select: options (list of choices, can be single or multi-select)
45
+ - search: tag name is the query, chunks include relevance scores
46
+ - checkbox, text, number, folder: type only
47
+ """
48
+
49
+ updated_at: datetime
50
+
51
+ workspace_ext_id: str
52
+
53
+ instruction: Optional[str] = None
54
+
55
+ parent_ext_id: Optional[str] = None
56
+
57
+ updated_by_ext_id: Optional[str] = None