parent
cf26ebdb2b
commit
0e7762a7a6
@ -0,0 +1,9 @@
|
|||||||
|
from swarms import DialogueSimulator, Worker
|
||||||
|
|
||||||
|
def select_next_speaker(step: int, agents) -> int:
|
||||||
|
idx = (step) % len(agents)
|
||||||
|
return idx
|
||||||
|
|
||||||
|
debate = DialogueSimulator(Worker, select_next_speaker)
|
||||||
|
|
||||||
|
debate.run()
|
@ -1,12 +0,0 @@
|
|||||||
def select_next_speaker(
|
|
||||||
step: int,
|
|
||||||
agents,
|
|
||||||
director
|
|
||||||
) -> int:
|
|
||||||
#if the step if even => director
|
|
||||||
#=> director selects next speaker
|
|
||||||
if step % 2 == 1:
|
|
||||||
idx = 0
|
|
||||||
else:
|
|
||||||
idx = director.select_next_speaker() + 1
|
|
||||||
return idx
|
|
@ -1,11 +0,0 @@
|
|||||||
|
|
||||||
from swarms import Workflow
|
|
||||||
from swarms.tools.autogpt import ChatOpenAI
|
|
||||||
|
|
||||||
workflow = Workflow(ChatOpenAI)
|
|
||||||
|
|
||||||
workflow.add("What's the weather in miami")
|
|
||||||
workflow.add("Provide details for {{ parent_output }}")
|
|
||||||
workflow.add("Summarize the above information: {{ parent_output}}")
|
|
||||||
|
|
||||||
workflow.run()
|
|
Loading…
Reference in new issue