|
8 | 8 | from .agent import Agent, ToolsToFinalOutputFunction, ToolsToFinalOutputResult
|
9 | 9 | from .agent_output import AgentOutputSchema
|
10 | 10 | from .computer import AsyncComputer, Button, Computer, Environment
|
11 |
| -from .exceptions import ( |
12 |
| - AgentsException, |
13 |
| - InputGuardrailTripwireTriggered, |
14 |
| - MaxTurnsExceeded, |
15 |
| - ModelBehaviorError, |
16 |
| - OutputGuardrailTripwireTriggered, |
17 |
| - UserError, |
18 |
| -) |
19 |
| -from .guardrail import ( |
20 |
| - GuardrailFunctionOutput, |
21 |
| - InputGuardrail, |
22 |
| - InputGuardrailResult, |
23 |
| - OutputGuardrail, |
24 |
| - OutputGuardrailResult, |
25 |
| - input_guardrail, |
26 |
| - output_guardrail, |
27 |
| -) |
| 11 | +from .exceptions import (AgentsException, InputGuardrailTripwireTriggered, |
| 12 | + MaxTurnsExceeded, ModelBehaviorError, |
| 13 | + OutputGuardrailTripwireTriggered, UserError) |
| 14 | +from .guardrail import (GuardrailFunctionOutput, InputGuardrail, |
| 15 | + InputGuardrailResult, OutputGuardrail, |
| 16 | + OutputGuardrailResult, input_guardrail, |
| 17 | + output_guardrail) |
28 | 18 | from .handoffs import Handoff, HandoffInputData, HandoffInputFilter, handoff
|
29 |
| -from .items import ( |
30 |
| - HandoffCallItem, |
31 |
| - HandoffOutputItem, |
32 |
| - ItemHelpers, |
33 |
| - MessageOutputItem, |
34 |
| - ModelResponse, |
35 |
| - ReasoningItem, |
36 |
| - RunItem, |
37 |
| - ToolCallItem, |
38 |
| - ToolCallOutputItem, |
39 |
| - TResponseInputItem, |
40 |
| -) |
| 19 | +from .items import (HandoffCallItem, HandoffOutputItem, ItemHelpers, |
| 20 | + MessageOutputItem, ModelResponse, ReasoningItem, RunItem, |
| 21 | + ToolCallItem, ToolCallOutputItem, TResponseInputItem) |
41 | 22 | from .lifecycle import AgentHooks, RunHooks
|
42 | 23 | from .model_settings import ModelSettings
|
43 | 24 | from .models.interface import Model, ModelProvider, ModelTracing
|
|
47 | 28 | from .result import RunResult, RunResultStreaming
|
48 | 29 | from .run import RunConfig, Runner
|
49 | 30 | from .run_context import RunContextWrapper, TContext
|
50 |
| -from .stream_events import ( |
51 |
| - AgentUpdatedStreamEvent, |
52 |
| - RawResponsesStreamEvent, |
53 |
| - RunItemStreamEvent, |
54 |
| - StreamEvent, |
55 |
| -) |
56 |
| -from .tool import ( |
57 |
| - ComputerTool, |
58 |
| - FileSearchTool, |
59 |
| - FunctionTool, |
60 |
| - FunctionToolResult, |
61 |
| - Tool, |
62 |
| - WebSearchTool, |
63 |
| - default_tool_error_function, |
64 |
| - function_tool, |
65 |
| -) |
66 |
| -from .tracing import ( |
67 |
| - AgentSpanData, |
68 |
| - CustomSpanData, |
69 |
| - FunctionSpanData, |
70 |
| - GenerationSpanData, |
71 |
| - GuardrailSpanData, |
72 |
| - HandoffSpanData, |
73 |
| - Span, |
74 |
| - SpanData, |
75 |
| - SpanError, |
76 |
| - SpeechGroupSpanData, |
77 |
| - SpeechSpanData, |
78 |
| - Trace, |
79 |
| - TracingProcessor, |
80 |
| - TranscriptionSpanData, |
81 |
| - add_trace_processor, |
82 |
| - agent_span, |
83 |
| - custom_span, |
84 |
| - function_span, |
85 |
| - gen_span_id, |
86 |
| - gen_trace_id, |
87 |
| - generation_span, |
88 |
| - get_current_span, |
89 |
| - get_current_trace, |
90 |
| - guardrail_span, |
91 |
| - handoff_span, |
92 |
| - set_trace_processors, |
93 |
| - set_tracing_disabled, |
94 |
| - set_tracing_export_api_key, |
95 |
| - speech_group_span, |
96 |
| - speech_span, |
97 |
| - trace, |
98 |
| - transcription_span, |
99 |
| -) |
| 31 | +from .stream_events import (AgentUpdatedStreamEvent, RawResponsesStreamEvent, |
| 32 | + RunItemStreamEvent, StreamEvent) |
| 33 | +from .tool import (ComputerTool, FileSearchTool, FunctionTool, |
| 34 | + FunctionToolResult, Tool, WebSearchTool, |
| 35 | + default_tool_error_function, function_tool) |
| 36 | +from .tracing import (AgentSpanData, CustomSpanData, FunctionSpanData, |
| 37 | + GenerationSpanData, GuardrailSpanData, HandoffSpanData, |
| 38 | + Span, SpanData, SpanError, SpeechGroupSpanData, |
| 39 | + SpeechSpanData, Trace, TracingProcessor, |
| 40 | + TranscriptionSpanData, add_trace_processor, agent_span, |
| 41 | + custom_span, function_span, gen_span_id, gen_trace_id, |
| 42 | + generation_span, get_current_span, get_current_trace, |
| 43 | + guardrail_span, handoff_span, set_trace_processors, |
| 44 | + set_tracing_disabled, set_tracing_export_api_key, |
| 45 | + speech_group_span, speech_span, trace, |
| 46 | + transcription_span) |
100 | 47 | from .usage import Usage
|
101 |
| -from .voice import ( |
102 |
| - AudioInput, |
103 |
| - OpenAISTTModel, |
104 |
| - OpenAISTTTranscriptionSession, |
105 |
| - OpenAITTSModel, |
106 |
| - OpenAIVoiceModelProvider, |
107 |
| - SingleAgentVoiceWorkflow, |
108 |
| - SingleAgentWorkflowCallbacks, |
109 |
| - StreamedAudioInput, |
110 |
| - StreamedAudioResult, |
111 |
| - StreamedTranscriptionSession, |
112 |
| - STTModel, |
113 |
| - STTModelSettings, |
114 |
| - TTSModel, |
115 |
| - TTSModelSettings, |
116 |
| - VoiceModelProvider, |
117 |
| - VoicePipeline, |
118 |
| - VoicePipelineConfig, |
119 |
| - VoiceStreamEvent, |
120 |
| - VoiceStreamEventAudio, |
121 |
| - VoiceStreamEventLifecycle, |
122 |
| - VoiceWorkflowBase, |
123 |
| - VoiceWorkflowHelper, |
124 |
| - get_sentence_based_splitter, |
125 |
| -) |
126 | 48 |
|
127 | 49 |
|
128 | 50 | def set_default_openai_key(key: str, use_for_tracing: bool = True) -> None:
|
@@ -268,27 +190,4 @@ def enable_verbose_stdout_logging():
|
268 | 190 | "gen_trace_id",
|
269 | 191 | "gen_span_id",
|
270 | 192 | "default_tool_error_function",
|
271 |
| - "AudioInput", |
272 |
| - "StreamedAudioInput", |
273 |
| - "STTModel", |
274 |
| - "STTModelSettings", |
275 |
| - "TTSModel", |
276 |
| - "TTSModelSettings", |
277 |
| - "VoiceModelProvider", |
278 |
| - "StreamedAudioResult", |
279 |
| - "SingleAgentVoiceWorkflow", |
280 |
| - "OpenAIVoiceModelProvider", |
281 |
| - "OpenAISTTModel", |
282 |
| - "OpenAITTSModel", |
283 |
| - "VoiceStreamEventAudio", |
284 |
| - "VoiceStreamEventLifecycle", |
285 |
| - "VoiceStreamEvent", |
286 |
| - "VoicePipeline", |
287 |
| - "VoicePipelineConfig", |
288 |
| - "get_sentence_based_splitter", |
289 |
| - "VoiceWorkflowHelper", |
290 |
| - "VoiceWorkflowBase", |
291 |
| - "StreamedTranscriptionSession", |
292 |
| - "OpenAISTTTranscriptionSession", |
293 |
| - "SingleAgentWorkflowCallbacks", |
294 | 193 | ]
|
0 commit comments