Exception: RubyLLM::Test::Errors::NoResponseProvidedError

Inherits:
StandardError
  • Object
show all
Defined in:
lib/ruby_llm/test/errors/no_response_provided_error.rb

Overview

No Response Provided Error

If the test setup does not provide a response for a test chat completion, this error is raised to indicate that the test is incomplete. The final chat message, generated by the ask method, is included in the error message for context.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(messages) ⇒ NoResponseProvidedError

Returns a new instance of NoResponseProvidedError.



14
15
16
17
# File 'lib/ruby_llm/test/errors/no_response_provided_error.rb', line 14

def initialize(messages)
  @messages = messages
  super("No test response provided for the following request:\n#{messages.last&.content}")
end

Instance Attribute Details

#messages ⇒ Object (readonly)

Returns the value of attribute messages.



12
13
14
# File 'lib/ruby_llm/test/errors/no_response_provided_error.rb', line 12

def messages
  @messages
end