Class: Intelligence::MessageContent::ToolCall

Inherits:
Base
  • Object
show all
Defined in:
lib/intelligence/message_content/tool_call.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from Base

build, build!, #initialize, #valid?

Constructor Details

This class inherits a constructor from Intelligence::MessageContent::Base

Instance Attribute Details

#tool_call_idObject (readonly)

Returns the value of attribute tool_call_id.



12
13
14
# File 'lib/intelligence/message_content/tool_call.rb', line 12

def tool_call_id
  @tool_call_id
end

#tool_nameObject (readonly)

Returns the value of attribute tool_name.



13
14
15
# File 'lib/intelligence/message_content/tool_call.rb', line 13

def tool_name
  @tool_name
end

#tool_parametersObject (readonly)

Returns the value of attribute tool_parameters.



14
15
16
# File 'lib/intelligence/message_content/tool_call.rb', line 14

def tool_parameters
  @tool_parameters
end

Instance Method Details

#to_hObject



16
17
18
19
20
21
22
23
# File 'lib/intelligence/message_content/tool_call.rb', line 16

def to_h
  { 
    type:             :tool_call, 
    tool_call_id:     tool_call_id, 
    tool_name:        tool_name, 
    tool_parameters:  tool_parameters 
  }.compact
end