Upload folder using huggingface_hub
Browse files- multiplayer_chat/run.py +3 -3
multiplayer_chat/run.py
CHANGED
|
@@ -7,8 +7,8 @@ async def run(inputs, worker_nodes = None, orchestrator_node = None, flow_run =
|
|
| 7 |
chat_initiator = AgentService(name="chat_initiator", fn="chat", worker_node=worker_nodes[0], orchestrator_node=orchestrator_node, flow_run=flow_run)
|
| 8 |
chat_receiver = AgentService(name="chat_receiver", fn="chat", worker_node=worker_nodes[1], orchestrator_node=orchestrator_node, flow_run=flow_run)
|
| 9 |
|
| 10 |
-
response = await chat_initiator(
|
| 11 |
for i in range(10):
|
| 12 |
-
response = await chat_receiver(
|
| 13 |
-
response = await chat_initiator(
|
| 14 |
return response
|
|
|
|
| 7 |
chat_initiator = AgentService(name="chat_initiator", fn="chat", worker_node=worker_nodes[0], orchestrator_node=orchestrator_node, flow_run=flow_run)
|
| 8 |
chat_receiver = AgentService(name="chat_receiver", fn="chat", worker_node=worker_nodes[1], orchestrator_node=orchestrator_node, flow_run=flow_run)
|
| 9 |
|
| 10 |
+
response = await chat_initiator(prompt=inputs.prompt)
|
| 11 |
for i in range(10):
|
| 12 |
+
response = await chat_receiver(prompt=response)
|
| 13 |
+
response = await chat_initiator(prompt=response)
|
| 14 |
return response
|