-
Notifications
You must be signed in to change notification settings - Fork 5k
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
Teachability for any agent #1091
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Conflicts: # autogen/agentchat/conversable_agent.py
rickyloynd-microsoft
had a problem deploying
to
openai1
December 28, 2023 19:45
— with
GitHub Actions
Failure
rickyloynd-microsoft
temporarily deployed
to
openai1
January 6, 2024 23:26
— with
GitHub Actions
Inactive
rickyloynd-microsoft
had a problem deploying
to
openai1
January 6, 2024 23:26
— with
GitHub Actions
Failure
rickyloynd-microsoft
temporarily deployed
to
openai1
January 6, 2024 23:26
— with
GitHub Actions
Inactive
rickyloynd-microsoft
temporarily deployed
to
openai1
January 6, 2024 23:26
— with
GitHub Actions
Inactive
rickyloynd-microsoft
had a problem deploying
to
openai1
January 6, 2024 23:26
— with
GitHub Actions
Failure
Now added! |
@sonichi Is this test currently expected to fail? OpenAI4ContribTests / CompressionTest (ubuntu-latest, 3.9) (pull_request_target) |
This was referenced Jan 7, 2024
Closed
3 tasks
whiskyboy
pushed a commit
to whiskyboy/autogen
that referenced
this pull request
Apr 17, 2024
* update funccall * code format * update to comments * update notebook * remove test for py3.7 * allow funccall to class functions * add test and clean up notebook * revise notebook and test * update * update mathagent * Update flaml/autogen/agent/agent.py Co-authored-by: Chi Wang <[email protected]> * Update flaml/autogen/agent/user_proxy_agent.py Co-authored-by: Chi Wang <[email protected]> * revise to comments * revise function call design, notebook and test. add doc * code format * ad message_to_dict function * update mathproxyagent * revise docstr * update * Update flaml/autogen/agent/math_user_proxy_agent.py Co-authored-by: Chi Wang <[email protected]> * Update flaml/autogen/agent/math_user_proxy_agent.py Co-authored-by: Qingyun Wu <[email protected]> * Update flaml/autogen/agent/user_proxy_agent.py Co-authored-by: Qingyun Wu <[email protected]> * simply funccall in userproxyagent, rewind auto-gen.md, revise to comments * code format * update * remove notebook for another pr * revise oai_conversation part in agent, revise function exec in user_proxy_agent * update test_funccall * update * update * fix pydantic version * Update test/autogen/test_agent.py Co-authored-by: Chi Wang <[email protected]> * fix bug * fix bug * update * update is_termination_msg to accept dict --------- Co-authored-by: Chi Wang <[email protected]> Co-authored-by: Qingyun Wu <[email protected]> Co-authored-by: Li Jiang <[email protected]>
whiskyboy
pushed a commit
to whiskyboy/autogen
that referenced
this pull request
Apr 17, 2024
* Partial implementation * Partial implementation * Fixes * update tests * cleanup * update tests * comments * logging * wording * underscore * Extend notebook for teachable GPTAssistantAgent * Notebook for teachable GPTAssistantAgents * Update notebook * Update notebook * Update notebook * Update notebook * revert file * Update blog post and other documentation. * pre-commit * Address reviewer feedback. * Add new nb link to examples page. --------- Co-authored-by: Chi Wang <[email protected]>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Why are these changes needed?
It’s often useful to combine multiple advanced capabilities into a single agent, as OpenAI has done with their recently released GPTs and Assistants, for which function calling, code interpreter, and RAG capabilities can work together in a composable and chainable way. But AutoGen makes it hard to chain advanced capabilities because
ConversableAgent
obtains each agent reply from just one registered reply function. Given the mutual exclusivity among registered reply functions, the capabilities of (for example)RetrieveAssistantAgent
andTeachableAgent
cannot be easily chained (combined in producing a single response) today; any given reply can leverage one or the other but not both.This PR enhances
ConversableAgent
to support chainable capabilities by means of a lightweight hook-registration mechanism allowing multiple capabilities to contribute to each agent reply. Leveraging this new mechanism, teachability can now be added to any agent that inherits fromConversableAgent
by instantiating aTeachability
object (which replaces the originalTeachableAgent
class) and calling itsadd_to_agent(agent)
method. For illustration, teachability can now be added to OpenAI Assistants throughGPTAssistantAgent
(unmodified by this PR), successfully combining teachability in a chain with whatever capabilities the particular OpenAI Assistants have (tools including functions, code interpreter, and retrieval). Teachable OpenAI Assistants are demonstrated in a new notebook.The original teachability tests, notebook, documentation, and blog post are all updated.
Related issue number
Closes #534, #535, #782
Checks