mirror of
https://github.com/FoundationAgents/MetaGPT.git
synced 2026-06-08 15:05:17 +02:00
Merge pull request #910 from garylin2099/v0.7-release
v0.7.2: fixed human interact and execute code bugs
This commit is contained in:
commit
0ea991fde4
4 changed files with 8 additions and 8 deletions
|
|
@ -1,13 +1,13 @@
|
|||
import asyncio
|
||||
import fire
|
||||
|
||||
from metagpt.roles.mi.interpreter import Interpreter
|
||||
|
||||
|
||||
async def main(requirement: str):
|
||||
mi = Interpreter(auto_run=True, use_tools=False)
|
||||
async def main(auto_run: bool = True):
|
||||
requirement = "Run data analysis on sklearn Wine recognition dataset, include a plot, and train a model to predict wine class (20% as validation), and show validation accuracy."
|
||||
mi = Interpreter(auto_run=auto_run)
|
||||
await mi.run(requirement)
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
requirement = "Run data analysis on sklearn Wine recognition dataset, include a plot, and train a model to predict wine class (20% as validation), and show validation accuracy."
|
||||
asyncio.run(main(requirement))
|
||||
fire.Fire(main)
|
||||
|
|
|
|||
|
|
@ -182,7 +182,7 @@ class ExecuteNbCode(Action):
|
|||
outputs = self.parse_outputs(self.nb.cells[-1].outputs)
|
||||
outputs, success = truncate(remove_escape_and_color_codes(outputs), is_success=success)
|
||||
|
||||
if "!pip" in outputs:
|
||||
if "!pip" in code:
|
||||
success = False
|
||||
|
||||
return outputs, success
|
||||
|
|
|
|||
|
|
@ -122,7 +122,7 @@ class Planner(BaseModel):
|
|||
) # "confirm, ... (more content, such as changing downstream tasks)"
|
||||
if confirmed_and_more:
|
||||
self.working_memory.add(Message(content=review, role="user", cause_by=AskReview))
|
||||
await self.update_plan(review)
|
||||
await self.update_plan()
|
||||
|
||||
def get_useful_memories(self, task_exclude_field=None) -> list[Message]:
|
||||
"""find useful memories only to reduce context length and improve performance"""
|
||||
|
|
|
|||
2
setup.py
2
setup.py
|
|
@ -57,7 +57,7 @@ extras_require["dev"] = (["pylint~=3.0.3", "black~=23.3.0", "isort~=5.12.0", "pr
|
|||
|
||||
setup(
|
||||
name="metagpt",
|
||||
version="0.7.1",
|
||||
version="0.7.2",
|
||||
description="The Multi-Agent Framework",
|
||||
long_description=long_description,
|
||||
long_description_content_type="text/markdown",
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue