Exception: RubyConversations::ToolCallValidationError

Inherits:
Error
  • Object
show all
Defined in:
lib/ruby_conversations/errors.rb

Overview

Error raised when tool calls are expected but not found in LLM response

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(message, last_message: nil, tool_names: nil) ⇒ ToolCallValidationError

Returns a new instance of ToolCallValidationError.



27
28
29
30
31
# File 'lib/ruby_conversations/errors.rb', line 27

def initialize(message, last_message: nil, tool_names: nil)
  super(message)
  @last_message = last_message
  @tool_names = tool_names
end

Instance Attribute Details

#last_messageObject (readonly)

Returns the value of attribute last_message.



25
26
27
# File 'lib/ruby_conversations/errors.rb', line 25

def last_message
  @last_message
end

#tool_namesObject (readonly)

Returns the value of attribute tool_names.



25
26
27
# File 'lib/ruby_conversations/errors.rb', line 25

def tool_names
  @tool_names
end