Skip to content

Commit 49c1081

Browse files
committed
Rename SetReplyAgent to SetReplyInfo
1 parent 8b23bc8 commit 49c1081

File tree

5 files changed

+11
-11
lines changed

5 files changed

+11
-11
lines changed

coagent/agents/parallel.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
NO_REPLY,
1010
RawMessage,
1111
Reply,
12-
SetReplyAgent,
12+
SetReplyInfo,
1313
)
1414

1515

@@ -95,7 +95,7 @@ async def started(self) -> None:
9595
addr = Address(name=agent_type, id=self.address.id)
9696
await self.channel.publish(
9797
addr,
98-
SetReplyAgent(reply_info=aggregator_reply).encode(),
98+
SetReplyInfo(reply_info=aggregator_reply).encode(),
9999
)
100100

101101
# Set the current agent to no-reply mode.

coagent/agents/sequential.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
GenericMessage,
66
NO_REPLY,
77
Reply,
8-
SetReplyAgent,
8+
SetReplyInfo,
99
handler,
1010
)
1111

@@ -25,7 +25,7 @@ async def started(self) -> None:
2525
reply = Reply(address=next_addr)
2626
await self.channel.publish(
2727
addr,
28-
SetReplyAgent(reply_info=reply).encode(),
28+
SetReplyInfo(reply_info=reply).encode(),
2929
)
3030

3131
# Set the current agent to no-reply mode.
@@ -42,7 +42,7 @@ async def handle(self, msg: GenericMessage, ctx: Context) -> None:
4242
last_addr = Address(name=self._agent_types[-1], id=self.address.id)
4343
await self.channel.publish(
4444
last_addr,
45-
SetReplyAgent(reply_info=reply).encode(),
45+
SetReplyInfo(reply_info=reply).encode(),
4646
)
4747

4848
# Send the message to the first agent in the list.

coagent/core/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
)
77
from .discovery import DiscoveryQuery, DiscoveryReply
88
from .logger import logger, set_stderr_logger
9-
from .messages import Message, GenericMessage, SetReplyAgent, StopIteration
9+
from .messages import Message, GenericMessage, SetReplyInfo, StopIteration
1010
from .runtime import BaseRuntime, BaseChannel, QueueSubscriptionIterator
1111
from .types import (
1212
Address,

coagent/core/agent.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
Message,
1616
Started,
1717
Stopped,
18-
SetReplyAgent,
18+
SetReplyInfo,
1919
StopIteration,
2020
)
2121
from .types import (
@@ -132,7 +132,7 @@ def __init__(self, timeout: float = 60):
132132
# this would result in a lot of messages.
133133
self._last_msg_received_at_lock: asyncio.Lock = asyncio.Lock()
134134

135-
# Normally `reply` is set by an orchestration agent by sending a `SetReplyAgent` message.
135+
# Normally `reply` is set by an orchestration agent by sending a `SetReplyInfo` message.
136136
self.reply: Reply | None = None
137137
self._reply_lock: asyncio.Lock = asyncio.Lock()
138138

@@ -144,7 +144,7 @@ def __init__(self, timeout: float = 60):
144144
"Cancel": Cancel,
145145
"Started": Started,
146146
"Stopped": Stopped,
147-
"SetReplyAgent": SetReplyAgent,
147+
"SetReplyInfo": SetReplyInfo,
148148
"ProbeAgent": ProbeAgent,
149149
"Empty": Empty,
150150
**message_types,
@@ -279,7 +279,7 @@ async def _handle_data(self) -> None:
279279
case Stopped():
280280
await self.stopped()
281281

282-
case SetReplyAgent():
282+
case SetReplyInfo():
283283
await self._set_reply_info(msg.reply_info)
284284

285285
case ProbeAgent() | Empty():

coagent/core/messages.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@ class ProbeAgent(Message):
122122
pass
123123

124124

125-
class SetReplyAgent(Message):
125+
class SetReplyInfo(Message):
126126
"""A message to set the reply information of an agent.
127127
128128
This is mainly useful when orchestrating multiple agents to work together.

0 commit comments

Comments
 (0)