agentex-sdk 0.4.20__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 CHANGED
@@ -1,4 +1,4 @@
1
1
  # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
2
 
3
3
  __title__ = "agentex"
4
- __version__ = "0.4.20" # x-release-please-version
4
+ __version__ = "0.4.22" # x-release-please-version
@@ -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
- client = await Client.connect(
87
- target_host=temporal_address,
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
@@ -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
- client = await Client.connect(
91
- target_host=temporal_address,
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.20
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=wh-98Xlko1T5mcaCEc0tEZM_lw-nJOnx8SloXc9HZE8,159
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
@@ -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=RZ1MqrGX--jdANRQRNno-wqjMLg_xuE-nrMssHDy6gQ,3180
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
@@ -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=_ffvNWFXHDMWW4KN40OI_7plD9SdDHFvNbyCoHPAQAo,7813
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.20.dist-info/METADATA,sha256=PBFFdBD7eL9fv_CZwAIpjwZeR77tqKT4XWgp89StpqY,15198
308
- agentex_sdk-0.4.20.dist-info/WHEEL,sha256=C2FUgwZgiLbznR-k0b_5k3Ai_1aASOXDss3lzCUsUug,87
309
- agentex_sdk-0.4.20.dist-info/entry_points.txt,sha256=V7vJuMZdF0UlvgX6KiBN7XUvq_cxF5kplcYvc1QlFaQ,62
310
- agentex_sdk-0.4.20.dist-info/licenses/LICENSE,sha256=Q1AOx2FtRcMlyMgQJ9eVN2WKPq2mQ33lnB4tvWxabLA,11337
311
- agentex_sdk-0.4.20.dist-info/RECORD,,
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,,