athena-intelligence 0.1.127__py3-none-any.whl → 0.1.184__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (99) hide show
  1. athena/__init__.py +24 -3
  2. athena/agents/__init__.py +2 -0
  3. athena/agents/client.py +51 -95
  4. athena/agents/drive/__init__.py +2 -0
  5. athena/agents/drive/client.py +31 -80
  6. athena/agents/drive/raw_client.py +155 -0
  7. athena/agents/general/__init__.py +2 -0
  8. athena/agents/general/client.py +91 -238
  9. athena/agents/general/raw_client.py +369 -0
  10. athena/agents/raw_client.py +176 -0
  11. athena/agents/research/__init__.py +2 -0
  12. athena/agents/research/client.py +31 -80
  13. athena/agents/research/raw_client.py +155 -0
  14. athena/agents/sql/__init__.py +2 -0
  15. athena/agents/sql/client.py +31 -80
  16. athena/agents/sql/raw_client.py +155 -0
  17. athena/assets/__init__.py +4 -0
  18. athena/assets/client.py +144 -0
  19. athena/assets/raw_client.py +164 -0
  20. athena/base_client.py +25 -11
  21. athena/client.py +1 -1
  22. athena/core/__init__.py +5 -0
  23. athena/core/api_error.py +13 -5
  24. athena/core/client_wrapper.py +33 -8
  25. athena/core/force_multipart.py +16 -0
  26. athena/core/http_client.py +70 -26
  27. athena/core/http_response.py +55 -0
  28. athena/core/jsonable_encoder.py +0 -1
  29. athena/core/pydantic_utilities.py +70 -111
  30. athena/core/serialization.py +7 -3
  31. athena/errors/__init__.py +2 -0
  32. athena/errors/bad_request_error.py +4 -2
  33. athena/errors/content_too_large_error.py +4 -2
  34. athena/errors/internal_server_error.py +4 -3
  35. athena/errors/not_found_error.py +4 -2
  36. athena/errors/unauthorized_error.py +4 -3
  37. athena/errors/unprocessable_entity_error.py +4 -3
  38. athena/errors/unsupported_media_type_error.py +4 -2
  39. athena/query/__init__.py +2 -0
  40. athena/query/client.py +39 -219
  41. athena/query/raw_client.py +344 -0
  42. athena/query/types/__init__.py +2 -0
  43. athena/tools/__init__.py +2 -0
  44. athena/tools/calendar/__init__.py +2 -0
  45. athena/tools/calendar/client.py +35 -79
  46. athena/tools/calendar/raw_client.py +172 -0
  47. athena/tools/client.py +114 -876
  48. athena/tools/email/__init__.py +2 -0
  49. athena/tools/email/client.py +39 -115
  50. athena/tools/email/raw_client.py +248 -0
  51. athena/tools/raw_client.py +1328 -0
  52. athena/tools/structured_data_extractor/__init__.py +2 -0
  53. athena/tools/structured_data_extractor/client.py +42 -96
  54. athena/tools/structured_data_extractor/raw_client.py +240 -0
  55. athena/tools/tasks/__init__.py +2 -0
  56. athena/tools/tasks/client.py +31 -43
  57. athena/tools/tasks/raw_client.py +96 -0
  58. athena/tools/types/__init__.py +2 -0
  59. athena/types/__init__.py +24 -2
  60. athena/types/asset_content_request_out.py +3 -3
  61. athena/types/asset_node.py +3 -3
  62. athena/types/asset_not_found_error.py +2 -2
  63. athena/types/asset_screenshot_response_out.py +4 -4
  64. athena/types/chunk.py +3 -3
  65. athena/types/chunk_content_item.py +3 -2
  66. athena/types/chunk_result.py +3 -3
  67. athena/types/content.py +7 -0
  68. athena/types/custom_agent_response.py +2 -2
  69. athena/types/data_frame_request_out.py +3 -3
  70. athena/types/data_frame_unknown_format_error.py +2 -2
  71. athena/types/document_chunk.py +2 -2
  72. athena/types/drive_agent_response.py +2 -2
  73. athena/types/file_chunk_request_out.py +3 -3
  74. athena/types/file_too_large_error.py +2 -2
  75. athena/types/folder_response.py +10 -4
  76. athena/types/general_agent_config.py +3 -3
  77. athena/types/general_agent_config_enabled_tools_item.py +1 -2
  78. athena/types/general_agent_request.py +15 -4
  79. athena/types/general_agent_response.py +4 -3
  80. athena/types/general_agent_response_message.py +100 -0
  81. athena/types/general_agent_response_message_kwargs.py +74 -0
  82. athena/types/{tool.py → id.py} +1 -1
  83. athena/types/image_url_content.py +2 -2
  84. athena/types/input_message.py +29 -0
  85. athena/types/input_message_content_item.py +39 -0
  86. athena/types/paginated_assets_out.py +52 -0
  87. athena/types/parent_folder_error.py +2 -2
  88. athena/types/prompt_message.py +3 -3
  89. athena/types/public_asset_out.py +97 -0
  90. athena/types/research_agent_response.py +2 -2
  91. athena/types/save_asset_request_out.py +2 -2
  92. athena/types/sql_agent_response.py +2 -2
  93. athena/types/structured_data_extractor_response.py +3 -3
  94. athena/types/text_content.py +2 -2
  95. athena/types/type.py +1 -1
  96. {athena_intelligence-0.1.127.dist-info → athena_intelligence-0.1.184.dist-info}/METADATA +3 -7
  97. athena_intelligence-0.1.184.dist-info/RECORD +112 -0
  98. {athena_intelligence-0.1.127.dist-info → athena_intelligence-0.1.184.dist-info}/WHEEL +1 -1
  99. athena_intelligence-0.1.127.dist-info/RECORD +0 -89
