o
    õæh¯  ã                   @   sb  d dl Z ddlmZmZmZmZmZmZmZm	Z	m
Z
mZmZmZmZmZ ddlmZ ddlmZmZ ddlmZmZ ddlmZmZ ddlmZmZmZmZm Z m!Z!m"Z"m#Z#m$Z$m%Z%m&Z&m'Z' dd	l(m)Z)m*Z* dd
l+m,Z, ddl-m.Z.m/Z/ g d¢Z0deddfdd„Z1de2e ddfdd„Z3de4ddfdd„Z5de6ddfdd„Z7eeƒ ƒ e1eƒ ƒ e  8eƒ j9¡ dS )é    Né   )Ú
agent_spanÚcustom_spanÚfunction_spanÚgeneration_spanÚget_current_spanÚget_current_traceÚguardrail_spanÚhandoff_spanÚmcp_tools_spanÚresponse_spanÚspeech_group_spanÚspeech_spanÚtraceÚtranscription_span)ÚTracingProcessor)Údefault_exporterÚdefault_processor)ÚDefaultTraceProviderÚTraceProvider)Úget_trace_providerÚset_trace_provider)ÚAgentSpanDataÚCustomSpanDataÚFunctionSpanDataÚGenerationSpanDataÚGuardrailSpanDataÚHandoffSpanDataÚMCPListToolsSpanDataÚResponseSpanDataÚSpanDataÚSpeechGroupSpanDataÚSpeechSpanDataÚTranscriptionSpanData)ÚSpanÚ	SpanError)ÚTrace)Úgen_span_idÚgen_trace_id)&Úadd_trace_processorr   r   r   r   r   r   r   r	   r
   r   Úset_trace_processorsr   Úset_tracing_disabledr   r&   r%   r$   r    r   r   r   r   r   r   r   r   r!   r"   r#   r   r   r(   r'   r   r   r   r   Úspan_processorÚreturnc                 C   ó   t ƒ  | ¡ dS )zS
    Adds a new trace processor. This processor will receive all traces/spans.
    N)r   Úregister_processor)r,   © r0   úX/var/www/html/openai_agents/venv/lib/python3.10/site-packages/agents/tracing/__init__.pyr)   S   ó   r)   Ú
processorsc                 C   r.   )z]
    Set the list of trace processors. This will replace the current list of processors.
    N)r   Úset_processors)r3   r0   r0   r1   r*   Z   r2   r*   Údisabledc                 C   r.   )z3
    Set whether tracing is globally disabled.
    N)r   Úset_disabled)r5   r0   r0   r1   r+   a   r2   r+   Úapi_keyc                 C   r.   )z:
    Set the OpenAI API key for the backend exporter.
    N)r   Úset_api_key)r7   r0   r0   r1   Úset_tracing_export_api_keyh   r2   r9   ):ÚatexitÚcreater   r   r   r   r   r   r	   r
   r   r   r   r   r   r   Úprocessor_interfacer   r3   r   r   Úproviderr   r   Úsetupr   r   Ú	span_datar   r   r   r   r   r   r   r   r    r!   r"   r#   Úspansr$   r%   Útracesr&   Úutilr'   r(   Ú__all__r)   Úlistr*   Úboolr+   Ústrr9   ÚregisterÚshutdownr0   r0   r0   r1   Ú<module>   s$    @8*

