Class: OpenAISwarm::FunctionDescriptor
- Inherits:
-
Object
- Object
- OpenAISwarm::FunctionDescriptor
- Defined in:
- lib/ruby-openai-swarm/function_descriptor.rb
Instance Attribute Summary collapse
-
#description ⇒ Object
readonly
Returns the value of attribute description.
-
#parameters ⇒ Object
readonly
Returns the value of attribute parameters.
-
#target_method ⇒ Object
readonly
Returns the value of attribute target_method.
Instance Method Summary collapse
-
#initialize(target_method:, description: '', parameters: nil) ⇒ FunctionDescriptor
constructor
A new instance of FunctionDescriptor.
Constructor Details
#initialize(target_method:, description: '', parameters: nil) ⇒ FunctionDescriptor
7 8 9 10 11 |
# File 'lib/ruby-openai-swarm/function_descriptor.rb', line 7 def initialize(target_method:, description: '', parameters: nil) @target_method = target_method.is_a?(Method) ? target_method : method(target_method) @description = description @parameters = parameters end |
Instance Attribute Details
#description ⇒ Object (readonly)
Returns the value of attribute description.
3 4 5 |
# File 'lib/ruby-openai-swarm/function_descriptor.rb', line 3 def description @description end |
#parameters ⇒ Object (readonly)
Returns the value of attribute parameters.
3 4 5 |
# File 'lib/ruby-openai-swarm/function_descriptor.rb', line 3 def parameters @parameters end |
#target_method ⇒ Object (readonly)
Returns the value of attribute target_method.
3 4 5 |
# File 'lib/ruby-openai-swarm/function_descriptor.rb', line 3 def target_method @target_method end |