Exception: RubyLLM::Agents::SpeechApiError

Inherits:
Error
  • Object
show all
Defined in:
lib/ruby_llm/agents/core/errors.rb

Overview

Raised when the TTS API returns an error response

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(message = nil, status: nil, response_body: nil) ⇒ SpeechApiError

Returns a new instance of SpeechApiError.



39
40
41
42
43
# File 'lib/ruby_llm/agents/core/errors.rb', line 39

def initialize(message = nil, status: nil, response_body: nil)
  @status = status
  @response_body = response_body
  super(message || "Speech API error (status: #{status})")
end

Instance Attribute Details

#response_bodyObject (readonly)

Returns the value of attribute response_body.



37
38
39
# File 'lib/ruby_llm/agents/core/errors.rb', line 37

def response_body
  @response_body
end

#statusObject (readonly)

Returns the value of attribute status.



37
38
39
# File 'lib/ruby_llm/agents/core/errors.rb', line 37

def status
  @status
end