Class: Bristow::Agents::Supervisor
- Inherits:
-
Bristow::Agent
- Object
- Bristow::Agent
- Bristow::Agents::Supervisor
- Defined in:
- lib/bristow/agents/supervisor.rb
Instance Attribute Summary collapse
-
#agency ⇒ Object
readonly
Returns the value of attribute agency.
Attributes inherited from Bristow::Agent
Instance Method Summary collapse
-
#initialize(child_agents:, agency:, custom_instructions: nil, termination: self.class.termination) ⇒ Supervisor
constructor
A new instance of Supervisor.
Methods inherited from Bristow::Agent
chat, #chat, #formatted_functions, #handle_function_call
Methods included from Sgetter
Constructor Details
#initialize(child_agents:, agency:, custom_instructions: nil, termination: self.class.termination) ⇒ Supervisor
Returns a new instance of Supervisor.
27 28 29 30 31 32 33 34 35 36 37 |
# File 'lib/bristow/agents/supervisor.rb', line 27 def initialize(child_agents:, agency:, custom_instructions: nil, termination: self.class.termination) super() @custom_instructions = custom_instructions || self.class.custom_instructions = (child_agents) @agency = agency @custom_instructions = custom_instructions || self.class.custom_instructions @termination = termination agency.agents << self @functions ||= [] @functions << Functions::Delegate.new(self, agency) end |
Instance Attribute Details
#agency ⇒ Object (readonly)
Returns the value of attribute agency.
6 7 8 |
# File 'lib/bristow/agents/supervisor.rb', line 6 def agency @agency end |