Module: RubyLLM::Sequel::ToolCallMethods

Defined in:
lib/ruby_llm/sequel/tool_call_methods.rb

Instance Method Summary collapse

Instance Method Details

#result_messageObject



17
18
19
# File 'lib/ruby_llm/sequel/tool_call_methods.rb', line 17

def result_message
  message_association.chat_association.messages_association_dataset.where(tool_call_id: id).first
end

#to_llmObject



6
7
8
9
10
11
12
13
14
15
# File 'lib/ruby_llm/sequel/tool_call_methods.rb', line 6

def to_llm
  attrs = {
    id: tool_call_id,
    name: name,
    arguments: parse_arguments
  }
  attrs[:thought_signature] = self[:thought_signature] if columns.include?(:thought_signature)

  ::RubyLLM::ToolCall.new(**attrs)
end