athena-intelligence 0.1.125__py3-none-any.whl → 0.1.127__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 +7 -0
- athena/agents/client.py +88 -36
- athena/agents/drive/client.py +80 -32
- athena/agents/general/client.py +222 -91
- athena/agents/research/client.py +80 -32
- athena/agents/sql/client.py +80 -32
- athena/base_client.py +13 -11
- athena/client.py +161 -61
- athena/core/__init__.py +21 -4
- athena/core/client_wrapper.py +9 -10
- athena/core/file.py +37 -8
- athena/core/http_client.py +97 -41
- athena/core/jsonable_encoder.py +33 -31
- athena/core/pydantic_utilities.py +272 -4
- athena/core/query_encoder.py +38 -13
- athena/core/request_options.py +5 -2
- athena/core/serialization.py +272 -0
- athena/errors/internal_server_error.py +2 -3
- athena/errors/unauthorized_error.py +2 -3
- athena/errors/unprocessable_entity_error.py +2 -3
- athena/query/client.py +208 -58
- athena/tools/calendar/client.py +82 -30
- athena/tools/client.py +956 -188
- athena/tools/email/client.py +117 -43
- athena/tools/structured_data_extractor/client.py +118 -67
- athena/tools/tasks/client.py +41 -17
- athena/types/__init__.py +4 -0
- athena/types/asset_content_request_out.py +26 -0
- athena/types/asset_node.py +14 -24
- athena/types/asset_not_found_error.py +11 -21
- athena/types/asset_screenshot_response_out.py +43 -0
- athena/types/chunk.py +11 -21
- athena/types/chunk_content_item.py +21 -41
- athena/types/chunk_result.py +13 -23
- athena/types/custom_agent_response.py +12 -22
- athena/types/data_frame_request_out.py +11 -21
- athena/types/data_frame_unknown_format_error.py +11 -21
- athena/types/document_chunk.py +12 -22
- athena/types/drive_agent_response.py +12 -22
- athena/types/file_chunk_request_out.py +11 -21
- athena/types/file_too_large_error.py +11 -21
- athena/types/folder_response.py +11 -21
- athena/types/general_agent_config.py +12 -21
- athena/types/general_agent_config_enabled_tools_item.py +0 -1
- athena/types/general_agent_request.py +13 -23
- athena/types/general_agent_response.py +12 -22
- athena/types/image_url_content.py +11 -21
- athena/types/parent_folder_error.py +11 -21
- athena/types/prompt_message.py +12 -22
- athena/types/research_agent_response.py +12 -22
- athena/types/save_asset_request_out.py +11 -21
- athena/types/sql_agent_response.py +13 -23
- athena/types/structured_data_extractor_response.py +15 -25
- athena/types/text_content.py +11 -21
- athena/types/tool.py +1 -13
- athena/types/type.py +1 -21
- athena/version.py +0 -1
- {athena_intelligence-0.1.125.dist-info → athena_intelligence-0.1.127.dist-info}/METADATA +12 -4
- athena_intelligence-0.1.127.dist-info/RECORD +89 -0
- {athena_intelligence-0.1.125.dist-info → athena_intelligence-0.1.127.dist-info}/WHEEL +1 -1
- athena_intelligence-0.1.125.dist-info/RECORD +0 -86
athena/types/document_chunk.py
CHANGED
@@ -1,34 +1,24 @@
|
|
1
1
|
# This file was auto-generated by Fern from our API Definition.
|
2
2
|
|
3
|
-
|
3
|
+
from ..core.pydantic_utilities import UniversalBaseModel
|
4
4
|
import typing
|
5
|
+
from ..core.pydantic_utilities import IS_PYDANTIC_V2
|
6
|
+
import pydantic
|
5
7
|
|
6
|
-
from ..core.datetime_utils import serialize_datetime
|
7
|
-
from ..core.pydantic_utilities import deep_union_pydantic_dicts, pydantic_v1
|
8
8
|
|
9
|
-
|
10
|
-
class DocumentChunk(pydantic_v1.BaseModel):
|
9
|
+
class DocumentChunk(UniversalBaseModel):
|
11
10
|
"""
|
12
11
|
A document chunk.
|
13
12
|
"""
|
14
13
|
|
15
|
-
metadata: typing.Optional[typing.Dict[str, typing.Any]] = None
|
14
|
+
metadata: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = None
|
16
15
|
page_content: str
|
17
16
|
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
|
23
|
-
kwargs_with_defaults_exclude_unset: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
|
24
|
-
kwargs_with_defaults_exclude_none: typing.Any = {"by_alias": True, "exclude_none": True, **kwargs}
|
25
|
-
|
26
|
-
return deep_union_pydantic_dicts(
|
27
|
-
super().dict(**kwargs_with_defaults_exclude_unset), super().dict(**kwargs_with_defaults_exclude_none)
|
28
|
-
)
|
17
|
+
if IS_PYDANTIC_V2:
|
18
|
+
model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
|
19
|
+
else:
|
29
20
|
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
json_encoders = {dt.datetime: serialize_datetime}
|
21
|
+
class Config:
|
22
|
+
frozen = True
|
23
|
+
smart_union = True
|
24
|
+
extra = pydantic.Extra.allow
|
@@ -1,32 +1,22 @@
|
|
1
1
|
# This file was auto-generated by Fern from our API Definition.
|
2
2
|
|
3
|
-
|
3
|
+
from ..core.pydantic_utilities import UniversalBaseModel
|
4
4
|
import typing
|
5
|
+
import pydantic
|
6
|
+
from ..core.pydantic_utilities import IS_PYDANTIC_V2
|
5
7
|
|
6
|
-
from ..core.datetime_utils import serialize_datetime
|
7
|
-
from ..core.pydantic_utilities import deep_union_pydantic_dicts, pydantic_v1
|
8
8
|
|
9
|
-
|
10
|
-
|
11
|
-
result: typing.Dict[str, typing.Any] = pydantic_v1.Field()
|
9
|
+
class DriveAgentResponse(UniversalBaseModel):
|
10
|
+
result: typing.Dict[str, typing.Optional[typing.Any]] = pydantic.Field()
|
12
11
|
"""
|
13
12
|
Results of the drive operation
|
14
13
|
"""
|
15
14
|
|
16
|
-
|
17
|
-
|
18
|
-
|
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
|
-
)
|
15
|
+
if IS_PYDANTIC_V2:
|
16
|
+
model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
|
17
|
+
else:
|
27
18
|
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
json_encoders = {dt.datetime: serialize_datetime}
|
19
|
+
class Config:
|
20
|
+
frozen = True
|
21
|
+
smart_union = True
|
22
|
+
extra = pydantic.Extra.allow
|
@@ -1,34 +1,24 @@
|
|
1
1
|
# This file was auto-generated by Fern from our API Definition.
|
2
2
|
|
3
|
-
|
3
|
+
from ..core.pydantic_utilities import UniversalBaseModel
|
4
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
5
|
from .document_chunk import DocumentChunk
|
6
|
+
from ..core.pydantic_utilities import IS_PYDANTIC_V2
|
7
|
+
import pydantic
|
9
8
|
|
10
9
|
|
11
|
-
class FileChunkRequestOut(
|
10
|
+
class FileChunkRequestOut(UniversalBaseModel):
|
12
11
|
"""
|
13
12
|
Response model for a file chunk.
|
14
13
|
"""
|
15
14
|
|
16
15
|
chunks: typing.Dict[str, typing.List[DocumentChunk]]
|
17
16
|
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
|
23
|
-
kwargs_with_defaults_exclude_unset: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
|
24
|
-
kwargs_with_defaults_exclude_none: typing.Any = {"by_alias": True, "exclude_none": True, **kwargs}
|
25
|
-
|
26
|
-
return deep_union_pydantic_dicts(
|
27
|
-
super().dict(**kwargs_with_defaults_exclude_unset), super().dict(**kwargs_with_defaults_exclude_none)
|
28
|
-
)
|
17
|
+
if IS_PYDANTIC_V2:
|
18
|
+
model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
|
19
|
+
else:
|
29
20
|
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
json_encoders = {dt.datetime: serialize_datetime}
|
21
|
+
class Config:
|
22
|
+
frozen = True
|
23
|
+
smart_union = True
|
24
|
+
extra = pydantic.Extra.allow
|
@@ -1,29 +1,19 @@
|
|
1
1
|
# This file was auto-generated by Fern from our API Definition.
|
2
2
|
|
3
|
-
|
3
|
+
from ..core.pydantic_utilities import UniversalBaseModel
|
4
|
+
from ..core.pydantic_utilities import IS_PYDANTIC_V2
|
4
5
|
import typing
|
6
|
+
import pydantic
|
5
7
|
|
6
|
-
from ..core.datetime_utils import serialize_datetime
|
7
|
-
from ..core.pydantic_utilities import deep_union_pydantic_dicts, pydantic_v1
|
8
8
|
|
9
|
-
|
10
|
-
class FileTooLargeError(pydantic_v1.BaseModel):
|
9
|
+
class FileTooLargeError(UniversalBaseModel):
|
11
10
|
message: str
|
12
11
|
|
13
|
-
|
14
|
-
|
15
|
-
|
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
|
-
)
|
12
|
+
if IS_PYDANTIC_V2:
|
13
|
+
model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
|
14
|
+
else:
|
24
15
|
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
json_encoders = {dt.datetime: serialize_datetime}
|
16
|
+
class Config:
|
17
|
+
frozen = True
|
18
|
+
smart_union = True
|
19
|
+
extra = pydantic.Extra.allow
|
athena/types/folder_response.py
CHANGED
@@ -1,14 +1,13 @@
|
|
1
1
|
# This file was auto-generated by Fern from our API Definition.
|
2
2
|
|
3
|
-
|
3
|
+
from ..core.pydantic_utilities import UniversalBaseModel
|
4
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
5
|
from .asset_node import AssetNode
|
6
|
+
from ..core.pydantic_utilities import IS_PYDANTIC_V2
|
7
|
+
import pydantic
|
9
8
|
|
10
9
|
|
11
|
-
class FolderResponse(
|
10
|
+
class FolderResponse(UniversalBaseModel):
|
12
11
|
"""
|
13
12
|
Combined response with tree data and visualization.
|
14
13
|
"""
|
@@ -16,20 +15,11 @@ class FolderResponse(pydantic_v1.BaseModel):
|
|
16
15
|
structure_tree_ascii: str
|
17
16
|
tree_data: typing.Dict[str, AssetNode]
|
18
17
|
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
|
24
|
-
kwargs_with_defaults_exclude_unset: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
|
25
|
-
kwargs_with_defaults_exclude_none: typing.Any = {"by_alias": True, "exclude_none": True, **kwargs}
|
26
|
-
|
27
|
-
return deep_union_pydantic_dicts(
|
28
|
-
super().dict(**kwargs_with_defaults_exclude_unset), super().dict(**kwargs_with_defaults_exclude_none)
|
29
|
-
)
|
18
|
+
if IS_PYDANTIC_V2:
|
19
|
+
model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
|
20
|
+
else:
|
30
21
|
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
json_encoders = {dt.datetime: serialize_datetime}
|
22
|
+
class Config:
|
23
|
+
frozen = True
|
24
|
+
smart_union = True
|
25
|
+
extra = pydantic.Extra.allow
|
@@ -1,36 +1,27 @@
|
|
1
1
|
# This file was auto-generated by Fern from our API Definition.
|
2
2
|
|
3
|
-
|
3
|
+
from ..core.pydantic_utilities import UniversalBaseModel
|
4
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
5
|
from .general_agent_config_enabled_tools_item import GeneralAgentConfigEnabledToolsItem
|
6
|
+
from ..core.pydantic_utilities import IS_PYDANTIC_V2
|
7
|
+
import pydantic
|
9
8
|
|
10
9
|
|
11
|
-
class GeneralAgentConfig(
|
10
|
+
class GeneralAgentConfig(UniversalBaseModel):
|
12
11
|
"""
|
13
12
|
Configurable fields for the agent.
|
14
13
|
"""
|
15
14
|
|
16
15
|
enabled_tools: typing.Optional[typing.List[GeneralAgentConfigEnabledToolsItem]] = None
|
17
16
|
knowledge_base_asset_ids: typing.Optional[typing.List[str]] = None
|
17
|
+
model: typing.Optional[str] = None
|
18
18
|
system_prompt: typing.Optional[str] = None
|
19
19
|
|
20
|
-
|
21
|
-
|
22
|
-
|
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
|
-
)
|
20
|
+
if IS_PYDANTIC_V2:
|
21
|
+
model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
|
22
|
+
else:
|
31
23
|
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
json_encoders = {dt.datetime: serialize_datetime}
|
24
|
+
class Config:
|
25
|
+
frozen = True
|
26
|
+
smart_union = True
|
27
|
+
extra = pydantic.Extra.allow
|
@@ -1,38 +1,28 @@
|
|
1
1
|
# This file was auto-generated by Fern from our API Definition.
|
2
2
|
|
3
|
-
|
4
|
-
import typing
|
5
|
-
|
6
|
-
from ..core.datetime_utils import serialize_datetime
|
7
|
-
from ..core.pydantic_utilities import deep_union_pydantic_dicts, pydantic_v1
|
3
|
+
from ..core.pydantic_utilities import UniversalBaseModel
|
8
4
|
from .general_agent_config import GeneralAgentConfig
|
5
|
+
import typing
|
6
|
+
import pydantic
|
7
|
+
from ..core.pydantic_utilities import IS_PYDANTIC_V2
|
9
8
|
|
10
9
|
|
11
|
-
class GeneralAgentRequest(
|
10
|
+
class GeneralAgentRequest(UniversalBaseModel):
|
12
11
|
"""
|
13
12
|
A chat request for the Athena SDK.
|
14
13
|
"""
|
15
14
|
|
16
15
|
config: GeneralAgentConfig
|
17
|
-
messages: typing.List[typing.Any] =
|
16
|
+
messages: typing.List[typing.Optional[typing.Any]] = pydantic.Field()
|
18
17
|
"""
|
19
18
|
The messages to send to the agent. Each message should be a string (for text inputs) or a list of multimodal content parts.
|
20
19
|
"""
|
21
20
|
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
|
27
|
-
kwargs_with_defaults_exclude_unset: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
|
28
|
-
kwargs_with_defaults_exclude_none: typing.Any = {"by_alias": True, "exclude_none": True, **kwargs}
|
29
|
-
|
30
|
-
return deep_union_pydantic_dicts(
|
31
|
-
super().dict(**kwargs_with_defaults_exclude_unset), super().dict(**kwargs_with_defaults_exclude_none)
|
32
|
-
)
|
21
|
+
if IS_PYDANTIC_V2:
|
22
|
+
model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
|
23
|
+
else:
|
33
24
|
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
json_encoders = {dt.datetime: serialize_datetime}
|
25
|
+
class Config:
|
26
|
+
frozen = True
|
27
|
+
smart_union = True
|
28
|
+
extra = pydantic.Extra.allow
|
@@ -1,33 +1,23 @@
|
|
1
1
|
# This file was auto-generated by Fern from our API Definition.
|
2
2
|
|
3
|
-
|
3
|
+
from ..core.pydantic_utilities import UniversalBaseModel
|
4
4
|
import typing
|
5
|
+
from ..core.pydantic_utilities import IS_PYDANTIC_V2
|
6
|
+
import pydantic
|
5
7
|
|
6
|
-
from ..core.datetime_utils import serialize_datetime
|
7
|
-
from ..core.pydantic_utilities import deep_union_pydantic_dicts, pydantic_v1
|
8
8
|
|
9
|
-
|
10
|
-
class GeneralAgentResponse(pydantic_v1.BaseModel):
|
9
|
+
class GeneralAgentResponse(UniversalBaseModel):
|
11
10
|
"""
|
12
11
|
The response from the agent.
|
13
12
|
"""
|
14
13
|
|
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}
|
14
|
+
messages: typing.List[typing.Dict[str, typing.Optional[typing.Any]]]
|
24
15
|
|
25
|
-
|
26
|
-
|
27
|
-
|
16
|
+
if IS_PYDANTIC_V2:
|
17
|
+
model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
|
18
|
+
else:
|
28
19
|
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
json_encoders = {dt.datetime: serialize_datetime}
|
20
|
+
class Config:
|
21
|
+
frozen = True
|
22
|
+
smart_union = True
|
23
|
+
extra = pydantic.Extra.allow
|
@@ -1,33 +1,23 @@
|
|
1
1
|
# This file was auto-generated by Fern from our API Definition.
|
2
2
|
|
3
|
-
|
3
|
+
from ..core.pydantic_utilities import UniversalBaseModel
|
4
4
|
import typing
|
5
|
+
from ..core.pydantic_utilities import IS_PYDANTIC_V2
|
6
|
+
import pydantic
|
5
7
|
|
6
|
-
from ..core.datetime_utils import serialize_datetime
|
7
|
-
from ..core.pydantic_utilities import deep_union_pydantic_dicts, pydantic_v1
|
8
8
|
|
9
|
-
|
10
|
-
class ImageUrlContent(pydantic_v1.BaseModel):
|
9
|
+
class ImageUrlContent(UniversalBaseModel):
|
11
10
|
"""
|
12
11
|
An image content item.
|
13
12
|
"""
|
14
13
|
|
15
14
|
image_url: typing.Dict[str, str]
|
16
15
|
|
17
|
-
|
18
|
-
|
19
|
-
|
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
|
-
)
|
16
|
+
if IS_PYDANTIC_V2:
|
17
|
+
model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
|
18
|
+
else:
|
28
19
|
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
json_encoders = {dt.datetime: serialize_datetime}
|
20
|
+
class Config:
|
21
|
+
frozen = True
|
22
|
+
smart_union = True
|
23
|
+
extra = pydantic.Extra.allow
|
@@ -1,29 +1,19 @@
|
|
1
1
|
# This file was auto-generated by Fern from our API Definition.
|
2
2
|
|
3
|
-
|
3
|
+
from ..core.pydantic_utilities import UniversalBaseModel
|
4
|
+
from ..core.pydantic_utilities import IS_PYDANTIC_V2
|
4
5
|
import typing
|
6
|
+
import pydantic
|
5
7
|
|
6
|
-
from ..core.datetime_utils import serialize_datetime
|
7
|
-
from ..core.pydantic_utilities import deep_union_pydantic_dicts, pydantic_v1
|
8
8
|
|
9
|
-
|
10
|
-
class ParentFolderError(pydantic_v1.BaseModel):
|
9
|
+
class ParentFolderError(UniversalBaseModel):
|
11
10
|
message: str
|
12
11
|
|
13
|
-
|
14
|
-
|
15
|
-
|
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
|
-
)
|
12
|
+
if IS_PYDANTIC_V2:
|
13
|
+
model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
|
14
|
+
else:
|
24
15
|
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
json_encoders = {dt.datetime: serialize_datetime}
|
16
|
+
class Config:
|
17
|
+
frozen = True
|
18
|
+
smart_union = True
|
19
|
+
extra = pydantic.Extra.allow
|
athena/types/prompt_message.py
CHANGED
@@ -1,14 +1,13 @@
|
|
1
1
|
# This file was auto-generated by Fern from our API Definition.
|
2
2
|
|
3
|
-
|
4
|
-
import typing
|
5
|
-
|
6
|
-
from ..core.datetime_utils import serialize_datetime
|
7
|
-
from ..core.pydantic_utilities import deep_union_pydantic_dicts, pydantic_v1
|
3
|
+
from ..core.pydantic_utilities import UniversalBaseModel
|
8
4
|
from .type import Type
|
5
|
+
from ..core.pydantic_utilities import IS_PYDANTIC_V2
|
6
|
+
import typing
|
7
|
+
import pydantic
|
9
8
|
|
10
9
|
|
11
|
-
class PromptMessage(
|
10
|
+
class PromptMessage(UniversalBaseModel):
|
12
11
|
"""
|
13
12
|
A message to use for the structured data extractor.
|
14
13
|
"""
|
@@ -16,20 +15,11 @@ class PromptMessage(pydantic_v1.BaseModel):
|
|
16
15
|
content: str
|
17
16
|
type: Type
|
18
17
|
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
|
24
|
-
kwargs_with_defaults_exclude_unset: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
|
25
|
-
kwargs_with_defaults_exclude_none: typing.Any = {"by_alias": True, "exclude_none": True, **kwargs}
|
26
|
-
|
27
|
-
return deep_union_pydantic_dicts(
|
28
|
-
super().dict(**kwargs_with_defaults_exclude_unset), super().dict(**kwargs_with_defaults_exclude_none)
|
29
|
-
)
|
18
|
+
if IS_PYDANTIC_V2:
|
19
|
+
model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
|
20
|
+
else:
|
30
21
|
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
json_encoders = {dt.datetime: serialize_datetime}
|
22
|
+
class Config:
|
23
|
+
frozen = True
|
24
|
+
smart_union = True
|
25
|
+
extra = pydantic.Extra.allow
|
@@ -1,32 +1,22 @@
|
|
1
1
|
# This file was auto-generated by Fern from our API Definition.
|
2
2
|
|
3
|
-
|
3
|
+
from ..core.pydantic_utilities import UniversalBaseModel
|
4
4
|
import typing
|
5
|
+
import pydantic
|
6
|
+
from ..core.pydantic_utilities import IS_PYDANTIC_V2
|
5
7
|
|
6
|
-
from ..core.datetime_utils import serialize_datetime
|
7
|
-
from ..core.pydantic_utilities import deep_union_pydantic_dicts, pydantic_v1
|
8
8
|
|
9
|
-
|
10
|
-
|
11
|
-
findings: typing.Dict[str, typing.Any] = pydantic_v1.Field()
|
9
|
+
class ResearchAgentResponse(UniversalBaseModel):
|
10
|
+
findings: typing.Dict[str, typing.Optional[typing.Any]] = pydantic.Field()
|
12
11
|
"""
|
13
12
|
Research findings and compiled information
|
14
13
|
"""
|
15
14
|
|
16
|
-
|
17
|
-
|
18
|
-
|
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
|
-
)
|
15
|
+
if IS_PYDANTIC_V2:
|
16
|
+
model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
|
17
|
+
else:
|
27
18
|
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
json_encoders = {dt.datetime: serialize_datetime}
|
19
|
+
class Config:
|
20
|
+
frozen = True
|
21
|
+
smart_union = True
|
22
|
+
extra = pydantic.Extra.allow
|
@@ -1,33 +1,23 @@
|
|
1
1
|
# This file was auto-generated by Fern from our API Definition.
|
2
2
|
|
3
|
-
|
3
|
+
from ..core.pydantic_utilities import UniversalBaseModel
|
4
|
+
from ..core.pydantic_utilities import IS_PYDANTIC_V2
|
4
5
|
import typing
|
6
|
+
import pydantic
|
5
7
|
|
6
|
-
from ..core.datetime_utils import serialize_datetime
|
7
|
-
from ..core.pydantic_utilities import deep_union_pydantic_dicts, pydantic_v1
|
8
8
|
|
9
|
-
|
10
|
-
class SaveAssetRequestOut(pydantic_v1.BaseModel):
|
9
|
+
class SaveAssetRequestOut(UniversalBaseModel):
|
11
10
|
"""
|
12
11
|
Response model asset information representation.
|
13
12
|
"""
|
14
13
|
|
15
14
|
asset_id: str
|
16
15
|
|
17
|
-
|
18
|
-
|
19
|
-
|
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
|
-
)
|
16
|
+
if IS_PYDANTIC_V2:
|
17
|
+
model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
|
18
|
+
else:
|
28
19
|
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
json_encoders = {dt.datetime: serialize_datetime}
|
20
|
+
class Config:
|
21
|
+
frozen = True
|
22
|
+
smart_union = True
|
23
|
+
extra = pydantic.Extra.allow
|