RealtimeObserver
autogen.agentchat.realtime.experimental.RealtimeObserver #
Bases: ABC
Observer for the OpenAI Realtime API.
Observer for the OpenAI Realtime API.
| PARAMETER | DESCRIPTION |
|---|---|
logger | The logger for the observer. TYPE: |
Source code in autogen/agentchat/realtime/experimental/realtime_observer.py
run async #
Run the observer with the agent.
When implementing, be sure to call self._ready_event.set() when the observer is ready to process events.
| PARAMETER | DESCRIPTION |
|---|---|
agent | The realtime agent attached to the observer. TYPE: |
Source code in autogen/agentchat/realtime/experimental/realtime_observer.py
run_loop abstractmethod async #
Run the loop if needed.
This method is called after the observer is ready to process events. Events will be processed by the on_event method, this is just a hook for additional processing. Use initialize_session to set up the session.
Source code in autogen/agentchat/realtime/experimental/realtime_observer.py
initialize_session abstractmethod async #
wait_for_ready async #
on_event abstractmethod async #
Handle an event from the OpenAI Realtime API.
| PARAMETER | DESCRIPTION |
|---|---|
event | The event from the OpenAI Realtime API. TYPE: |