athena-intelligence 0.1.205__tar.gz → 0.1.207__tar.gz
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 athena-intelligence might be problematic. Click here for more details.
- {athena_intelligence-0.1.205 → athena_intelligence-0.1.207}/PKG-INFO +1 -1
- {athena_intelligence-0.1.205 → athena_intelligence-0.1.207}/pyproject.toml +1 -1
- {athena_intelligence-0.1.205 → athena_intelligence-0.1.207}/src/athena/__init__.py +6 -1
- {athena_intelligence-0.1.205 → athena_intelligence-0.1.207}/src/athena/base_client.py +3 -0
- {athena_intelligence-0.1.205 → athena_intelligence-0.1.207}/src/athena/core/client_wrapper.py +2 -2
- athena_intelligence-0.1.207/src/athena/threads/client.py +114 -0
- athena_intelligence-0.1.207/src/athena/threads/raw_client.py +193 -0
- {athena_intelligence-0.1.205 → athena_intelligence-0.1.207}/src/athena/tools/sheets/client.py +118 -0
- {athena_intelligence-0.1.205 → athena_intelligence-0.1.207}/src/athena/tools/sheets/raw_client.py +150 -0
- athena_intelligence-0.1.207/src/athena/tools/tasks/__init__.py +4 -0
- {athena_intelligence-0.1.205 → athena_intelligence-0.1.207}/src/athena/types/__init__.py +4 -0
- athena_intelligence-0.1.207/src/athena/types/conversation_asset_info.py +100 -0
- athena_intelligence-0.1.207/src/athena/types/thread_status_response_out.py +47 -0
- {athena_intelligence-0.1.205 → athena_intelligence-0.1.207}/README.md +0 -0
- {athena_intelligence-0.1.205 → athena_intelligence-0.1.207}/src/athena/agents/__init__.py +0 -0
- {athena_intelligence-0.1.205 → athena_intelligence-0.1.207}/src/athena/agents/client.py +0 -0
- {athena_intelligence-0.1.205 → athena_intelligence-0.1.207}/src/athena/agents/drive/__init__.py +0 -0
- {athena_intelligence-0.1.205 → athena_intelligence-0.1.207}/src/athena/agents/drive/client.py +0 -0
- {athena_intelligence-0.1.205 → athena_intelligence-0.1.207}/src/athena/agents/drive/raw_client.py +0 -0
- {athena_intelligence-0.1.205 → athena_intelligence-0.1.207}/src/athena/agents/general/__init__.py +0 -0
- {athena_intelligence-0.1.205 → athena_intelligence-0.1.207}/src/athena/agents/general/client.py +0 -0
- {athena_intelligence-0.1.205 → athena_intelligence-0.1.207}/src/athena/agents/general/raw_client.py +0 -0
- {athena_intelligence-0.1.205 → athena_intelligence-0.1.207}/src/athena/agents/raw_client.py +0 -0
- {athena_intelligence-0.1.205 → athena_intelligence-0.1.207}/src/athena/agents/research/__init__.py +0 -0
- {athena_intelligence-0.1.205 → athena_intelligence-0.1.207}/src/athena/agents/research/client.py +0 -0
- {athena_intelligence-0.1.205 → athena_intelligence-0.1.207}/src/athena/agents/research/raw_client.py +0 -0
- {athena_intelligence-0.1.205 → athena_intelligence-0.1.207}/src/athena/agents/sql/__init__.py +0 -0
- {athena_intelligence-0.1.205 → athena_intelligence-0.1.207}/src/athena/agents/sql/client.py +0 -0
- {athena_intelligence-0.1.205 → athena_intelligence-0.1.207}/src/athena/agents/sql/raw_client.py +0 -0
- {athena_intelligence-0.1.205 → athena_intelligence-0.1.207}/src/athena/aop/__init__.py +0 -0
- {athena_intelligence-0.1.205 → athena_intelligence-0.1.207}/src/athena/aop/client.py +0 -0
- {athena_intelligence-0.1.205 → athena_intelligence-0.1.207}/src/athena/aop/raw_client.py +0 -0
- {athena_intelligence-0.1.205 → athena_intelligence-0.1.207}/src/athena/assets/__init__.py +0 -0
- {athena_intelligence-0.1.205 → athena_intelligence-0.1.207}/src/athena/assets/client.py +0 -0
- {athena_intelligence-0.1.205 → athena_intelligence-0.1.207}/src/athena/assets/raw_client.py +0 -0
- {athena_intelligence-0.1.205 → athena_intelligence-0.1.207}/src/athena/client.py +0 -0
- {athena_intelligence-0.1.205 → athena_intelligence-0.1.207}/src/athena/core/__init__.py +0 -0
- {athena_intelligence-0.1.205 → athena_intelligence-0.1.207}/src/athena/core/api_error.py +0 -0
- {athena_intelligence-0.1.205 → athena_intelligence-0.1.207}/src/athena/core/datetime_utils.py +0 -0
- {athena_intelligence-0.1.205 → athena_intelligence-0.1.207}/src/athena/core/file.py +0 -0
- {athena_intelligence-0.1.205 → athena_intelligence-0.1.207}/src/athena/core/force_multipart.py +0 -0
- {athena_intelligence-0.1.205 → athena_intelligence-0.1.207}/src/athena/core/http_client.py +0 -0
- {athena_intelligence-0.1.205 → athena_intelligence-0.1.207}/src/athena/core/http_response.py +0 -0
- {athena_intelligence-0.1.205 → athena_intelligence-0.1.207}/src/athena/core/jsonable_encoder.py +0 -0
- {athena_intelligence-0.1.205 → athena_intelligence-0.1.207}/src/athena/core/pydantic_utilities.py +0 -0
- {athena_intelligence-0.1.205 → athena_intelligence-0.1.207}/src/athena/core/query_encoder.py +0 -0
- {athena_intelligence-0.1.205 → athena_intelligence-0.1.207}/src/athena/core/remove_none_from_dict.py +0 -0
- {athena_intelligence-0.1.205 → athena_intelligence-0.1.207}/src/athena/core/request_options.py +0 -0
- {athena_intelligence-0.1.205 → athena_intelligence-0.1.207}/src/athena/core/serialization.py +0 -0
- {athena_intelligence-0.1.205 → athena_intelligence-0.1.207}/src/athena/environment.py +0 -0
- {athena_intelligence-0.1.205 → athena_intelligence-0.1.207}/src/athena/errors/__init__.py +0 -0
- {athena_intelligence-0.1.205 → athena_intelligence-0.1.207}/src/athena/errors/bad_request_error.py +0 -0
- {athena_intelligence-0.1.205 → athena_intelligence-0.1.207}/src/athena/errors/content_too_large_error.py +0 -0
- {athena_intelligence-0.1.205 → athena_intelligence-0.1.207}/src/athena/errors/internal_server_error.py +0 -0
- {athena_intelligence-0.1.205 → athena_intelligence-0.1.207}/src/athena/errors/not_found_error.py +0 -0
- {athena_intelligence-0.1.205 → athena_intelligence-0.1.207}/src/athena/errors/unauthorized_error.py +0 -0
- {athena_intelligence-0.1.205 → athena_intelligence-0.1.207}/src/athena/errors/unprocessable_entity_error.py +0 -0
- {athena_intelligence-0.1.205 → athena_intelligence-0.1.207}/src/athena/errors/unsupported_media_type_error.py +0 -0
- {athena_intelligence-0.1.205 → athena_intelligence-0.1.207}/src/athena/py.typed +0 -0
- {athena_intelligence-0.1.205 → athena_intelligence-0.1.207}/src/athena/query/__init__.py +0 -0
- {athena_intelligence-0.1.205 → athena_intelligence-0.1.207}/src/athena/query/client.py +0 -0
- {athena_intelligence-0.1.205 → athena_intelligence-0.1.207}/src/athena/query/raw_client.py +0 -0
- {athena_intelligence-0.1.205 → athena_intelligence-0.1.207}/src/athena/query/types/__init__.py +0 -0
- {athena_intelligence-0.1.205 → athena_intelligence-0.1.207}/src/athena/query/types/query_execute_request_database_asset_ids.py +0 -0
- {athena_intelligence-0.1.205/src/athena/tools/calendar → athena_intelligence-0.1.207/src/athena/threads}/__init__.py +0 -0
- {athena_intelligence-0.1.205 → athena_intelligence-0.1.207}/src/athena/tools/__init__.py +0 -0
- {athena_intelligence-0.1.205/src/athena/tools/email → athena_intelligence-0.1.207/src/athena/tools/calendar}/__init__.py +0 -0
- {athena_intelligence-0.1.205 → athena_intelligence-0.1.207}/src/athena/tools/calendar/client.py +0 -0
- {athena_intelligence-0.1.205 → athena_intelligence-0.1.207}/src/athena/tools/calendar/raw_client.py +0 -0
- {athena_intelligence-0.1.205 → athena_intelligence-0.1.207}/src/athena/tools/client.py +0 -0
- {athena_intelligence-0.1.205/src/athena/tools/sheets → athena_intelligence-0.1.207/src/athena/tools/email}/__init__.py +0 -0
- {athena_intelligence-0.1.205 → athena_intelligence-0.1.207}/src/athena/tools/email/client.py +0 -0
- {athena_intelligence-0.1.205 → athena_intelligence-0.1.207}/src/athena/tools/email/raw_client.py +0 -0
- {athena_intelligence-0.1.205 → athena_intelligence-0.1.207}/src/athena/tools/raw_client.py +0 -0
- {athena_intelligence-0.1.205/src/athena/tools/structured_data_extractor → athena_intelligence-0.1.207/src/athena/tools/sheets}/__init__.py +0 -0
- {athena_intelligence-0.1.205/src/athena/tools/tasks → athena_intelligence-0.1.207/src/athena/tools/structured_data_extractor}/__init__.py +0 -0
- {athena_intelligence-0.1.205 → athena_intelligence-0.1.207}/src/athena/tools/structured_data_extractor/client.py +0 -0
- {athena_intelligence-0.1.205 → athena_intelligence-0.1.207}/src/athena/tools/structured_data_extractor/raw_client.py +0 -0
- {athena_intelligence-0.1.205 → athena_intelligence-0.1.207}/src/athena/tools/tasks/client.py +0 -0
- {athena_intelligence-0.1.205 → athena_intelligence-0.1.207}/src/athena/tools/tasks/raw_client.py +0 -0
- {athena_intelligence-0.1.205 → athena_intelligence-0.1.207}/src/athena/tools/types/__init__.py +0 -0
- {athena_intelligence-0.1.205 → athena_intelligence-0.1.207}/src/athena/tools/types/tools_data_frame_request_columns_item.py +0 -0
- {athena_intelligence-0.1.205 → athena_intelligence-0.1.207}/src/athena/types/aop_async_execute_response_out.py +0 -0
- {athena_intelligence-0.1.205 → athena_intelligence-0.1.207}/src/athena/types/aop_execute_request_in.py +0 -0
- {athena_intelligence-0.1.205 → athena_intelligence-0.1.207}/src/athena/types/aop_execute_response_out.py +0 -0
- {athena_intelligence-0.1.205 → athena_intelligence-0.1.207}/src/athena/types/asset_content_request_out.py +0 -0
- {athena_intelligence-0.1.205 → athena_intelligence-0.1.207}/src/athena/types/asset_node.py +0 -0
- {athena_intelligence-0.1.205 → athena_intelligence-0.1.207}/src/athena/types/asset_not_found_error.py +0 -0
- {athena_intelligence-0.1.205 → athena_intelligence-0.1.207}/src/athena/types/asset_screenshot_response_out.py +0 -0
- {athena_intelligence-0.1.205 → athena_intelligence-0.1.207}/src/athena/types/chunk.py +0 -0
- {athena_intelligence-0.1.205 → athena_intelligence-0.1.207}/src/athena/types/chunk_content_item.py +0 -0
- {athena_intelligence-0.1.205 → athena_intelligence-0.1.207}/src/athena/types/chunk_result.py +0 -0
- {athena_intelligence-0.1.205 → athena_intelligence-0.1.207}/src/athena/types/chunk_result_chunk_id.py +0 -0
- {athena_intelligence-0.1.205 → athena_intelligence-0.1.207}/src/athena/types/content.py +0 -0
- {athena_intelligence-0.1.205 → athena_intelligence-0.1.207}/src/athena/types/create_new_sheet_tab_response.py +0 -0
- {athena_intelligence-0.1.205 → athena_intelligence-0.1.207}/src/athena/types/custom_agent_response.py +0 -0
- {athena_intelligence-0.1.205 → athena_intelligence-0.1.207}/src/athena/types/data_frame_request_out.py +0 -0
- {athena_intelligence-0.1.205 → athena_intelligence-0.1.207}/src/athena/types/data_frame_request_out_columns_item.py +0 -0
- {athena_intelligence-0.1.205 → athena_intelligence-0.1.207}/src/athena/types/data_frame_request_out_data_item_item.py +0 -0
- {athena_intelligence-0.1.205 → athena_intelligence-0.1.207}/src/athena/types/data_frame_request_out_index_item.py +0 -0
- {athena_intelligence-0.1.205 → athena_intelligence-0.1.207}/src/athena/types/data_frame_unknown_format_error.py +0 -0
- {athena_intelligence-0.1.205 → athena_intelligence-0.1.207}/src/athena/types/document_chunk.py +0 -0
- {athena_intelligence-0.1.205 → athena_intelligence-0.1.207}/src/athena/types/drive_agent_response.py +0 -0
- {athena_intelligence-0.1.205 → athena_intelligence-0.1.207}/src/athena/types/file_chunk_request_out.py +0 -0
- {athena_intelligence-0.1.205 → athena_intelligence-0.1.207}/src/athena/types/file_too_large_error.py +0 -0
- {athena_intelligence-0.1.205 → athena_intelligence-0.1.207}/src/athena/types/folder_response.py +0 -0
- {athena_intelligence-0.1.205 → athena_intelligence-0.1.207}/src/athena/types/general_agent_config.py +0 -0
- {athena_intelligence-0.1.205 → athena_intelligence-0.1.207}/src/athena/types/general_agent_config_enabled_tools_item.py +0 -0
- {athena_intelligence-0.1.205 → athena_intelligence-0.1.207}/src/athena/types/general_agent_request.py +0 -0
- {athena_intelligence-0.1.205 → athena_intelligence-0.1.207}/src/athena/types/general_agent_response.py +0 -0
- {athena_intelligence-0.1.205 → athena_intelligence-0.1.207}/src/athena/types/general_agent_response_message.py +0 -0
- {athena_intelligence-0.1.205 → athena_intelligence-0.1.207}/src/athena/types/general_agent_response_message_kwargs.py +0 -0
- {athena_intelligence-0.1.205 → athena_intelligence-0.1.207}/src/athena/types/get_table_response.py +0 -0
- {athena_intelligence-0.1.205 → athena_intelligence-0.1.207}/src/athena/types/id.py +0 -0
- {athena_intelligence-0.1.205 → athena_intelligence-0.1.207}/src/athena/types/image_url_content.py +0 -0
- {athena_intelligence-0.1.205 → athena_intelligence-0.1.207}/src/athena/types/input_message.py +0 -0
- {athena_intelligence-0.1.205 → athena_intelligence-0.1.207}/src/athena/types/input_message_content_item.py +0 -0
- {athena_intelligence-0.1.205 → athena_intelligence-0.1.207}/src/athena/types/paginated_assets_out.py +0 -0
- {athena_intelligence-0.1.205 → athena_intelligence-0.1.207}/src/athena/types/prompt_message.py +0 -0
- {athena_intelligence-0.1.205 → athena_intelligence-0.1.207}/src/athena/types/public_asset_out.py +0 -0
- {athena_intelligence-0.1.205 → athena_intelligence-0.1.207}/src/athena/types/research_agent_response.py +0 -0
- {athena_intelligence-0.1.205 → athena_intelligence-0.1.207}/src/athena/types/save_asset_request_out.py +0 -0
- {athena_intelligence-0.1.205 → athena_intelligence-0.1.207}/src/athena/types/sheet_operation_response.py +0 -0
- {athena_intelligence-0.1.205 → athena_intelligence-0.1.207}/src/athena/types/sql_agent_response.py +0 -0
- {athena_intelligence-0.1.205 → athena_intelligence-0.1.207}/src/athena/types/structured_data_extractor_response.py +0 -0
- {athena_intelligence-0.1.205 → athena_intelligence-0.1.207}/src/athena/types/text_content.py +0 -0
- {athena_intelligence-0.1.205 → athena_intelligence-0.1.207}/src/athena/types/type.py +0 -0
- {athena_intelligence-0.1.205 → athena_intelligence-0.1.207}/src/athena/version.py +0 -0
|
@@ -17,6 +17,7 @@ from .types import (
|
|
|
17
17
|
ChunkResult,
|
|
18
18
|
ChunkResultChunkId,
|
|
19
19
|
Content,
|
|
20
|
+
ConversationAssetInfo,
|
|
20
21
|
CreateNewSheetTabResponse,
|
|
21
22
|
CustomAgentResponse,
|
|
22
23
|
DataFrameRequestOut,
|
|
@@ -51,6 +52,7 @@ from .types import (
|
|
|
51
52
|
SqlAgentResponse,
|
|
52
53
|
StructuredDataExtractorResponse,
|
|
53
54
|
TextContent,
|
|
55
|
+
ThreadStatusResponseOut,
|
|
54
56
|
Type,
|
|
55
57
|
)
|
|
56
58
|
from .errors import (
|
|
@@ -62,7 +64,7 @@ from .errors import (
|
|
|
62
64
|
UnprocessableEntityError,
|
|
63
65
|
UnsupportedMediaTypeError,
|
|
64
66
|
)
|
|
65
|
-
from . import agents, aop, assets, query, tools
|
|
67
|
+
from . import agents, aop, assets, query, threads, tools
|
|
66
68
|
from .client import AsyncAthena, Athena
|
|
67
69
|
from .environment import AthenaEnvironment
|
|
68
70
|
from .query import QueryExecuteRequestDatabaseAssetIds
|
|
@@ -89,6 +91,7 @@ __all__ = [
|
|
|
89
91
|
"ChunkResultChunkId",
|
|
90
92
|
"Content",
|
|
91
93
|
"ContentTooLargeError",
|
|
94
|
+
"ConversationAssetInfo",
|
|
92
95
|
"CreateNewSheetTabResponse",
|
|
93
96
|
"CustomAgentResponse",
|
|
94
97
|
"DataFrameRequestOut",
|
|
@@ -126,6 +129,7 @@ __all__ = [
|
|
|
126
129
|
"SqlAgentResponse",
|
|
127
130
|
"StructuredDataExtractorResponse",
|
|
128
131
|
"TextContent",
|
|
132
|
+
"ThreadStatusResponseOut",
|
|
129
133
|
"ToolsDataFrameRequestColumnsItem",
|
|
130
134
|
"Type",
|
|
131
135
|
"UnauthorizedError",
|
|
@@ -136,5 +140,6 @@ __all__ = [
|
|
|
136
140
|
"aop",
|
|
137
141
|
"assets",
|
|
138
142
|
"query",
|
|
143
|
+
"threads",
|
|
139
144
|
"tools",
|
|
140
145
|
]
|
|
@@ -9,6 +9,7 @@ from .assets.client import AssetsClient, AsyncAssetsClient
|
|
|
9
9
|
from .core.client_wrapper import AsyncClientWrapper, SyncClientWrapper
|
|
10
10
|
from .environment import AthenaEnvironment
|
|
11
11
|
from .query.client import AsyncQueryClient, QueryClient
|
|
12
|
+
from .threads.client import AsyncThreadsClient, ThreadsClient
|
|
12
13
|
from .tools.client import AsyncToolsClient, ToolsClient
|
|
13
14
|
|
|
14
15
|
|
|
@@ -81,6 +82,7 @@ class BaseAthena:
|
|
|
81
82
|
self.aop = AopClient(client_wrapper=self._client_wrapper)
|
|
82
83
|
self.assets = AssetsClient(client_wrapper=self._client_wrapper)
|
|
83
84
|
self.query = QueryClient(client_wrapper=self._client_wrapper)
|
|
85
|
+
self.threads = ThreadsClient(client_wrapper=self._client_wrapper)
|
|
84
86
|
self.tools = ToolsClient(client_wrapper=self._client_wrapper)
|
|
85
87
|
|
|
86
88
|
|
|
@@ -153,6 +155,7 @@ class AsyncBaseAthena:
|
|
|
153
155
|
self.aop = AsyncAopClient(client_wrapper=self._client_wrapper)
|
|
154
156
|
self.assets = AsyncAssetsClient(client_wrapper=self._client_wrapper)
|
|
155
157
|
self.query = AsyncQueryClient(client_wrapper=self._client_wrapper)
|
|
158
|
+
self.threads = AsyncThreadsClient(client_wrapper=self._client_wrapper)
|
|
156
159
|
self.tools = AsyncToolsClient(client_wrapper=self._client_wrapper)
|
|
157
160
|
|
|
158
161
|
|
{athena_intelligence-0.1.205 → athena_intelligence-0.1.207}/src/athena/core/client_wrapper.py
RENAMED
|
@@ -22,10 +22,10 @@ class BaseClientWrapper:
|
|
|
22
22
|
|
|
23
23
|
def get_headers(self) -> typing.Dict[str, str]:
|
|
24
24
|
headers: typing.Dict[str, str] = {
|
|
25
|
-
"User-Agent": "athena-intelligence/0.1.
|
|
25
|
+
"User-Agent": "athena-intelligence/0.1.207",
|
|
26
26
|
"X-Fern-Language": "Python",
|
|
27
27
|
"X-Fern-SDK-Name": "athena-intelligence",
|
|
28
|
-
"X-Fern-SDK-Version": "0.1.
|
|
28
|
+
"X-Fern-SDK-Version": "0.1.207",
|
|
29
29
|
**(self.get_custom_headers() or {}),
|
|
30
30
|
}
|
|
31
31
|
headers["X-API-KEY"] = self.api_key
|
|
@@ -0,0 +1,114 @@
|
|
|
1
|
+
# This file was auto-generated by Fern from our API Definition.
|
|
2
|
+
|
|
3
|
+
import typing
|
|
4
|
+
|
|
5
|
+
from ..core.client_wrapper import AsyncClientWrapper, SyncClientWrapper
|
|
6
|
+
from ..core.request_options import RequestOptions
|
|
7
|
+
from ..types.thread_status_response_out import ThreadStatusResponseOut
|
|
8
|
+
from .raw_client import AsyncRawThreadsClient, RawThreadsClient
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
class ThreadsClient:
|
|
12
|
+
def __init__(self, *, client_wrapper: SyncClientWrapper):
|
|
13
|
+
self._raw_client = RawThreadsClient(client_wrapper=client_wrapper)
|
|
14
|
+
|
|
15
|
+
@property
|
|
16
|
+
def with_raw_response(self) -> RawThreadsClient:
|
|
17
|
+
"""
|
|
18
|
+
Retrieves a raw implementation of this client that returns raw responses.
|
|
19
|
+
|
|
20
|
+
Returns
|
|
21
|
+
-------
|
|
22
|
+
RawThreadsClient
|
|
23
|
+
"""
|
|
24
|
+
return self._raw_client
|
|
25
|
+
|
|
26
|
+
def get_status(
|
|
27
|
+
self, thread_id: str, *, request_options: typing.Optional[RequestOptions] = None
|
|
28
|
+
) -> ThreadStatusResponseOut:
|
|
29
|
+
"""
|
|
30
|
+
Check the status of a thread execution by thread ID. Returns thread status and associated conversation asset information for tracking progress.
|
|
31
|
+
|
|
32
|
+
Parameters
|
|
33
|
+
----------
|
|
34
|
+
thread_id : str
|
|
35
|
+
The unique thread ID to check status for
|
|
36
|
+
|
|
37
|
+
request_options : typing.Optional[RequestOptions]
|
|
38
|
+
Request-specific configuration.
|
|
39
|
+
|
|
40
|
+
Returns
|
|
41
|
+
-------
|
|
42
|
+
ThreadStatusResponseOut
|
|
43
|
+
Thread status retrieved successfully
|
|
44
|
+
|
|
45
|
+
Examples
|
|
46
|
+
--------
|
|
47
|
+
from athena import Athena
|
|
48
|
+
|
|
49
|
+
client = Athena(
|
|
50
|
+
api_key="YOUR_API_KEY",
|
|
51
|
+
)
|
|
52
|
+
client.threads.get_status(
|
|
53
|
+
thread_id="thread_id",
|
|
54
|
+
)
|
|
55
|
+
"""
|
|
56
|
+
_response = self._raw_client.get_status(thread_id, request_options=request_options)
|
|
57
|
+
return _response.data
|
|
58
|
+
|
|
59
|
+
|
|
60
|
+
class AsyncThreadsClient:
|
|
61
|
+
def __init__(self, *, client_wrapper: AsyncClientWrapper):
|
|
62
|
+
self._raw_client = AsyncRawThreadsClient(client_wrapper=client_wrapper)
|
|
63
|
+
|
|
64
|
+
@property
|
|
65
|
+
def with_raw_response(self) -> AsyncRawThreadsClient:
|
|
66
|
+
"""
|
|
67
|
+
Retrieves a raw implementation of this client that returns raw responses.
|
|
68
|
+
|
|
69
|
+
Returns
|
|
70
|
+
-------
|
|
71
|
+
AsyncRawThreadsClient
|
|
72
|
+
"""
|
|
73
|
+
return self._raw_client
|
|
74
|
+
|
|
75
|
+
async def get_status(
|
|
76
|
+
self, thread_id: str, *, request_options: typing.Optional[RequestOptions] = None
|
|
77
|
+
) -> ThreadStatusResponseOut:
|
|
78
|
+
"""
|
|
79
|
+
Check the status of a thread execution by thread ID. Returns thread status and associated conversation asset information for tracking progress.
|
|
80
|
+
|
|
81
|
+
Parameters
|
|
82
|
+
----------
|
|
83
|
+
thread_id : str
|
|
84
|
+
The unique thread ID to check status for
|
|
85
|
+
|
|
86
|
+
request_options : typing.Optional[RequestOptions]
|
|
87
|
+
Request-specific configuration.
|
|
88
|
+
|
|
89
|
+
Returns
|
|
90
|
+
-------
|
|
91
|
+
ThreadStatusResponseOut
|
|
92
|
+
Thread status retrieved successfully
|
|
93
|
+
|
|
94
|
+
Examples
|
|
95
|
+
--------
|
|
96
|
+
import asyncio
|
|
97
|
+
|
|
98
|
+
from athena import AsyncAthena
|
|
99
|
+
|
|
100
|
+
client = AsyncAthena(
|
|
101
|
+
api_key="YOUR_API_KEY",
|
|
102
|
+
)
|
|
103
|
+
|
|
104
|
+
|
|
105
|
+
async def main() -> None:
|
|
106
|
+
await client.threads.get_status(
|
|
107
|
+
thread_id="thread_id",
|
|
108
|
+
)
|
|
109
|
+
|
|
110
|
+
|
|
111
|
+
asyncio.run(main())
|
|
112
|
+
"""
|
|
113
|
+
_response = await self._raw_client.get_status(thread_id, request_options=request_options)
|
|
114
|
+
return _response.data
|
|
@@ -0,0 +1,193 @@
|
|
|
1
|
+
# This file was auto-generated by Fern from our API Definition.
|
|
2
|
+
|
|
3
|
+
import typing
|
|
4
|
+
from json.decoder import JSONDecodeError
|
|
5
|
+
|
|
6
|
+
from ..core.api_error import ApiError
|
|
7
|
+
from ..core.client_wrapper import AsyncClientWrapper, SyncClientWrapper
|
|
8
|
+
from ..core.http_response import AsyncHttpResponse, HttpResponse
|
|
9
|
+
from ..core.jsonable_encoder import jsonable_encoder
|
|
10
|
+
from ..core.pydantic_utilities import parse_obj_as
|
|
11
|
+
from ..core.request_options import RequestOptions
|
|
12
|
+
from ..errors.internal_server_error import InternalServerError
|
|
13
|
+
from ..errors.not_found_error import NotFoundError
|
|
14
|
+
from ..errors.unauthorized_error import UnauthorizedError
|
|
15
|
+
from ..errors.unprocessable_entity_error import UnprocessableEntityError
|
|
16
|
+
from ..types.asset_not_found_error import AssetNotFoundError
|
|
17
|
+
from ..types.thread_status_response_out import ThreadStatusResponseOut
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
class RawThreadsClient:
|
|
21
|
+
def __init__(self, *, client_wrapper: SyncClientWrapper):
|
|
22
|
+
self._client_wrapper = client_wrapper
|
|
23
|
+
|
|
24
|
+
def get_status(
|
|
25
|
+
self, thread_id: str, *, request_options: typing.Optional[RequestOptions] = None
|
|
26
|
+
) -> HttpResponse[ThreadStatusResponseOut]:
|
|
27
|
+
"""
|
|
28
|
+
Check the status of a thread execution by thread ID. Returns thread status and associated conversation asset information for tracking progress.
|
|
29
|
+
|
|
30
|
+
Parameters
|
|
31
|
+
----------
|
|
32
|
+
thread_id : str
|
|
33
|
+
The unique thread ID to check status for
|
|
34
|
+
|
|
35
|
+
request_options : typing.Optional[RequestOptions]
|
|
36
|
+
Request-specific configuration.
|
|
37
|
+
|
|
38
|
+
Returns
|
|
39
|
+
-------
|
|
40
|
+
HttpResponse[ThreadStatusResponseOut]
|
|
41
|
+
Thread status retrieved successfully
|
|
42
|
+
"""
|
|
43
|
+
_response = self._client_wrapper.httpx_client.request(
|
|
44
|
+
f"api/v0/threads/{jsonable_encoder(thread_id)}/status",
|
|
45
|
+
method="GET",
|
|
46
|
+
request_options=request_options,
|
|
47
|
+
)
|
|
48
|
+
try:
|
|
49
|
+
if 200 <= _response.status_code < 300:
|
|
50
|
+
_data = typing.cast(
|
|
51
|
+
ThreadStatusResponseOut,
|
|
52
|
+
parse_obj_as(
|
|
53
|
+
type_=ThreadStatusResponseOut, # type: ignore
|
|
54
|
+
object_=_response.json(),
|
|
55
|
+
),
|
|
56
|
+
)
|
|
57
|
+
return HttpResponse(response=_response, data=_data)
|
|
58
|
+
if _response.status_code == 401:
|
|
59
|
+
raise UnauthorizedError(
|
|
60
|
+
headers=dict(_response.headers),
|
|
61
|
+
body=typing.cast(
|
|
62
|
+
typing.Optional[typing.Any],
|
|
63
|
+
parse_obj_as(
|
|
64
|
+
type_=typing.Optional[typing.Any], # type: ignore
|
|
65
|
+
object_=_response.json(),
|
|
66
|
+
),
|
|
67
|
+
),
|
|
68
|
+
)
|
|
69
|
+
if _response.status_code == 404:
|
|
70
|
+
raise NotFoundError(
|
|
71
|
+
headers=dict(_response.headers),
|
|
72
|
+
body=typing.cast(
|
|
73
|
+
AssetNotFoundError,
|
|
74
|
+
parse_obj_as(
|
|
75
|
+
type_=AssetNotFoundError, # type: ignore
|
|
76
|
+
object_=_response.json(),
|
|
77
|
+
),
|
|
78
|
+
),
|
|
79
|
+
)
|
|
80
|
+
if _response.status_code == 422:
|
|
81
|
+
raise UnprocessableEntityError(
|
|
82
|
+
headers=dict(_response.headers),
|
|
83
|
+
body=typing.cast(
|
|
84
|
+
typing.Optional[typing.Any],
|
|
85
|
+
parse_obj_as(
|
|
86
|
+
type_=typing.Optional[typing.Any], # type: ignore
|
|
87
|
+
object_=_response.json(),
|
|
88
|
+
),
|
|
89
|
+
),
|
|
90
|
+
)
|
|
91
|
+
if _response.status_code == 500:
|
|
92
|
+
raise InternalServerError(
|
|
93
|
+
headers=dict(_response.headers),
|
|
94
|
+
body=typing.cast(
|
|
95
|
+
typing.Optional[typing.Any],
|
|
96
|
+
parse_obj_as(
|
|
97
|
+
type_=typing.Optional[typing.Any], # type: ignore
|
|
98
|
+
object_=_response.json(),
|
|
99
|
+
),
|
|
100
|
+
),
|
|
101
|
+
)
|
|
102
|
+
_response_json = _response.json()
|
|
103
|
+
except JSONDecodeError:
|
|
104
|
+
raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text)
|
|
105
|
+
raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json)
|
|
106
|
+
|
|
107
|
+
|
|
108
|
+
class AsyncRawThreadsClient:
|
|
109
|
+
def __init__(self, *, client_wrapper: AsyncClientWrapper):
|
|
110
|
+
self._client_wrapper = client_wrapper
|
|
111
|
+
|
|
112
|
+
async def get_status(
|
|
113
|
+
self, thread_id: str, *, request_options: typing.Optional[RequestOptions] = None
|
|
114
|
+
) -> AsyncHttpResponse[ThreadStatusResponseOut]:
|
|
115
|
+
"""
|
|
116
|
+
Check the status of a thread execution by thread ID. Returns thread status and associated conversation asset information for tracking progress.
|
|
117
|
+
|
|
118
|
+
Parameters
|
|
119
|
+
----------
|
|
120
|
+
thread_id : str
|
|
121
|
+
The unique thread ID to check status for
|
|
122
|
+
|
|
123
|
+
request_options : typing.Optional[RequestOptions]
|
|
124
|
+
Request-specific configuration.
|
|
125
|
+
|
|
126
|
+
Returns
|
|
127
|
+
-------
|
|
128
|
+
AsyncHttpResponse[ThreadStatusResponseOut]
|
|
129
|
+
Thread status retrieved successfully
|
|
130
|
+
"""
|
|
131
|
+
_response = await self._client_wrapper.httpx_client.request(
|
|
132
|
+
f"api/v0/threads/{jsonable_encoder(thread_id)}/status",
|
|
133
|
+
method="GET",
|
|
134
|
+
request_options=request_options,
|
|
135
|
+
)
|
|
136
|
+
try:
|
|
137
|
+
if 200 <= _response.status_code < 300:
|
|
138
|
+
_data = typing.cast(
|
|
139
|
+
ThreadStatusResponseOut,
|
|
140
|
+
parse_obj_as(
|
|
141
|
+
type_=ThreadStatusResponseOut, # type: ignore
|
|
142
|
+
object_=_response.json(),
|
|
143
|
+
),
|
|
144
|
+
)
|
|
145
|
+
return AsyncHttpResponse(response=_response, data=_data)
|
|
146
|
+
if _response.status_code == 401:
|
|
147
|
+
raise UnauthorizedError(
|
|
148
|
+
headers=dict(_response.headers),
|
|
149
|
+
body=typing.cast(
|
|
150
|
+
typing.Optional[typing.Any],
|
|
151
|
+
parse_obj_as(
|
|
152
|
+
type_=typing.Optional[typing.Any], # type: ignore
|
|
153
|
+
object_=_response.json(),
|
|
154
|
+
),
|
|
155
|
+
),
|
|
156
|
+
)
|
|
157
|
+
if _response.status_code == 404:
|
|
158
|
+
raise NotFoundError(
|
|
159
|
+
headers=dict(_response.headers),
|
|
160
|
+
body=typing.cast(
|
|
161
|
+
AssetNotFoundError,
|
|
162
|
+
parse_obj_as(
|
|
163
|
+
type_=AssetNotFoundError, # type: ignore
|
|
164
|
+
object_=_response.json(),
|
|
165
|
+
),
|
|
166
|
+
),
|
|
167
|
+
)
|
|
168
|
+
if _response.status_code == 422:
|
|
169
|
+
raise UnprocessableEntityError(
|
|
170
|
+
headers=dict(_response.headers),
|
|
171
|
+
body=typing.cast(
|
|
172
|
+
typing.Optional[typing.Any],
|
|
173
|
+
parse_obj_as(
|
|
174
|
+
type_=typing.Optional[typing.Any], # type: ignore
|
|
175
|
+
object_=_response.json(),
|
|
176
|
+
),
|
|
177
|
+
),
|
|
178
|
+
)
|
|
179
|
+
if _response.status_code == 500:
|
|
180
|
+
raise InternalServerError(
|
|
181
|
+
headers=dict(_response.headers),
|
|
182
|
+
body=typing.cast(
|
|
183
|
+
typing.Optional[typing.Any],
|
|
184
|
+
parse_obj_as(
|
|
185
|
+
type_=typing.Optional[typing.Any], # type: ignore
|
|
186
|
+
object_=_response.json(),
|
|
187
|
+
),
|
|
188
|
+
),
|
|
189
|
+
)
|
|
190
|
+
_response_json = _response.json()
|
|
191
|
+
except JSONDecodeError:
|
|
192
|
+
raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text)
|
|
193
|
+
raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json)
|
{athena_intelligence-0.1.205 → athena_intelligence-0.1.207}/src/athena/tools/sheets/client.py
RENAMED
|
@@ -930,6 +930,61 @@ class SheetsClient:
|
|
|
930
930
|
)
|
|
931
931
|
return _response.data
|
|
932
932
|
|
|
933
|
+
def insert_table_row(
|
|
934
|
+
self,
|
|
935
|
+
*,
|
|
936
|
+
asset_id: str,
|
|
937
|
+
row_data: typing.Sequence[typing.Dict[str, typing.Optional[str]]],
|
|
938
|
+
table_id: typing.Optional[str] = OMIT,
|
|
939
|
+
table_name: typing.Optional[str] = OMIT,
|
|
940
|
+
request_options: typing.Optional[RequestOptions] = None,
|
|
941
|
+
) -> SheetOperationResponse:
|
|
942
|
+
"""
|
|
943
|
+
Insert rows into a table in an Athena spreadsheet.
|
|
944
|
+
|
|
945
|
+
Parameters
|
|
946
|
+
----------
|
|
947
|
+
asset_id : str
|
|
948
|
+
The ID of the spreadsheet asset
|
|
949
|
+
|
|
950
|
+
row_data : typing.Sequence[typing.Dict[str, typing.Optional[str]]]
|
|
951
|
+
Array of row objects where keys are column names and values are cell values
|
|
952
|
+
|
|
953
|
+
table_id : typing.Optional[str]
|
|
954
|
+
Table ID to insert row into
|
|
955
|
+
|
|
956
|
+
table_name : typing.Optional[str]
|
|
957
|
+
Table name to insert row into
|
|
958
|
+
|
|
959
|
+
request_options : typing.Optional[RequestOptions]
|
|
960
|
+
Request-specific configuration.
|
|
961
|
+
|
|
962
|
+
Returns
|
|
963
|
+
-------
|
|
964
|
+
SheetOperationResponse
|
|
965
|
+
Successful Response
|
|
966
|
+
|
|
967
|
+
Examples
|
|
968
|
+
--------
|
|
969
|
+
from athena import Athena
|
|
970
|
+
|
|
971
|
+
client = Athena(
|
|
972
|
+
api_key="YOUR_API_KEY",
|
|
973
|
+
)
|
|
974
|
+
client.tools.sheets.insert_table_row(
|
|
975
|
+
asset_id="asset_id",
|
|
976
|
+
row_data=[{}],
|
|
977
|
+
)
|
|
978
|
+
"""
|
|
979
|
+
_response = self._raw_client.insert_table_row(
|
|
980
|
+
asset_id=asset_id,
|
|
981
|
+
row_data=row_data,
|
|
982
|
+
table_id=table_id,
|
|
983
|
+
table_name=table_name,
|
|
984
|
+
request_options=request_options,
|
|
985
|
+
)
|
|
986
|
+
return _response.data
|
|
987
|
+
|
|
933
988
|
def update_table(
|
|
934
989
|
self,
|
|
935
990
|
*,
|
|
@@ -2048,6 +2103,69 @@ class AsyncSheetsClient:
|
|
|
2048
2103
|
)
|
|
2049
2104
|
return _response.data
|
|
2050
2105
|
|
|
2106
|
+
async def insert_table_row(
|
|
2107
|
+
self,
|
|
2108
|
+
*,
|
|
2109
|
+
asset_id: str,
|
|
2110
|
+
row_data: typing.Sequence[typing.Dict[str, typing.Optional[str]]],
|
|
2111
|
+
table_id: typing.Optional[str] = OMIT,
|
|
2112
|
+
table_name: typing.Optional[str] = OMIT,
|
|
2113
|
+
request_options: typing.Optional[RequestOptions] = None,
|
|
2114
|
+
) -> SheetOperationResponse:
|
|
2115
|
+
"""
|
|
2116
|
+
Insert rows into a table in an Athena spreadsheet.
|
|
2117
|
+
|
|
2118
|
+
Parameters
|
|
2119
|
+
----------
|
|
2120
|
+
asset_id : str
|
|
2121
|
+
The ID of the spreadsheet asset
|
|
2122
|
+
|
|
2123
|
+
row_data : typing.Sequence[typing.Dict[str, typing.Optional[str]]]
|
|
2124
|
+
Array of row objects where keys are column names and values are cell values
|
|
2125
|
+
|
|
2126
|
+
table_id : typing.Optional[str]
|
|
2127
|
+
Table ID to insert row into
|
|
2128
|
+
|
|
2129
|
+
table_name : typing.Optional[str]
|
|
2130
|
+
Table name to insert row into
|
|
2131
|
+
|
|
2132
|
+
request_options : typing.Optional[RequestOptions]
|
|
2133
|
+
Request-specific configuration.
|
|
2134
|
+
|
|
2135
|
+
Returns
|
|
2136
|
+
-------
|
|
2137
|
+
SheetOperationResponse
|
|
2138
|
+
Successful Response
|
|
2139
|
+
|
|
2140
|
+
Examples
|
|
2141
|
+
--------
|
|
2142
|
+
import asyncio
|
|
2143
|
+
|
|
2144
|
+
from athena import AsyncAthena
|
|
2145
|
+
|
|
2146
|
+
client = AsyncAthena(
|
|
2147
|
+
api_key="YOUR_API_KEY",
|
|
2148
|
+
)
|
|
2149
|
+
|
|
2150
|
+
|
|
2151
|
+
async def main() -> None:
|
|
2152
|
+
await client.tools.sheets.insert_table_row(
|
|
2153
|
+
asset_id="asset_id",
|
|
2154
|
+
row_data=[{}],
|
|
2155
|
+
)
|
|
2156
|
+
|
|
2157
|
+
|
|
2158
|
+
asyncio.run(main())
|
|
2159
|
+
"""
|
|
2160
|
+
_response = await self._raw_client.insert_table_row(
|
|
2161
|
+
asset_id=asset_id,
|
|
2162
|
+
row_data=row_data,
|
|
2163
|
+
table_id=table_id,
|
|
2164
|
+
table_name=table_name,
|
|
2165
|
+
request_options=request_options,
|
|
2166
|
+
)
|
|
2167
|
+
return _response.data
|
|
2168
|
+
|
|
2051
2169
|
async def update_table(
|
|
2052
2170
|
self,
|
|
2053
2171
|
*,
|