-
Notifications
You must be signed in to change notification settings - Fork 192
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
Merge SwarmAgent into ConversableAgent #316
base: main
Are you sure you want to change the base?
Conversation
…sociated functions Signed-off-by: Mark Sze <[email protected]>
Signed-off-by: Mark Sze <[email protected]>
Signed-off-by: Mark Sze <[email protected]>
Signed-off-by: Mark Sze <[email protected]>
@sonichi, I've updated based on your feedback. I've marked them as resolved but please have a look over and let me know if you have any further thoughts on it. Otherwise, hopefully we can merge. |
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.
Is this file manually maintained or auto-generated? Why is the change?
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.
These notebooks won't work before the next release. So If we merge this PR now, we'd better make a release right after merging.
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.
Do you think we should also do some migration documentation for anyone who is currently using Swarm? Covering SwarmAgent > ConversableAgent + register_hand_off
self.register_hook(hookable_method="update_agent_state", hook=create_wrapper(func)) | ||
|
||
else: | ||
self.register_hook(hookable_method="update_agent_state", hook=func) |
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.
Do we have a list of hookable methods in the docstr of ConversableAgent somewhere? Every time we make a change to the list, we should modify that part.
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.
Good point, nothing at the moment, I'll add it in.
Co-authored-by: Chi Wang <[email protected]>
Co-authored-by: Chi Wang <[email protected]>
Co-authored-by: Chi Wang <[email protected]>
Why are these changes needed?
To expand the use of swarms to allow all ConversableAgent-based agents, this merges SwarmAgent into ConversableAgent.
Progress:
agent.register_hand_off
toregister_hand_off(agent
QUESTIONS/NOTES FOR REVIEWER:
my_agent = SwarmAgent(functions=[function_a, function_b])
). These functions were registered for LLM but not for execution (as a separate agent would execute). How should this work on ConversableAgent? Should it be the same or should there be a way to specify LLM and/or Execution for each function? I have left it as the same for now.__str__
on ConversableAgent and the associated internal function (_get_display_name()
) within it can be overwritten on a ConversableAgent instance, which I've done for any agents associated with a swarm. This means that if you do str(my_conversable_agent) you will get the name of the agent rather than the type as a string.MIGRATION INSTRUCTIONS:
Related issue number
#26
Checks