athena-intelligence 0.1.118__py3-none-any.whl → 0.1.120__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.
- athena/__init__.py +38 -1
- athena/agents/__init__.py +5 -0
- athena/agents/client.py +169 -0
- athena/agents/drive/__init__.py +2 -0
- athena/agents/drive/client.py +134 -0
- athena/agents/general/__init__.py +2 -0
- athena/agents/general/client.py +397 -0
- athena/agents/research/__init__.py +2 -0
- athena/agents/research/client.py +134 -0
- athena/agents/sql/__init__.py +2 -0
- athena/agents/sql/client.py +134 -0
- athena/base_client.py +3 -0
- athena/core/client_wrapper.py +1 -1
- athena/tools/__init__.py +2 -1
- athena/tools/calendar/__init__.py +2 -0
- athena/tools/calendar/client.py +155 -0
- athena/tools/client.py +12 -0
- athena/tools/email/__init__.py +2 -0
- athena/tools/email/client.py +223 -0
- athena/tools/structured_data_extractor/__init__.py +2 -0
- athena/tools/structured_data_extractor/client.py +150 -0
- athena/tools/tasks/__init__.py +2 -0
- athena/tools/tasks/client.py +87 -0
- athena/types/__init__.py +40 -0
- athena/types/custom_agent_response.py +32 -0
- athena/types/drive_agent_response.py +32 -0
- athena/types/general_agent_config.py +36 -0
- athena/types/general_agent_config_enabled_tools_item.py +7 -0
- athena/types/general_agent_request.py +39 -0
- athena/types/general_agent_request_messages_item.py +32 -0
- athena/types/general_agent_request_messages_item_content.py +7 -0
- athena/types/general_agent_request_messages_item_content_item.py +60 -0
- athena/types/general_agent_request_messages_item_content_item_image_url.py +29 -0
- athena/types/general_agent_request_messages_item_content_item_text.py +29 -0
- athena/types/general_agent_request_messages_item_type.py +25 -0
- athena/types/general_agent_response.py +33 -0
- athena/types/research_agent_response.py +32 -0
- athena/types/sql_agent_response.py +37 -0
- athena/types/structured_data_extractor_reponse.py +36 -0
- athena/types/tool.py +17 -0
- {athena_intelligence-0.1.118.dist-info → athena_intelligence-0.1.120.dist-info}/METADATA +1 -1
- athena_intelligence-0.1.120.dist-info/RECORD +82 -0
- athena_intelligence-0.1.118.dist-info/RECORD +0 -48
- {athena_intelligence-0.1.118.dist-info → athena_intelligence-0.1.120.dist-info}/WHEEL +0 -0
athena/types/__init__.py
CHANGED
@@ -1,27 +1,67 @@
|
|
1
1
|
# This file was auto-generated by Fern from our API Definition.
|
2
2
|
|
3
3
|
from .asset_not_found_error import AssetNotFoundError
|
4
|
+
from .custom_agent_response import CustomAgentResponse
|
4
5
|
from .data_frame_request_out import DataFrameRequestOut
|
5
6
|
from .data_frame_request_out_columns_item import DataFrameRequestOutColumnsItem
|
6
7
|
from .data_frame_request_out_data_item_item import DataFrameRequestOutDataItemItem
|
7
8
|
from .data_frame_request_out_index_item import DataFrameRequestOutIndexItem
|
8
9
|
from .data_frame_unknown_format_error import DataFrameUnknownFormatError
|
9
10
|
from .document_chunk import DocumentChunk
|
11
|
+
from .drive_agent_response import DriveAgentResponse
|
10
12
|
from .file_chunk_request_out import FileChunkRequestOut
|
11
13
|
from .file_too_large_error import FileTooLargeError
|
14
|
+
from .general_agent_config import GeneralAgentConfig
|
15
|
+
from .general_agent_config_enabled_tools_item import GeneralAgentConfigEnabledToolsItem
|
16
|
+
from .general_agent_request import GeneralAgentRequest
|
17
|
+
from .general_agent_request_messages_item import GeneralAgentRequestMessagesItem
|
18
|
+
from .general_agent_request_messages_item_content import GeneralAgentRequestMessagesItemContent
|
19
|
+
from .general_agent_request_messages_item_content_item import (
|
20
|
+
GeneralAgentRequestMessagesItemContentItem,
|
21
|
+
GeneralAgentRequestMessagesItemContentItem_ImageUrl,
|
22
|
+
GeneralAgentRequestMessagesItemContentItem_Text,
|
23
|
+
)
|
24
|
+
from .general_agent_request_messages_item_content_item_image_url import (
|
25
|
+
GeneralAgentRequestMessagesItemContentItemImageUrl,
|
26
|
+
)
|
27
|
+
from .general_agent_request_messages_item_content_item_text import GeneralAgentRequestMessagesItemContentItemText
|
28
|
+
from .general_agent_request_messages_item_type import GeneralAgentRequestMessagesItemType
|
29
|
+
from .general_agent_response import GeneralAgentResponse
|
12
30
|
from .parent_folder_error import ParentFolderError
|
31
|
+
from .research_agent_response import ResearchAgentResponse
|
13
32
|
from .save_asset_request_out import SaveAssetRequestOut
|
33
|
+
from .sql_agent_response import SqlAgentResponse
|
34
|
+
from .structured_data_extractor_reponse import StructuredDataExtractorReponse
|
35
|
+
from .tool import Tool
|
14
36
|
|
15
37
|
__all__ = [
|
16
38
|
"AssetNotFoundError",
|
39
|
+
"CustomAgentResponse",
|
17
40
|
"DataFrameRequestOut",
|
18
41
|
"DataFrameRequestOutColumnsItem",
|
19
42
|
"DataFrameRequestOutDataItemItem",
|
20
43
|
"DataFrameRequestOutIndexItem",
|
21
44
|
"DataFrameUnknownFormatError",
|
22
45
|
"DocumentChunk",
|
46
|
+
"DriveAgentResponse",
|
23
47
|
"FileChunkRequestOut",
|
24
48
|
"FileTooLargeError",
|
49
|
+
"GeneralAgentConfig",
|
50
|
+
"GeneralAgentConfigEnabledToolsItem",
|
51
|
+
"GeneralAgentRequest",
|
52
|
+
"GeneralAgentRequestMessagesItem",
|
53
|
+
"GeneralAgentRequestMessagesItemContent",
|
54
|
+
"GeneralAgentRequestMessagesItemContentItem",
|
55
|
+
"GeneralAgentRequestMessagesItemContentItemImageUrl",
|
56
|
+
"GeneralAgentRequestMessagesItemContentItemText",
|
57
|
+
"GeneralAgentRequestMessagesItemContentItem_ImageUrl",
|
58
|
+
"GeneralAgentRequestMessagesItemContentItem_Text",
|
59
|
+
"GeneralAgentRequestMessagesItemType",
|
60
|
+
"GeneralAgentResponse",
|
25
61
|
"ParentFolderError",
|
62
|
+
"ResearchAgentResponse",
|
26
63
|
"SaveAssetRequestOut",
|
64
|
+
"SqlAgentResponse",
|
65
|
+
"StructuredDataExtractorReponse",
|
66
|
+
"Tool",
|
27
67
|
]
|
@@ -0,0 +1,32 @@
|
|
1
|
+
# This file was auto-generated by Fern from our API Definition.
|
2
|
+
|
3
|
+
import datetime as dt
|
4
|
+
import typing
|
5
|
+
|
6
|
+
from ..core.datetime_utils import serialize_datetime
|
7
|
+
from ..core.pydantic_utilities import deep_union_pydantic_dicts, pydantic_v1
|
8
|
+
|
9
|
+
|
10
|
+
class CustomAgentResponse(pydantic_v1.BaseModel):
|
11
|
+
result: typing.Dict[str, typing.Any] = pydantic_v1.Field()
|
12
|
+
"""
|
13
|
+
The agent's response. Format depends on the specific agent implementation.
|
14
|
+
"""
|
15
|
+
|
16
|
+
def json(self, **kwargs: typing.Any) -> str:
|
17
|
+
kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
|
18
|
+
return super().json(**kwargs_with_defaults)
|
19
|
+
|
20
|
+
def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
|
21
|
+
kwargs_with_defaults_exclude_unset: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
|
22
|
+
kwargs_with_defaults_exclude_none: typing.Any = {"by_alias": True, "exclude_none": True, **kwargs}
|
23
|
+
|
24
|
+
return deep_union_pydantic_dicts(
|
25
|
+
super().dict(**kwargs_with_defaults_exclude_unset), super().dict(**kwargs_with_defaults_exclude_none)
|
26
|
+
)
|
27
|
+
|
28
|
+
class Config:
|
29
|
+
frozen = True
|
30
|
+
smart_union = True
|
31
|
+
extra = pydantic_v1.Extra.allow
|
32
|
+
json_encoders = {dt.datetime: serialize_datetime}
|
@@ -0,0 +1,32 @@
|
|
1
|
+
# This file was auto-generated by Fern from our API Definition.
|
2
|
+
|
3
|
+
import datetime as dt
|
4
|
+
import typing
|
5
|
+
|
6
|
+
from ..core.datetime_utils import serialize_datetime
|
7
|
+
from ..core.pydantic_utilities import deep_union_pydantic_dicts, pydantic_v1
|
8
|
+
|
9
|
+
|
10
|
+
class DriveAgentResponse(pydantic_v1.BaseModel):
|
11
|
+
result: typing.Dict[str, typing.Any] = pydantic_v1.Field()
|
12
|
+
"""
|
13
|
+
Results of the drive operation
|
14
|
+
"""
|
15
|
+
|
16
|
+
def json(self, **kwargs: typing.Any) -> str:
|
17
|
+
kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
|
18
|
+
return super().json(**kwargs_with_defaults)
|
19
|
+
|
20
|
+
def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
|
21
|
+
kwargs_with_defaults_exclude_unset: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
|
22
|
+
kwargs_with_defaults_exclude_none: typing.Any = {"by_alias": True, "exclude_none": True, **kwargs}
|
23
|
+
|
24
|
+
return deep_union_pydantic_dicts(
|
25
|
+
super().dict(**kwargs_with_defaults_exclude_unset), super().dict(**kwargs_with_defaults_exclude_none)
|
26
|
+
)
|
27
|
+
|
28
|
+
class Config:
|
29
|
+
frozen = True
|
30
|
+
smart_union = True
|
31
|
+
extra = pydantic_v1.Extra.allow
|
32
|
+
json_encoders = {dt.datetime: serialize_datetime}
|
@@ -0,0 +1,36 @@
|
|
1
|
+
# This file was auto-generated by Fern from our API Definition.
|
2
|
+
|
3
|
+
import datetime as dt
|
4
|
+
import typing
|
5
|
+
|
6
|
+
from ..core.datetime_utils import serialize_datetime
|
7
|
+
from ..core.pydantic_utilities import deep_union_pydantic_dicts, pydantic_v1
|
8
|
+
from .general_agent_config_enabled_tools_item import GeneralAgentConfigEnabledToolsItem
|
9
|
+
|
10
|
+
|
11
|
+
class GeneralAgentConfig(pydantic_v1.BaseModel):
|
12
|
+
"""
|
13
|
+
Configurable fields for the agent.
|
14
|
+
"""
|
15
|
+
|
16
|
+
enabled_tools: typing.Optional[typing.List[GeneralAgentConfigEnabledToolsItem]] = None
|
17
|
+
knowledge_base_asset_ids: typing.Optional[typing.List[str]] = None
|
18
|
+
system_prompt: typing.Optional[str] = None
|
19
|
+
|
20
|
+
def json(self, **kwargs: typing.Any) -> str:
|
21
|
+
kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
|
22
|
+
return super().json(**kwargs_with_defaults)
|
23
|
+
|
24
|
+
def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
|
25
|
+
kwargs_with_defaults_exclude_unset: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
|
26
|
+
kwargs_with_defaults_exclude_none: typing.Any = {"by_alias": True, "exclude_none": True, **kwargs}
|
27
|
+
|
28
|
+
return deep_union_pydantic_dicts(
|
29
|
+
super().dict(**kwargs_with_defaults_exclude_unset), super().dict(**kwargs_with_defaults_exclude_none)
|
30
|
+
)
|
31
|
+
|
32
|
+
class Config:
|
33
|
+
frozen = True
|
34
|
+
smart_union = True
|
35
|
+
extra = pydantic_v1.Extra.allow
|
36
|
+
json_encoders = {dt.datetime: serialize_datetime}
|
@@ -0,0 +1,39 @@
|
|
1
|
+
# This file was auto-generated by Fern from our API Definition.
|
2
|
+
|
3
|
+
import datetime as dt
|
4
|
+
import typing
|
5
|
+
|
6
|
+
from ..core.datetime_utils import serialize_datetime
|
7
|
+
from ..core.pydantic_utilities import deep_union_pydantic_dicts, pydantic_v1
|
8
|
+
from .general_agent_config import GeneralAgentConfig
|
9
|
+
from .general_agent_request_messages_item import GeneralAgentRequestMessagesItem
|
10
|
+
|
11
|
+
|
12
|
+
class GeneralAgentRequest(pydantic_v1.BaseModel):
|
13
|
+
"""
|
14
|
+
A chat request for the Athena SDK.
|
15
|
+
"""
|
16
|
+
|
17
|
+
config: GeneralAgentConfig
|
18
|
+
messages: typing.List[GeneralAgentRequestMessagesItem] = pydantic_v1.Field()
|
19
|
+
"""
|
20
|
+
The messages to send to the agent. Each message should be a string (for text inputs) or a list of multimodal content parts.
|
21
|
+
"""
|
22
|
+
|
23
|
+
def json(self, **kwargs: typing.Any) -> str:
|
24
|
+
kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
|
25
|
+
return super().json(**kwargs_with_defaults)
|
26
|
+
|
27
|
+
def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
|
28
|
+
kwargs_with_defaults_exclude_unset: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
|
29
|
+
kwargs_with_defaults_exclude_none: typing.Any = {"by_alias": True, "exclude_none": True, **kwargs}
|
30
|
+
|
31
|
+
return deep_union_pydantic_dicts(
|
32
|
+
super().dict(**kwargs_with_defaults_exclude_unset), super().dict(**kwargs_with_defaults_exclude_none)
|
33
|
+
)
|
34
|
+
|
35
|
+
class Config:
|
36
|
+
frozen = True
|
37
|
+
smart_union = True
|
38
|
+
extra = pydantic_v1.Extra.allow
|
39
|
+
json_encoders = {dt.datetime: serialize_datetime}
|
@@ -0,0 +1,32 @@
|
|
1
|
+
# This file was auto-generated by Fern from our API Definition.
|
2
|
+
|
3
|
+
import datetime as dt
|
4
|
+
import typing
|
5
|
+
|
6
|
+
from ..core.datetime_utils import serialize_datetime
|
7
|
+
from ..core.pydantic_utilities import deep_union_pydantic_dicts, pydantic_v1
|
8
|
+
from .general_agent_request_messages_item_content import GeneralAgentRequestMessagesItemContent
|
9
|
+
from .general_agent_request_messages_item_type import GeneralAgentRequestMessagesItemType
|
10
|
+
|
11
|
+
|
12
|
+
class GeneralAgentRequestMessagesItem(pydantic_v1.BaseModel):
|
13
|
+
content: GeneralAgentRequestMessagesItemContent
|
14
|
+
type: GeneralAgentRequestMessagesItemType
|
15
|
+
|
16
|
+
def json(self, **kwargs: typing.Any) -> str:
|
17
|
+
kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
|
18
|
+
return super().json(**kwargs_with_defaults)
|
19
|
+
|
20
|
+
def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
|
21
|
+
kwargs_with_defaults_exclude_unset: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
|
22
|
+
kwargs_with_defaults_exclude_none: typing.Any = {"by_alias": True, "exclude_none": True, **kwargs}
|
23
|
+
|
24
|
+
return deep_union_pydantic_dicts(
|
25
|
+
super().dict(**kwargs_with_defaults_exclude_unset), super().dict(**kwargs_with_defaults_exclude_none)
|
26
|
+
)
|
27
|
+
|
28
|
+
class Config:
|
29
|
+
frozen = True
|
30
|
+
smart_union = True
|
31
|
+
extra = pydantic_v1.Extra.allow
|
32
|
+
json_encoders = {dt.datetime: serialize_datetime}
|
@@ -0,0 +1,7 @@
|
|
1
|
+
# This file was auto-generated by Fern from our API Definition.
|
2
|
+
|
3
|
+
import typing
|
4
|
+
|
5
|
+
from .general_agent_request_messages_item_content_item import GeneralAgentRequestMessagesItemContentItem
|
6
|
+
|
7
|
+
GeneralAgentRequestMessagesItemContent = typing.Union[str, typing.List[GeneralAgentRequestMessagesItemContentItem]]
|
@@ -0,0 +1,60 @@
|
|
1
|
+
# This file was auto-generated by Fern from our API Definition.
|
2
|
+
|
3
|
+
from __future__ import annotations
|
4
|
+
|
5
|
+
import datetime as dt
|
6
|
+
import typing
|
7
|
+
|
8
|
+
from ..core.datetime_utils import serialize_datetime
|
9
|
+
from ..core.pydantic_utilities import deep_union_pydantic_dicts, pydantic_v1
|
10
|
+
|
11
|
+
|
12
|
+
class GeneralAgentRequestMessagesItemContentItem_Text(pydantic_v1.BaseModel):
|
13
|
+
text: str
|
14
|
+
type: typing.Literal["text"] = "text"
|
15
|
+
|
16
|
+
def json(self, **kwargs: typing.Any) -> str:
|
17
|
+
kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
|
18
|
+
return super().json(**kwargs_with_defaults)
|
19
|
+
|
20
|
+
def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
|
21
|
+
kwargs_with_defaults_exclude_unset: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
|
22
|
+
kwargs_with_defaults_exclude_none: typing.Any = {"by_alias": True, "exclude_none": True, **kwargs}
|
23
|
+
|
24
|
+
return deep_union_pydantic_dicts(
|
25
|
+
super().dict(**kwargs_with_defaults_exclude_unset), super().dict(**kwargs_with_defaults_exclude_none)
|
26
|
+
)
|
27
|
+
|
28
|
+
class Config:
|
29
|
+
frozen = True
|
30
|
+
smart_union = True
|
31
|
+
extra = pydantic_v1.Extra.allow
|
32
|
+
json_encoders = {dt.datetime: serialize_datetime}
|
33
|
+
|
34
|
+
|
35
|
+
class GeneralAgentRequestMessagesItemContentItem_ImageUrl(pydantic_v1.BaseModel):
|
36
|
+
image_url: typing.Dict[str, str]
|
37
|
+
type: typing.Literal["image_url"] = "image_url"
|
38
|
+
|
39
|
+
def json(self, **kwargs: typing.Any) -> str:
|
40
|
+
kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
|
41
|
+
return super().json(**kwargs_with_defaults)
|
42
|
+
|
43
|
+
def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
|
44
|
+
kwargs_with_defaults_exclude_unset: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
|
45
|
+
kwargs_with_defaults_exclude_none: typing.Any = {"by_alias": True, "exclude_none": True, **kwargs}
|
46
|
+
|
47
|
+
return deep_union_pydantic_dicts(
|
48
|
+
super().dict(**kwargs_with_defaults_exclude_unset), super().dict(**kwargs_with_defaults_exclude_none)
|
49
|
+
)
|
50
|
+
|
51
|
+
class Config:
|
52
|
+
frozen = True
|
53
|
+
smart_union = True
|
54
|
+
extra = pydantic_v1.Extra.allow
|
55
|
+
json_encoders = {dt.datetime: serialize_datetime}
|
56
|
+
|
57
|
+
|
58
|
+
GeneralAgentRequestMessagesItemContentItem = typing.Union[
|
59
|
+
GeneralAgentRequestMessagesItemContentItem_Text, GeneralAgentRequestMessagesItemContentItem_ImageUrl
|
60
|
+
]
|
@@ -0,0 +1,29 @@
|
|
1
|
+
# This file was auto-generated by Fern from our API Definition.
|
2
|
+
|
3
|
+
import datetime as dt
|
4
|
+
import typing
|
5
|
+
|
6
|
+
from ..core.datetime_utils import serialize_datetime
|
7
|
+
from ..core.pydantic_utilities import deep_union_pydantic_dicts, pydantic_v1
|
8
|
+
|
9
|
+
|
10
|
+
class GeneralAgentRequestMessagesItemContentItemImageUrl(pydantic_v1.BaseModel):
|
11
|
+
image_url: typing.Dict[str, str]
|
12
|
+
|
13
|
+
def json(self, **kwargs: typing.Any) -> str:
|
14
|
+
kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
|
15
|
+
return super().json(**kwargs_with_defaults)
|
16
|
+
|
17
|
+
def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
|
18
|
+
kwargs_with_defaults_exclude_unset: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
|
19
|
+
kwargs_with_defaults_exclude_none: typing.Any = {"by_alias": True, "exclude_none": True, **kwargs}
|
20
|
+
|
21
|
+
return deep_union_pydantic_dicts(
|
22
|
+
super().dict(**kwargs_with_defaults_exclude_unset), super().dict(**kwargs_with_defaults_exclude_none)
|
23
|
+
)
|
24
|
+
|
25
|
+
class Config:
|
26
|
+
frozen = True
|
27
|
+
smart_union = True
|
28
|
+
extra = pydantic_v1.Extra.allow
|
29
|
+
json_encoders = {dt.datetime: serialize_datetime}
|
@@ -0,0 +1,29 @@
|
|
1
|
+
# This file was auto-generated by Fern from our API Definition.
|
2
|
+
|
3
|
+
import datetime as dt
|
4
|
+
import typing
|
5
|
+
|
6
|
+
from ..core.datetime_utils import serialize_datetime
|
7
|
+
from ..core.pydantic_utilities import deep_union_pydantic_dicts, pydantic_v1
|
8
|
+
|
9
|
+
|
10
|
+
class GeneralAgentRequestMessagesItemContentItemText(pydantic_v1.BaseModel):
|
11
|
+
text: str
|
12
|
+
|
13
|
+
def json(self, **kwargs: typing.Any) -> str:
|
14
|
+
kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
|
15
|
+
return super().json(**kwargs_with_defaults)
|
16
|
+
|
17
|
+
def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
|
18
|
+
kwargs_with_defaults_exclude_unset: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
|
19
|
+
kwargs_with_defaults_exclude_none: typing.Any = {"by_alias": True, "exclude_none": True, **kwargs}
|
20
|
+
|
21
|
+
return deep_union_pydantic_dicts(
|
22
|
+
super().dict(**kwargs_with_defaults_exclude_unset), super().dict(**kwargs_with_defaults_exclude_none)
|
23
|
+
)
|
24
|
+
|
25
|
+
class Config:
|
26
|
+
frozen = True
|
27
|
+
smart_union = True
|
28
|
+
extra = pydantic_v1.Extra.allow
|
29
|
+
json_encoders = {dt.datetime: serialize_datetime}
|
@@ -0,0 +1,25 @@
|
|
1
|
+
# This file was auto-generated by Fern from our API Definition.
|
2
|
+
|
3
|
+
import enum
|
4
|
+
import typing
|
5
|
+
|
6
|
+
T_Result = typing.TypeVar("T_Result")
|
7
|
+
|
8
|
+
|
9
|
+
class GeneralAgentRequestMessagesItemType(str, enum.Enum):
|
10
|
+
USER = "user"
|
11
|
+
ASSISTANT = "assistant"
|
12
|
+
SYSTEM = "system"
|
13
|
+
|
14
|
+
def visit(
|
15
|
+
self,
|
16
|
+
user: typing.Callable[[], T_Result],
|
17
|
+
assistant: typing.Callable[[], T_Result],
|
18
|
+
system: typing.Callable[[], T_Result],
|
19
|
+
) -> T_Result:
|
20
|
+
if self is GeneralAgentRequestMessagesItemType.USER:
|
21
|
+
return user()
|
22
|
+
if self is GeneralAgentRequestMessagesItemType.ASSISTANT:
|
23
|
+
return assistant()
|
24
|
+
if self is GeneralAgentRequestMessagesItemType.SYSTEM:
|
25
|
+
return system()
|
@@ -0,0 +1,33 @@
|
|
1
|
+
# This file was auto-generated by Fern from our API Definition.
|
2
|
+
|
3
|
+
import datetime as dt
|
4
|
+
import typing
|
5
|
+
|
6
|
+
from ..core.datetime_utils import serialize_datetime
|
7
|
+
from ..core.pydantic_utilities import deep_union_pydantic_dicts, pydantic_v1
|
8
|
+
|
9
|
+
|
10
|
+
class GeneralAgentResponse(pydantic_v1.BaseModel):
|
11
|
+
"""
|
12
|
+
The response from the agent.
|
13
|
+
"""
|
14
|
+
|
15
|
+
messages: typing.List[typing.Dict[str, typing.Any]]
|
16
|
+
|
17
|
+
def json(self, **kwargs: typing.Any) -> str:
|
18
|
+
kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
|
19
|
+
return super().json(**kwargs_with_defaults)
|
20
|
+
|
21
|
+
def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
|
22
|
+
kwargs_with_defaults_exclude_unset: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
|
23
|
+
kwargs_with_defaults_exclude_none: typing.Any = {"by_alias": True, "exclude_none": True, **kwargs}
|
24
|
+
|
25
|
+
return deep_union_pydantic_dicts(
|
26
|
+
super().dict(**kwargs_with_defaults_exclude_unset), super().dict(**kwargs_with_defaults_exclude_none)
|
27
|
+
)
|
28
|
+
|
29
|
+
class Config:
|
30
|
+
frozen = True
|
31
|
+
smart_union = True
|
32
|
+
extra = pydantic_v1.Extra.allow
|
33
|
+
json_encoders = {dt.datetime: serialize_datetime}
|
@@ -0,0 +1,32 @@
|
|
1
|
+
# This file was auto-generated by Fern from our API Definition.
|
2
|
+
|
3
|
+
import datetime as dt
|
4
|
+
import typing
|
5
|
+
|
6
|
+
from ..core.datetime_utils import serialize_datetime
|
7
|
+
from ..core.pydantic_utilities import deep_union_pydantic_dicts, pydantic_v1
|
8
|
+
|
9
|
+
|
10
|
+
class ResearchAgentResponse(pydantic_v1.BaseModel):
|
11
|
+
findings: typing.Dict[str, typing.Any] = pydantic_v1.Field()
|
12
|
+
"""
|
13
|
+
Research findings and compiled information
|
14
|
+
"""
|
15
|
+
|
16
|
+
def json(self, **kwargs: typing.Any) -> str:
|
17
|
+
kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
|
18
|
+
return super().json(**kwargs_with_defaults)
|
19
|
+
|
20
|
+
def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
|
21
|
+
kwargs_with_defaults_exclude_unset: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
|
22
|
+
kwargs_with_defaults_exclude_none: typing.Any = {"by_alias": True, "exclude_none": True, **kwargs}
|
23
|
+
|
24
|
+
return deep_union_pydantic_dicts(
|
25
|
+
super().dict(**kwargs_with_defaults_exclude_unset), super().dict(**kwargs_with_defaults_exclude_none)
|
26
|
+
)
|
27
|
+
|
28
|
+
class Config:
|
29
|
+
frozen = True
|
30
|
+
smart_union = True
|
31
|
+
extra = pydantic_v1.Extra.allow
|
32
|
+
json_encoders = {dt.datetime: serialize_datetime}
|
@@ -0,0 +1,37 @@
|
|
1
|
+
# This file was auto-generated by Fern from our API Definition.
|
2
|
+
|
3
|
+
import datetime as dt
|
4
|
+
import typing
|
5
|
+
|
6
|
+
from ..core.datetime_utils import serialize_datetime
|
7
|
+
from ..core.pydantic_utilities import deep_union_pydantic_dicts, pydantic_v1
|
8
|
+
|
9
|
+
|
10
|
+
class SqlAgentResponse(pydantic_v1.BaseModel):
|
11
|
+
metadata: typing.Dict[str, typing.Any] = pydantic_v1.Field()
|
12
|
+
"""
|
13
|
+
Additional metadata about the generated query
|
14
|
+
"""
|
15
|
+
|
16
|
+
query_asset_id: str = pydantic_v1.Field()
|
17
|
+
"""
|
18
|
+
The asset ID of the generated SQL query object
|
19
|
+
"""
|
20
|
+
|
21
|
+
def json(self, **kwargs: typing.Any) -> str:
|
22
|
+
kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
|
23
|
+
return super().json(**kwargs_with_defaults)
|
24
|
+
|
25
|
+
def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
|
26
|
+
kwargs_with_defaults_exclude_unset: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
|
27
|
+
kwargs_with_defaults_exclude_none: typing.Any = {"by_alias": True, "exclude_none": True, **kwargs}
|
28
|
+
|
29
|
+
return deep_union_pydantic_dicts(
|
30
|
+
super().dict(**kwargs_with_defaults_exclude_unset), super().dict(**kwargs_with_defaults_exclude_none)
|
31
|
+
)
|
32
|
+
|
33
|
+
class Config:
|
34
|
+
frozen = True
|
35
|
+
smart_union = True
|
36
|
+
extra = pydantic_v1.Extra.allow
|
37
|
+
json_encoders = {dt.datetime: serialize_datetime}
|
@@ -0,0 +1,36 @@
|
|
1
|
+
# This file was auto-generated by Fern from our API Definition.
|
2
|
+
|
3
|
+
import datetime as dt
|
4
|
+
import typing
|
5
|
+
|
6
|
+
from ..core.datetime_utils import serialize_datetime
|
7
|
+
from ..core.pydantic_utilities import deep_union_pydantic_dicts, pydantic_v1
|
8
|
+
|
9
|
+
|
10
|
+
class StructuredDataExtractorReponse(pydantic_v1.BaseModel):
|
11
|
+
"""
|
12
|
+
The agent's response.
|
13
|
+
"""
|
14
|
+
|
15
|
+
data: typing.Dict[str, typing.Any] = pydantic_v1.Field()
|
16
|
+
"""
|
17
|
+
The extracted structured data. Guaranteed to match `json_schema`.
|
18
|
+
"""
|
19
|
+
|
20
|
+
def json(self, **kwargs: typing.Any) -> str:
|
21
|
+
kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
|
22
|
+
return super().json(**kwargs_with_defaults)
|
23
|
+
|
24
|
+
def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
|
25
|
+
kwargs_with_defaults_exclude_unset: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
|
26
|
+
kwargs_with_defaults_exclude_none: typing.Any = {"by_alias": True, "exclude_none": True, **kwargs}
|
27
|
+
|
28
|
+
return deep_union_pydantic_dicts(
|
29
|
+
super().dict(**kwargs_with_defaults_exclude_unset), super().dict(**kwargs_with_defaults_exclude_none)
|
30
|
+
)
|
31
|
+
|
32
|
+
class Config:
|
33
|
+
frozen = True
|
34
|
+
smart_union = True
|
35
|
+
extra = pydantic_v1.Extra.allow
|
36
|
+
json_encoders = {dt.datetime: serialize_datetime}
|
athena/types/tool.py
ADDED
@@ -0,0 +1,17 @@
|
|
1
|
+
# This file was auto-generated by Fern from our API Definition.
|
2
|
+
|
3
|
+
import enum
|
4
|
+
import typing
|
5
|
+
|
6
|
+
T_Result = typing.TypeVar("T_Result")
|
7
|
+
|
8
|
+
|
9
|
+
class Tool(str, enum.Enum):
|
10
|
+
SEARCH = "search"
|
11
|
+
BROWSE = "browse"
|
12
|
+
|
13
|
+
def visit(self, search: typing.Callable[[], T_Result], browse: typing.Callable[[], T_Result]) -> T_Result:
|
14
|
+
if self is Tool.SEARCH:
|
15
|
+
return search()
|
16
|
+
if self is Tool.BROWSE:
|
17
|
+
return browse()
|