mirror of
https://github.com/microsoft/autogen.git
synced 2025-10-01 11:06:58 +00:00

* Added Runtime Factory to support multiple implementations * Rename to ComponentEnsemble to ZMQRuntime * rename zmq_runtime * rename zmq_runtime * pre-commit fixes * pre-commit fix * pre-commit fixes and default runtime * pre-commit fixes * Rename constants * Rename Constants --------- Co-authored-by: Li Jiang <bnujli@gmail.com>
14 lines
409 B
Python
14 lines
409 B
Python
import zmq
|
|
|
|
from autogencap.Actor import Actor
|
|
from autogencap.constants import Termination_Topic
|
|
from autogencap.DebugLog import Debug
|
|
|
|
|
|
class AGActor(Actor):
|
|
def on_start(self, context: zmq.Context):
|
|
super().on_start(context)
|
|
str_topic = Termination_Topic
|
|
Debug(self.actor_name, f"subscribe to: {str_topic}")
|
|
self._socket.setsockopt_string(zmq.SUBSCRIBE, f"{str_topic}")
|