diff --git a/swarms/swarms/dialogue_simulator.py b/swarms/swarms/dialogue_simulator.py index 18cc989d..8943b9f3 100644 --- a/swarms/swarms/dialogue_simulator.py +++ b/swarms/swarms/dialogue_simulator.py @@ -1,5 +1,3 @@ -from typing import List, Callable - class DialogueSimulator: def __init__( @@ -17,8 +15,10 @@ class DialogueSimulator: def start(self, name: str, message: str): #init conv with a message from name + prompt = f"Name {name} and message: {message}" + for agent in self.agents: - agent.receive(name, message) + agent.run(prompt) #increment time self._step += 1 diff --git a/swarms/workers/worker.py b/swarms/workers/worker.py index 77c2a472..fcd58e08 100644 --- a/swarms/workers/worker.py +++ b/swarms/workers/worker.py @@ -39,7 +39,7 @@ class Worker: llm=None, openai: bool = True, ): - self.openai_api_key = openai_api_key + self.openai_api_key = openai_api_keyd self.temperature = temperature self.human_in_the_loop = human_in_the_loop @@ -104,7 +104,7 @@ class Worker: embeddings_model = OpenAIEmbeddings(openai_api_key=self.openai_api_key) embedding_size = 4096 index = faiss.IndexFlatL2(embedding_size) - + self.vectorstore = FAISS(embeddings_model.embed_query, index, InMemoryDocstore({}), {}) except Exception as error: raise RuntimeError(f"Error setting up memory perhaps try try tuning the embedding size: {error}")