Class: OpenAI::Models::Realtime::Connection
- Inherits:
-
Object
- Object
- OpenAI::Models::Realtime::Connection
- Includes:
- Enumerable[OpenAI::Models::Realtime::connection_server_event]
- Defined in:
- sig/openai/helpers/realtime/connection.rbs
Instance Attribute Summary collapse
-
#conversation ⇒ OpenAI::Realtime::ConnectionResources::Conversation
readonly
Returns the value of attribute conversation.
-
#input_audio_buffer ⇒ OpenAI::Realtime::ConnectionResources::InputAudioBuffer
readonly
Returns the value of attribute input_audio_buffer.
-
#response ⇒ OpenAI::Realtime::ConnectionResources::Response
readonly
Returns the value of attribute response.
-
#session ⇒ OpenAI::Realtime::ConnectionResources::Session
readonly
Returns the value of attribute session.
-
#url ⇒ URI::Generic
readonly
Returns the value of attribute url.
Instance Method Summary collapse
- #abort ⇒ nil private
- #close ⇒ nil
- #closed? ⇒ Boolean
- #each ⇒ void
-
#initialize ⇒ Connection
constructor
private
A new instance of Connection.
- #parse_event ⇒ Object
- #receive ⇒ OpenAI::Models::Realtime::connection_server_event?
- #receive_raw ⇒ String?
- #send_event ⇒ Object
- #send_raw ⇒ nil
Constructor Details
#initialize ⇒ Connection
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Returns a new instance of Connection.
22 |
# File 'sig/openai/helpers/realtime/connection.rbs', line 22
def initialize: (socket: untyped, url: URI::Generic) -> void
|
Instance Attribute Details
#conversation ⇒ OpenAI::Realtime::ConnectionResources::Conversation (readonly)
Returns the value of attribute conversation.
18 19 20 |
# File 'sig/openai/helpers/realtime/connection.rbs', line 18 def conversation @conversation end |
#input_audio_buffer ⇒ OpenAI::Realtime::ConnectionResources::InputAudioBuffer (readonly)
Returns the value of attribute input_audio_buffer.
19 20 21 |
# File 'sig/openai/helpers/realtime/connection.rbs', line 19 def input_audio_buffer @input_audio_buffer end |
#response ⇒ OpenAI::Realtime::ConnectionResources::Response (readonly)
Returns the value of attribute response.
17 18 19 |
# File 'sig/openai/helpers/realtime/connection.rbs', line 17 def response @response end |
#session ⇒ OpenAI::Realtime::ConnectionResources::Session (readonly)
Returns the value of attribute session.
16 17 18 |
# File 'sig/openai/helpers/realtime/connection.rbs', line 16 def session @session end |
#url ⇒ URI::Generic (readonly)
Returns the value of attribute url.
15 16 17 |
# File 'sig/openai/helpers/realtime/connection.rbs', line 15 def url @url end |
Instance Method Details
#abort ⇒ nil
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
40 |
# File 'sig/openai/helpers/realtime/connection.rbs', line 40
def abort: -> nil
|
#close ⇒ nil
37 |
# File 'sig/openai/helpers/realtime/connection.rbs', line 37
def close: (?code: Integer, ?reason: String) -> nil
|
#closed? ⇒ Boolean
41 |
# File 'sig/openai/helpers/realtime/connection.rbs', line 41
def closed?: -> bool
|
#each ⇒ void
This method returns an undefined value.
23 |
# File 'sig/openai/helpers/realtime/connection.rbs', line 23
def each:
|
#parse_event ⇒ Object
30 |
# File 'sig/openai/helpers/realtime/connection.rbs', line 30
def parse_event: (
|
#receive ⇒ OpenAI::Models::Realtime::connection_server_event?
28 |
# File 'sig/openai/helpers/realtime/connection.rbs', line 28
def receive: -> OpenAI::Models::Realtime::connection_server_event?
|
#receive_raw ⇒ String?
29 |
# File 'sig/openai/helpers/realtime/connection.rbs', line 29
def receive_raw: -> String?
|
#send_event ⇒ Object
33 |
# File 'sig/openai/helpers/realtime/connection.rbs', line 33
def send_event: (
|
#send_raw ⇒ nil
36 |
# File 'sig/openai/helpers/realtime/connection.rbs', line 36
def send_raw: (String data) -> nil
|