agentex-sdk 0.4.20__py3-none-any.whl → 0.4.21__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.
- agentex/_version.py +1 -1
- agentex/lib/core/clients/temporal/utils.py +18 -13
- {agentex_sdk-0.4.20.dist-info → agentex_sdk-0.4.21.dist-info}/METADATA +1 -1
- {agentex_sdk-0.4.20.dist-info → agentex_sdk-0.4.21.dist-info}/RECORD +7 -7
- {agentex_sdk-0.4.20.dist-info → agentex_sdk-0.4.21.dist-info}/WHEEL +0 -0
- {agentex_sdk-0.4.20.dist-info → agentex_sdk-0.4.21.dist-info}/entry_points.txt +0 -0
- {agentex_sdk-0.4.20.dist-info → agentex_sdk-0.4.21.dist-info}/licenses/LICENSE +0 -0
agentex/_version.py
CHANGED
@@ -3,6 +3,7 @@ from typing import Any
|
|
3
3
|
from temporalio.client import Client, Plugin as ClientPlugin
|
4
4
|
from temporalio.runtime import Runtime, TelemetryConfig, OpenTelemetryConfig
|
5
5
|
from temporalio.contrib.pydantic import pydantic_data_converter
|
6
|
+
from temporalio.contrib.openai_agents import OpenAIAgentsPlugin
|
6
7
|
|
7
8
|
# class DateTimeJSONEncoder(AdvancedJSONEncoder):
|
8
9
|
# def default(self, o: Any) -> Any:
|
@@ -74,20 +75,24 @@ async def get_temporal_client(temporal_address: str, metrics_url: str | None = N
|
|
74
75
|
if plugins:
|
75
76
|
validate_client_plugins(plugins)
|
76
77
|
|
78
|
+
# Check if OpenAI plugin is present - it needs to configure its own data converter
|
79
|
+
has_openai_plugin = any(
|
80
|
+
isinstance(p, OpenAIAgentsPlugin) for p in (plugins or [])
|
81
|
+
)
|
82
|
+
|
83
|
+
# Only set data_converter if OpenAI plugin is not present
|
84
|
+
connect_kwargs = {
|
85
|
+
"target_host": temporal_address,
|
86
|
+
"plugins": plugins,
|
87
|
+
}
|
88
|
+
|
89
|
+
if not has_openai_plugin:
|
90
|
+
connect_kwargs["data_converter"] = pydantic_data_converter
|
91
|
+
|
77
92
|
if not metrics_url:
|
78
|
-
client = await Client.connect(
|
79
|
-
target_host=temporal_address,
|
80
|
-
# data_converter=custom_data_converter,
|
81
|
-
data_converter=pydantic_data_converter,
|
82
|
-
plugins=plugins,
|
83
|
-
)
|
93
|
+
client = await Client.connect(**connect_kwargs)
|
84
94
|
else:
|
85
95
|
runtime = Runtime(telemetry=TelemetryConfig(metrics=OpenTelemetryConfig(url=metrics_url)))
|
86
|
-
|
87
|
-
|
88
|
-
# data_converter=custom_data_converter,
|
89
|
-
data_converter=pydantic_data_converter,
|
90
|
-
runtime=runtime,
|
91
|
-
plugins=plugins,
|
92
|
-
)
|
96
|
+
connect_kwargs["runtime"] = runtime
|
97
|
+
client = await Client.connect(**connect_kwargs)
|
93
98
|
return client
|
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.3
|
2
2
|
Name: agentex-sdk
|
3
|
-
Version: 0.4.
|
3
|
+
Version: 0.4.21
|
4
4
|
Summary: The official Python library for the agentex API
|
5
5
|
Project-URL: Homepage, https://github.com/scaleapi/agentex-python
|
6
6
|
Project-URL: Repository, https://github.com/scaleapi/agentex-python
|
@@ -11,7 +11,7 @@ agentex/_resource.py,sha256=S1t7wmR5WUvoDIhZjo_x-E7uoTJBynJ3d8tPJMQYdjw,1106
|
|
11
11
|
agentex/_response.py,sha256=Tb9zazsnemO2rTxWtBjAD5WBqlhli5ZaXGbiKgdu5DE,28794
|
12
12
|
agentex/_streaming.py,sha256=FNGJExRCF-vTRUZHFKUfoAWFhDGOB3XbioVCF37Jr7E,10104
|
13
13
|
agentex/_types.py,sha256=lO491FSd7vM_uBp7-TvItbauEAH8SsEPYcyNO_5lKGM,7297
|
14
|
-
agentex/_version.py,sha256=
|
14
|
+
agentex/_version.py,sha256=QlKIj-0yz0xu7DzzyrkGCF4wpdbuPsVO94aYwFpAFTM,159
|
15
15
|
agentex/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
16
16
|
agentex/_utils/__init__.py,sha256=7fch0GT9zpNnErbciSpUNa-SjTxxjY6kxHxKMOM4AGs,2305
|
17
17
|
agentex/_utils/_compat.py,sha256=D8gtAvjJQrDWt9upS0XaG9Rr5l1QhiAx_I_1utT_tt0,1195
|
@@ -119,7 +119,7 @@ agentex/lib/core/clients/__init__.py,sha256=AbpHGcgLb-kRsJGnwFEktk7uzpZOCcBY74-Y
|
|
119
119
|
agentex/lib/core/clients/temporal/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
120
120
|
agentex/lib/core/clients/temporal/temporal_client.py,sha256=D24RSs_AXvHGTrdF8zR4BQPa1X1EIGS2j-nwJv8w0y4,6823
|
121
121
|
agentex/lib/core/clients/temporal/types.py,sha256=B5fKLH5QQvqVYIZYZGU37vrOYyaytqAdPEnU4bAg2Ak,1334
|
122
|
-
agentex/lib/core/clients/temporal/utils.py,sha256=
|
122
|
+
agentex/lib/core/clients/temporal/utils.py,sha256=tro3SWFXTjsj0haaMpUBuumkWVdcaETETtVkWWrzF24,3372
|
123
123
|
agentex/lib/core/services/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
124
124
|
agentex/lib/core/services/adk/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
125
125
|
agentex/lib/core/services/adk/agent_task_tracker.py,sha256=qkiEEKpbHIaKf6t-iP8Tn5jSDCbRWa5rEuSFD6y4u8Y,2897
|
@@ -304,8 +304,8 @@ agentex/types/messages/batch_update_params.py,sha256=Ug5CThbD49a8j4qucg04OdmVrp_
|
|
304
304
|
agentex/types/messages/batch_update_response.py,sha256=TbSBe6SuPzjXXWSj-nRjT1JHGBooTshHQQDa1AixQA8,278
|
305
305
|
agentex/types/shared/__init__.py,sha256=IKs-Qn5Yja0kFh1G1kDqYZo43qrOu1hSoxlPdN-85dI,149
|
306
306
|
agentex/types/shared/delete_response.py,sha256=8qH3zvQXaOHYQSHyXi7UQxdR4miTzR7V9K4zXVsiUyk,215
|
307
|
-
agentex_sdk-0.4.
|
308
|
-
agentex_sdk-0.4.
|
309
|
-
agentex_sdk-0.4.
|
310
|
-
agentex_sdk-0.4.
|
311
|
-
agentex_sdk-0.4.
|
307
|
+
agentex_sdk-0.4.21.dist-info/METADATA,sha256=jUNki_WEL6w1Z2eoW1ucdt82gQ6NqYl-uZGAsJtqiqQ,15198
|
308
|
+
agentex_sdk-0.4.21.dist-info/WHEEL,sha256=C2FUgwZgiLbznR-k0b_5k3Ai_1aASOXDss3lzCUsUug,87
|
309
|
+
agentex_sdk-0.4.21.dist-info/entry_points.txt,sha256=V7vJuMZdF0UlvgX6KiBN7XUvq_cxF5kplcYvc1QlFaQ,62
|
310
|
+
agentex_sdk-0.4.21.dist-info/licenses/LICENSE,sha256=Q1AOx2FtRcMlyMgQJ9eVN2WKPq2mQ33lnB4tvWxabLA,11337
|
311
|
+
agentex_sdk-0.4.21.dist-info/RECORD,,
|
File without changes
|
File without changes
|
File without changes
|