agentex-sdk 0.4.21__py3-none-any.whl → 0.4.22__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/temporal/workers/worker.py +19 -9
- {agentex_sdk-0.4.21.dist-info → agentex_sdk-0.4.22.dist-info}/METADATA +1 -1
- {agentex_sdk-0.4.21.dist-info → agentex_sdk-0.4.22.dist-info}/RECORD +7 -7
- {agentex_sdk-0.4.21.dist-info → agentex_sdk-0.4.22.dist-info}/WHEEL +0 -0
- {agentex_sdk-0.4.21.dist-info → agentex_sdk-0.4.22.dist-info}/entry_points.txt +0 -0
- {agentex_sdk-0.4.21.dist-info → agentex_sdk-0.4.22.dist-info}/licenses/LICENSE +0 -0
agentex/_version.py
CHANGED
@@ -23,6 +23,7 @@ from temporalio.converter import (
|
|
23
23
|
JSONPlainPayloadConverter,
|
24
24
|
_JSONTypeConverterUnhandled,
|
25
25
|
)
|
26
|
+
from temporalio.contrib.openai_agents import OpenAIAgentsPlugin
|
26
27
|
|
27
28
|
from agentex.lib.utils.logging import make_logger
|
28
29
|
from agentex.lib.utils.registration import register_agent
|
@@ -81,18 +82,27 @@ async def get_temporal_client(temporal_address: str, metrics_url: str | None = N
|
|
81
82
|
if plugins != []: # We don't need to validate the plugins if they are empty
|
82
83
|
_validate_plugins(plugins)
|
83
84
|
|
85
|
+
# Check if OpenAI plugin is present - it needs to configure its own data converter
|
86
|
+
has_openai_plugin = any(
|
87
|
+
isinstance(p, OpenAIAgentsPlugin) for p in (plugins or [])
|
88
|
+
)
|
89
|
+
|
90
|
+
# Build connection kwargs
|
91
|
+
connect_kwargs = {
|
92
|
+
"target_host": temporal_address,
|
93
|
+
"plugins": plugins,
|
94
|
+
}
|
95
|
+
|
96
|
+
# Only set data_converter if OpenAI plugin is not present
|
97
|
+
if not has_openai_plugin:
|
98
|
+
connect_kwargs["data_converter"] = custom_data_converter
|
99
|
+
|
84
100
|
if not metrics_url:
|
85
|
-
client = await Client.connect(
|
86
|
-
target_host=temporal_address, data_converter=custom_data_converter, plugins=plugins
|
87
|
-
)
|
101
|
+
client = await Client.connect(**connect_kwargs)
|
88
102
|
else:
|
89
103
|
runtime = Runtime(telemetry=TelemetryConfig(metrics=OpenTelemetryConfig(url=metrics_url)))
|
90
|
-
|
91
|
-
|
92
|
-
data_converter=custom_data_converter,
|
93
|
-
runtime=runtime,
|
94
|
-
plugins=plugins,
|
95
|
-
)
|
104
|
+
connect_kwargs["runtime"] = runtime
|
105
|
+
client = await Client.connect(**connect_kwargs)
|
96
106
|
return client
|
97
107
|
|
98
108
|
|
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.3
|
2
2
|
Name: agentex-sdk
|
3
|
-
Version: 0.4.
|
3
|
+
Version: 0.4.22
|
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=bH0J151suC81qUajoQKjWzRTMVqUeh62eEsl5CiFNhY,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
|
@@ -163,7 +163,7 @@ agentex/lib/core/temporal/services/temporal_task_service.py,sha256=W0L2GkSWwO2WZ
|
|
163
163
|
agentex/lib/core/temporal/types/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
164
164
|
agentex/lib/core/temporal/types/workflow.py,sha256=o8lBUloI44NTYFfbA1BLgzUneyN7aLbt042Eq_9OKo8,89
|
165
165
|
agentex/lib/core/temporal/workers/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
166
|
-
agentex/lib/core/temporal/workers/worker.py,sha256=
|
166
|
+
agentex/lib/core/temporal/workers/worker.py,sha256=r-f4zUUqbsskK_d5azj7Ra-YLrHnVj7vImT_D2xvRnM,8166
|
167
167
|
agentex/lib/core/temporal/workflows/workflow.py,sha256=ZoWsrNPup69RnMHnuks1DRy9YsmK_nYdjsOosYVfFxw,723
|
168
168
|
agentex/lib/core/tracing/__init__.py,sha256=07j9IRgZWFtZhdkk01l1nvaC5aCpygLWy94yXpYUZbM,229
|
169
169
|
agentex/lib/core/tracing/trace.py,sha256=b-TnBMEdUsZzKq2jfXU-GvFNxrfm6l_-YJtcw1nhohU,8952
|
@@ -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.22.dist-info/METADATA,sha256=RsmQhG6mjNj3w0Q99nueJcr1Y3Ur7cuK078r4mgFeZo,15198
|
308
|
+
agentex_sdk-0.4.22.dist-info/WHEEL,sha256=C2FUgwZgiLbznR-k0b_5k3Ai_1aASOXDss3lzCUsUug,87
|
309
|
+
agentex_sdk-0.4.22.dist-info/entry_points.txt,sha256=V7vJuMZdF0UlvgX6KiBN7XUvq_cxF5kplcYvc1QlFaQ,62
|
310
|
+
agentex_sdk-0.4.22.dist-info/licenses/LICENSE,sha256=Q1AOx2FtRcMlyMgQJ9eVN2WKPq2mQ33lnB4tvWxabLA,11337
|
311
|
+
agentex_sdk-0.4.22.dist-info/RECORD,,
|
File without changes
|
File without changes
|
File without changes
|