module documentation
Initialize Temporal OpenAI Agents overrides.
Function | set |
Configure Temporal-specific overrides for OpenAI agents. |
Class | _ |
Undocumented |
@contextmanager
def set_open_ai_agent_temporal_overrides(model_params:
def set_open_ai_agent_temporal_overrides(model_params:
ModelActivityParameters
, auto_close_tracing_in_workflows: bool
= False):
(source)
ΒΆ
Configure Temporal-specific overrides for OpenAI agents.
Warning
This API is experimental and may change in future versions. Use with caution in production environments. Future versions may wrap the worker directly instead of requiring this context manager.
This context manager sets up the necessary Temporal-specific runners and trace providers for running OpenAI agents within Temporal workflows. It should be called in the main entry point of your application before initializing the Temporal client and worker.
The context manager handles: 1. Setting up a Temporal-specific runner for OpenAI agents 2. Configuring a Temporal-aware trace provider 3. Restoring previous settings when the context exits
Parameters | |
modelModelActivityParameters | Configuration parameters for Temporal activity execution of model calls. |
autobool | If set to true, close tracing spans immediately. |
Returns | |
A context manager that yields the configured TemporalTraceProvider. |