Class: RubyLLM::ActiveRecord::ToolCall

Inherits:
ActiveRecord::Base
  • Object
show all
Includes:
PayloadHelpers
Defined in:
lib/ruby_llm/active_record/tool_call.rb

Overview

RubyLLM's private persistence for provider tool calls.

Instance Method Summary collapse

Instance Method Details

#to_llmObject



18
19
20
21
22
23
24
25
26
# File 'lib/ruby_llm/active_record/tool_call.rb', line 18

def to_llm
  RubyLLM::ToolCall.new(
    id: tool_call_id,
    name: name,
    arguments: arguments || {},
    thought_signature: thought_signature,
    remote: self[:remote]
  )
end

#tool_error_messageObject



28
29
30
# File 'lib/ruby_llm/active_record/tool_call.rb', line 28

def tool_error_message
  payload_error_message(arguments)
end