Class: Swarm::Agent

Inherits:
Object
  • Object
show all
Defined in:
lib/swarm/agent.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(name:, model:, instructions:, functions: [], tool_choice: 'auto') ⇒ Agent

Returns a new instance of Agent.



7
8
9
10
11
12
13
# File 'lib/swarm/agent.rb', line 7

def initialize(name:, model:, instructions:, functions: [], tool_choice: 'auto')
  @name = name
  @model = model
  @instructions = instructions
  @functions = functions
  @tool_choice = tool_choice
end

Instance Attribute Details

#functionsObject

Returns the value of attribute functions.



5
6
7
# File 'lib/swarm/agent.rb', line 5

def functions
  @functions
end

#instructionsObject

Returns the value of attribute instructions.



5
6
7
# File 'lib/swarm/agent.rb', line 5

def instructions
  @instructions
end

#modelObject

Returns the value of attribute model.



5
6
7
# File 'lib/swarm/agent.rb', line 5

def model
  @model
end

#nameObject

Returns the value of attribute name.



5
6
7
# File 'lib/swarm/agent.rb', line 5

def name
  @name
end

#tool_choiceObject

Returns the value of attribute tool_choice.



5
6
7
# File 'lib/swarm/agent.rb', line 5

def tool_choice
  @tool_choice
end