experimental
autogen.agentchat.realtime.experimental.FunctionObserver
FunctionObserver
Observer for handling function calls from the OpenAI Realtime API.
Observer for handling function calls from the OpenAI Realtime API.
Parameters:Name | Description |
---|---|
logger | Type: ForwardRef('Logger') | None Default: None |
Instance Methods
call_function
Call a function registered with the agent.
Parameters:Name | Description |
---|---|
call_id | The ID of the function call. Type: str |
name | The name of the function to call. Type: str |
kwargs | The arguments to pass to the function. Type: dict[str, typing.Any] |
initialize_session
Add registered tools to OpenAI with a session update.
on_event
Handle function call events from the OpenAI Realtime API.
Parameters:Name | Description |
---|---|
event | The event from the OpenAI Realtime API. Type: autogen.agentchat.realtime.experimental.realtime_events.RealtimeEvent |
run_loop
Run the observer loop.