clients
autogen.agentchat.realtime.experimental.clients.GeminiRealtimeClient
GeminiRealtimeClient
(Experimental) Client for Gemini Realtime API.
(Experimental) Client for Gemini Realtime API.
Parameters:Name | Description |
---|---|
llm_config | The config for the client. Type: dict[str, typing.Any] |
logger | Type: logging.Logger | None Default: None |
Static Methods
get_factory
Create a Realtime API client.
Parameters:Name | Description |
---|---|
llm_config | Type: dict[str, typing.Any] |
logger | The logger for the client. Type: logging.Logger |
**kwargs | Type: Any |
Instance Attributes
connection
Get the Gemini WebSocket connection.
logger
Get the logger for the Gemini Realtime API.
Instance Methods
connect
Connect to the Gemini Realtime API.
read_events
Read Events from the Gemini Realtime API.
send_audio
Send audio to the Gemini Realtime API.
Parameters:Name | Description |
---|---|
audio | The audio to send. Type: str |
send_function_result
Send the result of a function call to the Gemini Realtime API.
Parameters:Name | Description |
---|---|
call_id | The ID of the function call. Type: str |
result | The result of the function call. Type: str |
send_text
Send a text message to the Gemini Realtime API.
Parameters:Name | Description |
---|---|
role | The role of the message. Type: Literal['user', 'assistant', 'system'] |
text | The text of the message. Type: str |
turn_complete | Type: bool Default: True |
session_update
Record session updates to be applied when the connection is established.
Parameters:Name | Description |
---|---|
session_options | The session options to update. Type: dict[str, typing.Any] |
truncate_audio
Name | Description |
---|---|
audio_end_ms | Type: int |
content_index | Type: int |
item_id | Type: str |