athena/types/__init__.py CHANGED
@@ -1,5 +1,7 @@
1
1
  # This file was auto-generated by Fern from our API Definition.
2
2
 
3
+ # isort: skip_file
4
+
3
5
  from .asset_content_request_out import AssetContentRequestOut
4
6
  from .asset_node import AssetNode
5
7
  from .asset_not_found_error import AssetNotFoundError
@@ -8,6 +10,7 @@ from .chunk import Chunk
8
10
  from .chunk_content_item import ChunkContentItem, ChunkContentItem_ImageUrl, ChunkContentItem_Text
9
11
  from .chunk_result import ChunkResult
10
12
  from .chunk_result_chunk_id import ChunkResultChunkId
13
+ from .content import Content
11
14
  from .custom_agent_response import CustomAgentResponse
12
15
  from .data_frame_request_out import DataFrameRequestOut
13
16
  from .data_frame_request_out_columns_item import DataFrameRequestOutColumnsItem
@@ -23,15 +26,25 @@ from .general_agent_config import GeneralAgentConfig
23
26
  from .general_agent_config_enabled_tools_item import GeneralAgentConfigEnabledToolsItem
24
27
  from .general_agent_request import GeneralAgentRequest
25
28
  from .general_agent_response import GeneralAgentResponse
29
+ from .general_agent_response_message import GeneralAgentResponseMessage
30
+ from .general_agent_response_message_kwargs import GeneralAgentResponseMessageKwargs
31
+ from .id import Id
26
32
  from .image_url_content import ImageUrlContent
33
+ from .input_message import InputMessage
34
+ from .input_message_content_item import (
35
+ InputMessageContentItem,
36
+ InputMessageContentItem_ImageUrl,
37
+ InputMessageContentItem_Text,
38
+ )
39
+ from .paginated_assets_out import PaginatedAssetsOut
27
40
  from .parent_folder_error import ParentFolderError
28
41
  from .prompt_message import PromptMessage
42
+ from .public_asset_out import PublicAssetOut
29
43
  from .research_agent_response import ResearchAgentResponse
30
44
  from .save_asset_request_out import SaveAssetRequestOut
31
45
  from .sql_agent_response import SqlAgentResponse
32
46
  from .structured_data_extractor_response import StructuredDataExtractorResponse
33
47
  from .text_content import TextContent
34
- from .tool import Tool
35
48
  from .type import Type
36
49
 
