athena-intelligence 0.1.230__py3-none-any.whl → 0.1.242__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of athena-intelligence might be problematic. Click here for more details.
- athena/__init__.py +217 -68
- athena/agents/__init__.py +33 -1
- athena/agents/client.py +81 -18
- athena/assets/client.py +12 -2
- athena/base_client.py +118 -18
- athena/client.py +14 -8
- athena/core/__init__.py +73 -20
- athena/core/client_wrapper.py +2 -2
- athena/core/force_multipart.py +4 -2
- athena/core/http_response.py +1 -1
- athena/core/pydantic_utilities.py +5 -2
- athena/errors/__init__.py +42 -7
- athena/query/__init__.py +28 -1
- athena/query/types/__init__.py +30 -1
- athena/tools/__init__.py +47 -3
- athena/tools/client.py +157 -26
- athena/tools/sheets/__init__.py +30 -0
- athena/tools/sheets/client.py +59 -94
- athena/tools/sheets/raw_client.py +60 -74
- athena/tools/sheets/types/__init__.py +36 -0
- athena/tools/sheets/types/update_sheet_range_request_values_item_item.py +5 -0
- athena/tools/types/__init__.py +28 -1
- athena/types/__init__.py +181 -51
- athena/types/aop_execute_response_out.py +2 -1
- athena/types/backgroundcolor.py +7 -0
- athena/types/border_model.py +23 -0
- athena/types/border_style.py +7 -0
- athena/types/borders_model.py +23 -0
- athena/types/cell_format.py +49 -0
- athena/types/cell_format_horizontal_alignment.py +5 -0
- athena/types/cell_format_vertical_alignment.py +5 -0
- athena/types/color.py +7 -0
- athena/types/conversation_asset_info.py +3 -2
- athena/types/conversation_message.py +42 -0
- athena/types/conversation_result.py +67 -0
- athena/types/number_format_model.py +28 -0
- athena/types/number_format_type.py +21 -0
- athena/types/sheet.py +53 -0
- athena/types/text_format_model.py +28 -0
- athena/types/textrotation.py +5 -0
- athena/types/theme_color.py +20 -0
- athena/types/wrap_strategy.py +5 -0
- {athena_intelligence-0.1.230.dist-info → athena_intelligence-0.1.242.dist-info}/METADATA +1 -1
- {athena_intelligence-0.1.230.dist-info → athena_intelligence-0.1.242.dist-info}/RECORD +45 -26
- {athena_intelligence-0.1.230.dist-info → athena_intelligence-0.1.242.dist-info}/WHEEL +0 -0
|
@@ -8,11 +8,15 @@ from ...core.client_wrapper import AsyncClientWrapper, SyncClientWrapper
|
|
|
8
8
|
from ...core.http_response import AsyncHttpResponse, HttpResponse
|
|
9
9
|
from ...core.pydantic_utilities import parse_obj_as
|
|
10
10
|
from ...core.request_options import RequestOptions
|
|
11
|
+
from ...core.serialization import convert_and_respect_annotation_metadata
|
|
11
12
|
from ...errors.unprocessable_entity_error import UnprocessableEntityError
|
|
13
|
+
from ...types.cell_format import CellFormat
|
|
12
14
|
from ...types.create_new_sheet_tab_response import CreateNewSheetTabResponse
|
|
13
15
|
from ...types.get_table_response import GetTableResponse
|
|
16
|
+
from ...types.sheet import Sheet
|
|
14
17
|
from ...types.sheet_operation_response import SheetOperationResponse
|
|
15
18
|
from ...types.table_row_data import TableRowData
|
|
19
|
+
from .types.update_sheet_range_request_values_item_item import UpdateSheetRangeRequestValuesItemItem
|
|
16
20
|
|
|
17
21
|
# this is used as the default value for optional parameters
|
|
18
22
|
OMIT = typing.cast(typing.Any, ...)
|
|
@@ -503,10 +507,9 @@ class RawSheetsClient:
|
|
|
503
507
|
asset_id: str,
|
|
504
508
|
end_column: int,
|
|
505
509
|
end_row: int,
|
|
510
|
+
formatting: CellFormat,
|
|
506
511
|
start_column: int,
|
|
507
512
|
start_row: int,
|
|
508
|
-
type: str,
|
|
509
|
-
value_json: str,
|
|
510
513
|
sheet_id: typing.Optional[int] = OMIT,
|
|
511
514
|
request_options: typing.Optional[RequestOptions] = None,
|
|
512
515
|
) -> HttpResponse[SheetOperationResponse]:
|
|
@@ -524,18 +527,15 @@ class RawSheetsClient:
|
|
|
524
527
|
end_row : int
|
|
525
528
|
1-based ending row index
|
|
526
529
|
|
|
530
|
+
formatting : CellFormat
|
|
531
|
+
Cell format
|
|
532
|
+
|
|
527
533
|
start_column : int
|
|
528
534
|
1-based starting column index
|
|
529
535
|
|
|
530
536
|
start_row : int
|
|
531
537
|
1-based starting row index
|
|
532
538
|
|
|
533
|
-
type : str
|
|
534
|
-
Formatting type (e.g. backgroundColor, textFormat, borders, etc.)
|
|
535
|
-
|
|
536
|
-
value_json : str
|
|
537
|
-
JSON string for value param (e.g. '"#FF0000"' or '{"fontSize":12}')
|
|
538
|
-
|
|
539
539
|
sheet_id : typing.Optional[int]
|
|
540
540
|
Sheet ID (defaults to 1)
|
|
541
541
|
|
|
@@ -554,11 +554,12 @@ class RawSheetsClient:
|
|
|
554
554
|
"asset_id": asset_id,
|
|
555
555
|
"end_column": end_column,
|
|
556
556
|
"end_row": end_row,
|
|
557
|
+
"formatting": convert_and_respect_annotation_metadata(
|
|
558
|
+
object_=formatting, annotation=CellFormat, direction="write"
|
|
559
|
+
),
|
|
557
560
|
"sheet_id": sheet_id,
|
|
558
561
|
"start_column": start_column,
|
|
559
562
|
"start_row": start_row,
|
|
560
|
-
"type": type,
|
|
561
|
-
"value_json": value_json,
|
|
562
563
|
},
|
|
563
564
|
headers={
|
|
564
565
|
"content-type": "application/json",
|
|
@@ -598,7 +599,8 @@ class RawSheetsClient:
|
|
|
598
599
|
asset_id: str,
|
|
599
600
|
start_column: int,
|
|
600
601
|
start_row: int,
|
|
601
|
-
values: typing.Sequence[
|
|
602
|
+
values: typing.Sequence[typing.Sequence[typing.Optional[UpdateSheetRangeRequestValuesItemItem]]],
|
|
603
|
+
formatting: typing.Optional[typing.Sequence[typing.Sequence[typing.Optional[CellFormat]]]] = OMIT,
|
|
602
604
|
sheet_id: typing.Optional[int] = OMIT,
|
|
603
605
|
request_options: typing.Optional[RequestOptions] = None,
|
|
604
606
|
) -> HttpResponse[SheetOperationResponse]:
|
|
@@ -616,8 +618,11 @@ class RawSheetsClient:
|
|
|
616
618
|
start_row : int
|
|
617
619
|
1-based starting row index
|
|
618
620
|
|
|
619
|
-
values : typing.Sequence[
|
|
620
|
-
|
|
621
|
+
values : typing.Sequence[typing.Sequence[typing.Optional[UpdateSheetRangeRequestValuesItemItem]]]
|
|
622
|
+
2D list of cells for each row
|
|
623
|
+
|
|
624
|
+
formatting : typing.Optional[typing.Sequence[typing.Sequence[typing.Optional[CellFormat]]]]
|
|
625
|
+
Optional 2D list of cell formats matching the structure of values. Each row is a list of CellFormat objects for each cell in that row. Use None for cells without formatting. numberFormat is not required unless user explicity asked to change
|
|
621
626
|
|
|
622
627
|
sheet_id : typing.Optional[int]
|
|
623
628
|
Sheet ID (defaults to 1)
|
|
@@ -635,10 +640,19 @@ class RawSheetsClient:
|
|
|
635
640
|
method="POST",
|
|
636
641
|
json={
|
|
637
642
|
"asset_id": asset_id,
|
|
643
|
+
"formatting": convert_and_respect_annotation_metadata(
|
|
644
|
+
object_=formatting,
|
|
645
|
+
annotation=typing.Sequence[typing.Sequence[typing.Optional[CellFormat]]],
|
|
646
|
+
direction="write",
|
|
647
|
+
),
|
|
638
648
|
"sheet_id": sheet_id,
|
|
639
649
|
"start_column": start_column,
|
|
640
650
|
"start_row": start_row,
|
|
641
|
-
"values":
|
|
651
|
+
"values": convert_and_respect_annotation_metadata(
|
|
652
|
+
object_=values,
|
|
653
|
+
annotation=typing.Sequence[typing.Sequence[typing.Optional[UpdateSheetRangeRequestValuesItemItem]]],
|
|
654
|
+
direction="write",
|
|
655
|
+
),
|
|
642
656
|
},
|
|
643
657
|
headers={
|
|
644
658
|
"content-type": "application/json",
|
|
@@ -818,14 +832,7 @@ class RawSheetsClient:
|
|
|
818
832
|
raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json)
|
|
819
833
|
|
|
820
834
|
def create_tab(
|
|
821
|
-
self,
|
|
822
|
-
*,
|
|
823
|
-
asset_id: str,
|
|
824
|
-
sheet_id: int,
|
|
825
|
-
title: str,
|
|
826
|
-
active_sheet_id: typing.Optional[int] = OMIT,
|
|
827
|
-
tab_color: typing.Optional[str] = OMIT,
|
|
828
|
-
request_options: typing.Optional[RequestOptions] = None,
|
|
835
|
+
self, *, asset_id: str, sheet: Sheet, request_options: typing.Optional[RequestOptions] = None
|
|
829
836
|
) -> HttpResponse[CreateNewSheetTabResponse]:
|
|
830
837
|
"""
|
|
831
838
|
Create a new tab in an Athena spreadsheet.
|
|
@@ -835,17 +842,8 @@ class RawSheetsClient:
|
|
|
835
842
|
asset_id : str
|
|
836
843
|
The ID of the spreadsheet asset
|
|
837
844
|
|
|
838
|
-
|
|
839
|
-
Sheet
|
|
840
|
-
|
|
841
|
-
title : str
|
|
842
|
-
Title of the new tab
|
|
843
|
-
|
|
844
|
-
active_sheet_id : typing.Optional[int]
|
|
845
|
-
Currently active sheet ID
|
|
846
|
-
|
|
847
|
-
tab_color : typing.Optional[str]
|
|
848
|
-
Optional color of the new tab
|
|
845
|
+
sheet : Sheet
|
|
846
|
+
Sheet Specification
|
|
849
847
|
|
|
850
848
|
request_options : typing.Optional[RequestOptions]
|
|
851
849
|
Request-specific configuration.
|
|
@@ -859,11 +857,8 @@ class RawSheetsClient:
|
|
|
859
857
|
"api/v0/tools/sheets/tab/create",
|
|
860
858
|
method="POST",
|
|
861
859
|
json={
|
|
862
|
-
"active_sheet_id": active_sheet_id,
|
|
863
860
|
"asset_id": asset_id,
|
|
864
|
-
"
|
|
865
|
-
"tab_color": tab_color,
|
|
866
|
-
"title": title,
|
|
861
|
+
"sheet": convert_and_respect_annotation_metadata(object_=sheet, annotation=Sheet, direction="write"),
|
|
867
862
|
},
|
|
868
863
|
headers={
|
|
869
864
|
"content-type": "application/json",
|
|
@@ -1873,10 +1868,9 @@ class AsyncRawSheetsClient:
|
|
|
1873
1868
|
asset_id: str,
|
|
1874
1869
|
end_column: int,
|
|
1875
1870
|
end_row: int,
|
|
1871
|
+
formatting: CellFormat,
|
|
1876
1872
|
start_column: int,
|
|
1877
1873
|
start_row: int,
|
|
1878
|
-
type: str,
|
|
1879
|
-
value_json: str,
|
|
1880
1874
|
sheet_id: typing.Optional[int] = OMIT,
|
|
1881
1875
|
request_options: typing.Optional[RequestOptions] = None,
|
|
1882
1876
|
) -> AsyncHttpResponse[SheetOperationResponse]:
|
|
@@ -1894,18 +1888,15 @@ class AsyncRawSheetsClient:
|
|
|
1894
1888
|
end_row : int
|
|
1895
1889
|
1-based ending row index
|
|
1896
1890
|
|
|
1891
|
+
formatting : CellFormat
|
|
1892
|
+
Cell format
|
|
1893
|
+
|
|
1897
1894
|
start_column : int
|
|
1898
1895
|
1-based starting column index
|
|
1899
1896
|
|
|
1900
1897
|
start_row : int
|
|
1901
1898
|
1-based starting row index
|
|
1902
1899
|
|
|
1903
|
-
type : str
|
|
1904
|
-
Formatting type (e.g. backgroundColor, textFormat, borders, etc.)
|
|
1905
|
-
|
|
1906
|
-
value_json : str
|
|
1907
|
-
JSON string for value param (e.g. '"#FF0000"' or '{"fontSize":12}')
|
|
1908
|
-
|
|
1909
1900
|
sheet_id : typing.Optional[int]
|
|
1910
1901
|
Sheet ID (defaults to 1)
|
|
1911
1902
|
|
|
@@ -1924,11 +1915,12 @@ class AsyncRawSheetsClient:
|
|
|
1924
1915
|
"asset_id": asset_id,
|
|
1925
1916
|
"end_column": end_column,
|
|
1926
1917
|
"end_row": end_row,
|
|
1918
|
+
"formatting": convert_and_respect_annotation_metadata(
|
|
1919
|
+
object_=formatting, annotation=CellFormat, direction="write"
|
|
1920
|
+
),
|
|
1927
1921
|
"sheet_id": sheet_id,
|
|
1928
1922
|
"start_column": start_column,
|
|
1929
1923
|
"start_row": start_row,
|
|
1930
|
-
"type": type,
|
|
1931
|
-
"value_json": value_json,
|
|
1932
1924
|
},
|
|
1933
1925
|
headers={
|
|
1934
1926
|
"content-type": "application/json",
|
|
@@ -1968,7 +1960,8 @@ class AsyncRawSheetsClient:
|
|
|
1968
1960
|
asset_id: str,
|
|
1969
1961
|
start_column: int,
|
|
1970
1962
|
start_row: int,
|
|
1971
|
-
values: typing.Sequence[
|
|
1963
|
+
values: typing.Sequence[typing.Sequence[typing.Optional[UpdateSheetRangeRequestValuesItemItem]]],
|
|
1964
|
+
formatting: typing.Optional[typing.Sequence[typing.Sequence[typing.Optional[CellFormat]]]] = OMIT,
|
|
1972
1965
|
sheet_id: typing.Optional[int] = OMIT,
|
|
1973
1966
|
request_options: typing.Optional[RequestOptions] = None,
|
|
1974
1967
|
) -> AsyncHttpResponse[SheetOperationResponse]:
|
|
@@ -1986,8 +1979,11 @@ class AsyncRawSheetsClient:
|
|
|
1986
1979
|
start_row : int
|
|
1987
1980
|
1-based starting row index
|
|
1988
1981
|
|
|
1989
|
-
values : typing.Sequence[
|
|
1990
|
-
|
|
1982
|
+
values : typing.Sequence[typing.Sequence[typing.Optional[UpdateSheetRangeRequestValuesItemItem]]]
|
|
1983
|
+
2D list of cells for each row
|
|
1984
|
+
|
|
1985
|
+
formatting : typing.Optional[typing.Sequence[typing.Sequence[typing.Optional[CellFormat]]]]
|
|
1986
|
+
Optional 2D list of cell formats matching the structure of values. Each row is a list of CellFormat objects for each cell in that row. Use None for cells without formatting. numberFormat is not required unless user explicity asked to change
|
|
1991
1987
|
|
|
1992
1988
|
sheet_id : typing.Optional[int]
|
|
1993
1989
|
Sheet ID (defaults to 1)
|
|
@@ -2005,10 +2001,19 @@ class AsyncRawSheetsClient:
|
|
|
2005
2001
|
method="POST",
|
|
2006
2002
|
json={
|
|
2007
2003
|
"asset_id": asset_id,
|
|
2004
|
+
"formatting": convert_and_respect_annotation_metadata(
|
|
2005
|
+
object_=formatting,
|
|
2006
|
+
annotation=typing.Sequence[typing.Sequence[typing.Optional[CellFormat]]],
|
|
2007
|
+
direction="write",
|
|
2008
|
+
),
|
|
2008
2009
|
"sheet_id": sheet_id,
|
|
2009
2010
|
"start_column": start_column,
|
|
2010
2011
|
"start_row": start_row,
|
|
2011
|
-
"values":
|
|
2012
|
+
"values": convert_and_respect_annotation_metadata(
|
|
2013
|
+
object_=values,
|
|
2014
|
+
annotation=typing.Sequence[typing.Sequence[typing.Optional[UpdateSheetRangeRequestValuesItemItem]]],
|
|
2015
|
+
direction="write",
|
|
2016
|
+
),
|
|
2012
2017
|
},
|
|
2013
2018
|
headers={
|
|
2014
2019
|
"content-type": "application/json",
|
|
@@ -2188,14 +2193,7 @@ class AsyncRawSheetsClient:
|
|
|
2188
2193
|
raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json)
|
|
2189
2194
|
|
|
2190
2195
|
async def create_tab(
|
|
2191
|
-
self,
|
|
2192
|
-
*,
|
|
2193
|
-
asset_id: str,
|
|
2194
|
-
sheet_id: int,
|
|
2195
|
-
title: str,
|
|
2196
|
-
active_sheet_id: typing.Optional[int] = OMIT,
|
|
2197
|
-
tab_color: typing.Optional[str] = OMIT,
|
|
2198
|
-
request_options: typing.Optional[RequestOptions] = None,
|
|
2196
|
+
self, *, asset_id: str, sheet: Sheet, request_options: typing.Optional[RequestOptions] = None
|
|
2199
2197
|
) -> AsyncHttpResponse[CreateNewSheetTabResponse]:
|
|
2200
2198
|
"""
|
|
2201
2199
|
Create a new tab in an Athena spreadsheet.
|
|
@@ -2205,17 +2203,8 @@ class AsyncRawSheetsClient:
|
|
|
2205
2203
|
asset_id : str
|
|
2206
2204
|
The ID of the spreadsheet asset
|
|
2207
2205
|
|
|
2208
|
-
|
|
2209
|
-
Sheet
|
|
2210
|
-
|
|
2211
|
-
title : str
|
|
2212
|
-
Title of the new tab
|
|
2213
|
-
|
|
2214
|
-
active_sheet_id : typing.Optional[int]
|
|
2215
|
-
Currently active sheet ID
|
|
2216
|
-
|
|
2217
|
-
tab_color : typing.Optional[str]
|
|
2218
|
-
Optional color of the new tab
|
|
2206
|
+
sheet : Sheet
|
|
2207
|
+
Sheet Specification
|
|
2219
2208
|
|
|
2220
2209
|
request_options : typing.Optional[RequestOptions]
|
|
2221
2210
|
Request-specific configuration.
|
|
@@ -2229,11 +2218,8 @@ class AsyncRawSheetsClient:
|
|
|
2229
2218
|
"api/v0/tools/sheets/tab/create",
|
|
2230
2219
|
method="POST",
|
|
2231
2220
|
json={
|
|
2232
|
-
"active_sheet_id": active_sheet_id,
|
|
2233
2221
|
"asset_id": asset_id,
|
|
2234
|
-
"
|
|
2235
|
-
"tab_color": tab_color,
|
|
2236
|
-
"title": title,
|
|
2222
|
+
"sheet": convert_and_respect_annotation_metadata(object_=sheet, annotation=Sheet, direction="write"),
|
|
2237
2223
|
},
|
|
2238
2224
|
headers={
|
|
2239
2225
|
"content-type": "application/json",
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
# This file was auto-generated by Fern from our API Definition.
|
|
2
|
+
|
|
3
|
+
# isort: skip_file
|
|
4
|
+
|
|
5
|
+
import typing
|
|
6
|
+
from importlib import import_module
|
|
7
|
+
|
|
8
|
+
if typing.TYPE_CHECKING:
|
|
9
|
+
from .update_sheet_range_request_values_item_item import UpdateSheetRangeRequestValuesItemItem
|
|
10
|
+
_dynamic_imports: typing.Dict[str, str] = {
|
|
11
|
+
"UpdateSheetRangeRequestValuesItemItem": ".update_sheet_range_request_values_item_item"
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
def __getattr__(attr_name: str) -> typing.Any:
|
|
16
|
+
module_name = _dynamic_imports.get(attr_name)
|
|
17
|
+
if module_name is None:
|
|
18
|
+
raise AttributeError(f"No {attr_name} found in _dynamic_imports for module name -> {__name__}")
|
|
19
|
+
try:
|
|
20
|
+
module = import_module(module_name, __package__)
|
|
21
|
+
if module_name == f".{attr_name}":
|
|
22
|
+
return module
|
|
23
|
+
else:
|
|
24
|
+
return getattr(module, attr_name)
|
|
25
|
+
except ImportError as e:
|
|
26
|
+
raise ImportError(f"Failed to import {attr_name} from {module_name}: {e}") from e
|
|
27
|
+
except AttributeError as e:
|
|
28
|
+
raise AttributeError(f"Failed to get {attr_name} from {module_name}: {e}") from e
|
|
29
|
+
|
|
30
|
+
|
|
31
|
+
def __dir__():
|
|
32
|
+
lazy_attrs = list(_dynamic_imports.keys())
|
|
33
|
+
return sorted(lazy_attrs)
|
|
34
|
+
|
|
35
|
+
|
|
36
|
+
__all__ = ["UpdateSheetRangeRequestValuesItemItem"]
|
athena/tools/types/__init__.py
CHANGED
|
@@ -2,6 +2,33 @@
|
|
|
2
2
|
|
|
3
3
|
# isort: skip_file
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
import typing
|
|
6
|
+
from importlib import import_module
|
|
7
|
+
|
|
8
|
+
if typing.TYPE_CHECKING:
|
|
9
|
+
from .tools_data_frame_request_columns_item import ToolsDataFrameRequestColumnsItem
|
|
10
|
+
_dynamic_imports: typing.Dict[str, str] = {"ToolsDataFrameRequestColumnsItem": ".tools_data_frame_request_columns_item"}
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
def __getattr__(attr_name: str) -> typing.Any:
|
|
14
|
+
module_name = _dynamic_imports.get(attr_name)
|
|
15
|
+
if module_name is None:
|
|
16
|
+
raise AttributeError(f"No {attr_name} found in _dynamic_imports for module name -> {__name__}")
|
|
17
|
+
try:
|
|
18
|
+
module = import_module(module_name, __package__)
|
|
19
|
+
if module_name == f".{attr_name}":
|
|
20
|
+
return module
|
|
21
|
+
else:
|
|
22
|
+
return getattr(module, attr_name)
|
|
23
|
+
except ImportError as e:
|
|
24
|
+
raise ImportError(f"Failed to import {attr_name} from {module_name}: {e}") from e
|
|
25
|
+
except AttributeError as e:
|
|
26
|
+
raise AttributeError(f"Failed to get {attr_name} from {module_name}: {e}") from e
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
def __dir__():
|
|
30
|
+
lazy_attrs = list(_dynamic_imports.keys())
|
|
31
|
+
return sorted(lazy_attrs)
|
|
32
|
+
|
|
6
33
|
|
|
7
34
|
__all__ = ["ToolsDataFrameRequestColumnsItem"]
|
athena/types/__init__.py
CHANGED
|
@@ -2,57 +2,170 @@
|
|
|
2
2
|
|
|
3
3
|
# isort: skip_file
|
|
4
4
|
|
|
5
|
-
|
|
6
|
-
from
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
from .
|
|
10
|
-
from .
|
|
11
|
-
from .
|
|
12
|
-
from .
|
|
13
|
-
from .
|
|
14
|
-
from .
|
|
15
|
-
from .
|
|
16
|
-
from .
|
|
17
|
-
from .
|
|
18
|
-
from .
|
|
19
|
-
from .
|
|
20
|
-
from .
|
|
21
|
-
from .
|
|
22
|
-
from .
|
|
23
|
-
from .
|
|
24
|
-
from .
|
|
25
|
-
from .
|
|
26
|
-
from .
|
|
27
|
-
from .
|
|
28
|
-
from .
|
|
29
|
-
from .
|
|
30
|
-
from .
|
|
31
|
-
from .
|
|
32
|
-
from .
|
|
33
|
-
from .
|
|
34
|
-
from .
|
|
35
|
-
from .
|
|
36
|
-
from .
|
|
37
|
-
from .
|
|
38
|
-
from .
|
|
39
|
-
from .
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
from .
|
|
45
|
-
from .
|
|
46
|
-
from .
|
|
47
|
-
from .
|
|
48
|
-
from .
|
|
49
|
-
from .
|
|
50
|
-
from .
|
|
51
|
-
from .
|
|
52
|
-
from .
|
|
53
|
-
from .
|
|
54
|
-
|
|
55
|
-
|
|
5
|
+
import typing
|
|
6
|
+
from importlib import import_module
|
|
7
|
+
|
|
8
|
+
if typing.TYPE_CHECKING:
|
|
9
|
+
from .aop_async_execute_response_out import AopAsyncExecuteResponseOut
|
|
10
|
+
from .aop_execute_request_in import AopExecuteRequestIn
|
|
11
|
+
from .aop_execute_response_out import AopExecuteResponseOut
|
|
12
|
+
from .asset_content_request_out import AssetContentRequestOut
|
|
13
|
+
from .asset_node import AssetNode
|
|
14
|
+
from .asset_screenshot_response_out import AssetScreenshotResponseOut
|
|
15
|
+
from .backgroundcolor import Backgroundcolor
|
|
16
|
+
from .border_model import BorderModel
|
|
17
|
+
from .border_style import BorderStyle
|
|
18
|
+
from .borders_model import BordersModel
|
|
19
|
+
from .cell_format import CellFormat
|
|
20
|
+
from .cell_format_horizontal_alignment import CellFormatHorizontalAlignment
|
|
21
|
+
from .cell_format_vertical_alignment import CellFormatVerticalAlignment
|
|
22
|
+
from .chunk import Chunk
|
|
23
|
+
from .chunk_content_item import ChunkContentItem, ChunkContentItem_ImageUrl, ChunkContentItem_Text
|
|
24
|
+
from .chunk_result import ChunkResult
|
|
25
|
+
from .chunk_result_chunk_id import ChunkResultChunkId
|
|
26
|
+
from .color import Color
|
|
27
|
+
from .content import Content
|
|
28
|
+
from .conversation_asset_info import ConversationAssetInfo
|
|
29
|
+
from .conversation_message import ConversationMessage
|
|
30
|
+
from .conversation_result import ConversationResult
|
|
31
|
+
from .create_new_sheet_tab_response import CreateNewSheetTabResponse
|
|
32
|
+
from .custom_agent_response import CustomAgentResponse
|
|
33
|
+
from .data_frame_request_out import DataFrameRequestOut
|
|
34
|
+
from .data_frame_request_out_columns_item import DataFrameRequestOutColumnsItem
|
|
35
|
+
from .data_frame_request_out_data_item_item import DataFrameRequestOutDataItemItem
|
|
36
|
+
from .data_frame_request_out_index_item import DataFrameRequestOutIndexItem
|
|
37
|
+
from .data_frame_unknown_format_error import DataFrameUnknownFormatError
|
|
38
|
+
from .document_chunk import DocumentChunk
|
|
39
|
+
from .drive_agent_response import DriveAgentResponse
|
|
40
|
+
from .file_chunk_request_out import FileChunkRequestOut
|
|
41
|
+
from .file_too_large_error import FileTooLargeError
|
|
42
|
+
from .folder_response import FolderResponse
|
|
43
|
+
from .general_agent_config import GeneralAgentConfig
|
|
44
|
+
from .general_agent_config_enabled_tools_item import GeneralAgentConfigEnabledToolsItem
|
|
45
|
+
from .general_agent_request import GeneralAgentRequest
|
|
46
|
+
from .general_agent_response import GeneralAgentResponse
|
|
47
|
+
from .general_agent_response_message import GeneralAgentResponseMessage
|
|
48
|
+
from .general_agent_response_message_kwargs import GeneralAgentResponseMessageKwargs
|
|
49
|
+
from .get_table_response import GetTableResponse
|
|
50
|
+
from .id import Id
|
|
51
|
+
from .image_url_content import ImageUrlContent
|
|
52
|
+
from .input_message import InputMessage
|
|
53
|
+
from .input_message_content_item import (
|
|
54
|
+
InputMessageContentItem,
|
|
55
|
+
InputMessageContentItem_ImageUrl,
|
|
56
|
+
InputMessageContentItem_Text,
|
|
57
|
+
)
|
|
58
|
+
from .number_format_model import NumberFormatModel
|
|
59
|
+
from .number_format_type import NumberFormatType
|
|
60
|
+
from .paginated_assets_out import PaginatedAssetsOut
|
|
61
|
+
from .prompt_message import PromptMessage
|
|
62
|
+
from .public_asset_out import PublicAssetOut
|
|
63
|
+
from .research_agent_response import ResearchAgentResponse
|
|
64
|
+
from .save_asset_request_out import SaveAssetRequestOut
|
|
65
|
+
from .sheet import Sheet
|
|
66
|
+
from .sheet_operation_response import SheetOperationResponse
|
|
67
|
+
from .sql_agent_response import SqlAgentResponse
|
|
68
|
+
from .structured_data_extractor_response import StructuredDataExtractorResponse
|
|
69
|
+
from .table_row_data import TableRowData
|
|
70
|
+
from .text_content import TextContent
|
|
71
|
+
from .text_format_model import TextFormatModel
|
|
72
|
+
from .textrotation import Textrotation
|
|
73
|
+
from .theme_color import ThemeColor
|
|
74
|
+
from .thread_status_response_out import ThreadStatusResponseOut
|
|
75
|
+
from .type import Type
|
|
76
|
+
from .wrap_strategy import WrapStrategy
|
|
77
|
+
_dynamic_imports: typing.Dict[str, str] = {
|
|
78
|
+
"AopAsyncExecuteResponseOut": ".aop_async_execute_response_out",
|
|
79
|
+
"AopExecuteRequestIn": ".aop_execute_request_in",
|
|
80
|
+
"AopExecuteResponseOut": ".aop_execute_response_out",
|
|
81
|
+
"AssetContentRequestOut": ".asset_content_request_out",
|
|
82
|
+
"AssetNode": ".asset_node",
|
|
83
|
+
"AssetScreenshotResponseOut": ".asset_screenshot_response_out",
|
|
84
|
+
"Backgroundcolor": ".backgroundcolor",
|
|
85
|
+
"BorderModel": ".border_model",
|
|
86
|
+
"BorderStyle": ".border_style",
|
|
87
|
+
"BordersModel": ".borders_model",
|
|
88
|
+
"CellFormat": ".cell_format",
|
|
89
|
+
"CellFormatHorizontalAlignment": ".cell_format_horizontal_alignment",
|
|
90
|
+
"CellFormatVerticalAlignment": ".cell_format_vertical_alignment",
|
|
91
|
+
"Chunk": ".chunk",
|
|
92
|
+
"ChunkContentItem": ".chunk_content_item",
|
|
93
|
+
"ChunkContentItem_ImageUrl": ".chunk_content_item",
|
|
94
|
+
"ChunkContentItem_Text": ".chunk_content_item",
|
|
95
|
+
"ChunkResult": ".chunk_result",
|
|
96
|
+
"ChunkResultChunkId": ".chunk_result_chunk_id",
|
|
97
|
+
"Color": ".color",
|
|
98
|
+
"Content": ".content",
|
|
99
|
+
"ConversationAssetInfo": ".conversation_asset_info",
|
|
100
|
+
"ConversationMessage": ".conversation_message",
|
|
101
|
+
"ConversationResult": ".conversation_result",
|
|
102
|
+
"CreateNewSheetTabResponse": ".create_new_sheet_tab_response",
|
|
103
|
+
"CustomAgentResponse": ".custom_agent_response",
|
|
104
|
+
"DataFrameRequestOut": ".data_frame_request_out",
|
|
105
|
+
"DataFrameRequestOutColumnsItem": ".data_frame_request_out_columns_item",
|
|
106
|
+
"DataFrameRequestOutDataItemItem": ".data_frame_request_out_data_item_item",
|
|
107
|
+
"DataFrameRequestOutIndexItem": ".data_frame_request_out_index_item",
|
|
108
|
+
"DataFrameUnknownFormatError": ".data_frame_unknown_format_error",
|
|
109
|
+
"DocumentChunk": ".document_chunk",
|
|
110
|
+
"DriveAgentResponse": ".drive_agent_response",
|
|
111
|
+
"FileChunkRequestOut": ".file_chunk_request_out",
|
|
112
|
+
"FileTooLargeError": ".file_too_large_error",
|
|
113
|
+
"FolderResponse": ".folder_response",
|
|
114
|
+
"GeneralAgentConfig": ".general_agent_config",
|
|
115
|
+
"GeneralAgentConfigEnabledToolsItem": ".general_agent_config_enabled_tools_item",
|
|
116
|
+
"GeneralAgentRequest": ".general_agent_request",
|
|
117
|
+
"GeneralAgentResponse": ".general_agent_response",
|
|
118
|
+
"GeneralAgentResponseMessage": ".general_agent_response_message",
|
|
119
|
+
"GeneralAgentResponseMessageKwargs": ".general_agent_response_message_kwargs",
|
|
120
|
+
"GetTableResponse": ".get_table_response",
|
|
121
|
+
"Id": ".id",
|
|
122
|
+
"ImageUrlContent": ".image_url_content",
|
|
123
|
+
"InputMessage": ".input_message",
|
|
124
|
+
"InputMessageContentItem": ".input_message_content_item",
|
|
125
|
+
"InputMessageContentItem_ImageUrl": ".input_message_content_item",
|
|
126
|
+
"InputMessageContentItem_Text": ".input_message_content_item",
|
|
127
|
+
"NumberFormatModel": ".number_format_model",
|
|
128
|
+
"NumberFormatType": ".number_format_type",
|
|
129
|
+
"PaginatedAssetsOut": ".paginated_assets_out",
|
|
130
|
+
"PromptMessage": ".prompt_message",
|
|
131
|
+
"PublicAssetOut": ".public_asset_out",
|
|
132
|
+
"ResearchAgentResponse": ".research_agent_response",
|
|
133
|
+
"SaveAssetRequestOut": ".save_asset_request_out",
|
|
134
|
+
"Sheet": ".sheet",
|
|
135
|
+
"SheetOperationResponse": ".sheet_operation_response",
|
|
136
|
+
"SqlAgentResponse": ".sql_agent_response",
|
|
137
|
+
"StructuredDataExtractorResponse": ".structured_data_extractor_response",
|
|
138
|
+
"TableRowData": ".table_row_data",
|
|
139
|
+
"TextContent": ".text_content",
|
|
140
|
+
"TextFormatModel": ".text_format_model",
|
|
141
|
+
"Textrotation": ".textrotation",
|
|
142
|
+
"ThemeColor": ".theme_color",
|
|
143
|
+
"ThreadStatusResponseOut": ".thread_status_response_out",
|
|
144
|
+
"Type": ".type",
|
|
145
|
+
"WrapStrategy": ".wrap_strategy",
|
|
146
|
+
}
|
|
147
|
+
|
|
148
|
+
|
|
149
|
+
def __getattr__(attr_name: str) -> typing.Any:
|
|
150
|
+
module_name = _dynamic_imports.get(attr_name)
|
|
151
|
+
if module_name is None:
|
|
152
|
+
raise AttributeError(f"No {attr_name} found in _dynamic_imports for module name -> {__name__}")
|
|
153
|
+
try:
|
|
154
|
+
module = import_module(module_name, __package__)
|
|
155
|
+
if module_name == f".{attr_name}":
|
|
156
|
+
return module
|
|
157
|
+
else:
|
|
158
|
+
return getattr(module, attr_name)
|
|
159
|
+
except ImportError as e:
|
|
160
|
+
raise ImportError(f"Failed to import {attr_name} from {module_name}: {e}") from e
|
|
161
|
+
except AttributeError as e:
|
|
162
|
+
raise AttributeError(f"Failed to get {attr_name} from {module_name}: {e}") from e
|
|
163
|
+
|
|
164
|
+
|
|
165
|
+
def __dir__():
|
|
166
|
+
lazy_attrs = list(_dynamic_imports.keys())
|
|
167
|
+
return sorted(lazy_attrs)
|
|
168
|
+
|
|
56
169
|
|
|
57
170
|
__all__ = [
|
|
58
171
|
"AopAsyncExecuteResponseOut",
|
|
@@ -61,14 +174,24 @@ __all__ = [
|
|
|
61
174
|
"AssetContentRequestOut",
|
|
62
175
|
"AssetNode",
|
|
63
176
|
"AssetScreenshotResponseOut",
|
|
177
|
+
"Backgroundcolor",
|
|
178
|
+
"BorderModel",
|
|
179
|
+
"BorderStyle",
|
|
180
|
+
"BordersModel",
|
|
181
|
+
"CellFormat",
|
|
182
|
+
"CellFormatHorizontalAlignment",
|
|
183
|
+
"CellFormatVerticalAlignment",
|
|
64
184
|
"Chunk",
|
|
65
185
|
"ChunkContentItem",
|
|
66
186
|
"ChunkContentItem_ImageUrl",
|
|
67
187
|
"ChunkContentItem_Text",
|
|
68
188
|
"ChunkResult",
|
|
69
189
|
"ChunkResultChunkId",
|
|
190
|
+
"Color",
|
|
70
191
|
"Content",
|
|
71
192
|
"ConversationAssetInfo",
|
|
193
|
+
"ConversationMessage",
|
|
194
|
+
"ConversationResult",
|
|
72
195
|
"CreateNewSheetTabResponse",
|
|
73
196
|
"CustomAgentResponse",
|
|
74
197
|
"DataFrameRequestOut",
|
|
@@ -94,16 +217,23 @@ __all__ = [
|
|
|
94
217
|
"InputMessageContentItem",
|
|
95
218
|
"InputMessageContentItem_ImageUrl",
|
|
96
219
|
"InputMessageContentItem_Text",
|
|
220
|
+
"NumberFormatModel",
|
|
221
|
+
"NumberFormatType",
|
|
97
222
|
"PaginatedAssetsOut",
|
|
98
223
|
"PromptMessage",
|
|
99
224
|
"PublicAssetOut",
|
|
100
225
|
"ResearchAgentResponse",
|
|
101
226
|
"SaveAssetRequestOut",
|
|
227
|
+
"Sheet",
|
|
102
228
|
"SheetOperationResponse",
|
|
103
229
|
"SqlAgentResponse",
|
|
104
230
|
"StructuredDataExtractorResponse",
|
|
105
231
|
"TableRowData",
|
|
106
232
|
"TextContent",
|
|
233
|
+
"TextFormatModel",
|
|
234
|
+
"Textrotation",
|
|
235
|
+
"ThemeColor",
|
|
107
236
|
"ThreadStatusResponseOut",
|
|
108
237
|
"Type",
|
|
238
|
+
"WrapStrategy",
|
|
109
239
|
]
|
|
@@ -4,6 +4,7 @@ import typing
|
|
|
4
4
|
|
|
5
5
|
import pydantic
|
|
6
6
|
from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel
|
|
7
|
+
from .conversation_result import ConversationResult
|
|
7
8
|
|
|
8
9
|
|
|
9
10
|
class AopExecuteResponseOut(UniversalBaseModel):
|
|
@@ -31,7 +32,7 @@ class AopExecuteResponseOut(UniversalBaseModel):
|
|
|
31
32
|
Base prompt of the AOP before user inputs were added
|
|
32
33
|
"""
|
|
33
34
|
|
|
34
|
-
conversation: typing.Optional[
|
|
35
|
+
conversation: typing.Optional[ConversationResult] = pydantic.Field(default=None)
|
|
35
36
|
"""
|
|
36
37
|
The conversation result from the AOP execution
|
|
37
38
|
"""
|