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
arbi/types/__init__.py ADDED
@@ -0,0 +1,8 @@
1
+ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
+
3
+ from __future__ import annotations
4
+
5
+ from .chunk import Chunk as Chunk
6
+ from .chunk_param import ChunkParam as ChunkParam
7
+ from .chunk_metadata import ChunkMetadata as ChunkMetadata
8
+ from .chunk_metadata_param import ChunkMetadataParam as ChunkMetadataParam
@@ -0,0 +1,94 @@
1
+ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
+
3
+ from __future__ import annotations
4
+
5
+ from .doc_response import DocResponse as DocResponse
6
+ from .user_response import UserResponse as UserResponse
7
+ from .embedder_config import EmbedderConfig as EmbedderConfig
8
+ from .reranker_config import RerankerConfig as RerankerConfig
9
+ from .query_llm_config import QueryLlmConfig as QueryLlmConfig
10
+ from .retriever_config import RetrieverConfig as RetrieverConfig
11
+ from .title_llm_config import TitleLlmConfig as TitleLlmConfig
12
+ from .tag_create_params import TagCreateParams as TagCreateParams
13
+ from .tag_update_params import TagUpdateParams as TagUpdateParams
14
+ from .user_login_params import UserLoginParams as UserLoginParams
15
+ from .workspace_response import WorkspaceResponse as WorkspaceResponse
16
+ from .parser_config_param import ParserConfigParam as ParserConfigParam
17
+ from .tag_create_response import TagCreateResponse as TagCreateResponse
18
+ from .tag_delete_response import TagDeleteResponse as TagDeleteResponse
19
+ from .tag_update_response import TagUpdateResponse as TagUpdateResponse
20
+ from .user_login_response import UserLoginResponse as UserLoginResponse
21
+ from .chunker_config_param import ChunkerConfigParam as ChunkerConfigParam
22
+ from .config_create_params import ConfigCreateParams as ConfigCreateParams
23
+ from .user_logout_response import UserLogoutResponse as UserLogoutResponse
24
+ from .user_register_params import UserRegisterParams as UserRegisterParams
25
+ from .embedder_config_param import EmbedderConfigParam as EmbedderConfigParam
26
+ from .model_citation_config import ModelCitationConfig as ModelCitationConfig
27
+ from .reranker_config_param import RerankerConfigParam as RerankerConfigParam
28
+ from .workspace_copy_params import WorkspaceCopyParams as WorkspaceCopyParams
29
+ from .assistant_query_params import AssistantQueryParams as AssistantQueryParams
30
+ from .config_create_response import ConfigCreateResponse as ConfigCreateResponse
31
+ from .config_delete_response import ConfigDeleteResponse as ConfigDeleteResponse
32
+ from .document_delete_params import DocumentDeleteParams as DocumentDeleteParams
33
+ from .document_update_params import DocumentUpdateParams as DocumentUpdateParams
34
+ from .document_upload_params import DocumentUploadParams as DocumentUploadParams
35
+ from .query_llm_config_param import QueryLlmConfigParam as QueryLlmConfigParam
36
+ from .retriever_config_param import RetrieverConfigParam as RetrieverConfigParam
37
+ from .title_llm_config_param import TitleLlmConfigParam as TitleLlmConfigParam
38
+ from .workspace_share_params import WorkspaceShareParams as WorkspaceShareParams
39
+ from .workspace_copy_response import WorkspaceCopyResponse as WorkspaceCopyResponse
40
+ from .workspace_update_params import WorkspaceUpdateParams as WorkspaceUpdateParams
41
+ from .config_retrieve_response import ConfigRetrieveResponse as ConfigRetrieveResponse
42
+ from .document_retrieve_params import DocumentRetrieveParams as DocumentRetrieveParams
43
+ from .document_update_response import DocumentUpdateResponse as DocumentUpdateResponse
44
+ from .document_upload_response import DocumentUploadResponse as DocumentUploadResponse
45
+ from .user_verify_email_params import UserVerifyEmailParams as UserVerifyEmailParams
46
+ from .workspace_share_response import WorkspaceShareResponse as WorkspaceShareResponse
47
+ from .assistant_retrieve_params import AssistantRetrieveParams as AssistantRetrieveParams
48
+ from .workspace_delete_response import WorkspaceDeleteResponse as WorkspaceDeleteResponse
49
+ from .document_retrieve_response import DocumentRetrieveResponse as DocumentRetrieveResponse
50
+ from .health_get_models_response import HealthGetModelsResponse as HealthGetModelsResponse
51
+ from .notification_create_params import NotificationCreateParams as NotificationCreateParams
52
+ from .notification_delete_params import NotificationDeleteParams as NotificationDeleteParams
53
+ from .notification_list_response import NotificationListResponse as NotificationListResponse
54
+ from .notification_update_params import NotificationUpdateParams as NotificationUpdateParams
55
+ from .user_verify_email_response import UserVerifyEmailResponse as UserVerifyEmailResponse
56
+ from .conversation_share_response import ConversationShareResponse as ConversationShareResponse
57
+ from .model_citation_config_param import ModelCitationConfigParam as ModelCitationConfigParam
58
+ from .user_change_password_params import UserChangePasswordParams as UserChangePasswordParams
59
+ from .user_list_products_response import UserListProductsResponse as UserListProductsResponse
60
+ from .workspace_get_tags_response import WorkspaceGetTagsResponse as WorkspaceGetTagsResponse
61
+ from .config_get_versions_response import ConfigGetVersionsResponse as ConfigGetVersionsResponse
62
+ from .conversation_delete_response import ConversationDeleteResponse as ConversationDeleteResponse
63
+ from .document_get_parsed_response import DocumentGetParsedResponse as DocumentGetParsedResponse
64
+ from .health_check_models_response import HealthCheckModelsResponse as HealthCheckModelsResponse
65
+ from .notification_create_response import NotificationCreateResponse as NotificationCreateResponse
66
+ from .notification_update_response import NotificationUpdateResponse as NotificationUpdateResponse
67
+ from .user_check_sso_status_params import UserCheckSSOStatusParams as UserCheckSSOStatusParams
68
+ from .workspace_get_stats_response import WorkspaceGetStatsResponse as WorkspaceGetStatsResponse
69
+ from .workspace_get_users_response import WorkspaceGetUsersResponse as WorkspaceGetUsersResponse
70
+ from .workspace_remove_user_params import WorkspaceRemoveUserParams as WorkspaceRemoveUserParams
71
+ from .user_change_password_response import UserChangePasswordResponse as UserChangePasswordResponse
72
+ from .user_list_workspaces_response import UserListWorkspacesResponse as UserListWorkspacesResponse
73
+ from .user_check_sso_status_response import UserCheckSSOStatusResponse as UserCheckSSOStatusResponse
74
+ from .workspace_remove_user_response import WorkspaceRemoveUserResponse as WorkspaceRemoveUserResponse
75
+ from .document_upload_from_url_params import DocumentUploadFromURLParams as DocumentUploadFromURLParams
76
+ from .health_retrieve_status_response import HealthRetrieveStatusResponse as HealthRetrieveStatusResponse
77
+ from .conversation_update_title_params import ConversationUpdateTitleParams as ConversationUpdateTitleParams
78
+ from .workspace_get_documents_response import WorkspaceGetDocumentsResponse as WorkspaceGetDocumentsResponse
79
+ from .document_upload_from_url_response import DocumentUploadFromURLResponse as DocumentUploadFromURLResponse
80
+ from .notification_get_schemas_response import NotificationGetSchemasResponse as NotificationGetSchemasResponse
81
+ from .workspace_create_protected_params import WorkspaceCreateProtectedParams as WorkspaceCreateProtectedParams
82
+ from .conversation_update_title_response import ConversationUpdateTitleResponse as ConversationUpdateTitleResponse
83
+ from .document_date_extractor_llm_config import DocumentDateExtractorLlmConfig as DocumentDateExtractorLlmConfig
84
+ from .conversation_delete_message_response import ConversationDeleteMessageResponse as ConversationDeleteMessageResponse
85
+ from .workspace_get_conversations_response import WorkspaceGetConversationsResponse as WorkspaceGetConversationsResponse
86
+ from .conversation_retrieve_message_response import (
87
+ ConversationRetrieveMessageResponse as ConversationRetrieveMessageResponse,
88
+ )
89
+ from .conversation_retrieve_threads_response import (
90
+ ConversationRetrieveThreadsResponse as ConversationRetrieveThreadsResponse,
91
+ )
92
+ from .document_date_extractor_llm_config_param import (
93
+ DocumentDateExtractorLlmConfigParam as DocumentDateExtractorLlmConfigParam,
94
+ )
@@ -0,0 +1,95 @@
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, Union, Iterable, Optional
6
+ from typing_extensions import Literal, Required, Annotated, TypeAlias, TypedDict
7
+
8
+ from ..._types import SequenceNotStr
9
+ from ..._utils import PropertyInfo
10
+ from ..chunk_param import ChunkParam
11
+
12
+ __all__ = [
13
+ "AssistantQueryParams",
14
+ "Tools",
15
+ "ToolsModelCitationTool",
16
+ "ToolsModelCitationToolToolResponses",
17
+ "ToolsRetrievalChunkToolInput",
18
+ "ToolsRetrievalFullContextToolInput",
19
+ "ToolsTraceTool",
20
+ ]
21
+
22
+
23
+ class AssistantQueryParams(TypedDict, total=False):
24
+ content: Required[str]
25
+
26
+ workspace_ext_id: Required[str]
27
+
28
+ config_ext_id: Optional[str]
29
+
30
+ parent_message_ext_id: Optional[str]
31
+
32
+ tools: Dict[str, Tools]
33
+
34
+ workspace_key: Annotated[str, PropertyInfo(alias="workspace-key")]
35
+
36
+
37
+ class ToolsModelCitationToolToolResponses(TypedDict, total=False):
38
+ """Data for a single citation - shared by DocTags and ModelCitationTool."""
39
+
40
+ chunk_ids: Required[SequenceNotStr[str]]
41
+
42
+ offset_end: Required[int]
43
+
44
+ offset_start: Required[int]
45
+
46
+ statement: Required[str]
47
+
48
+
49
+ class ToolsModelCitationTool(TypedDict, total=False):
50
+ description: str
51
+
52
+ name: Literal["model_citation"]
53
+
54
+ tool_responses: Dict[str, ToolsModelCitationToolToolResponses]
55
+
56
+
57
+ class ToolsRetrievalChunkToolInput(TypedDict, total=False):
58
+ description: str
59
+
60
+ name: Literal["retrieval_chunk"]
61
+
62
+ tool_args: Dict[str, SequenceNotStr[str]]
63
+
64
+ tool_responses: Dict[str, Iterable[ChunkParam]]
65
+
66
+
67
+ class ToolsRetrievalFullContextToolInput(TypedDict, total=False):
68
+ description: str
69
+
70
+ name: Literal["retrieval_full_context"]
71
+
72
+ tool_args: Dict[str, object]
73
+
74
+ tool_responses: Dict[str, Iterable[ChunkParam]]
75
+
76
+
77
+ class ToolsTraceTool(TypedDict, total=False):
78
+ """Execution trace tool that captures the full execution history of a request."""
79
+
80
+ description: str
81
+
82
+ duration_seconds: Optional[float]
83
+
84
+ name: Literal["trace"]
85
+
86
+ start_time: Optional[float]
87
+
88
+ steps: Iterable[Dict[str, object]]
89
+
90
+ trace_id: Optional[str]
91
+
92
+
93
+ Tools: TypeAlias = Union[
94
+ ToolsModelCitationTool, ToolsRetrievalChunkToolInput, ToolsRetrievalFullContextToolInput, ToolsTraceTool
95
+ ]
@@ -0,0 +1,95 @@
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, Union, Iterable, Optional
6
+ from typing_extensions import Literal, Required, Annotated, TypeAlias, TypedDict
7
+
8
+ from ..._types import SequenceNotStr
9
+ from ..._utils import PropertyInfo
10
+ from ..chunk_param import ChunkParam
11
+
12
+ __all__ = [
13
+ "AssistantRetrieveParams",
14
+ "Tools",
15
+ "ToolsModelCitationTool",
16
+ "ToolsModelCitationToolToolResponses",
17
+ "ToolsRetrievalChunkToolInput",
18
+ "ToolsRetrievalFullContextToolInput",
19
+ "ToolsTraceTool",
20
+ ]
21
+
22
+
23
+ class AssistantRetrieveParams(TypedDict, total=False):
24
+ content: Required[str]
25
+
26
+ workspace_ext_id: Required[str]
27
+
28
+ config_ext_id: Optional[str]
29
+
30
+ parent_message_ext_id: Optional[str]
31
+
32
+ tools: Dict[str, Tools]
33
+
34
+ workspace_key: Annotated[str, PropertyInfo(alias="workspace-key")]
35
+
36
+
37
+ class ToolsModelCitationToolToolResponses(TypedDict, total=False):
38
+ """Data for a single citation - shared by DocTags and ModelCitationTool."""
39
+
40
+ chunk_ids: Required[SequenceNotStr[str]]
41
+
42
+ offset_end: Required[int]
43
+
44
+ offset_start: Required[int]
45
+
46
+ statement: Required[str]
47
+
48
+
49
+ class ToolsModelCitationTool(TypedDict, total=False):
50
+ description: str
51
+
52
+ name: Literal["model_citation"]
53
+
54
+ tool_responses: Dict[str, ToolsModelCitationToolToolResponses]
55
+
56
+
57
+ class ToolsRetrievalChunkToolInput(TypedDict, total=False):
58
+ description: str
59
+
60
+ name: Literal["retrieval_chunk"]
61
+
62
+ tool_args: Dict[str, SequenceNotStr[str]]
63
+
64
+ tool_responses: Dict[str, Iterable[ChunkParam]]
65
+
66
+
67
+ class ToolsRetrievalFullContextToolInput(TypedDict, total=False):
68
+ description: str
69
+
70
+ name: Literal["retrieval_full_context"]
71
+
72
+ tool_args: Dict[str, object]
73
+
74
+ tool_responses: Dict[str, Iterable[ChunkParam]]
75
+
76
+
77
+ class ToolsTraceTool(TypedDict, total=False):
78
+ """Execution trace tool that captures the full execution history of a request."""
79
+
80
+ description: str
81
+
82
+ duration_seconds: Optional[float]
83
+
84
+ name: Literal["trace"]
85
+
86
+ start_time: Optional[float]
87
+
88
+ steps: Iterable[Dict[str, object]]
89
+
90
+ trace_id: Optional[str]
91
+
92
+
93
+ Tools: TypeAlias = Union[
94
+ ToolsModelCitationTool, ToolsRetrievalChunkToolInput, ToolsRetrievalFullContextToolInput, ToolsTraceTool
95
+ ]
@@ -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__ = ["ChunkerConfigParam"]
8
+
9
+ ChunkerConfigParam: TypeAlias = object
@@ -0,0 +1,227 @@
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, Annotated, TypedDict
7
+
8
+ from ..._utils import PropertyInfo
9
+ from .parser_config_param import ParserConfigParam
10
+ from .chunker_config_param import ChunkerConfigParam
11
+ from .embedder_config_param import EmbedderConfigParam
12
+ from .reranker_config_param import RerankerConfigParam
13
+ from .query_llm_config_param import QueryLlmConfigParam
14
+ from .retriever_config_param import RetrieverConfigParam
15
+ from .title_llm_config_param import TitleLlmConfigParam
16
+ from .model_citation_config_param import ModelCitationConfigParam
17
+ from .document_date_extractor_llm_config_param import DocumentDateExtractorLlmConfigParam
18
+
19
+ __all__ = [
20
+ "ConfigCreateParams",
21
+ "AgentLlm",
22
+ "Agents",
23
+ "DoctagLlm",
24
+ "DocumentSummaryExtractorLlm",
25
+ "EvaluatorLlm",
26
+ "KeywordEmbedder",
27
+ ]
28
+
29
+
30
+ class ConfigCreateParams(TypedDict, total=False):
31
+ agent_llm: Annotated[Optional[AgentLlm], PropertyInfo(alias="AgentLLM")]
32
+
33
+ agents: Annotated[Optional[Agents], PropertyInfo(alias="Agents")]
34
+
35
+ chunker: Annotated[Optional[ChunkerConfigParam], PropertyInfo(alias="Chunker")]
36
+
37
+ doctag_llm: Annotated[Optional[DoctagLlm], PropertyInfo(alias="DoctagLLM")]
38
+ """
39
+ Configuration for DoctagLLM - extracts information from documents based on tag
40
+ instructions.
41
+ """
42
+
43
+ document_date_extractor_llm: Annotated[
44
+ Optional[DocumentDateExtractorLlmConfigParam], PropertyInfo(alias="DocumentDateExtractorLLM")
45
+ ]
46
+
47
+ document_summary_extractor_llm: Annotated[
48
+ Optional[DocumentSummaryExtractorLlm], PropertyInfo(alias="DocumentSummaryExtractorLLM")
49
+ ]
50
+
51
+ embedder: Annotated[Optional[EmbedderConfigParam], PropertyInfo(alias="Embedder")]
52
+
53
+ evaluator_llm: Annotated[Optional[EvaluatorLlm], PropertyInfo(alias="EvaluatorLLM")]
54
+
55
+ keyword_embedder: Annotated[Optional[KeywordEmbedder], PropertyInfo(alias="KeywordEmbedder")]
56
+ """Configuration for keyword embedder with BM25 scoring."""
57
+
58
+ model_citation: Annotated[Optional[ModelCitationConfigParam], PropertyInfo(alias="ModelCitation")]
59
+
60
+ parent_message_ext_id: Optional[str]
61
+
62
+ parser: Annotated[Optional[ParserConfigParam], PropertyInfo(alias="Parser")]
63
+
64
+ query_llm: Annotated[Optional[QueryLlmConfigParam], PropertyInfo(alias="QueryLLM")]
65
+
66
+ reranker: Annotated[Optional[RerankerConfigParam], PropertyInfo(alias="Reranker")]
67
+
68
+ retriever: Annotated[Optional[RetrieverConfigParam], PropertyInfo(alias="Retriever")]
69
+
70
+ title: str
71
+
72
+ title_llm: Annotated[Optional[TitleLlmConfigParam], PropertyInfo(alias="TitleLLM")]
73
+
74
+
75
+ class AgentLlm(TypedDict, total=False):
76
+ api_type: Annotated[Literal["local", "remote"], PropertyInfo(alias="API_TYPE")]
77
+ """The inference type (local or remote)."""
78
+
79
+ enabled: Annotated[bool, PropertyInfo(alias="ENABLED")]
80
+ """Whether to use agent mode for queries."""
81
+
82
+ max_char_size_to_answer: Annotated[int, PropertyInfo(alias="MAX_CHAR_SIZE_TO_ANSWER")]
83
+ """Maximum character size for history."""
84
+
85
+ max_context_tokens: Annotated[int, PropertyInfo(alias="MAX_CONTEXT_TOKENS")]
86
+ """
87
+ Maximum tokens for gathered context (applies to evidence buffer and final
88
+ query).
89
+ """
90
+
91
+ max_iterations: Annotated[int, PropertyInfo(alias="MAX_ITERATIONS")]
92
+ """Maximum agent loop iterations."""
93
+
94
+ max_tokens: Annotated[int, PropertyInfo(alias="MAX_TOKENS")]
95
+ """Maximum tokens for planning decisions."""
96
+
97
+ model_name: Annotated[str, PropertyInfo(alias="MODEL_NAME")]
98
+ """The name of the model to be used."""
99
+
100
+ show_interim_steps: Annotated[bool, PropertyInfo(alias="SHOW_INTERIM_STEPS")]
101
+ """Whether to show agent's intermediate steps."""
102
+
103
+ system_instruction: Annotated[str, PropertyInfo(alias="SYSTEM_INSTRUCTION")]
104
+ """The system instruction for agent planning."""
105
+
106
+ temperature: Annotated[float, PropertyInfo(alias="TEMPERATURE")]
107
+ """Temperature for agent decisions."""
108
+
109
+
110
+ class Agents(TypedDict, total=False):
111
+ agent_model_name: Annotated[str, PropertyInfo(alias="AGENT_MODEL_NAME")]
112
+ """The name of the model to be used for the agent."""
113
+
114
+ agent_prompt: Annotated[str, PropertyInfo(alias="AGENT_PROMPT")]
115
+
116
+ enabled: Annotated[bool, PropertyInfo(alias="ENABLED")]
117
+ """Whether to use agents mode for queries."""
118
+
119
+ llm_agent_temperature: Annotated[float, PropertyInfo(alias="LLM_AGENT_TEMPERATURE")]
120
+ """Temperature value for randomness."""
121
+
122
+ llm_page_filter_model_name: Annotated[str, PropertyInfo(alias="LLM_PAGE_FILTER_MODEL_NAME")]
123
+ """The name of the model to be used for the llm page filter model."""
124
+
125
+ llm_page_filter_prompt: Annotated[str, PropertyInfo(alias="LLM_PAGE_FILTER_PROMPT")]
126
+
127
+ llm_page_filter_temperature: Annotated[float, PropertyInfo(alias="LLM_PAGE_FILTER_TEMPERATURE")]
128
+ """Temperature value for randomness."""
129
+
130
+ llm_summarise_model_name: Annotated[str, PropertyInfo(alias="LLM_SUMMARISE_MODEL_NAME")]
131
+ """The name of the model to be used for the llm summarise model."""
132
+
133
+ llm_summarise_prompt: Annotated[str, PropertyInfo(alias="LLM_SUMMARISE_PROMPT")]
134
+
135
+ llm_summarise_temperature: Annotated[float, PropertyInfo(alias="LLM_SUMMARISE_TEMPERATURE")]
136
+ """Temperature value for randomness."""
137
+
138
+
139
+ class DoctagLlm(TypedDict, total=False):
140
+ """
141
+ Configuration for DoctagLLM - extracts information from documents based on tag instructions.
142
+ """
143
+
144
+ api_type: Annotated[Literal["local", "remote"], PropertyInfo(alias="API_TYPE")]
145
+ """The inference type (local or remote)."""
146
+
147
+ max_char_context_to_answer: Annotated[int, PropertyInfo(alias="MAX_CHAR_CONTEXT_TO_ANSWER")]
148
+ """Maximum characters in document for context."""
149
+
150
+ max_tokens: Annotated[int, PropertyInfo(alias="MAX_TOKENS")]
151
+ """Maximum number of tokens allowed for all answers."""
152
+
153
+ model_name: Annotated[str, PropertyInfo(alias="MODEL_NAME")]
154
+ """The name of the non-reasoning model to be used."""
155
+
156
+ system_instruction: Annotated[str, PropertyInfo(alias="SYSTEM_INSTRUCTION")]
157
+
158
+ temperature: Annotated[float, PropertyInfo(alias="TEMPERATURE")]
159
+ """Temperature for factual answers."""
160
+
161
+
162
+ class DocumentSummaryExtractorLlm(TypedDict, total=False):
163
+ api_type: Annotated[Literal["local", "remote"], PropertyInfo(alias="API_TYPE")]
164
+ """The inference type (local or remote)."""
165
+
166
+ max_char_context_to_answer: Annotated[int, PropertyInfo(alias="MAX_CHAR_CONTEXT_TO_ANSWER")]
167
+ """Maximum characters in document for context."""
168
+
169
+ max_tokens: Annotated[int, PropertyInfo(alias="MAX_TOKENS")]
170
+ """Maximum number of tokens allowed."""
171
+
172
+ model_name: Annotated[str, PropertyInfo(alias="MODEL_NAME")]
173
+ """The name of the non-reasoning model to be used."""
174
+
175
+ system_instruction: Annotated[str, PropertyInfo(alias="SYSTEM_INSTRUCTION")]
176
+
177
+ temperature: Annotated[float, PropertyInfo(alias="TEMPERATURE")]
178
+ """Temperature value for randomness."""
179
+
180
+
181
+ class EvaluatorLlm(TypedDict, total=False):
182
+ api_type: Annotated[Literal["local", "remote"], PropertyInfo(alias="API_TYPE")]
183
+ """The inference type (local or remote)."""
184
+
185
+ max_char_size_to_answer: Annotated[int, PropertyInfo(alias="MAX_CHAR_SIZE_TO_ANSWER")]
186
+ """Maximum character size for evaluation context."""
187
+
188
+ max_tokens: Annotated[int, PropertyInfo(alias="MAX_TOKENS")]
189
+ """Maximum tokens for evaluation response."""
190
+
191
+ model_name: Annotated[str, PropertyInfo(alias="MODEL_NAME")]
192
+ """The name of the non-reasoning model to be used."""
193
+
194
+ system_instruction: Annotated[str, PropertyInfo(alias="SYSTEM_INSTRUCTION")]
195
+ """The system instruction for chunk evaluation."""
196
+
197
+ temperature: Annotated[float, PropertyInfo(alias="TEMPERATURE")]
198
+ """Low temperature for consistent evaluation."""
199
+
200
+
201
+ class KeywordEmbedder(TypedDict, total=False):
202
+ """Configuration for keyword embedder with BM25 scoring."""
203
+
204
+ bm25_avgdl: Annotated[float, PropertyInfo(alias="BM25_AVGDL")]
205
+ """Average document length in tokens.
206
+
207
+ Adjust based on your documents: chat messages ~20-50, articles ~100-300, papers
208
+ ~1000+
209
+ """
210
+
211
+ bm25_b: Annotated[float, PropertyInfo(alias="BM25_B")]
212
+ """BM25 document length normalization (0.0-1.0).
213
+
214
+ 0=ignore length, 1=full penalty for long docs. Default 0.75 is standard.
215
+ """
216
+
217
+ bm25_k1: Annotated[float, PropertyInfo(alias="BM25_K1")]
218
+ """BM25 term frequency saturation (1.2-2.0).
219
+
220
+ Higher = more weight on term repetition. Default 1.5 works for most cases.
221
+ """
222
+
223
+ dimension_space: Annotated[int, PropertyInfo(alias="DIMENSION_SPACE")]
224
+ """Total dimension space for hash trick (1,048,576 dimensions)"""
225
+
226
+ filter_stopwords: Annotated[bool, PropertyInfo(alias="FILTER_STOPWORDS")]
227
+ """Remove common stopwords to reduce noise"""
@@ -0,0 +1,17 @@
1
+ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
+
3
+ from typing import Optional
4
+
5
+ from ..._models import BaseModel
6
+
7
+ __all__ = ["ConfigCreateResponse"]
8
+
9
+
10
+ class ConfigCreateResponse(BaseModel):
11
+ """Response model for configuration save endpoint"""
12
+
13
+ created_at: str
14
+
15
+ external_id: str
16
+
17
+ title: Optional[str] = None
@@ -0,0 +1,11 @@
1
+ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
+
3
+ from typing import Optional
4
+
5
+ from ..._models import BaseModel
6
+
7
+ __all__ = ["ConfigDeleteResponse"]
8
+
9
+
10
+ class ConfigDeleteResponse(BaseModel):
11
+ detail: Optional[str] = None
@@ -0,0 +1,19 @@
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__ = ["ConfigGetVersionsResponse", "Version"]
8
+
9
+
10
+ class Version(BaseModel):
11
+ created_at: str
12
+
13
+ external_id: str
14
+
15
+ title: Optional[str] = None
16
+
17
+
18
+ class ConfigGetVersionsResponse(BaseModel):
19
+ versions: List[Version]