athena-intelligence 0.1.120__py3-none-any.whl → 0.1.122__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 +0 -16
- athena/agents/general/client.py +30 -66
- athena/core/client_wrapper.py +1 -1
- athena/types/__init__.py +0 -20
- athena/types/general_agent_request.py +1 -2
- {athena_intelligence-0.1.120.dist-info → athena_intelligence-0.1.122.dist-info}/METADATA +1 -1
- {athena_intelligence-0.1.120.dist-info → athena_intelligence-0.1.122.dist-info}/RECORD +8 -14
- athena/types/general_agent_request_messages_item.py +0 -32
- athena/types/general_agent_request_messages_item_content.py +0 -7
- athena/types/general_agent_request_messages_item_content_item.py +0 -60
- athena/types/general_agent_request_messages_item_content_item_image_url.py +0 -29
- athena/types/general_agent_request_messages_item_content_item_text.py +0 -29
- athena/types/general_agent_request_messages_item_type.py +0 -25
- {athena_intelligence-0.1.120.dist-info → athena_intelligence-0.1.122.dist-info}/WHEEL +0 -0
athena/__init__.py
CHANGED
@@ -15,14 +15,6 @@ from .types import (
|
|
15
15
|
GeneralAgentConfig,
|
16
16
|
GeneralAgentConfigEnabledToolsItem,
|
17
17
|
GeneralAgentRequest,
|
18
|
-
GeneralAgentRequestMessagesItem,
|
19
|
-
GeneralAgentRequestMessagesItemContent,
|
20
|
-
GeneralAgentRequestMessagesItemContentItem,
|
21
|
-
GeneralAgentRequestMessagesItemContentItemImageUrl,
|
22
|
-
GeneralAgentRequestMessagesItemContentItemText,
|
23
|
-
GeneralAgentRequestMessagesItemContentItem_ImageUrl,
|
24
|
-
GeneralAgentRequestMessagesItemContentItem_Text,
|
25
|
-
GeneralAgentRequestMessagesItemType,
|
26
18
|
GeneralAgentResponse,
|
27
19
|
ParentFolderError,
|
28
20
|
ResearchAgentResponse,
|
@@ -64,14 +56,6 @@ __all__ = [
|
|
64
56
|
"GeneralAgentConfig",
|
65
57
|
"GeneralAgentConfigEnabledToolsItem",
|
66
58
|
"GeneralAgentRequest",
|
67
|
-
"GeneralAgentRequestMessagesItem",
|
68
|
-
"GeneralAgentRequestMessagesItemContent",
|
69
|
-
"GeneralAgentRequestMessagesItemContentItem",
|
70
|
-
"GeneralAgentRequestMessagesItemContentItemImageUrl",
|
71
|
-
"GeneralAgentRequestMessagesItemContentItemText",
|
72
|
-
"GeneralAgentRequestMessagesItemContentItem_ImageUrl",
|
73
|
-
"GeneralAgentRequestMessagesItemContentItem_Text",
|
74
|
-
"GeneralAgentRequestMessagesItemType",
|
75
59
|
"GeneralAgentResponse",
|
76
60
|
"InternalServerError",
|
77
61
|
"NotFoundError",
|
athena/agents/general/client.py
CHANGED
@@ -39,13 +39,7 @@ class GeneralClient:
|
|
39
39
|
|
40
40
|
Examples
|
41
41
|
--------
|
42
|
-
from athena import
|
43
|
-
GeneralAgentConfig,
|
44
|
-
GeneralAgentRequest,
|
45
|
-
GeneralAgentRequestMessagesItem,
|
46
|
-
GeneralAgentRequestMessagesItemType,
|
47
|
-
Tool,
|
48
|
-
)
|
42
|
+
from athena import GeneralAgentConfig, GeneralAgentRequest, Tool
|
49
43
|
from athena.client import Athena
|
50
44
|
|
51
45
|
client = Athena(
|
@@ -58,10 +52,10 @@ class GeneralClient:
|
|
58
52
|
enabled_tools=[Tool.SEARCH],
|
59
53
|
),
|
60
54
|
messages=[
|
61
|
-
|
62
|
-
content
|
63
|
-
type
|
64
|
-
|
55
|
+
{
|
56
|
+
"content": "Please call the search tool for AAPL news.",
|
57
|
+
"type": "user",
|
58
|
+
}
|
65
59
|
],
|
66
60
|
)
|
67
61
|
],
|
@@ -103,13 +97,7 @@ class GeneralClient:
|
|
103
97
|
|
104
98
|
Examples
|
105
99
|
--------
|
106
|
-
from athena import
|
107
|
-
GeneralAgentConfig,
|
108
|
-
GeneralAgentRequest,
|
109
|
-
GeneralAgentRequestMessagesItem,
|
110
|
-
GeneralAgentRequestMessagesItemType,
|
111
|
-
Tool,
|
112
|
-
)
|
100
|
+
from athena import GeneralAgentConfig, GeneralAgentRequest, Tool
|
113
101
|
from athena.client import Athena
|
114
102
|
|
115
103
|
client = Athena(
|
@@ -121,10 +109,10 @@ class GeneralClient:
|
|
121
109
|
enabled_tools=[Tool.SEARCH],
|
122
110
|
),
|
123
111
|
messages=[
|
124
|
-
|
125
|
-
content
|
126
|
-
type
|
127
|
-
|
112
|
+
{
|
113
|
+
"content": "Please call the search tool for AAPL news.",
|
114
|
+
"type": "user",
|
115
|
+
}
|
128
116
|
],
|
129
117
|
),
|
130
118
|
)
|
@@ -162,13 +150,7 @@ class GeneralClient:
|
|
162
150
|
|
163
151
|
Examples
|
164
152
|
--------
|
165
|
-
from athena import
|
166
|
-
GeneralAgentConfig,
|
167
|
-
GeneralAgentRequest,
|
168
|
-
GeneralAgentRequestMessagesItem,
|
169
|
-
GeneralAgentRequestMessagesItemType,
|
170
|
-
Tool,
|
171
|
-
)
|
153
|
+
from athena import GeneralAgentConfig, GeneralAgentRequest, Tool
|
172
154
|
from athena.client import Athena
|
173
155
|
|
174
156
|
client = Athena(
|
@@ -180,10 +162,10 @@ class GeneralClient:
|
|
180
162
|
enabled_tools=[Tool.SEARCH],
|
181
163
|
),
|
182
164
|
messages=[
|
183
|
-
|
184
|
-
content
|
185
|
-
type
|
186
|
-
|
165
|
+
{
|
166
|
+
"content": "Please call the search tool for AAPL news.",
|
167
|
+
"type": "user",
|
168
|
+
}
|
187
169
|
],
|
188
170
|
),
|
189
171
|
)
|
@@ -230,13 +212,7 @@ class AsyncGeneralClient:
|
|
230
212
|
|
231
213
|
Examples
|
232
214
|
--------
|
233
|
-
from athena import
|
234
|
-
GeneralAgentConfig,
|
235
|
-
GeneralAgentRequest,
|
236
|
-
GeneralAgentRequestMessagesItem,
|
237
|
-
GeneralAgentRequestMessagesItemType,
|
238
|
-
Tool,
|
239
|
-
)
|
215
|
+
from athena import GeneralAgentConfig, GeneralAgentRequest, Tool
|
240
216
|
from athena.client import AsyncAthena
|
241
217
|
|
242
218
|
client = AsyncAthena(
|
@@ -249,10 +225,10 @@ class AsyncGeneralClient:
|
|
249
225
|
enabled_tools=[Tool.SEARCH],
|
250
226
|
),
|
251
227
|
messages=[
|
252
|
-
|
253
|
-
content
|
254
|
-
type
|
255
|
-
|
228
|
+
{
|
229
|
+
"content": "Please call the search tool for AAPL news.",
|
230
|
+
"type": "user",
|
231
|
+
}
|
256
232
|
],
|
257
233
|
)
|
258
234
|
],
|
@@ -294,13 +270,7 @@ class AsyncGeneralClient:
|
|
294
270
|
|
295
271
|
Examples
|
296
272
|
--------
|
297
|
-
from athena import
|
298
|
-
GeneralAgentConfig,
|
299
|
-
GeneralAgentRequest,
|
300
|
-
GeneralAgentRequestMessagesItem,
|
301
|
-
GeneralAgentRequestMessagesItemType,
|
302
|
-
Tool,
|
303
|
-
)
|
273
|
+
from athena import GeneralAgentConfig, GeneralAgentRequest, Tool
|
304
274
|
from athena.client import AsyncAthena
|
305
275
|
|
306
276
|
client = AsyncAthena(
|
@@ -312,10 +282,10 @@ class AsyncGeneralClient:
|
|
312
282
|
enabled_tools=[Tool.SEARCH],
|
313
283
|
),
|
314
284
|
messages=[
|
315
|
-
|
316
|
-
content
|
317
|
-
type
|
318
|
-
|
285
|
+
{
|
286
|
+
"content": "Please call the search tool for AAPL news.",
|
287
|
+
"type": "user",
|
288
|
+
}
|
319
289
|
],
|
320
290
|
),
|
321
291
|
)
|
@@ -353,13 +323,7 @@ class AsyncGeneralClient:
|
|
353
323
|
|
354
324
|
Examples
|
355
325
|
--------
|
356
|
-
from athena import
|
357
|
-
GeneralAgentConfig,
|
358
|
-
GeneralAgentRequest,
|
359
|
-
GeneralAgentRequestMessagesItem,
|
360
|
-
GeneralAgentRequestMessagesItemType,
|
361
|
-
Tool,
|
362
|
-
)
|
326
|
+
from athena import GeneralAgentConfig, GeneralAgentRequest, Tool
|
363
327
|
from athena.client import AsyncAthena
|
364
328
|
|
365
329
|
client = AsyncAthena(
|
@@ -371,10 +335,10 @@ class AsyncGeneralClient:
|
|
371
335
|
enabled_tools=[Tool.SEARCH],
|
372
336
|
),
|
373
337
|
messages=[
|
374
|
-
|
375
|
-
content
|
376
|
-
type
|
377
|
-
|
338
|
+
{
|
339
|
+
"content": "Please call the search tool for AAPL news.",
|
340
|
+
"type": "user",
|
341
|
+
}
|
378
342
|
],
|
379
343
|
),
|
380
344
|
)
|
athena/core/client_wrapper.py
CHANGED
@@ -17,7 +17,7 @@ class BaseClientWrapper:
|
|
17
17
|
headers: typing.Dict[str, str] = {
|
18
18
|
"X-Fern-Language": "Python",
|
19
19
|
"X-Fern-SDK-Name": "athena-intelligence",
|
20
|
-
"X-Fern-SDK-Version": "0.1.
|
20
|
+
"X-Fern-SDK-Version": "0.1.122",
|
21
21
|
}
|
22
22
|
headers["X-API-KEY"] = self.api_key
|
23
23
|
return headers
|
athena/types/__init__.py
CHANGED
@@ -14,18 +14,6 @@ from .file_too_large_error import FileTooLargeError
|
|
14
14
|
from .general_agent_config import GeneralAgentConfig
|
15
15
|
from .general_agent_config_enabled_tools_item import GeneralAgentConfigEnabledToolsItem
|
16
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
17
|
from .general_agent_response import GeneralAgentResponse
|
30
18
|
from .parent_folder_error import ParentFolderError
|
31
19
|
from .research_agent_response import ResearchAgentResponse
|
@@ -49,14 +37,6 @@ __all__ = [
|
|
49
37
|
"GeneralAgentConfig",
|
50
38
|
"GeneralAgentConfigEnabledToolsItem",
|
51
39
|
"GeneralAgentRequest",
|
52
|
-
"GeneralAgentRequestMessagesItem",
|
53
|
-
"GeneralAgentRequestMessagesItemContent",
|
54
|
-
"GeneralAgentRequestMessagesItemContentItem",
|
55
|
-
"GeneralAgentRequestMessagesItemContentItemImageUrl",
|
56
|
-
"GeneralAgentRequestMessagesItemContentItemText",
|
57
|
-
"GeneralAgentRequestMessagesItemContentItem_ImageUrl",
|
58
|
-
"GeneralAgentRequestMessagesItemContentItem_Text",
|
59
|
-
"GeneralAgentRequestMessagesItemType",
|
60
40
|
"GeneralAgentResponse",
|
61
41
|
"ParentFolderError",
|
62
42
|
"ResearchAgentResponse",
|
@@ -6,7 +6,6 @@ import typing
|
|
6
6
|
from ..core.datetime_utils import serialize_datetime
|
7
7
|
from ..core.pydantic_utilities import deep_union_pydantic_dicts, pydantic_v1
|
8
8
|
from .general_agent_config import GeneralAgentConfig
|
9
|
-
from .general_agent_request_messages_item import GeneralAgentRequestMessagesItem
|
10
9
|
|
11
10
|
|
12
11
|
class GeneralAgentRequest(pydantic_v1.BaseModel):
|
@@ -15,7 +14,7 @@ class GeneralAgentRequest(pydantic_v1.BaseModel):
|
|
15
14
|
"""
|
16
15
|
|
17
16
|
config: GeneralAgentConfig
|
18
|
-
messages: typing.List[
|
17
|
+
messages: typing.List[typing.Any] = pydantic_v1.Field()
|
19
18
|
"""
|
20
19
|
The messages to send to the agent. Each message should be a string (for text inputs) or a list of multimodal content parts.
|
21
20
|
"""
|
@@ -1,10 +1,10 @@
|
|
1
|
-
athena/__init__.py,sha256=
|
1
|
+
athena/__init__.py,sha256=iCOL1NZiVObNQQHMZ47mrTS_r4YuHRGJGLCThyQxVRg,2044
|
2
2
|
athena/agents/__init__.py,sha256=I6MO2O_hb6KLa8oDHbGNSAhcPE-dsrX6LMcAEhsg3PQ,160
|
3
3
|
athena/agents/client.py,sha256=aI8rNhXBSVJ-hvjnIoCK9sKvHB0e95Zkn-3YpXOKFrY,6721
|
4
4
|
athena/agents/drive/__init__.py,sha256=FTtvy8EDg9nNNg9WCatVgKTRYV8-_v1roeGPAKoa_pw,65
|
5
5
|
athena/agents/drive/client.py,sha256=k--gUzUSi6L5kpmKHi7eX1UnlEq4kG-QI9phAZ5srC0,4727
|
6
6
|
athena/agents/general/__init__.py,sha256=FTtvy8EDg9nNNg9WCatVgKTRYV8-_v1roeGPAKoa_pw,65
|
7
|
-
athena/agents/general/client.py,sha256=
|
7
|
+
athena/agents/general/client.py,sha256=BfM_FLF3mduO4o976-RNXhbvuRpp0zRTyOdlCKW529M,13154
|
8
8
|
athena/agents/research/__init__.py,sha256=FTtvy8EDg9nNNg9WCatVgKTRYV8-_v1roeGPAKoa_pw,65
|
9
9
|
athena/agents/research/client.py,sha256=mo63cUvLw8AC9I29WI4Ym_jOsvRsco1wRqsNp0rtCEc,4745
|
10
10
|
athena/agents/sql/__init__.py,sha256=FTtvy8EDg9nNNg9WCatVgKTRYV8-_v1roeGPAKoa_pw,65
|
@@ -13,7 +13,7 @@ athena/base_client.py,sha256=-kVdOlIibBz48lxWratdQAzT7fTvZsORvOMF3KoPDPw,5647
|
|
13
13
|
athena/client.py,sha256=4PUPrBPCMTFpHR1yuKVR5eC1AYBl_25SMf6ZH82JHB0,19039
|
14
14
|
athena/core/__init__.py,sha256=UFXpYzcGxWQUucU1TkjOQ9mGWN3A5JohluOIWVYKU4I,973
|
15
15
|
athena/core/api_error.py,sha256=RE8LELok2QCjABadECTvtDp7qejA1VmINCh6TbqPwSE,426
|
16
|
-
athena/core/client_wrapper.py,sha256=
|
16
|
+
athena/core/client_wrapper.py,sha256=GDT2am2KI0l7odoK0jxA57nkA-gmSGfkk6i9sshqImE,1806
|
17
17
|
athena/core/datetime_utils.py,sha256=nBys2IsYrhPdszxGKCNRPSOCwa-5DWOHG95FB8G9PKo,1047
|
18
18
|
athena/core/file.py,sha256=sy1RUGZ3aJYuw998bZytxxo6QdgKmlnlgBaMvwEKCGg,1480
|
19
19
|
athena/core/http_client.py,sha256=Z4NuAsJD-51yqmoME17O5sxwx5orSp1wsnd6bPyKcgA,17768
|
@@ -48,7 +48,7 @@ athena/tools/tasks/__init__.py,sha256=FTtvy8EDg9nNNg9WCatVgKTRYV8-_v1roeGPAKoa_p
|
|
48
48
|
athena/tools/tasks/client.py,sha256=5kT6ulh2YDIbNYiv-knBjtF-ST7p0dUvZyrd7t5O61s,2975
|
49
49
|
athena/tools/types/__init__.py,sha256=cA-ZQm6veQAP3_vKu9KkZpISsQqgTBN_Z--FGY1c2iA,197
|
50
50
|
athena/tools/types/tools_data_frame_request_columns_item.py,sha256=GA1FUlTV_CfSc-KToTAwFf4Exl0rr4fsweVZupztjw0,138
|
51
|
-
athena/types/__init__.py,sha256=
|
51
|
+
athena/types/__init__.py,sha256=0D7plyB40Adtmo5YohNnc7bs7qcwIxslC7LknZd_nK4,1934
|
52
52
|
athena/types/asset_not_found_error.py,sha256=ZcgqRuzvO4Z8vVVxwtDB-QtKhpVIVV3hqQuJeUoOoJE,1121
|
53
53
|
athena/types/custom_agent_response.py,sha256=_Vm_fJq4cETtOawBW7p0cvH4Jmle26lHQZ73A8MdLX0,1263
|
54
54
|
athena/types/data_frame_request_out.py,sha256=1CEBe-baDQi0uz_EgMw0TKGYXGj6KV44cL3ViRTZLKM,1669
|
@@ -62,13 +62,7 @@ athena/types/file_chunk_request_out.py,sha256=Ju0I_UpSitjQ-XqSIRvvg2XA6QtfCLZClP
|
|
62
62
|
athena/types/file_too_large_error.py,sha256=AinkrcgR7lcTILAD8RX0x48P3GlSoAh1OihxMvSvRuo,1120
|
63
63
|
athena/types/general_agent_config.py,sha256=FaswWVsDTsL5Fs9Tlx4zSK1S8OrsFnzruEt7l72XlGA,1457
|
64
64
|
athena/types/general_agent_config_enabled_tools_item.py,sha256=6gYaU7uIDJbgygtBKLdYL-VbPxxbEcxwRsT8VaW5vN8,165
|
65
|
-
athena/types/general_agent_request.py,sha256=
|
66
|
-
athena/types/general_agent_request_messages_item.py,sha256=4sFvUZ3YeR5ce7R7EKRSz6RHjq0CWQk7Jip7_9t2t7Y,1401
|
67
|
-
athena/types/general_agent_request_messages_item_content.py,sha256=kG1NX_QA_o-HEQPDVxI6-h9xkrfTyKfMqZ2bE7ipnTw,302
|
68
|
-
athena/types/general_agent_request_messages_item_content_item.py,sha256=U_g0R0bAxdKhdUmlThA9BH8vKq2qTJ1FmtL_iQQtRrk,2387
|
69
|
-
athena/types/general_agent_request_messages_item_content_item_image_url.py,sha256=JNdVoLBMzm6gl_OOFajseZIAzu5_tLms76UL1e7WRTk,1173
|
70
|
-
athena/types/general_agent_request_messages_item_content_item_text.py,sha256=GfSBWQ7igY3uQlsBHKmVlHXBrcSP1rVScTDPy9om62k,1146
|
71
|
-
athena/types/general_agent_request_messages_item_type.py,sha256=dDSQcu9xtKZdNjDux2xSQd7AO9WdrOFmi8rHFU6GTbY,725
|
65
|
+
athena/types/general_agent_request.py,sha256=NnUVtz8U1VoA1SJapbp163Wf_inEQVeFCYWJvM4P-qI,1449
|
72
66
|
athena/types/general_agent_response.py,sha256=9BxqXzchSti5O0Ch_WJkvmkawkBhpH03QlZIbKdYbAY,1212
|
73
67
|
athena/types/parent_folder_error.py,sha256=ZMF-i3mZY6Mu1n5uQ60Q3mIIfehlWuXtgFUkSYspkx8,1120
|
74
68
|
athena/types/research_agent_response.py,sha256=-1mX4M0IEWDFH3alSZdtuhZHSerjWYJQkn74r3Dp26g,1235
|
@@ -77,6 +71,6 @@ athena/types/sql_agent_response.py,sha256=DmeG0HPZkPT_gTrtkroVZluGZIV9McB8wmME2i
|
|
77
71
|
athena/types/structured_data_extractor_reponse.py,sha256=Fa-54k20UIqHKDsmUpF4wZpaiTb_J35XysY1GZUf63w,1306
|
78
72
|
athena/types/tool.py,sha256=6H2BFZiBgQOtYUAwSYBeGZKhwev17IEwnIjgmno6dZw,436
|
79
73
|
athena/version.py,sha256=8aYAOJtVLaJLpRp6mTiEIhnl8gXA7yE0aDtZ-3mKQ4k,87
|
80
|
-
athena_intelligence-0.1.
|
81
|
-
athena_intelligence-0.1.
|
82
|
-
athena_intelligence-0.1.
|
74
|
+
athena_intelligence-0.1.122.dist-info/METADATA,sha256=YKzNYjg8r3D0PeORshmkbJ3YWBnl8LMylR_YZg7PNes,5274
|
75
|
+
athena_intelligence-0.1.122.dist-info/WHEEL,sha256=Zb28QaM1gQi8f4VCBhsUklF61CTlNYfs9YAZn-TOGFk,88
|
76
|
+
athena_intelligence-0.1.122.dist-info/RECORD,,
|
@@ -1,32 +0,0 @@
|
|
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}
|
@@ -1,7 +0,0 @@
|
|
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]]
|
@@ -1,60 +0,0 @@
|
|
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
|
-
]
|
@@ -1,29 +0,0 @@
|
|
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}
|
@@ -1,29 +0,0 @@
|
|
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}
|
@@ -1,25 +0,0 @@
|
|
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()
|
File without changes
|