Spaces:
Sleeping
Sleeping
Download communication/message_bus.py from umar-30/Multi-agent-system: direct link, hf CLI and curl.
- Browser
- Download file 323 Bytes
-
https://huggingface.co/spaces/umar-30/Multi-agent-system/resolve/main/communication/message_bus.py
- Command line
-
hf download hf://spaces/umar-30/Multi-agent-system/communication/message_bus.py
-
curl -L -o message_bus.py https://huggingface.co/spaces/umar-30/Multi-agent-system/resolve/main/communication/message_bus.py
323 Bytes
| class MessageBus: | |
| def __init__(self): | |
| self.messages = [] | |
| def send(self, sender, receiver, content): | |
| self.messages.append({ | |
| "sender": sender, | |
| "receiver": receiver, | |
| "content": content | |
| }) | |
| def get_messages(self): | |
| return self.messages |