module documentation

Initialize Temporal OpenAI Agents overrides.

Class _OpenAIJSONPlainPayloadConverter Strict pydantic deserialization with a lenient fallback.
Function _data_converter Undocumented
Function _install_otel_instrumentation Configure OpenInference while at least one tracing context is active.
Function _lenient_construct Build value into type_ without enforcing required fields.
Function _set_open_ai_agent_temporal_overrides Undocumented
Function _uninstall_otel_instrumentation Tear down OpenInference after the final tracing context exits.
Variable _otel_trace_start_instrumentor Undocumented
Variable _otel_trace_start_original Undocumented
Variable _otel_trace_start_patch_lock Undocumented
Variable _otel_trace_start_patch_ref_count Undocumented
def _data_converter(converter: DataConverter | None) -> DataConverter: (source)

Undocumented

def _install_otel_instrumentation(tracer_provider: typing.Any): (source)

Configure OpenInference while at least one tracing context is active.

def _lenient_construct(type_: typing.Any, value: typing.Any) -> typing.Any: (source)

Build value into type_ without enforcing required fields.

OpenAI's construct_type handles its own response models (and the unions/lists thereof), but not the agents dataclasses that wrap them (e.g. ModelResponse), so the dataclass layer is reconstructed here and each field delegated to construct_type. include_extras preserves the Annotated discriminators the unions rely on.

def _set_open_ai_agent_temporal_overrides(model_params: ModelActivityParameters, start_spans_in_replay: bool = False): (source)

Undocumented

def _uninstall_otel_instrumentation(): (source)

Tear down OpenInference after the final tracing context exits.

_otel_trace_start_instrumentor: typing.Any | None = (source)

Undocumented

_otel_trace_start_original: Callable[..., typing.Any] | None = (source)

Undocumented

_otel_trace_start_patch_lock = (source)

Undocumented

_otel_trace_start_patch_ref_count: int = (source)

Undocumented