Integrate CodeIntepreter
Features
- Planning ability for general
Rolethrough_plan_and_actfunction - A
CodeInterpreter(Role)that could solve problems through coding. This role inherits the planning ability and can also use tools. - A
MLEngineer(Role)that tailored for machine learning and data analysis - Both roles above can interact with human for plan confirmation or modification
- A
Plannerand a data structurePlanwere the support for role's planning capability. - Multiple
Actions reusable across roles, incluingWriteCodeByGenerate,WriteCodeWithTools,ExecuteCode, etc. These enable a real-time code generation and display.
Feature Docs TODO
Result TODO
- This is a huge pr, provide the tests result and some example execution log to help a easier review.
- There are lots of if/else judgments, make sure that the unittests have cover them.
- To have a format update like type annotation, PROMPT_TEMPLATE position and its format, tool schema definition position and so on.
- Add more param description/example especially for the param has Union type.
- Make the usage clear like
ml_enginner vs ml_enginner_simple,execute_code vs run_codeand so on. - Uniform usage like
working_memory, make sure it can cover the further usage. And update Action with ActionNode later.
Codecov Report
Attention: 161 lines in your changes are missing coverage. Please review.
Comparison is base (
a7cb21a) 80.11% compared to head (a35f536) 81.88%. Report is 5 commits behind head on dev.
:exclamation: Your organization needs to install the Codecov GitHub app to enable full functionality.
Additional details and impacted files
@@ Coverage Diff @@
## dev #736 +/- ##
==========================================
+ Coverage 80.11% 81.88% +1.77%
==========================================
Files 200 225 +25
Lines 11046 12446 +1400
==========================================
+ Hits 8849 10192 +1343
- Misses 2197 2254 +57
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
https://github.com/geekan/MetaGPT/actions/runs/7726960897/job/21064351903?pr=736
Reached test coverage 86%. No lower than target branch dev. In terms of 8 test failures, 6 of them depend on fix on dev, 2 will be solved soon.
https://github.com/geekan/MetaGPT/actions/runs/7735868125/job/21092824632
Test coverage at 87%, higher than target branch (dev), all tests passed (5 failures at dev not related to this PR)
- Don't write comments that don't make sense, if the subclass's methods are nothing special, it should probably use the parent's comments
- Notice that some logic has actually changed boundaries in the modification and need to provide a test result
- Done
- https://github.com/geekan/MetaGPT/actions/runs/7775123241/job/21200724452?pr=736 All tests passed with a coverage no lower than dev. (The 7 failures are the same with current dev and are not related to this PR)