pull/30/head
Kye 1 year ago
parent 8aeac1d0ee
commit 0469658b2c

@ -66,7 +66,7 @@ class HierarchicalSwarm:
self.logging_enabled = logging_enabled self.logging_enabled = logging_enabled
self.verbose = verbose self.verbose = verbose
self.logger = logging.getLogger() self.logger = logging.getLogger()
if not logging_enabled: if not logging_enabled:
@ -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)

Loading…
Cancel
Save