Class: Swarm::Agent
- Inherits:
-
Object
- Object
- Swarm::Agent
- Defined in:
- lib/swarm/types.rb
Instance Attribute Summary collapse
-
#functions ⇒ Object
Returns the value of attribute functions.
-
#instructions ⇒ Object
Returns the value of attribute instructions.
-
#model ⇒ Object
Returns the value of attribute model.
-
#name ⇒ Object
Returns the value of attribute name.
-
#parallel_tool_calls ⇒ Object
Returns the value of attribute parallel_tool_calls.
-
#tool_choice ⇒ Object
Returns the value of attribute tool_choice.
Instance Method Summary collapse
-
#initialize(name: "Agent", model: "gpt-4", instructions: "You are a helpful agent.", functions: [], tool_choice: nil, parallel_tool_calls: true) ⇒ Agent
constructor
A new instance of Agent.
Constructor Details
#initialize(name: "Agent", model: "gpt-4", instructions: "You are a helpful agent.", functions: [], tool_choice: nil, parallel_tool_calls: true) ⇒ Agent
Returns a new instance of Agent.
5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 |
# File 'lib/swarm/types.rb', line 5 def initialize( name: "Agent", model: "gpt-4", instructions: "You are a helpful agent.", functions: [], tool_choice: nil, parallel_tool_calls: true ) @name = name @model = model @instructions = instructions @functions = functions @tool_choice = tool_choice @parallel_tool_calls = parallel_tool_calls end |
Instance Attribute Details
#functions ⇒ Object
Returns the value of attribute functions.
3 4 5 |
# File 'lib/swarm/types.rb', line 3 def functions @functions end |
#instructions ⇒ Object
Returns the value of attribute instructions.
3 4 5 |
# File 'lib/swarm/types.rb', line 3 def instructions @instructions end |
#model ⇒ Object
Returns the value of attribute model.
3 4 5 |
# File 'lib/swarm/types.rb', line 3 def model @model end |
#name ⇒ Object
Returns the value of attribute name.
3 4 5 |
# File 'lib/swarm/types.rb', line 3 def name @name end |
#parallel_tool_calls ⇒ Object
Returns the value of attribute parallel_tool_calls.
3 4 5 |
# File 'lib/swarm/types.rb', line 3 def parallel_tool_calls @parallel_tool_calls end |
#tool_choice ⇒ Object
Returns the value of attribute tool_choice.
3 4 5 |
# File 'lib/swarm/types.rb', line 3 def tool_choice @tool_choice end |