Skip to content
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

Enable defining new functions after agent creation #285

Merged
merged 15 commits into from
Dec 2, 2023

Conversation

elecnix
Copy link
Collaborator

@elecnix elecnix commented Oct 18, 2023

Why are these changes needed?

This PR enables autogen agents to update/remove new functions, through conversation.

The functions added to llm_config are passed to OpenAI, which may respond with a function call, or a message.

Checks

@elecnix
Copy link
Collaborator Author

elecnix commented Oct 18, 2023

@microsoft-github-policy-service agree

@codecov-commenter
Copy link

codecov-commenter commented Oct 19, 2023

Codecov Report

Merging #285 (65ba171) into main (c1d6a5e) will increase coverage by 8.33%.
The diff coverage is 16.66%.

@@            Coverage Diff             @@
##             main     #285      +/-   ##
==========================================
+ Coverage   28.72%   37.06%   +8.33%     
==========================================
  Files          27       27              
  Lines        3380     3386       +6     
  Branches      760      761       +1     
==========================================
+ Hits          971     1255     +284     
+ Misses       2338     2015     -323     
- Partials       71      116      +45     
Flag Coverage Δ
unittests 37.00% <16.66%> (+8.33%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files Coverage Δ
autogen/agentchat/conversable_agent.py 66.81% <16.66%> (+0.21%) ⬆️

... and 10 files with indirect coverage changes

Copy link
Collaborator

@thinkall thinkall left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you @elecnix, this is interesting!

notebook/agentchat_inception_function.ipynb Show resolved Hide resolved
@thinkall thinkall requested review from sonichi and yiranwu0 October 19, 2023 11:18
@sonichi sonichi requested a review from qingyun-wu October 21, 2023 01:40
@qingyun-wu qingyun-wu requested a review from skzhang1 October 21, 2023 23:08
@sonichi sonichi added the tool-usage suggestion and execution of function/tool call label Oct 22, 2023
@gagb gagb added the teach label Oct 24, 2023
@skzhang1 skzhang1 added this pull request to the merge queue Dec 1, 2023
@skzhang1 skzhang1 removed this pull request from the merge queue due to a manual request Dec 1, 2023
@skzhang1 skzhang1 requested a review from qingyun-wu December 1, 2023 22:18
website/docs/Examples.md Outdated Show resolved Hide resolved
@qingyun-wu qingyun-wu added this pull request to the merge queue Dec 2, 2023
Merged via the queue into microsoft:main with commit 17c51fd Dec 2, 2023
66 of 71 checks passed
@sonichi
Copy link
Contributor

sonichi commented Dec 2, 2023

Thanks @elecnix and @skzhang1 @qingyun-wu for merging this PR. It took a while, but the concept was very interesting.
@elecnix If you'd like to write a blogpost, please feel free to make a PR.

rlam3 pushed a commit to rlam3/autogen that referenced this pull request Dec 19, 2023
* Enable defining new functions after agent creation

* Add notebook for function inception example

* format

* 1. fix bug 2. support remove function

* 1. fix bug 2. support remove function

* 1. add example doc 2. change test file 3. change ipynb title

* Update website/docs/Examples.md

---------

Co-authored-by: Li Jiang <[email protected]>
Co-authored-by: “skzhang1” <“[email protected]”>
Co-authored-by: Shaokun Zhang <[email protected]>
Co-authored-by: Qingyun Wu <[email protected]>
whiskyboy pushed a commit to whiskyboy/autogen that referenced this pull request Apr 17, 2024
* Enable defining new functions after agent creation

* Add notebook for function inception example

* format

* 1. fix bug 2. support remove function

* 1. fix bug 2. support remove function

* 1. add example doc 2. change test file 3. change ipynb title

* Update website/docs/Examples.md

---------

Co-authored-by: Li Jiang <[email protected]>
Co-authored-by: “skzhang1” <“[email protected]”>
Co-authored-by: Shaokun Zhang <[email protected]>
Co-authored-by: Qingyun Wu <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
tool-usage suggestion and execution of function/tool call
Projects
None yet
Development

Successfully merging this pull request may close these issues.

9 participants