Class: OpenAI::Live::ForkConnection

Inherits:
Connection show all
Defined in:
lib/openai/helpers/live/websocket.rb

Overview

Caller-driven startup using overrides for an eligible stored session.

Instance Attribute Summary

Attributes inherited from WebSocket::TypedConnection

#url

Attributes inherited from WebSocket::Connection

#url

Instance Method Summary collapse

Methods inherited from Connection

#initialize, #receive, #receive_raw

Methods inherited from WebSocket::TypedConnection

#close, #closed?, #each, #initialize, #parse_event, #receive

Methods included from WebSocket::GuardedConnection

#abort, #close, #closed?

Methods inherited from WebSocket::Connection

#abort, #close, #closed?, #each, #initialize, #receive, #receive_raw, #send_raw

Constructor Details

This class inherits a constructor from OpenAI::Live::Connection

Instance Method Details

#send_event(event) ⇒ Object



119
120
121
122
123
124
125
# File 'lib/openai/helpers/live/websocket.rb', line 119

def send_event(event)
  if event.is_a?(OpenAI::Live::SessionStartEvent)
    raise ArgumentError, "Invalid Live client event."
  end

  super
end