fix aask() got an unexpected keyword argument 'images'
User description
This fixes the error when running software_company with is_human flag True for ProjectManager.
The issue is that BaseLLM.aask takes in more keyword arguments than handled by HumanProvider.aask and that results in the following error.
aask() got an unexpected keyword argument 'images'
Tested the code after the fix.
PR Type
Bug fix
Description
- Added support for flexible keyword arguments in the
aaskmethod ofHumanProviderclass. This prevents errors when unexpected keyword arguments are passed, enhancing the method's robustness.
Changes walkthrough 📝
| Relevant files | |||
|---|---|---|---|
| Bug fix |
|
💡 PR-Agent usage: Comment
/helpon the PR to get a list of all available PR-Agent tools and their descriptions
PR Description updated to latest commit (https://github.com/geekan/MetaGPT/commit/d4bd66898327b818eb80eb12a7bba25305304e79)
- [ ] Copy walkthrough table to "Files Changed" Tab
PR Review 🔍
| ⏱️ Estimated effort to review [1-5] |
1, because the change is minimal and straightforward, involving only the addition of **kwargs to handle additional unexpected keyword arguments in a method. |
| 🧪 Relevant tests |
No |
| ⚡ Possible issues |
No |
| 🔒 Security concerns |
No |
PR Code Suggestions ✨
| Category | Suggestions |
| Possible issue |
Ensure that arbitrary keyword arguments are properly handled or passed through.**The addition of metagpt/provider/human_provider.py [36]
|
Codecov Report
All modified and coverable lines are covered by tests :white_check_mark:
Project coverage is 70.20%. Comparing base (
f201b2f) to head (d4bd668).
:exclamation: Your organization needs to install the Codecov GitHub app to enable full functionality.
Additional details and impacted files
@@ Coverage Diff @@
## main #1264 +/- ##
==========================================
- Coverage 70.22% 70.20% -0.03%
==========================================
Files 316 316
Lines 18860 18860
==========================================
- Hits 13245 13240 -5
- Misses 5615 5620 +5
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
LGTM