Class: Conductor::Workflow::Llm::ToolCall
- Inherits:
-
Object
- Object
- Conductor::Workflow::Llm::ToolCall
- Defined in:
- lib/conductor/workflow/llm/tool_call.rb
Overview
ToolCall represents a tool invocation in an LLM conversation
Instance Attribute Summary collapse
-
#input_parameters ⇒ Object
Returns the value of attribute input_parameters.
-
#integration_names ⇒ Object
Returns the value of attribute integration_names.
-
#name ⇒ Object
Returns the value of attribute name.
-
#output ⇒ Object
Returns the value of attribute output.
-
#task_reference_name ⇒ Object
Returns the value of attribute task_reference_name.
-
#type ⇒ Object
Returns the value of attribute type.
Instance Method Summary collapse
-
#initialize(name:, task_reference_name: nil, integration_names: nil, type: 'SIMPLE', input_parameters: nil, output: nil) ⇒ ToolCall
constructor
A new instance of ToolCall.
-
#to_h ⇒ Hash
Convert to hash for serialization.
Constructor Details
#initialize(name:, task_reference_name: nil, integration_names: nil, type: 'SIMPLE', input_parameters: nil, output: nil) ⇒ ToolCall
Returns a new instance of ToolCall.
17 18 19 20 21 22 23 24 25 |
# File 'lib/conductor/workflow/llm/tool_call.rb', line 17 def initialize(name:, task_reference_name: nil, integration_names: nil, type: 'SIMPLE', input_parameters: nil, output: nil) @name = name @task_reference_name = task_reference_name @integration_names = integration_names @type = type @input_parameters = input_parameters @output = output end |
Instance Attribute Details
#input_parameters ⇒ Object
Returns the value of attribute input_parameters.
8 9 10 |
# File 'lib/conductor/workflow/llm/tool_call.rb', line 8 def input_parameters @input_parameters end |
#integration_names ⇒ Object
Returns the value of attribute integration_names.
8 9 10 |
# File 'lib/conductor/workflow/llm/tool_call.rb', line 8 def integration_names @integration_names end |
#name ⇒ Object
Returns the value of attribute name.
8 9 10 |
# File 'lib/conductor/workflow/llm/tool_call.rb', line 8 def name @name end |
#output ⇒ Object
Returns the value of attribute output.
8 9 10 |
# File 'lib/conductor/workflow/llm/tool_call.rb', line 8 def output @output end |
#task_reference_name ⇒ Object
Returns the value of attribute task_reference_name.
8 9 10 |
# File 'lib/conductor/workflow/llm/tool_call.rb', line 8 def task_reference_name @task_reference_name end |
#type ⇒ Object
Returns the value of attribute type.
8 9 10 |
# File 'lib/conductor/workflow/llm/tool_call.rb', line 8 def type @type end |
Instance Method Details
#to_h ⇒ Hash
Convert to hash for serialization
29 30 31 32 33 34 35 36 37 38 39 |
# File 'lib/conductor/workflow/llm/tool_call.rb', line 29 def to_h result = { 'name' => @name, 'type' => @type } result['taskReferenceName'] = @task_reference_name if @task_reference_name result['integrationNames'] = @integration_names if @integration_names result['inputParameters'] = @input_parameters if @input_parameters result['output'] = @output if @output result end |