|
|
@ -135,6 +135,7 @@ class HierarchicalSwarm:
|
|
|
|
logging.error(f"Failed to initialize vector store: {e}")
|
|
|
|
logging.error(f"Failed to initialize vector store: {e}")
|
|
|
|
return None
|
|
|
|
return None
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
def initialize_worker_node(self, worker_tools, vectorstore, llm_class=ChatOpenAI):
|
|
|
|
def initialize_worker_node(self, worker_tools, vectorstore, llm_class=ChatOpenAI):
|
|
|
|
try:
|
|
|
|
try:
|
|
|
|
llm = self.initialize_llm(ChatOpenAI)
|
|
|
|
llm = self.initialize_llm(ChatOpenAI)
|
|
|
@ -203,6 +204,8 @@ class HierarchicalSwarm:
|
|
|
|
assert worker_tools is not None, "worker_tools is not initialized"
|
|
|
|
assert worker_tools is not None, "worker_tools is not initialized"
|
|
|
|
|
|
|
|
|
|
|
|
vectorstore = self.initialize_vectorstore() if self.use_vectorstore else None
|
|
|
|
vectorstore = self.initialize_vectorstore() if self.use_vectorstore else None
|
|
|
|
|
|
|
|
assert vectorstore is not None, "vectorstore is not initialized"
|
|
|
|
|
|
|
|
|
|
|
|
worker_node = self.initialize_worker_node(worker_tools, vectorstore)
|
|
|
|
worker_node = self.initialize_worker_node(worker_tools, vectorstore)
|
|
|
|
|
|
|
|
|
|
|
|
boss_node = self.initialize_boss_node(vectorstore, worker_node)
|
|
|
|
boss_node = self.initialize_boss_node(vectorstore, worker_node)
|
|
|
|