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

[Add] Function calling support for Autobuild #2294

Closed
wants to merge 0 commits into from

Conversation

krishnashed
Copy link
Contributor

Why are these changes needed?

Introduction of Autobuild, didn't support function/tool calling. This PR is solution to add this feature/

Related issue number

Closes #1510

Checks

Check and tests still need to be written and passed.

@codecov-commenter
Copy link

codecov-commenter commented Apr 5, 2024

Codecov Report

Attention: Patch coverage is 0% with 39 lines in your changes are missing coverage. Please review.

Project coverage is 26.53%. Comparing base (4a44093) to head (8194d21).
Report is 19 commits behind head on main.

❗ Current head 8194d21 differs from pull request most recent head ff36e1e. Consider uploading reports for the commit ff36e1e to get more accurate results

Files Patch % Lines
autogen/agentchat/contrib/agent_builder.py 0.00% 39 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff             @@
##             main    #2294       +/-   ##
===========================================
- Coverage   38.14%   26.53%   -11.62%     
===========================================
  Files          78       81        +3     
  Lines        7865     8134      +269     
  Branches     1683     1876      +193     
===========================================
- Hits         3000     2158      -842     
- Misses       4615     5725     +1110     
- Partials      250      251        +1     
Flag Coverage Δ
unittest 13.15% <0.00%> (?)
unittests 26.07% <0.00%> (-12.06%) ⬇️

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

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@krishnashed
Copy link
Contributor Author

@microsoft-github-policy-service agree

@ekzhu ekzhu requested review from LinxinS97, sonichi and JieyuZ2 April 5, 2024 18:00
@ekzhu
Copy link
Collaborator

ekzhu commented Apr 5, 2024

You can fix code formatting running pre-commit run --all-files locally.

@jamesliu
Copy link
Contributor

jamesliu commented Apr 6, 2024

@krishnashed, I'd like to explore and validate any test scenarios you might have. Thanks.

@JieyuZ2
Copy link
Contributor

JieyuZ2 commented Apr 6, 2024

hey @krishnashed very nice feature, could you check this feature and make it compatible? https://microsoft.github.io/autogen/docs/topics/code-execution/user-defined-functions/

@krishnashed
Copy link
Contributor Author

Sure @JieyuZ2 I'll check it out and make sure it's compatible

@krishnashed
Copy link
Contributor Author

@JieyuZ2 @jamesliu I have added support for OpenAI Assistant generated using AutoBuild to access function calling. Also added working ipynb files for same

OAI_CONFIG_LIST_sample Outdated Show resolved Hide resolved
@sonichi sonichi requested review from jamesliu, ekzhu and SDcodehub April 14, 2024 00:58
Copy link
Contributor Author

@krishnashed krishnashed left a comment

Choose a reason for hiding this comment

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

@sonichi Closing the review, as minor update you suggested is implemented, and pre-build checks are now passing

OAI_CONFIG_LIST_sample Outdated Show resolved Hide resolved
@krishnashed
Copy link
Contributor Author

@jamesliu I have added test cases for Autobuild function calling, can you please review?

@@ -642,13 +686,58 @@ def _build_agents(

Returns:
agent_list: a list of agents.
list_of_functions: List of functions to be registered with agents.
Copy link
Contributor

Choose a reason for hiding this comment

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

list_of_functions in Args, not in Returns

Copy link

gitguardian bot commented May 22, 2024

⚠️ GitGuardian has uncovered 1 secret following the scan of your pull request.

Please consider investigating the findings and remediating the incidents. Failure to do so may lead to compromising the associated services or software components.

🔎 Detected hardcoded secret in your pull request
GitGuardian id GitGuardian status Secret Commit Filename
10404662 Triggered Generic CLI Secret b522480 .github/workflows/dotnet-release.yml View secret
🛠 Guidelines to remediate hardcoded secrets
  1. Understand the implications of revoking this secret by investigating where it is used in your code.
  2. Replace and store your secret safely. Learn here the best practices.
  3. Revoke and rotate this secret.
  4. If possible, rewrite git history. Rewriting git history is not a trivial act. You might completely break other contributing developers' workflow and you risk accidentally deleting legitimate data.

To avoid such incidents in the future consider


🦉 GitGuardian detects secrets in your source code to help developers and security teams secure the modern development process. You are seeing this because you or someone else with access to this repository has authorized GitGuardian to scan your pull request.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Feature Request]: how do we add tools to agents created by AgentBuilder ?
6 participants