37
50
  __all__ = [
@@ -45,6 +58,7 @@ __all__ = [
45
58
  "ChunkContentItem_Text",
46
59
  "ChunkResult",
47
60
  "ChunkResultChunkId",
61
+ "Content",
48
62
  "CustomAgentResponse",
49
63
  "DataFrameRequestOut",
50
64
  "DataFrameRequestOutColumnsItem",
@@ -60,14 +74,22 @@ __all__ = [
60
74
  "GeneralAgentConfigEnabledToolsItem",
61
75
  "GeneralAgentRequest",
62
76
  "GeneralAgentResponse",
77
+ "GeneralAgentResponseMessage",
78
+ "GeneralAgentResponseMessageKwargs",
79
+ "Id",
63
80
  "ImageUrlContent",
81
+ "InputMessage",
82
+ "InputMessageContentItem",
83
+ "InputMessageContentItem_ImageUrl",
84
+ "InputMessageContentItem_Text",
85
+ "PaginatedAssetsOut",
64
86
  "ParentFolderError",
65
87
  "PromptMessage",
88
+ "PublicAssetOut",
66
89
  "ResearchAgentResponse",
67
90
  "SaveAssetRequestOut",
68
91
  "SqlAgentResponse",
69
92
  "StructuredDataExtractorResponse",
70
93
  "TextContent",
71
- "Tool",
72
94
  "Type",
73
95
  ]
@@ -1,10 +1,10 @@
1
1
  # This file was auto-generated by Fern from our API Definition.
2
2
 
3
- from ..core.pydantic_utilities import UniversalBaseModel
4
- import pydantic
5
- from ..core.pydantic_utilities import IS_PYDANTIC_V2
6
3
  import typing
7
4
 
5
+ import pydantic
6
+ from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel
7
+
8
8
 
9
9
  class AssetContentRequestOut(UniversalBaseModel):
10
10
  """
@@ -1,11 +1,11 @@
1
1
  # This file was auto-generated by Fern from our API Definition.
2
2
 
3
3
  from __future__ import annotations
4
- from ..core.pydantic_utilities import UniversalBaseModel
4
+
5
5
  import typing
6
- from ..core.pydantic_utilities import IS_PYDANTIC_V2
6
+
7
7
  import pydantic
8
- from ..core.pydantic_utilities import update_forward_refs
8
+ from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel, update_forward_refs
9
9
 
10
10
 
11
11
  class AssetNode(UniversalBaseModel):
@@ -1,9 +1,9 @@
1
1
  # This file was auto-generated by Fern from our API Definition.
2
2
 
3
- from ..core.pydantic_utilities import UniversalBaseModel
4
- from ..core.pydantic_utilities import IS_PYDANTIC_V2
5
3
  import typing
4
+
6
5
  import pydantic
6
+ from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel
7
7
 
8
8
 
9
9
  class AssetNotFoundError(UniversalBaseModel):
@@ -1,11 +1,11 @@
1
1
  # This file was auto-generated by Fern from our API Definition.
2
2
 
3
- from ..core.pydantic_utilities import UniversalBaseModel
3
+ import typing
4
+
5
+ import pydantic
4
6
  import typing_extensions
7
+ from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel
5
8
  from ..core.serialization import FieldMetadata
6
- import pydantic
7
- from ..core.pydantic_utilities import IS_PYDANTIC_V2
8
- import typing
9
9
 
10
10
 
11
11
  class AssetScreenshotResponseOut(UniversalBaseModel):
athena/types/chunk.py CHANGED
@@ -1,10 +1,10 @@
1
1
  # This file was auto-generated by Fern from our API Definition.
2
2
 
3
- from ..core.pydantic_utilities import UniversalBaseModel
4
3
  import typing
5
- from .chunk_content_item import ChunkContentItem
6
- from ..core.pydantic_utilities import IS_PYDANTIC_V2
4
+
7
5
  import pydantic
6
+ from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel
7
+ from .chunk_content_item import ChunkContentItem
8
8
 
9
9
 
10
10
  class Chunk(UniversalBaseModel):
@@ -1,10 +1,11 @@
1
1
  # This file was auto-generated by Fern from our API Definition.
2
2
 
3
3
  from __future__ import annotations
4
- from ..core.pydantic_utilities import UniversalBaseModel
4
+
5
5
  import typing
6
- from ..core.pydantic_utilities import IS_PYDANTIC_V2
6
+
7
7
  import pydantic
8
+ from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel
8
9
 
9
10
 
10
11
  class ChunkContentItem_Text(UniversalBaseModel):
@@ -1,10 +1,10 @@
1
1
  # This file was auto-generated by Fern from our API Definition.
2
2
 
3
- from ..core.pydantic_utilities import UniversalBaseModel
4
- from .chunk_result_chunk_id import ChunkResultChunkId
5
3
  import typing
6
- from ..core.pydantic_utilities import IS_PYDANTIC_V2
4
+
7
5
  import pydantic
6
+ from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel
7
+ from .chunk_result_chunk_id import ChunkResultChunkId
8
8
 
9
9
 
10
10
  class ChunkResult(UniversalBaseModel):
@@ -0,0 +1,7 @@
1
+ # This file was auto-generated by Fern from our API Definition.
2
+
3
+ import typing
4
+
5
+ from .input_message_content_item import InputMessageContentItem
6
+
7
+ Content = typing.Union[str, typing.List[InputMessageContentItem]]
@@ -1,9 +1,9 @@
1
1
  # This file was auto-generated by Fern from our API Definition.
2
2
 
3
- from ..core.pydantic_utilities import UniversalBaseModel
4
3
  import typing
4
+
5
5
  import pydantic
6
- from ..core.pydantic_utilities import IS_PYDANTIC_V2
6
+ from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel
7
7
 
8
8
 
9
9
  class CustomAgentResponse(UniversalBaseModel):
@@ -1,12 +1,12 @@
1
1
  # This file was auto-generated by Fern from our API Definition.
2
2
 
3
- from ..core.pydantic_utilities import UniversalBaseModel
4
3
  import typing
4
+
5
+ import pydantic
6
+ from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel
5
7
  from .data_frame_request_out_columns_item import DataFrameRequestOutColumnsItem
6
8
  from .data_frame_request_out_data_item_item import DataFrameRequestOutDataItemItem
7
9
  from .data_frame_request_out_index_item import DataFrameRequestOutIndexItem
8
- from ..core.pydantic_utilities import IS_PYDANTIC_V2
9
- import pydantic
10
10
 
11
11
 
12
12
  class DataFrameRequestOut(UniversalBaseModel):
@@ -1,9 +1,9 @@
1
1
  # This file was auto-generated by Fern from our API Definition.
2
2
 
3
- from ..core.pydantic_utilities import UniversalBaseModel
4
- from ..core.pydantic_utilities import IS_PYDANTIC_V2
5
3
  import typing
4
+
6
5
  import pydantic
6
+ from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel
7
7
 
8
8
 
9
9
  class DataFrameUnknownFormatError(UniversalBaseModel):
@@ -1,9 +1,9 @@
1
1
  # This file was auto-generated by Fern from our API Definition.
2
2
 
3
- from ..core.pydantic_utilities import UniversalBaseModel
4
3
  import typing
5
- from ..core.pydantic_utilities import IS_PYDANTIC_V2
4
+
6
5
  import pydantic
6
+ from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel
7
7
 
8
8
 
9
9
  class DocumentChunk(UniversalBaseModel):
@@ -1,9 +1,9 @@
1
1
  # This file was auto-generated by Fern from our API Definition.
2
2
 
3
- from ..core.pydantic_utilities import UniversalBaseModel
4
3
  import typing
4
+
5
5
  import pydantic
6
- from ..core.pydantic_utilities import IS_PYDANTIC_V2
6
+ from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel
7
7
 
8
8
 
9
9
  class DriveAgentResponse(UniversalBaseModel):
@@ -1,10 +1,10 @@
1
1
  # This file was auto-generated by Fern from our API Definition.
2
2
 
3
- from ..core.pydantic_utilities import UniversalBaseModel
4
3
  import typing
5
- from .document_chunk import DocumentChunk
6
- from ..core.pydantic_utilities import IS_PYDANTIC_V2
4
+
7
5
  import pydantic
6
+ from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel
7
+ from .document_chunk import DocumentChunk
8
8
 
9
9
 
10
10
  class FileChunkRequestOut(UniversalBaseModel):
@@ -1,9 +1,9 @@
1
1
  # This file was auto-generated by Fern from our API Definition.
2
2
 
3
- from ..core.pydantic_utilities import UniversalBaseModel
4
- from ..core.pydantic_utilities import IS_PYDANTIC_V2
5
3
  import typing
4
+
6
5
  import pydantic
6
+ from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel
7
7
 
8
8
 
9
9
  class FileTooLargeError(UniversalBaseModel):
@@ -1,10 +1,11 @@
1
1
  # This file was auto-generated by Fern from our API Definition.
2
2
 
3
- from ..core.pydantic_utilities import UniversalBaseModel
3
+ from __future__ import annotations
4
+
4
5
  import typing
5
- from .asset_node import AssetNode
6
- from ..core.pydantic_utilities import IS_PYDANTIC_V2
6
+
7
7
  import pydantic
8
+ from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel, update_forward_refs
8
9
 
9
10
 
10
11
  class FolderResponse(UniversalBaseModel):
@@ -13,7 +14,7 @@ class FolderResponse(UniversalBaseModel):
13
14
  """
14
15
 
15
16
  structure_tree_ascii: str
16
- tree_data: typing.Dict[str, AssetNode]
17
+ tree_data: typing.Dict[str, "AssetNode"]
17
18
 
18
19
  if IS_PYDANTIC_V2:
19
20
  model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
@@ -23,3 +24,8 @@ class FolderResponse(UniversalBaseModel):
23
24
  frozen = True
24
25
  smart_union = True
25
26
  extra = pydantic.Extra.allow
27
+
28
+
29
+ from .asset_node import AssetNode # noqa: E402, F401, I001
30
+
31
+ update_forward_refs(FolderResponse)
@@ -1,10 +1,10 @@
1
1
  # This file was auto-generated by Fern from our API Definition.
2
2
 
3
- from ..core.pydantic_utilities import UniversalBaseModel
4
3
  import typing
5
- from .general_agent_config_enabled_tools_item import GeneralAgentConfigEnabledToolsItem
6
- from ..core.pydantic_utilities import IS_PYDANTIC_V2
4
+
7
5
  import pydantic
6
+ from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel
7
+ from .general_agent_config_enabled_tools_item import GeneralAgentConfigEnabledToolsItem
8
8
 
9
9
 
10
10
  class GeneralAgentConfig(UniversalBaseModel):
@@ -1,6 +1,5 @@
1
1
  # This file was auto-generated by Fern from our API Definition.
2
2
 
3
3
  import typing
4
- from .tool import Tool
5
4
 
6
- GeneralAgentConfigEnabledToolsItem = typing.Union[Tool, str]
5
+ GeneralAgentConfigEnabledToolsItem = typing.Union[typing.Literal["search"], typing.Literal["browse"], str]
@@ -1,10 +1,11 @@
1
1
  # This file was auto-generated by Fern from our API Definition.
2
2
 
3
- from ..core.pydantic_utilities import UniversalBaseModel
4
- from .general_agent_config import GeneralAgentConfig
5
3
  import typing
4
+
6
5
  import pydantic
7
- from ..core.pydantic_utilities import IS_PYDANTIC_V2
6
+ from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel
7
+ from .general_agent_config import GeneralAgentConfig
8
+ from .input_message import InputMessage
8
9
 
9
10
 
10
11
  class GeneralAgentRequest(UniversalBaseModel):
@@ -12,12 +13,22 @@ class GeneralAgentRequest(UniversalBaseModel):
12
13
  A chat request for the Athena SDK.
13
14
  """
14
15
 
16
+ channel: typing.Optional[str] = pydantic.Field(default=None)
17
+ """
18
+ The channel through which the request is being made.
19
+ """
20
+
15
21
  config: GeneralAgentConfig
16
- messages: typing.List[typing.Optional[typing.Any]] = pydantic.Field()
22
+ messages: typing.List[InputMessage] = pydantic.Field()
17
23
  """
18
24
  The messages to send to the agent. Each message should be a string (for text inputs) or a list of multimodal content parts.
19
25
  """
20
26
 
27
+ thread_id: typing.Optional[str] = pydantic.Field(default=None)
28
+ """
29
+ Optional thread ID for conversation persistence. If not provided, a new thread will be created.
30
+ """
31
+
21
32
  if IS_PYDANTIC_V2:
22
33
  model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
23
34
  else:
@@ -1,9 +1,10 @@
1
1
  # This file was auto-generated by Fern from our API Definition.
2
2
 
3
- from ..core.pydantic_utilities import UniversalBaseModel
4
3
  import typing
5
- from ..core.pydantic_utilities import IS_PYDANTIC_V2
4
+
6
5
  import pydantic
6
+ from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel
7
+ from .general_agent_response_message import GeneralAgentResponseMessage
7
8
 
8
9
 
9
10
  class GeneralAgentResponse(UniversalBaseModel):
@@ -11,7 +12,7 @@ class GeneralAgentResponse(UniversalBaseModel):
11
12
  The response from the agent.
12
13
  """
13
14
 
14
- messages: typing.List[typing.Dict[str, typing.Optional[typing.Any]]]
15
+ messages: typing.List[GeneralAgentResponseMessage]
15
16
 
16
17
  if IS_PYDANTIC_V2:
17
18
  model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
@@ -0,0 +1,100 @@
1
+ # This file was auto-generated by Fern from our API Definition.
2
+
3
+ import typing
4
+
5
+ import pydantic
6
+ import typing_extensions
7
+ from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel
8
+ from ..core.serialization import FieldMetadata
9
+ from .content import Content
10
+ from .general_agent_response_message_kwargs import GeneralAgentResponseMessageKwargs
11
+ from .id import Id
12
+
13
+
14
+ class GeneralAgentResponseMessage(UniversalBaseModel):
15
+ """
16
+ A response message from the agent.
17
+ """
18
+
19
+ additional_kwargs: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = pydantic.Field(default=None)
20
+ """
21
+ Additional keyword arguments for the message.
22
+ """
23
+
24
+ content: typing.Optional[Content] = pydantic.Field(default=None)
25
+ """
26
+ The content of the message, can be string or list of content parts.
27
+ """
28
+
29
+ id: typing.Optional[Id] = pydantic.Field(default=None)
30
+ """
31
+ Unique identifier for the message or LangChain class identifier.
32
+ """
33
+
34
+ kwargs_: typing_extensions.Annotated[
35
+ typing.Optional[GeneralAgentResponseMessageKwargs], FieldMetadata(alias="kwargs")
36
+ ] = pydantic.Field(default=None)
37
+ """
38
+ Structured kwargs field containing known message data.
39
+ """
40
+
41
+ langchain_id: typing.Optional[typing.List[str]] = pydantic.Field(default=None)
42
+ """
43
+ LangChain class identifier
44
+ """
45
+
46
+ lc: typing.Optional[int] = pydantic.Field(default=None)
47
+ """
48
+ LangChain version marker
49
+ """
50
+
51
+ message_id: typing.Optional[str] = pydantic.Field(default=None)
52
+ """
53
+ The actual message identifier (when id contains LangChain class path).
54
+ """
55
+
56
+ name: typing.Optional[str] = pydantic.Field(default=None)
57
+ """
58
+ Name associated with the message.
59
+ """
60
+
61
+ response_metadata: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = pydantic.Field(default=None)
62
+ """
63
+ Metadata about the response generation.
64
+ """
65
+
66
+ role: typing.Optional[str] = pydantic.Field(default=None)
67
+ """
68
+ Role of the message sender (e.g., 'ai', 'human', 'system', 'tool'). Automatically populated from kwargs.type for convenience.
69
+ """
70
+
71
+ tool_call_id: typing.Optional[str] = pydantic.Field(default=None)
72
+ """
73
+ ID of the tool call this message responds to (for tool messages).
74
+ """
75
+
76
+ tool_calls: typing.Optional[typing.List[typing.Dict[str, typing.Optional[typing.Any]]]] = pydantic.Field(
77
+ default=None
78
+ )
79
+ """
80
+ Tool calls made by the message (for AI messages).
81
+ """
82
+
83
+ type: str = pydantic.Field()
84
+ """
85
+ The type of the message (e.g., 'human', 'ai', 'system', 'tool').
86
+ """
87
+
88
+ usage_metadata: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = pydantic.Field(default=None)
89
+ """
90
+ Usage metadata including token counts.
91
+ """
92
+
93
+ if IS_PYDANTIC_V2:
94
+ model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
95
+ else:
96
+
97
+ class Config:
98
+ frozen = True
99
+ smart_union = True
100
+ extra = pydantic.Extra.allow
@@ -0,0 +1,74 @@
1
+ # This file was auto-generated by Fern from our API Definition.
2
+
3
+ import typing
4
+
5
+ import pydantic
6
+ from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel
7
+ from .content import Content
8
+
9
+
10
+ class GeneralAgentResponseMessageKwargs(UniversalBaseModel):
11
+ """
12
+ Structured kwargs data for response messages with basic required fields.
13
+ """
14
+
15
+ additional_kwargs: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = pydantic.Field(default=None)
16
+ """
17
+ Additional keyword arguments for the message.
18
+ """
19
+
20
+ content: typing.Optional[Content] = pydantic.Field(default=None)
21
+ """
22
+ The content of the response message, matches main response content.
23
+ """
24
+
25
+ id: typing.Optional[str] = pydantic.Field(default=None)
26
+ """
27
+ Unique identifier for the message.
28
+ """
29
+
30
+ name: typing.Optional[str] = pydantic.Field(default=None)
31
+ """
32
+ Name associated with the message.
33
+ """
34
+
35
+ response_metadata: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = pydantic.Field(default=None)
36
+ """
37
+ Metadata about the response generation.
38
+ """
39
+
40
+ role: typing.Optional[str] = pydantic.Field(default=None)
41
+ """
42
+ Role of the message sender.
43
+ """
44
+
45
+ tool_call_id: typing.Optional[str] = pydantic.Field(default=None)
46
+ """
47
+ ID of the tool call this message responds to (for tool messages).
48
+ """
49
+
50
+ tool_calls: typing.Optional[typing.List[typing.Dict[str, typing.Optional[typing.Any]]]] = pydantic.Field(
51
+ default=None
52
+ )
53
+ """
54
+ Tool calls made by the message (for AI messages).
55
+ """
56
+
57
+ type: str = pydantic.Field()
58
+ """
59
+ The type of the message (e.g., 'human', 'ai', 'system', 'tool').
60
+ """
61
+
62
+ usage_metadata: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = pydantic.Field(default=None)
63
+ """
64
+ Usage metadata including token counts.
65
+ """
66
+
67
+ if IS_PYDANTIC_V2:
68
+ model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
69
+ else:
70
+
71
+ class Config:
72
+ frozen = True
73
+ smart_union = True
74
+ extra = pydantic.Extra.allow
@@ -2,4 +2,4 @@
2
2
 
3
3
  import typing
4
4
 
5
- Tool = typing.Union[typing.Literal["search", "browse"], typing.Any]
5
+ Id = typing.Union[str, typing.List[str]]
@@ -1,9 +1,9 @@
1
1
  # This file was auto-generated by Fern from our API Definition.
2
2
 
3
- from ..core.pydantic_utilities import UniversalBaseModel
4
3
  import typing
5
- from ..core.pydantic_utilities import IS_PYDANTIC_V2
4
+
6
5
  import pydantic
6
+ from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel
7
7
 
8
8
 
9
9
  class ImageUrlContent(UniversalBaseModel):
@@ -0,0 +1,29 @@
1
+ # This file was auto-generated by Fern from our API Definition.
2
+
3
+ import typing
4
+
5
+ import pydantic
6
+ from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel
7
+ from .content import Content
8
+
9
+
10
+ class InputMessage(UniversalBaseModel):
11
+ """
12
+ A message to be sent to the agent.
13
+ """
14
+
15
+ additional_kwargs: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = None
16
+ content: Content
17
+ id: typing.Optional[str] = None
18
+ name: typing.Optional[str] = None
19
+ role: typing.Optional[str] = None
20
+ type: typing.Optional[str] = None
21
+
22
+ if IS_PYDANTIC_V2:
23
+ model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
24
+ else:
25
+
26
+ class Config:
27
+ frozen = True
28
+ smart_union = True
29
+ extra = pydantic.Extra.allow
@@ -0,0 +1,39 @@
1
+ # This file was auto-generated by Fern from our API Definition.
2
+
3
+ from __future__ import annotations
4
+
5
+ import typing
6
+
7
+ import pydantic
8
+ from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel
9
+
10
+
11
+ class InputMessageContentItem_Text(UniversalBaseModel):
12
+ type: typing.Literal["text"] = "text"
13
+ text: str
14
+
15
+ if IS_PYDANTIC_V2:
16
+ model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
17
+ else:
18
+
19
+ class Config:
20
+ frozen = True
21
+ smart_union = True
22
+ extra = pydantic.Extra.allow
23
+
24
+
25
+ class InputMessageContentItem_ImageUrl(UniversalBaseModel):
26
+ type: typing.Literal["image_url"] = "image_url"
27
+ image_url: typing.Dict[str, str]
28
+
29
+ if IS_PYDANTIC_V2:
30
+ model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
31
+ else:
32
+
33
+ class Config:
34
+ frozen = True
35
+ smart_union = True
36
+ extra = pydantic.Extra.allow
37
+
38
+
39
+ InputMessageContentItem = typing.Union[InputMessageContentItem_Text, InputMessageContentItem_ImageUrl]