From 57cb4a9b0a38e190d3b536c3a8b9d393c3472f48 Mon Sep 17 00:00:00 2001 From: Kye Date: Mon, 25 Sep 2023 13:09:57 -0400 Subject: [PATCH] cleanup Former-commit-id: 82f2d0fee78e8dc7601bfd78f4d52f8b409d7b81 --- dialogue_simulator.py | 9 +++++++++ mmi.py | 7 ------- swarms/swarms/dialogue_simulator.py | 4 +++- 3 files changed, 12 insertions(+), 8 deletions(-) create mode 100644 dialogue_simulator.py delete mode 100644 mmi.py diff --git a/dialogue_simulator.py b/dialogue_simulator.py new file mode 100644 index 00000000..1ca76338 --- /dev/null +++ b/dialogue_simulator.py @@ -0,0 +1,9 @@ +from swarms import DialogueSimulator, Worker + +worker1 = Worker(ai_name="Optimus Prime", openai_api_key="") +worker2 = Worker(ai_name="Optimus Prime", openai_api_key="") + +collab = DialogueSimulator([worker1, worker2], DialogueSimulator.select_next_speaker) +collab.reset() + +collab.start("My name is Plinus and I am a worker", "How are you?") \ No newline at end of file diff --git a/mmi.py b/mmi.py deleted file mode 100644 index 794ec79f..00000000 --- a/mmi.py +++ /dev/null @@ -1,7 +0,0 @@ -from swarms import DialogueSimulator, Worker - -worker = Worker(ai_name="Optimus Prime", openai_api_key="") - -collab = DialogueSimulator(worker, DialogueSimulator.select_next_speaker) - -collab.start("My name is Plinus and I am a worker", "How are you?") \ No newline at end of file diff --git a/swarms/swarms/dialogue_simulator.py b/swarms/swarms/dialogue_simulator.py index 7925e35c..9fa6fce2 100644 --- a/swarms/swarms/dialogue_simulator.py +++ b/swarms/swarms/dialogue_simulator.py @@ -1,7 +1,9 @@ +from swarms.swarms.dialogue_simulator import Worker + class DialogueSimulator: def __init__( self, - agents, + agents[Worker], selection_func ): self.agents = agents