Class: Brute::ToolCall

Inherits:
Data
  • Object
show all
Defined in:
lib/brute/messages.rb

Overview

One tool invocation requested by the model. Arguments are always a Hash.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(id:, name:, arguments: {}) ⇒ ToolCall

Returns a new instance of ToolCall.



9
10
11
# File 'lib/brute/messages.rb', line 9

def initialize(id:, name:, arguments: {})
  super(id: id, name: name.to_s, arguments: arguments.to_h)
end

Instance Attribute Details

#argumentsObject (readonly)

Returns the value of attribute arguments

Returns:

  • (Object)

    the current value of arguments



8
9
10
# File 'lib/brute/messages.rb', line 8

def arguments
  @arguments
end

#idObject (readonly)

Returns the value of attribute id

Returns:

  • (Object)

    the current value of id



8
9
10
# File 'lib/brute/messages.rb', line 8

def id
  @id
end

#nameObject (readonly)

Returns the value of attribute name

Returns:

  • (Object)

    the current value of name



8
9
10
# File 'lib/brute/messages.rb', line 8

def name
  @name
end