Hierarchical process (#206)

* Hierarchical process +  Docs
Co-authored-by: João Moura <joaomdmoura@gmail.com>
This commit is contained in:
Gui Vieira
2024-02-02 13:56:35 -03:00
committed by GitHub
parent 8fc0f33dd5
commit c78237cb86
12 changed files with 1358 additions and 74 deletions

View File

@@ -33,13 +33,13 @@ class AgentTools(BaseModel):
def delegate_work(self, command):
"""Useful to delegate a specific task to a coworker."""
return self.__execute(command)
return self._execute(command)
def ask_question(self, command):
"""Useful to ask a question, opinion or take from a coworker."""
return self.__execute(command)
return self._execute(command)
def __execute(self, command):
def _execute(self, command):
"""Execute the command."""
try:
agent, task, context = command.split("|")