
    Cj                       S SK Jr  S SKrS SKrS SKJrJr  S SKJrJr  S SK	J
r
JrJr  S SKJr  SSKJr  SS	KJr  SS
KJr  SSKJrJr  SSKJr  SSKJrJr  SSKJr  \\S4   r \\S4   r \ " S S\\\   5      5       r g)    )annotationsN)	AwaitableCallable)	dataclassfield)AnyGenericcast)Prompt   )	AgentBase)OutputGuardrail)Handoff)AgentHooksBaseRunHooksBase)logger)RunContextWrapperTContext)MaybeAwaitableRealtimeAgent[TContext]c                      \ rS rSr% SrSrS\S'    SrS\S'    \" \	S9r
S	\S
'    \" \	S9rS\S'    SrS\S'    SS jrSS jrSrg)RealtimeAgent   a  A specialized agent instance that is meant to be used within a `RealtimeSession` to build
voice agents. Due to the nature of this agent, some configuration options are not supported
that are supported by regular `Agent` instances. For example:
- `model` choice is not supported, as all RealtimeAgents will be handled by the same model
  within a `RealtimeSession`.
- `modelSettings` is not supported, as all RealtimeAgents will be handled by the same model
  within a `RealtimeSession`.
- `outputType` is not supported, as RealtimeAgents do not support structured outputs.
- `toolUseBehavior` is not supported, as all RealtimeAgents will be handled by the same model
  within a `RealtimeSession`.
- `voice` can be configured on an `Agent` level; however, it cannot be changed after the first
  agent within a `RealtimeSession` has spoken.

See `AgentBase` for base parameters that are shared with `Agent`s.
Nzbstr | Callable[[RunContextWrapper[TContext], RealtimeAgent[TContext]], MaybeAwaitable[str]] | NoneinstructionszPrompt | Noneprompt)default_factoryz@list[RealtimeAgent[Any] | Handoff[TContext, RealtimeAgent[Any]]]handoffszlist[OutputGuardrail[TContext]]output_guardrailszRealtimeAgentHooks | Nonehooksc                0    [         R                  " U 40 UD6$ )zMake a copy of the agent, with the given arguments changed. For example, you could do:
```
new_agent = agent.clone(instructions="New instructions")
```
)dataclassesreplace)selfkwargss     g/home/rurouni/.local/share/pipx/venvs/strix-agent/lib/python3.13/site-packages/agents/realtime/agent.pycloneRealtimeAgent.cloneR   s     ""42622    c                  #    [        U R                  [        5      (       a  U R                  $ [        U R                  5      (       ar  [        R
                  " U R                  5      (       a.  [        [        [           U R                  X5      5      I Sh  vN $ [        [        U R                  X5      5      $ U R                  b#  [        R                  " SU R                   35        g NT7f)z$Get the system prompt for the agent.Nz1Instructions must be a string or a function, got )

isinstancer   strcallableinspectiscoroutinefunctionr
   r   r   error)r#   run_contexts     r%   get_system_promptRealtimeAgent.get_system_promptZ   s     d''--$$$d''((**4+<+<==!)C.$2C2CK2VWWWC!2!2;!EFF*LLLTM^M^L_`a Xs   BC-C+AC- )r$   r   returnr   )r0   zRunContextWrapper[TContext]r4   z
str | None)__name__
__module____qualname____firstlineno____doc__r   __annotations__r   r   listr   r   r   r&   r1   __static_attributes__r3   r(   r%   r   r      s    . 	 	 !FM  RWRHN 
 :?t9T6T (,E$+3r(   r   )!
__future__r   r!   r-   collections.abcr   r   r   r   typingr   r	   r
   agents.promptsr   agentr   	guardrailr   r   r   	lifecycler   r   r   r0   r   r   util._typesr   RealtimeAgentHooksRealtimeRunHooksr   r3   r(   r%   <module>rG      s    "   / ( % % !  '  4  5 (#H.G$GH  '*C CD  % KIwx0 K Kr(   