Class: Conductor::Workflow::Llm::ToolSpec
- Inherits:
-
Object
- Object
- Conductor::Workflow::Llm::ToolSpec
- Defined in:
- lib/conductor/workflow/llm/tool_spec.rb
Overview
ToolSpec defines a tool specification for LLM function calling
Instance Attribute Summary collapse
-
#config_params ⇒ Object
Returns the value of attribute config_params.
-
#description ⇒ Object
Returns the value of attribute description.
-
#input_schema ⇒ Object
Returns the value of attribute input_schema.
-
#integration_names ⇒ Object
Returns the value of attribute integration_names.
-
#name ⇒ Object
Returns the value of attribute name.
-
#output_schema ⇒ Object
Returns the value of attribute output_schema.
-
#type ⇒ Object
Returns the value of attribute type.
Instance Method Summary collapse
-
#initialize(name:, type: 'SIMPLE', description: nil, config_params: nil, integration_names: nil, input_schema: nil, output_schema: nil) ⇒ ToolSpec
constructor
A new instance of ToolSpec.
-
#to_h ⇒ Hash
Convert to hash for serialization.
Constructor Details
#initialize(name:, type: 'SIMPLE', description: nil, config_params: nil, integration_names: nil, input_schema: nil, output_schema: nil) ⇒ ToolSpec
Returns a new instance of ToolSpec.
18 19 20 21 22 23 24 25 26 27 |
# File 'lib/conductor/workflow/llm/tool_spec.rb', line 18 def initialize(name:, type: 'SIMPLE', description: nil, config_params: nil, integration_names: nil, input_schema: nil, output_schema: nil) @name = name @type = type @description = description @config_params = config_params @integration_names = integration_names @input_schema = input_schema @output_schema = output_schema end |
Instance Attribute Details
#config_params ⇒ Object
Returns the value of attribute config_params.
8 9 10 |
# File 'lib/conductor/workflow/llm/tool_spec.rb', line 8 def config_params @config_params end |
#description ⇒ Object
Returns the value of attribute description.
8 9 10 |
# File 'lib/conductor/workflow/llm/tool_spec.rb', line 8 def description @description end |
#input_schema ⇒ Object
Returns the value of attribute input_schema.
8 9 10 |
# File 'lib/conductor/workflow/llm/tool_spec.rb', line 8 def input_schema @input_schema end |
#integration_names ⇒ Object
Returns the value of attribute integration_names.
8 9 10 |
# File 'lib/conductor/workflow/llm/tool_spec.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_spec.rb', line 8 def name @name end |
#output_schema ⇒ Object
Returns the value of attribute output_schema.
8 9 10 |
# File 'lib/conductor/workflow/llm/tool_spec.rb', line 8 def output_schema @output_schema end |
#type ⇒ Object
Returns the value of attribute type.
8 9 10 |
# File 'lib/conductor/workflow/llm/tool_spec.rb', line 8 def type @type end |
Instance Method Details
#to_h ⇒ Hash
Convert to hash for serialization
31 32 33 34 35 36 37 38 39 40 41 42 |
# File 'lib/conductor/workflow/llm/tool_spec.rb', line 31 def to_h result = { 'name' => @name, 'type' => @type } result['description'] = @description if @description result['configParams'] = @config_params if @config_params result['integrationNames'] = @integration_names if @integration_names result['inputSchema'] = @input_schema if @input_schema result['outputSchema'] = @output_schema if @output_schema result end |