-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: Info channel #562
base: master
Are you sure you want to change the base?
feat: Info channel #562
Conversation
Important Review skippedAuto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the You can disable this status message by setting the Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (invoked as PR comments)
Additionally, you can add CodeRabbit Configration File (
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the contribution, left some comment. For this PR I think we need more systematic and integrated design to support our BaseMessage
exchange
self.input_queues[channel.name] = asyncio.Queue() | ||
channel.input_queues[self.name] = asyncio.Queue() | ||
self.output_queues[channel.name] = channel.input_queues[self.name] | ||
channel.output_queues[self.name] = self.input_queues[channel.name] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- ensure channels are not connected multiple times?
- whether initialize a queue for both input and output will lead to inconsistencie?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's handled in ChannelManagement.register_channel, each channel will be registered only one time.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @zhiyu-01! Leave some commets.
And for example part, I am considering that if the communication among a_channel
, b_channel
and c_channel
and the task of saying hello are too general and abstract as example.
Can you show some examples of multi agents communicate with each other asynchronously by their own channel, or they communicate with a server, such as mini twitter?
Or maybe we should put in some examples of different ways channels can be organized, such as group chats or simultaneous communication with the server, in utils
. And maybe the current generic channel is too abstract?
r"""Connect to another channel. | ||
|
||
Args: | ||
channel(Channel): another channel to connect | ||
""" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add more explaination to explain the meaning of connect is 'Connect the output queue of another channel to the input queue of the current cahnnel, and the input queue of another channel to the output queue of the current cahnnel' ?
|
||
Args: | ||
name (str): name of the channel to receive from | ||
""" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add explnation for return? Such as return the message received from another channel.
assert manager.channels["A"] == channel_a | ||
assert manager.channels["B"] == channel_b | ||
assert check | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also assert the message received from another channel for this part?
Description
Creat a info channel class for communication between different tasks and agents.
Motivation and Context
Types of changes
What types of changes does your code introduce? Put an
x
in all the boxes that apply:Implemented Tasks
Checklist
Go over all the following points, and put an
x
in all the boxes that apply.If you are unsure about any of these, don't hesitate to ask. We are here to help!