autogen
autogen copied to clipboard
[Core] Unify function decorators for function calling, reply, termination and hook functions
Why are these changes needed?
Add function decorators for registering functions for reply, termination and hook and unify API
Describe the solution you'd like
Add the following function decorators:
@agent.register.for_execution
@agent.register.for_llm
@agent.register.for_reply
@agent.register.for_termination
@agent.register.for_hook
Related issue number
Closes #1214
Checks
- [x] I've included any doc changes needed for https://microsoft.github.io/autogen/. See https://microsoft.github.io/autogen/docs/Contribute#documentation to build and test documentation locally.
- [x] I've added tests (if relevant) corresponding to the changes introduced in this PR.
- [x] I've made sure all auto checks have passed.
Codecov Report
Attention: 6 lines in your changes are missing coverage. Please review.
Comparison is base (
2e519b0) 30.63% compared to head (20ba740) 41.20%.
| Files | Patch % | Lines |
|---|---|---|
| autogen/agentchat/conversable_agent.py | 85.71% | 3 Missing and 3 partials :warning: |
Additional details and impacted files
@@ Coverage Diff @@
## main #1215 +/- ##
===========================================
+ Coverage 30.63% 41.20% +10.57%
===========================================
Files 32 32
Lines 4365 4402 +37
Branches 1015 1074 +59
===========================================
+ Hits 1337 1814 +477
+ Misses 2932 2450 -482
- Partials 96 138 +42
| Flag | Coverage Δ | |
|---|---|---|
| unittests | 41.14% <85.71%> (+10.55%) |
:arrow_up: |
Flags with carried forward coverage won't be shown. Click here to find out more.
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.