3939
4040
4141class ResponseBuilders :
42- """Builders for creating model responses for testing.
43-
44- .. warning::
45- This API is experimental and may change in the future.
46- """
42+ """Builders for creating model responses for testing."""
4743
4844 @staticmethod
4945 def model_response (output : TResponseOutputItem ) -> ModelResponse :
50- """Create a ModelResponse with the given output.
51-
52- .. warning::
53- This API is experimental and may change in the future.
54- """
46+ """Create a ModelResponse with the given output."""
5547 return ModelResponse (
5648 output = [output ],
5749 usage = Usage (),
@@ -60,11 +52,7 @@ def model_response(output: TResponseOutputItem) -> ModelResponse:
6052
6153 @staticmethod
6254 def response_output_message (text : str ) -> ResponseOutputMessage :
63- """Create a ResponseOutputMessage with text content.
64-
65- .. warning::
66- This API is experimental and may change in the future.
67- """
55+ """Create a ResponseOutputMessage with text content."""
6856 return ResponseOutputMessage (
6957 id = "" ,
7058 content = [
@@ -81,11 +69,7 @@ def response_output_message(text: str) -> ResponseOutputMessage:
8169
8270 @staticmethod
8371 def tool_call (arguments : str , name : str ) -> ModelResponse :
84- """Create a ModelResponse with a function tool call.
85-
86- .. warning::
87- This API is experimental and may change in the future.
88- """
72+ """Create a ModelResponse with a function tool call."""
8973 return ResponseBuilders .model_response (
9074 ResponseFunctionToolCall (
9175 arguments = arguments ,
@@ -99,57 +83,33 @@ def tool_call(arguments: str, name: str) -> ModelResponse:
9983
10084 @staticmethod
10185 def output_message (text : str ) -> ModelResponse :
102- """Create a ModelResponse with an output message.
103-
104- .. warning::
105- This API is experimental and may change in the future.
106- """
86+ """Create a ModelResponse with an output message."""
10787 return ResponseBuilders .model_response (
10888 ResponseBuilders .response_output_message (text )
10989 )
11090
11191
11292class TestModelProvider (ModelProvider ):
113- """Test model provider which simply returns the given module.
114-
115- .. warning::
116- This API is experimental and may change in the future.
117- """
93+ """Test model provider which simply returns the given module."""
11894
11995 __test__ = False
12096
12197 def __init__ (self , model : Model ):
122- """Initialize a test model provider with a model.
123-
124- .. warning::
125- This API is experimental and may change in the future.
126- """
98+ """Initialize a test model provider with a model."""
12799 self ._model = model
128100
129101 def get_model (self , model_name : str | None ) -> Model :
130- """Get a model from the model provider.
131-
132- .. warning::
133- This API is experimental and may change in the future.
134- """
102+ """Get a model from the model provider."""
135103 return self ._model
136104
137105
138106class TestModel (Model ):
139- """Test model for use mocking model responses.
140-
141- .. warning::
142- This API is experimental and may change in the future.
143- """
107+ """Test model for use mocking model responses."""
144108
145109 __test__ = False
146110
147111 def __init__ (self , fn : Callable [[], ModelResponse ]) -> None :
148- """Initialize a test model with a callable.
149-
150- .. warning::
151- This API is experimental and may change in the future.
152- """
112+ """Initialize a test model with a callable."""
153113 self .fn = fn
154114
155115 async def get_response (
@@ -182,11 +142,7 @@ def stream_response(
182142
183143 @staticmethod
184144 def returning_responses (responses : list [ModelResponse ]) -> "TestModel" :
185- """Create a mock model which sequentially returns responses from a list.
186-
187- .. warning::
188- This API is experimental and may change in the future.
189- """
145+ """Create a mock model which sequentially returns responses from a list."""
190146 i = iter (responses )
191147 return TestModel (lambda : next (i ))
192148
@@ -197,9 +153,6 @@ class AgentEnvironment:
197153 This async context manager provides a convenient way to set up testing environments
198154 for OpenAI agents with mocked model calls and Temporal integration.
199155
200- .. warning::
201- This API is experimental and may change in the future.
202-
203156 Example:
204157 >>> from temporalio.contrib.openai_agents.testing import AgentEnvironment, TestModelProvider, ResponseBuilders
205158 >>> from temporalio.client import Client
@@ -246,9 +199,8 @@ def __init__(
246199 register_activities: Whether to register activities during worker execution.
247200 add_temporal_spans: Whether to add temporal spans to traces
248201 use_otel_instrumentation: If set to true, enable open telemetry instrumentation.
249-
250- .. warning::
251- This API is experimental and may change in the future.
202+ Warning: use_otel_instrumentation is experimental and behavior may change in future versions.
203+ Use with caution in production environments.
252204 """
253205 self ._model_params = model_params
254206 self ._model_provider = None
@@ -289,9 +241,6 @@ def applied_on_client(self, client: Client) -> Client:
289241
290242 Returns:
291243 A new Client instance with the OpenAI agents plugin applied.
292-
293- .. warning::
294- This API is experimental and may change in the future.
295244 """
296245 if self ._plugin is None :
297246 raise RuntimeError (
@@ -305,11 +254,7 @@ def applied_on_client(self, client: Client) -> Client:
305254
306255 @property
307256 def openai_agents_plugin (self ) -> OpenAIAgentsPlugin :
308- """Get the underlying OpenAI agents plugin.
309-
310- .. warning::
311- This API is experimental and may change in the future.
312- """
257+ """Get the underlying OpenAI agents plugin."""
313258 if self ._plugin is None :
314259 raise RuntimeError (
315260 "AgentEnvironment must be entered before accessing plugin"
0 commit comments