OpenAIRealtimeClient
autogen.agentchat.realtime.experimental.clients.OpenAIRealtimeClient #
Bases: RealtimeClientBase
(Experimental) Client for OpenAI Realtime API.
(Experimental) Client for OpenAI Realtime API.
PARAMETER | DESCRIPTION |
---|---|
llm_config | The config for the client. |
Source code in autogen/agentchat/realtime/experimental/clients/oai/base_client.py
add_event async
#
get_event async
#
queue_input_audio_buffer_delta async
#
queue InputAudioBufferDelta.
PARAMETER | DESCRIPTION |
---|---|
audio | The audio. TYPE: |
Source code in autogen/agentchat/realtime/experimental/clients/realtime_client.py
send_function_result async
#
Send the result of a function call to the OpenAI Realtime API.
PARAMETER | DESCRIPTION |
---|---|
call_id | The ID of the function call. TYPE: |
result | The result of the function call. TYPE: |
Source code in autogen/agentchat/realtime/experimental/clients/oai/base_client.py
send_text async
#
Send a text message to the OpenAI Realtime API.
PARAMETER | DESCRIPTION |
---|---|
role | The role of the message. TYPE: |
text | The text of the message. TYPE: |
Source code in autogen/agentchat/realtime/experimental/clients/oai/base_client.py
send_audio async
#
Send audio to the OpenAI Realtime API.
PARAMETER | DESCRIPTION |
---|---|
audio | The audio to send. TYPE: |
Source code in autogen/agentchat/realtime/experimental/clients/oai/base_client.py
truncate_audio async
#
Truncate audio in the OpenAI Realtime API.
PARAMETER | DESCRIPTION |
---|---|
audio_end_ms | The end of the audio to truncate. TYPE: |
content_index | The index of the content to truncate. TYPE: |
item_id | The ID of the item to truncate. TYPE: |
Source code in autogen/agentchat/realtime/experimental/clients/oai/base_client.py
session_update async
#
Send a session update to the OpenAI Realtime API.
PARAMETER | DESCRIPTION |
---|---|
session_options | The session options to update. |
Source code in autogen/agentchat/realtime/experimental/clients/oai/base_client.py
connect async
#
Connect to the OpenAI Realtime API.
Source code in autogen/agentchat/realtime/experimental/clients/oai/base_client.py
read_events async
#
Read messages from the OpenAI Realtime API.
Source code in autogen/agentchat/realtime/experimental/clients/oai/base_client.py
get_factory classmethod
#
Create a Realtime API client.
PARAMETER | DESCRIPTION |
---|---|
model | The model to create the client for. TYPE: |
voice | The voice to use. TYPE: |
system_message | The system message to use. TYPE: |
kwargs | Additional arguments. TYPE: |
RETURNS | DESCRIPTION |
---|---|
RealtimeClientProtocol | The Realtime API client is returned if the model matches the pattern TYPE: |