Comments (1)
2024-02-21 09:26:26.482 | WARNING | metagpt.utils.git_repository:rename_root:214 - Move C:\project\MetaGPT\workspace\20240221092607 to C:\project\MetaGPT\workspace\video_search error: [WinError 32] 另
一个程序正在使用此文件,进程无法访问。: 'C:\project\MetaGPT\workspace\20240221092607'
Windows下此处的异常只会导致C:\project\MetaGPT\workspace\20240221092607
残留,不会影响C:\project\MetaGPT\workspace\video_search
的生成。这是python mv
windows文件夹已知的问题。你可以用过metagpt --project-name参数类绕过这个问题,人为指定project name可绕过这个rename操作。
2024-02-21 09:26:27.050 | INFO | metagpt.roles.role:_act:399 - Bob(Architect): to do WriteDesign(WriteDesign)
[CONTENT]
{
"Implementation approach": "We will use the Vue framework for the front-end and the Java+springboot+springmvc+mybatis plus+mysql stack for the back-end. We will use a modular approach to developmen
t, with each module responsible for a specific set of functionality. This will make it easier to maintain and update the system in the future.",
"File list": [
"main.py",
"game.py"
],
"Data structures and interfaces": "\nclassDiagram\n class User {\n - username: str\n - password: str\n - email: str\n - permissions: list\n +login()\n +
logout()\n +change_password()\n +reset_password()\n }\n class Permission {\n - name: str\n - description: str\n +check()\n }\n class Role {\n - nam
e: str\n - description: str\n - permissions: list\n +assign()\n +revoke()\n }\n class Attendance {\n - date: date\n - time: time\n - location: str
\n - employee: User\n +check_in()\n +check_out()\n }\n class Congestion {\n - date: date\n - time: time\n - location: str\n - severity: int\n
+report()\n }\n class Notification {\n - type: str\n - message: str\n - recipient: User\n +send()\n }\n class Video {\n - id: int\n - title: str
\n - description: str\n - url: str\n - tags: list\n +search()\n +view()\n +download()\n }\n class SearchEngine {\n - index: Index\n - ranki
ng: Ranking\n - summary: Summary\n +search(query: str) list\n }\n class Index {\n - data: dict\n +create_index(data: dict)\n +query_index(query: str) list\n
}\n class Ranking {\n +rank_results(results: list) list\n }\n class Summary {\n +summarize_results(results: list) str\n }\n User --> Attendance\n User --> Congestion\n
User --> Notification\n User --> Video\n SearchEngine --> Index\n SearchEngine --> Ranking\n SearchEngine --> Summary\n",
"Program call flow": "\nsequenceDiagram\n participant M as Main\n participant SE as SearchEngine\n participant I as Index\n participant R as Ranking\n participant S as Summary\n M
->>SE: search(query)\n SE->>I: query_index(query)\n I->>SE: return results\n SE->>R: rank_results(results)\n R-->>SE: return ranked_results\n SE->>S: summarize_results(ranked_results)\n
S-->>SE: return summary\n SE-->>M: return summary\n",
"Anything UNCLEAR": "Clarification needed on third-party API integration, ..."
}
[/CONTENT]
从上面的日志看,类视图和时序图都已经正常的生成,而且类视图与时序图是配套的。
{
"Implementation approach": "We will use the Vue framework for the front-end and the Java+springboot+springmvc+mybatis plus+mysql stack for the back-end. We will use a modular approach to development, with each module responsible for a specific set of functionality. This will make it easier to maintain and update the system in the future.",
"File list": [
"main.py",
"game.py"
],
"Data structures and interfaces": "\nclassDiagram\n class User {\n - username: str\n - password: str\n - email: str\n - permissions: list\n +login()\n +logout()\n +change_password()\n +reset_password()\n }\n class Permission {\n - name: str\n - description: str\n +check()\n }\n class Role {\n - name: str\n - description: str\n - permissions: list\n +assign()\n +revoke()\n }\n class Attendance {\n - date: date\n - time: time\n - location: str\n - employee: User\n +check_in()\n +check_out()\n }\n class Congestion {\n - date: date\n - time: time\n - location: str\n - severity: int\n+report()\n }\n class Notification {\n - type: str\n - message: str\n - recipient: User\n +send()\n }\n class Video {\n - id: int\n - title: str\n - description: str\n - url: str\n - tags: list\n +search()\n +view()\n +download()\n }\n class SearchEngine {\n - index: Index\n - ranking: Ranking\n - summary: Summary\n +search(query: str) list\n }\n class Index {\n - data: dict\n +create_index(data: dict)\n +query_index(query: str) list\n}\n class Ranking {\n +rank_results(results: list) list\n }\n class Summary {\n +summarize_results(results: list) str\n }\n User --> Attendance\n User --> Congestion\nUser --> Notification\n User --> Video\n SearchEngine --> Index\n SearchEngine --> Ranking\n SearchEngine --> Summary\n",
"Program call flow": "\nsequenceDiagram\n participant M as Main\n participant SE as SearchEngine\n participant I as Index\n participant R as Ranking\n participant S as Summary\n M->>SE: search(query)\n SE->>I: query_index(query)\n I->>SE: return results\n SE->>R: rank_results(results)\n R-->>SE: return ranked_results\n SE->>S: summarize_results(ranked_results)\nS-->>SE: return summary\n SE-->>M: return summary\n",
"Anything UNCLEAR": "Clarification needed on third-party API integration, ..."
}
classDiagram
class User {
- username: str
- password: str
- email: str
- permissions: list
+login()
+logout()
+change_password()
+reset_password()
}
class Permission {
- name: str
- description: str
+check()
}
class Role {
- name: str
- description: str
- permissions: list
+assign()
+revoke()
}
class Attendance {
- date: date
- time: time
- location: str
- employee: User
+check_in()
+check_out()
}
class Congestion {
- date: date
- time: time
- location: str
- severity: int
+report()
}
class Notification {
- type: str
- message: str
- recipient: User
+send()
}
class Video {
- id: int
- title: str
- description: str
- url: str
- tags: list
+search()
+view()
+download()
}
class SearchEngine {
- index: Index
- ranking: Ranking
- summary: Summary
+search(query: str) list
}
class Index {
- data: dict
+create_index(data: dict)
+query_index(query: str) list
}
class Ranking {
+rank_results(results: list) list
}
class Summary {
+summarize_results(results: list) str
}
User --> Attendance
User --> Congestion
User --> Notification
User --> Video
SearchEngine --> Index
SearchEngine --> Ranking
SearchEngine --> Summary
sequenceDiagram
participant M as Main
participant SE as SearchEngine
participant I as Index
participant R as Ranking
participant S as Summary
M->>SE: search(query)
SE->>I: query_index(query)
I->>SE: return results
SE->>R: rank_results(results)
R-->>SE: return ranked_results
SE->>S: summarize_results(ranked_results)
S-->>SE: return summary
SE-->>M: return summary
所以,真正的问题是File list
的内容出错了。
LLM错误的将metagpt/actions/design_api_an.py
中的示例作为回答填到了File list
里:
FILE_LIST = ActionNode(
key="File list",
expected_type=List[str],
instruction="Only need relative paths. ALWAYS write a main.py or app.py here",
example=["main.py", "game.py"],
)
到了WriteTask阶段,大模型在抄示例的路上越走越远。
2024-02-21 09:26:49.820 | INFO | metagpt.roles.role:_act:399 - Eve(Project Manager): to do WriteTasks(WriteTasks)
[CONTENT]
{
"Required Python packages": [
"flask==1.1.2",
"bcrypt==3.2.0"
],
"Required Other language third-party packages": [
"No third-party dependencies required"
],
"Logic Analysis": [
[
"game.py",
"Contains Game class and ... functions"
],
[
"main.py",
"Contains main function, from game import Game"
]
],
"Task list": [
"game.py",
"main.py"
],
"Shared Knowledge": "game.py contains functions shared across the project.",
"Anything UNCLEAR": "Clarification needed on how to start and initialize third-party libraries."
}
[/CONTENT]
几乎是在照搬metagpt/actions/project_management_an.py
示例部分的内容:
REQUIRED_PYTHON_PACKAGES = ActionNode(
key="Required Python packages",
expected_type=List[str],
instruction="Provide required Python packages in requirements.txt format.",
example=["flask==1.1.2", "bcrypt==3.2.0"],
)
REQUIRED_OTHER_LANGUAGE_PACKAGES = ActionNode(
key="Required Other language third-party packages",
expected_type=List[str],
instruction="List down the required packages for languages other than Python.",
example=["No third-party dependencies required"],
)
LOGIC_ANALYSIS = ActionNode(
key="Logic Analysis",
expected_type=List[List[str]],
instruction="Provide a list of files with the classes/methods/functions to be implemented, "
"including dependency analysis and imports.",
example=[
["game.py", "Contains Game class and ... functions"],
["main.py", "Contains main function, from game import Game"],
],
)
总结一下所有的问题:
- 大模型并未正确的理解输入的内容。建议换个版本或换个大模型试试。
- 另一个可能导致问题的因素是采用了类似json格式的输入参数。我没测过gemini,但openai在使用这种格式的上下文时,很容易出现被锁死在某个key-value里而丢失其他信息的现象。因此建议采用markdown格式做输入,采用json格式做输出。你可以试试看用markdown格式来描述需求,看看问题1是否会自动消失。
Please help me complete a project, which is divided into front-end and back-end. The front-end uses the Vue framework, and the back-end uses java+springboo
t+springmvc+mybatis plus+mysql. Please carefully analyze the requirements and implement each function. The project requirements are as follows:{'Video Search ': {'Background Management End': {'Persona
l Center ': {'Login': {'Method ':' User Name+Password Login '},' Password Management ': {'Function ': ['Forgot Password ',' Send Verification Code to Modify via Email ',' Change Password '},' Logout ':
{}},' Permission Management System ': {'General Permission Management System': {}}, 'Attendance Ma nagement': {'Attendance Personnel Management ': {'Function': 'Add, Delete, Change'}, 'Attendance Reco
rds': {},' Attendance Machine Management ': {'Function': ['On ',' Off ']}, 'Personnel Search': {'Onl ine Personnel Monitoring ': {'Function': ['Single person monitoring ',' Multi person monitoring ','
View historical images']}, 'Offline Search': {'Function ':' Access videos and personnel images, batch search for the location of personnel in the video '},' Priority Implementation ': 2},' Congestion
Monitoring ': {'Online Video': {'Function ': ['Monitor traffic lights',' Monitor intersection vehicle conditions']}, 'Notification': {'Method ': ['Email', 'Topic', 'SMS',' Notification Strategy ']}, '
Call algorithm platform interface': {}}, 'Big screen, cockpit': {}, 'Data access': {' Bottom layer data access': {'Collected by': 'edge computing', 'Data': {'Video data': {'Type': 'Real time data'}, '
Other data': {}}}, 'Big data': {}}}
from metagpt.
Related Issues (20)
- Generate garbled code starting with u, incorrect JSON format, duplicate request HOT 5
- Issues related with write_code_review and Total running cost HOT 3
- AttributeError: module 'setuptools.errors' has no attribute 'CompileError' HOT 2
- [IPKernelApp] WARNING | Parent appears to have exited, shutting down
- how to run werewolf in the current environment HOT 1
- pydantic_core._pydantic_core.ValidationError: 1 validation error for Config HOT 3
- There is a bug of zhipuai llm while using metagpt on ubuntu22.04 under the environment of WSL2 of windows11 Home edition HOT 5
- 如何实现使LLM输出符合格式要求的SOP或Json? HOT 1
- GLM4一直报错 HOT 3
- 百度千帆API调用失败 HOT 2
- ModuleNotFoundError: No module named 'pwd' HOT 2
- setted "repair_llm_output: true" in config2.yaml, but still meet the JSONDecodeError HOT 2
- Multi modal LLM integration HOT 1
- A direct dependency ipykernel==6.27.0 is a yanked version
- what‘s the meaning of watch in a role? it's like perception for a role to observe, or a state? HOT 1
- Create 2048 game is the only thing that runs when using llama2 HOT 1
- error when run crawl_webpage.py HOT 1
- 中文在线文档崩溃了,504
- serpapi的配置项中增加搜索引擎的相关配置,以支持更多的搜索引擎如:bing, baidu 等 HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from metagpt.