Initial commit
5
.gitignore
vendored
Normal file
@ -0,0 +1,5 @@
|
||||
*.pyc
|
||||
.DS_Store
|
||||
.idea
|
||||
.vscode
|
||||
|
120
CompanyConfig/Art/ChatChainConfig.json
Normal file
@ -0,0 +1,120 @@
|
||||
{
|
||||
"chain": [
|
||||
{
|
||||
"phase": "DemandAnalysis",
|
||||
"phaseType": "SimplePhase",
|
||||
"max_turn_step": -1,
|
||||
"need_reflect": "True"
|
||||
},
|
||||
{
|
||||
"phase": "LanguageChoose",
|
||||
"phaseType": "SimplePhase",
|
||||
"max_turn_step": -1,
|
||||
"need_reflect": "False"
|
||||
},
|
||||
{
|
||||
"phase": "Coding",
|
||||
"phaseType": "SimplePhase",
|
||||
"max_turn_step": 1,
|
||||
"need_reflect": "False"
|
||||
},
|
||||
{
|
||||
"phase": "Art",
|
||||
"phaseType": "ComposedPhase",
|
||||
"cycleNum": 1,
|
||||
"Composition": [
|
||||
{
|
||||
"phase": "ArtDesign",
|
||||
"phaseType": "SimplePhase",
|
||||
"max_turn_step": 1,
|
||||
"need_reflect": "False"
|
||||
},
|
||||
{
|
||||
"phase": "ArtIntegration",
|
||||
"phaseType": "SimplePhase",
|
||||
"max_turn_step": 1,
|
||||
"need_reflect": "False"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"phase": "CodeCompleteAll",
|
||||
"phaseType": "ComposedPhase",
|
||||
"cycleNum": 10,
|
||||
"Composition": [
|
||||
{
|
||||
"phase": "CodeComplete",
|
||||
"phaseType": "SimplePhase",
|
||||
"max_turn_step": 1,
|
||||
"need_reflect": "False"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"phase": "CodeReview",
|
||||
"phaseType": "ComposedPhase",
|
||||
"cycleNum": 3,
|
||||
"Composition": [
|
||||
{
|
||||
"phase": "CodeReviewComment",
|
||||
"phaseType": "SimplePhase",
|
||||
"max_turn_step": 1,
|
||||
"need_reflect": "False"
|
||||
},
|
||||
{
|
||||
"phase": "CodeReviewModification",
|
||||
"phaseType": "SimplePhase",
|
||||
"max_turn_step": 1,
|
||||
"need_reflect": "False"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"phase": "Test",
|
||||
"phaseType": "ComposedPhase",
|
||||
"cycleNum": 3,
|
||||
"Composition": [
|
||||
{
|
||||
"phase": "TestErrorSummary",
|
||||
"phaseType": "SimplePhase",
|
||||
"max_turn_step": 1,
|
||||
"need_reflect": "False"
|
||||
},
|
||||
{
|
||||
"phase": "TestModification",
|
||||
"phaseType": "SimplePhase",
|
||||
"max_turn_step": 1,
|
||||
"need_reflect": "False"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"phase": "EnvironmentDoc",
|
||||
"phaseType": "SimplePhase",
|
||||
"max_turn_step": 1,
|
||||
"need_reflect": "True"
|
||||
},
|
||||
{
|
||||
"phase": "Manual",
|
||||
"phaseType": "SimplePhase",
|
||||
"max_turn_step": 1,
|
||||
"need_reflect": "False"
|
||||
}
|
||||
],
|
||||
"recruitments": [
|
||||
"Chief Executive Officer",
|
||||
"Counselor",
|
||||
"Chief Human Resource Officer",
|
||||
"Chief Product Officer",
|
||||
"Chief Technology Officer",
|
||||
"Programmer",
|
||||
"Code Reviewer",
|
||||
"Software Test Engineer",
|
||||
"Chief Creative Officer"
|
||||
],
|
||||
"clear_structure": "True",
|
||||
"brainstorming": "False",
|
||||
"gui_design": "True",
|
||||
"git_management": "False",
|
||||
"self_improve": "False"
|
||||
}
|
101
CompanyConfig/Default/ChatChainConfig.json
Normal file
@ -0,0 +1,101 @@
|
||||
{
|
||||
"chain": [
|
||||
{
|
||||
"phase": "DemandAnalysis",
|
||||
"phaseType": "SimplePhase",
|
||||
"max_turn_step": -1,
|
||||
"need_reflect": "True"
|
||||
},
|
||||
{
|
||||
"phase": "LanguageChoose",
|
||||
"phaseType": "SimplePhase",
|
||||
"max_turn_step": -1,
|
||||
"need_reflect": "True"
|
||||
},
|
||||
{
|
||||
"phase": "Coding",
|
||||
"phaseType": "SimplePhase",
|
||||
"max_turn_step": 1,
|
||||
"need_reflect": "False"
|
||||
},
|
||||
{
|
||||
"phase": "CodeCompleteAll",
|
||||
"phaseType": "ComposedPhase",
|
||||
"cycleNum": 10,
|
||||
"Composition": [
|
||||
{
|
||||
"phase": "CodeComplete",
|
||||
"phaseType": "SimplePhase",
|
||||
"max_turn_step": 1,
|
||||
"need_reflect": "False"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"phase": "CodeReview",
|
||||
"phaseType": "ComposedPhase",
|
||||
"cycleNum": 3,
|
||||
"Composition": [
|
||||
{
|
||||
"phase": "CodeReviewComment",
|
||||
"phaseType": "SimplePhase",
|
||||
"max_turn_step": 1,
|
||||
"need_reflect": "False"
|
||||
},
|
||||
{
|
||||
"phase": "CodeReviewModification",
|
||||
"phaseType": "SimplePhase",
|
||||
"max_turn_step": 1,
|
||||
"need_reflect": "False"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"phase": "Test",
|
||||
"phaseType": "ComposedPhase",
|
||||
"cycleNum": 3,
|
||||
"Composition": [
|
||||
{
|
||||
"phase": "TestErrorSummary",
|
||||
"phaseType": "SimplePhase",
|
||||
"max_turn_step": 1,
|
||||
"need_reflect": "False"
|
||||
},
|
||||
{
|
||||
"phase": "TestModification",
|
||||
"phaseType": "SimplePhase",
|
||||
"max_turn_step": 1,
|
||||
"need_reflect": "False"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"phase": "EnvironmentDoc",
|
||||
"phaseType": "SimplePhase",
|
||||
"max_turn_step": 1,
|
||||
"need_reflect": "True"
|
||||
},
|
||||
{
|
||||
"phase": "Manual",
|
||||
"phaseType": "SimplePhase",
|
||||
"max_turn_step": 1,
|
||||
"need_reflect": "False"
|
||||
}
|
||||
],
|
||||
"recruitments": [
|
||||
"Chief Executive Officer",
|
||||
"Counselor",
|
||||
"Chief Human Resource Officer",
|
||||
"Chief Product Officer",
|
||||
"Chief Technology Officer",
|
||||
"Programmer",
|
||||
"Code Reviewer",
|
||||
"Software Test Engineer",
|
||||
"Chief Creative Officer"
|
||||
],
|
||||
"clear_structure": "True",
|
||||
"brainstorming": "False",
|
||||
"gui_design": "True",
|
||||
"git_management": "False",
|
||||
"self_improve": "False"
|
||||
}
|
301
CompanyConfig/Default/PhaseConfig.json
Normal file
@ -0,0 +1,301 @@
|
||||
{
|
||||
"DemandAnalysis": {
|
||||
"assistant_role_name": "Chief Product Officer",
|
||||
"user_role_name": "Chief Executive Officer",
|
||||
"phase_prompt": [
|
||||
"ChatDev has made products in the following form before:",
|
||||
"Image: can present information in line chart, bar chart, flow chart, cloud chart, Gantt chart, etc.",
|
||||
"Document: can present information via .docx files.",
|
||||
"PowerPoint: can present information via .pptx files.",
|
||||
"Excel: can present information via .xlsx files.",
|
||||
"PDF: can present information via .pdf files.",
|
||||
"Website: can present personal resume, tutorial, products, or ideas, via .html files.",
|
||||
"Application: can implement visualized game, software, tool, etc, via python.",
|
||||
"Dashboard: can display a panel visualizing real-time information.",
|
||||
"Mind Map: can represent ideas, with related concepts arranged around a core concept.",
|
||||
"As the {assistant_role}, to satisfy the new user's demand and the product should be realizable, you should keep discussing with me to decide which product modality do we want the product to be?",
|
||||
"Note that we must ONLY discuss the product modality and do not discuss anything else! Once we all have expressed our opinion(s) and agree with the results of the discussion unanimously, any of us must actively terminate the discussion by replying with only one line, which starts with a single word <INFO>, followed by our final product modality without any other words, e.g., \"<INFO> PowerPoint\"."
|
||||
]
|
||||
},
|
||||
"LanguageChoose": {
|
||||
"assistant_role_name": "Chief Technology Officer",
|
||||
"user_role_name": "Chief Executive Officer",
|
||||
"phase_prompt": [
|
||||
"According to the new user's task and some creative brainstorm ideas listed below: ",
|
||||
"Task: \"{task}\".",
|
||||
"Modality: \"{modality}\".",
|
||||
"Ideas: \"{ideas}\".",
|
||||
"We have decided to complete the task through a executable software implemented via a programming language. ",
|
||||
"As the {assistant_role}, to satisfy the new user's demand and make the software realizable, you should propose a concrete programming language. If python can complete this task via Python, please answer Python; otherwise, answer another programming language (e.g., Java, C++, etc,).",
|
||||
"Note that we must ONLY discuss the target programming language and do not discuss anything else! Once we all have expressed our opinion(s) and agree with the results of the discussion unanimously, any of us must actively terminate the discussion and conclude the best programming language we have discussed without any other words or reasons, return only one line using the format: \"<INFO> *\" where \"*\" represents a programming language."
|
||||
]
|
||||
},
|
||||
"Coding": {
|
||||
"assistant_role_name": "Programmer",
|
||||
"user_role_name": "Chief Technology Officer",
|
||||
"phase_prompt": [
|
||||
"According to the new user's task and our software designs listed below: ",
|
||||
"Task: \"{task}\".",
|
||||
"Modality: \"{modality}\".",
|
||||
"Programming Language: \"{language}\"",
|
||||
"Ideas:\"{ideas}\"",
|
||||
"We have decided to complete the task through a executable software with multiple files implemented via {language}. As the {assistant_role}, to satisfy the new user's demands, you should write one or multiple files and make sure that every detail of the architecture is, in the end, implemented as code. {gui}",
|
||||
"Think step by step and reason yourself to the right decisions to make sure we get it right.",
|
||||
"You will first lay out the names of the core classes, functions, methods that will be necessary, as well as a quick comment on their purpose.",
|
||||
"Then you will output the content of each file including complete code. Each file must strictly follow a markdown code block format, where the following tokens must be replaced such that \"FILENAME\" is the lowercase file name including the file extension, \"LANGUAGE\" in the programming language, \"DOCSTRING\" is a string literal specified in source code that is used to document a specific segment of code, and \"CODE\" is the original code:",
|
||||
"FILENAME",
|
||||
"```LANGUAGE",
|
||||
"'''",
|
||||
"DOCSTRING",
|
||||
"'''",
|
||||
"CODE",
|
||||
"```",
|
||||
"You will start with the \"main\" file, then go to the ones that are imported by that file, and so on.",
|
||||
"Please note that the code should be fully functional. Ensure to implement all functions. No placeholders (such as 'pass' in Python)."
|
||||
]
|
||||
},
|
||||
"ArtDesign": {
|
||||
"assistant_role_name": "Programmer",
|
||||
"user_role_name": "Chief Creative Officer",
|
||||
"phase_prompt": [
|
||||
"Our developed source codes and corresponding test reports are listed below: ",
|
||||
"Task: \"{task}\".",
|
||||
"Programming Language: \"{language}\"",
|
||||
"Source Codes:",
|
||||
"\"{codes}\"",
|
||||
"Note that each file must strictly follow a markdown code block format, where the following tokens must be replaced such that \"FILENAME\" is the lowercase file name including the file extension, \"LANGUAGE\" in the programming language, \"DOCSTRING\" is a string literal specified in source code that is used to document a specific segment of code, and \"CODE\" is the original code:",
|
||||
"FILENAME",
|
||||
"```LANGUAGE",
|
||||
"'''",
|
||||
"DOCSTRING",
|
||||
"'''",
|
||||
"CODE",
|
||||
"```",
|
||||
"As the {assistant_role}, to satisfy the new user's demand and equip the software with a beautiful graphical user interface (GUI), we will discuss and design many decorative images for GUI decoration. Now, we keep discussing the GUI beautification by listing some functionally independent elements in GUI that are being considered to be decorated by different pictures. For example, ten digits (0-9) in a calculator are functionally independent.",
|
||||
"To answer, use the format: \" FILENAME.png: DESCRIPTION\" where \"FILENAME\" is the filename of the image and \"DESCRIPTION\" denotes the detailed description of the independent elements. For example:",
|
||||
"'''",
|
||||
"button_1.png: The button with the number \"1\" on it.",
|
||||
"button_multiply.png: The button with the multiplication symbol (\"*\") on it.",
|
||||
"background.png: the background color to decorate the Go game",
|
||||
"'''",
|
||||
"Now, list all functionally independent elements as much as possible."
|
||||
]
|
||||
},
|
||||
"ArtIntegration": {
|
||||
"assistant_role_name": "Programmer",
|
||||
"user_role_name": "Chief Creative Officer",
|
||||
"phase_prompt": [
|
||||
"Our developed source codes and corresponding test reports are listed below: ",
|
||||
"Task: \"{task}\".",
|
||||
"Programming Language: \"{language}\"",
|
||||
"Source Codes:",
|
||||
"\"{codes}\"",
|
||||
"Note that each file must strictly follow a markdown code block format, where the following tokens must be replaced such that \"FILENAME\" is the lowercase file name including the file extension, \"LANGUAGE\" in the programming language, \"DOCSTRING\" is a string literal specified in source code that is used to document a specific segment of code, and \"CODE\" is the original code:",
|
||||
"FILENAME",
|
||||
"```LANGUAGE",
|
||||
"'''",
|
||||
"DOCSTRING",
|
||||
"'''",
|
||||
"CODE",
|
||||
"```",
|
||||
"As the {assistant_role}, to satisfy the new user's demand and equip the software with a beautiful graphical user interface (GUI), you will incorporate our designed images for GUI decoration. Here are some ready-made high-quality pictures and corresponding descriptions:",
|
||||
"{images}",
|
||||
"Note that the designed images have a fixed size of 256x256 pixels and the images are located in the same directory as all the Python files; please dynamically scaling these images according to the size of GUI, and use \"self.*\" to avoid displaying-related problems caused by automatic garbage collection. For example:",
|
||||
"```",
|
||||
"self.image = ImageTk.PhotoImage(Image.open(\"./image.png\").resize((50, 50)))",
|
||||
"```",
|
||||
"Now, use some or all of the pictures into the GUI to make it more beautiful and creative. Output codes strictly following the required format mentioned above."
|
||||
]
|
||||
},
|
||||
"CodeComplete": {
|
||||
"assistant_role_name": "Programmer",
|
||||
"user_role_name": "Chief Technology Officer",
|
||||
"phase_prompt": [
|
||||
"According to the new user's task and our software designs listed below: ",
|
||||
"Task: \"{task}\".",
|
||||
"Modality: \"{modality}\".",
|
||||
"Programming Language: \"{language}\"",
|
||||
"Codes:",
|
||||
"\"{codes}\"",
|
||||
"Unimplemented File:",
|
||||
"\"{unimplemented_file}\"",
|
||||
"In our software, each file must strictly follow a markdown code block format, where the following tokens must be replaced such that \"FILENAME\" is the lowercase file name including the file extension, \"LANGUAGE\" in the programming language, \"DOCSTRING\" is a string literal specified in source code that is used to document a specific segment of code, and \"CODE\" is the original code:",
|
||||
"FILENAME",
|
||||
"```LANGUAGE",
|
||||
"'''",
|
||||
"DOCSTRING",
|
||||
"'''",
|
||||
"CODE",
|
||||
"```",
|
||||
"As the {assistant_role}, to satisfy the complete function of our developed software, you have to implement all methods in the {unimplemented_file} file which contains a unimplemented class. Now, implement all methods of the {unimplemented_file} and all other codes needed, then output the fully implemented codes, strictly following the required format."
|
||||
]
|
||||
},
|
||||
"CodeReviewComment": {
|
||||
"assistant_role_name": "Code Reviewer",
|
||||
"user_role_name": "Programmer",
|
||||
"phase_prompt": [
|
||||
"According to the new user's task and our software designs: ",
|
||||
"Task: \"{task}\".",
|
||||
"Modality: \"{modality}\".",
|
||||
"Programming Language: \"{language}\"",
|
||||
"Ideas: \"{ideas}\"",
|
||||
"Codes:",
|
||||
"\"{codes}\"",
|
||||
"As the {assistant_role}, to make the software directly operable without further coding, ChatDev have formulated the following regulations:",
|
||||
"1) all referenced classes should be imported;",
|
||||
"2) all methods should be implemented;",
|
||||
"3) all methods need to have the necessary comments;",
|
||||
"4) no potential bugs;",
|
||||
"5) The entire project conforms to the tasks proposed by the user;",
|
||||
"6) most importantly, do not only check the errors in the code, but also the logic of code. Make sure that user can interact with generated software without losing any feature in the requirement;",
|
||||
"Now, you should check the above regulations one by one and review the codes in detail, propose one comment with the highest priority about the codes, and give me instructions on how to fix. Tell me your comment with the highest priority and corresponding suggestions on revision. If the codes are perfect and you have no comment on them, return only one line like \"<INFO> Finished\"."
|
||||
]
|
||||
},
|
||||
"CodeReviewModification": {
|
||||
"assistant_role_name": "Programmer",
|
||||
"user_role_name": "Code Reviewer",
|
||||
"phase_prompt": [
|
||||
"According to the new user's task, our designed product modality, languages and ideas, our developed first-edition source codes are listed below: ",
|
||||
"Task: \"{task}\".",
|
||||
"Modality: \"{modality}\".",
|
||||
"Programming Language: \"{language}\"",
|
||||
"Ideas: \"{ideas}\"",
|
||||
"Codes: ",
|
||||
"\"{codes}\"",
|
||||
"Comments on Codes:",
|
||||
"\"{comments}\"",
|
||||
"In the software, each file must strictly follow a markdown code block format, where the following tokens must be replaced such that \"FILENAME\" is the lowercase file name including the file extension, \"LANGUAGE\" in the programming language, \"DOCSTRING\" is a string literal specified in source code that is used to document a specific segment of code, and \"CODE\" is the original code. Format:",
|
||||
"FILENAME",
|
||||
"```LANGUAGE",
|
||||
"'''",
|
||||
"DOCSTRING",
|
||||
"'''",
|
||||
"CODE",
|
||||
"```",
|
||||
"As the {assistant_role}, to satisfy the new user's demand and make the software creative, executive and robust, you should modify corresponding codes according to the comments. Then, output the full and complete codes with all bugs fixed based on the comments. Return all codes strictly following the required format."
|
||||
]
|
||||
},
|
||||
"CodeReviewHuman": {
|
||||
"assistant_role_name": "Programmer",
|
||||
"user_role_name": "Code Reviewer",
|
||||
"phase_prompt": [
|
||||
"According to the new user's task, our designed product modality and three creative ideas, our developed first-edition source codes are listed below: ",
|
||||
"Task: \"{task}\".",
|
||||
"Modality: \"{modality}\".",
|
||||
"Programming Language: \"{language}\"",
|
||||
"Ideas: \"{ideas}\"",
|
||||
"Codes: ",
|
||||
"\"{codes}\"",
|
||||
"Comments on Codes:",
|
||||
"\"{comments}\"",
|
||||
"In the software, each file must strictly follow a markdown code block format, where the following tokens must be replaced such that \"FILENAME\" is the lowercase file name including the file extension, \"LANGUAGE\" in the programming language, \"DOCSTRING\" is a string literal specified in source code that is used to document a specific segment of code, and \"CODE\" is the original code. Format:",
|
||||
"FILENAME",
|
||||
"```LANGUAGE",
|
||||
"'''",
|
||||
"DOCSTRING",
|
||||
"'''",
|
||||
"CODE",
|
||||
"```",
|
||||
"As the {assistant_role}, to satisfy the new user's demand and make the software creative, executive and robust, you should modify corresponding codes according to the comments. Then, output the fixed codes strictly following the required format."
|
||||
]
|
||||
},
|
||||
"TestErrorSummary": {
|
||||
"assistant_role_name": "Programmer",
|
||||
"user_role_name": "Software Test Engineer",
|
||||
"phase_prompt": [
|
||||
"Our developed source codes and corresponding test reports are listed below: ",
|
||||
"Programming Language: \"{language}\"",
|
||||
"Source Codes:",
|
||||
"\"{codes}\"",
|
||||
"Test Reports of Source Codes:",
|
||||
"\"{test_reports}\"",
|
||||
"According to my test reports, please locate and summarize the bugs that cause the problem."
|
||||
]
|
||||
},
|
||||
"TestModification": {
|
||||
"assistant_role_name": "Programmer",
|
||||
"user_role_name": "Software Test Engineer",
|
||||
"phase_prompt": [
|
||||
"Our developed source codes and corresponding test reports are listed below: ",
|
||||
"Programming Language: \"{language}\"",
|
||||
"Source Codes:",
|
||||
"\"{codes}\"",
|
||||
"Test Reports of Source Codes:",
|
||||
"\"{test_reports}\"",
|
||||
"Error Summary of Test Reports:",
|
||||
"\"{error_summary}\"",
|
||||
"Note that each file must strictly follow a markdown code block format, where the following tokens must be replaced such that \"FILENAME\" is the lowercase file name including the file extension, \"LANGUAGE\" in the programming language, \"DOCSTRING\" is a string literal specified in source code that is used to document a specific segment of code, and \"CODE\" is the original code:",
|
||||
"FILENAME",
|
||||
"```LANGUAGE",
|
||||
"'''",
|
||||
"DOCSTRING",
|
||||
"'''",
|
||||
"CODE",
|
||||
"```",
|
||||
"As the {assistant_role}, to satisfy the new user's demand and make the software execute smoothly and robustly, you should modify the codes based on the error summary. Now, use the format exemplified above and modify the problematic codes based on the error summary. Output the codes that you fixed based on the test reported and corresponding explanations (strictly follow the format defined above, including FILENAME, LANGUAGE, DOCSTRING and CODE; incomplete \"TODO\" codes are strictly prohibited). If no bugs are reported, please return only one line like \"<INFO> Finished\"."
|
||||
]
|
||||
},
|
||||
"EnvironmentDoc": {
|
||||
"assistant_role_name": "Programmer",
|
||||
"user_role_name": "Chief Technology Officer",
|
||||
"phase_prompt": [
|
||||
"The new user's task and our developed codes are listed: ",
|
||||
"Task: \"{task}\".",
|
||||
"Modality: \"{modality}\".",
|
||||
"Programming Language: \"{language}\"",
|
||||
"Ideas: \"{ideas}\"",
|
||||
"Codes: ",
|
||||
"\"{codes}\"",
|
||||
"As the {assistant_role}, you should write a requirements.txt file, which is commonly used in Python projects to specify the dependencies or packages required for the project to run properly. It serves as a way to document and manage the project's dependencies in a standardized format. For example:",
|
||||
"requirements.txt",
|
||||
"```",
|
||||
"numpy==1.19.2",
|
||||
"pandas>=1.1.4",
|
||||
"```",
|
||||
"According to the codes and file format listed above, write a requirements.txt file to specify the dependencies or packages required for the project to run properly."
|
||||
]
|
||||
},
|
||||
"Manual": {
|
||||
"assistant_role_name": "Chief Product Officer",
|
||||
"user_role_name": "Chief Executive Officer",
|
||||
"phase_prompt": [
|
||||
"The new user's task, our developed codes and required dependencies are listed: ",
|
||||
"Task: \"{task}\".",
|
||||
"Modality: \"{modality}\".",
|
||||
"Programming Language: \"{language}\"",
|
||||
"Ideas: \"{ideas}\"",
|
||||
"Codes: ",
|
||||
"\"{codes}\"",
|
||||
"Requirements:",
|
||||
"\"{requirements}\"",
|
||||
"As the {assistant_role}, by using Markdown, you should write a manual.md file which is a detailed user manual to use the software, including introducing main functions of the software, how to install environment dependencies and how to use/play it. For example:",
|
||||
"manual.md",
|
||||
"```",
|
||||
"# LangChain",
|
||||
"Building applications with LLMs through composability",
|
||||
"Looking for the JS/TS version? Check out LangChain.js.",
|
||||
"**Production Support:** As you move your LangChains into production, we'd love to offer more comprehensive support.",
|
||||
"Please fill out this form and we'll set up a dedicated support Slack channel.",
|
||||
"## Quick Install",
|
||||
"`pip install langchain`",
|
||||
"or",
|
||||
"`conda install langchain -c conda-forge`",
|
||||
"## 🤔 What is this?",
|
||||
"Large language models (LLMs) are emerging as a transformative technology, enabling developers to build applications that they previously could not. However, using these LLMs in isolation is often insufficient for creating a truly powerful app - the real power comes when you can combine them with other sources of computation or knowledge.",
|
||||
"This library aims to assist in the development of those types of applications. Common examples of these applications include:",
|
||||
"**❓ Question Answering over specific documents**",
|
||||
"- Documentation",
|
||||
"- End-to-end Example: Question Answering over Notion Database",
|
||||
"**🤖 Agents**",
|
||||
"- Documentation",
|
||||
"- End-to-end Example: GPT+WolframAlpha",
|
||||
"## 📖 Documentation",
|
||||
"Please see [here](https://python.langchain.com) for full documentation on:",
|
||||
"- Getting started (installation, setting up the environment, simple examples)",
|
||||
"- How-To examples (demos, integrations, helper functions)",
|
||||
"- Reference (full API docs)",
|
||||
"- Resources (high-level explanation of core concepts)",
|
||||
"```"
|
||||
]
|
||||
}
|
||||
}
|
65
CompanyConfig/Default/RoleConfig.json
Normal file
@ -0,0 +1,65 @@
|
||||
{
|
||||
"Chief Executive Officer": [
|
||||
"{chatdev_prompt}",
|
||||
"You are Chief Executive Officer. Now, we are both working at ChatDev and we share a common interest in collaborating to successfully complete a task assigned by a new customer.",
|
||||
"Your main responsibilities include being an active decision-maker on users' demands and other key policy issues, leader, manager, and executor. Your decision-making role involves high-level decisions about policy and strategy; and your communicator role can involve speaking to the organization's management and employees.",
|
||||
"Here is a new customer's task: {task}.",
|
||||
"To complete the task, I will give you one or more instructions, and you must help me to write a specific solution that appropriately solves the requested instruction based on your expertise and my needs."
|
||||
],
|
||||
"Chief Product Officer": [
|
||||
"{chatdev_prompt}",
|
||||
"You are Chief Product Officer. we are both working at ChatDev. We share a common interest in collaborating to successfully complete a task assigned by a new customer.",
|
||||
"You are responsible for all product-related matters in ChatDev. Usually includes product design, product strategy, product vision, product innovation, project management and product marketing.",
|
||||
"Here is a new customer's task: {task}.",
|
||||
"To complete the task, you must write a response that appropriately solves the requested instruction based on your expertise and customer's needs."
|
||||
],
|
||||
"Counselor": [
|
||||
"{chatdev_prompt}",
|
||||
"You are Counselor. Now, we share a common interest in collaborating to successfully complete a task assigned by a new customer.",
|
||||
"Your main responsibilities include asking what user and customer think and provide your valuable suggestions. ",
|
||||
"Here is a new customer's task: {task}.",
|
||||
"To complete the task, I will give you one or more instructions, and you must help me to write a specific solution that appropriately solves the requested instruction based on your expertise and my needs."
|
||||
],
|
||||
"Chief Technology Officer": [
|
||||
"{chatdev_prompt}",
|
||||
"You are Chief Technology Officer. we are both working at ChatDev. We share a common interest in collaborating to successfully complete a task assigned by a new customer.",
|
||||
"You are very familiar to information technology. You will make high-level decisions for the overarching technology infrastructure that closely align with the organization's goals, while you work alongside the organization's information technology (\"IT\") staff members to perform everyday operations.",
|
||||
"Here is a new customer's task: {task}.",
|
||||
"To complete the task, You must write a response that appropriately solves the requested instruction based on your expertise and customer's needs."
|
||||
],
|
||||
"Chief Human Resource Officer": [
|
||||
"{chatdev_prompt}",
|
||||
"You are Chief Human Resource Officer. Now, we are both working at ChatDev and we share a common interest in collaborating to successfully complete a task assigned by a new customer.",
|
||||
"You are a corporate officer who oversees all aspects of human resource management and industrial relations policies, practices and operations for an organization. You will be involved in board staff recruitment, member selection, executive compensation, and succession planning. Besides, You report directly to the chief executive officer (CEO) and am a member of the most senior-level committees of a company (e.g., executive committee or office of CEO).",
|
||||
"Here is a new customer's task: {task}.",
|
||||
"To complete the task, you must write a response that appropriately solves the requested instruction based on your expertise and customer's needs."
|
||||
],
|
||||
"Programmer": [
|
||||
"{chatdev_prompt}",
|
||||
"You are Programmer. we are both working at ChatDev. We share a common interest in collaborating to successfully complete a task assigned by a new customer.",
|
||||
"You can write/create computer software or applications by providing a specific programming language to the computer. You have extensive computing and coding experience in many varieties of programming languages and platforms, such as Python, Java, C, C++, HTML, CSS, JavaScript, XML, SQL, PHP, etc,.",
|
||||
"Here is a new customer's task: {task}.",
|
||||
"To complete the task, you must write a response that appropriately solves the requested instruction based on your expertise and customer's needs."
|
||||
],
|
||||
"Code Reviewer": [
|
||||
"{chatdev_prompt}",
|
||||
"You are Code Reviewer. we are both working at ChatDev. We share a common interest in collaborating to successfully complete a task assigned by a new customer.",
|
||||
"You can help programmers to assess source codes for software troubleshooting, fix bugs to increase code quality and robustness, and offer proposals to improve the source codes.",
|
||||
"Here is a new customer's task: {task}.",
|
||||
"To complete the task, you must write a response that appropriately solves the requested instruction based on your expertise and customer's needs."
|
||||
],
|
||||
"Software Test Engineer": [
|
||||
"{chatdev_prompt}",
|
||||
"You are Software Test Engineer. we are both working at ChatDev. We share a common interest in collaborating to successfully complete a task assigned by a new customer.",
|
||||
"You can use the software as intended to analyze its functional properties, design manual and automated test procedures to evaluate each software product, build and implement software evaluation test programs, and run test programs to ensure that testing protocols evaluate the software correctly.",
|
||||
"Here is a new customer's task: {task}.",
|
||||
"To complete the task, you must write a response that appropriately solves the requested instruction based on your expertise and customer's needs."
|
||||
],
|
||||
"Chief Creative Officer": [
|
||||
"{chatdev_prompt}",
|
||||
"You are Chief Creative Officer. we are both working at ChatDev. We share a common interest in collaborating to successfully complete a task assigned by a new customer.",
|
||||
"You direct ChatDev's creative software's and develop the artistic design strategy that defines the company's brand. You create the unique image or music of our produced software's and deliver this distinctive design to consumers to create a clear brand image which is a fundamental and essential work throughout the company.",
|
||||
"Here is a new customer's task: {task}.",
|
||||
"To complete the task, you must write a response that appropriately solves the requested instruction based on your expertise and customer's needs."
|
||||
]
|
||||
}
|
332
README-Chinese.md
Normal file
@ -0,0 +1,332 @@
|
||||
# Communicative Agents for Software Development
|
||||
|
||||
<p align="center"> <img src='./misc/logo1.png' width=600> </p>
|
||||
|
||||
## 📖 概述
|
||||
|
||||
- **ChatDev** 是一家**虚拟软件公司**,通过各种不同角色的**智能体**运营,包括执行官、技术官、程序员、测试员等。这些智能体形成了一个多智能体组织结构,其使命是“通过编程改变数字世界”。ChatDev内的智能体通过参加专业的功能研讨会来**协作**,包括设计、编码、测试和文档编写等任务。
|
||||
- ChatDev的主要目标是提供一个基于大型语言模型(LLM)的**易于使用**、**高度可定制**并且**可扩展**的框架,它是研究群体智能的理想场景。
|
||||
|
||||
## 📰 新闻
|
||||
|
||||
- **2023年9月1日:Art模式现已可用!您可以使用智能体生成软件中使用的图像,尝试 `python3 run.py --config "Art"`。** 请参见此处的[示例](https://chat.openai.com/WareHouse/gomokugameArtExample_THUNLP_20230831122822)。
|
||||
- 2023年8月28日:系统已公开提供使用。
|
||||
- 2023年8月17日:V1.0.0版本已准备好发布。
|
||||
- 2023年7月30日:用户可以自定义ChatChain、Phase和Role设置。此外,现在支持在线Log模式和重放模式。
|
||||
- 2023年7月16日:与该项目相关的[预印本论文](https://arxiv.org/abs/2307.07924)已发表。
|
||||
- 2023年6月30日:发布了`ChatDev`仓库的初始版本。
|
||||
|
||||
## ❓ ChatDev能做什么?
|
||||
|
||||
![intro](misc/intro.png)
|
||||
|
||||
|
||||
|
||||
https://github.com/OpenBMB/ChatDev/assets/11889052/80d01d2f-677b-4399-ad8b-f7af9bb62b72
|
||||
|
||||
## ⚡️ 快速开始
|
||||
|
||||
要开始使用,按照以下步骤操作:
|
||||
|
||||
1. **克隆GitHub存储库:** 首先,使用以下命令克隆存储库:
|
||||
|
||||
```
|
||||
git clone https://github.com/OpenBMB/ChatDev.git
|
||||
```
|
||||
|
||||
2. **设置Python环境:** 确保您具有3.9或更高版本的Python环境。您可以使用以下命令创建并激活环境,可以将`ChatDev_conda_env`替换为您喜欢的环境名称:
|
||||
|
||||
```
|
||||
conda create -n ChatDev_conda_env python=3.9 -y
|
||||
conda activate ChatDev_conda_env
|
||||
```
|
||||
|
||||
3. **安装依赖项:** 进入`ChatDev`目录并运行以下命令来安装必要的依赖项:
|
||||
|
||||
```
|
||||
cd ChatDev
|
||||
pip3 install -r requirements.txt
|
||||
```
|
||||
|
||||
4. **设置OpenAI API密钥:** 将您的OpenAI API密钥导出为环境变量。将`"your_OpenAI_API_key"`替换为您的实际API密钥。请注意,此环境变量是特定于会话的,因此如果打开新的终端会话,您需要重新设置它。 在Unix/Linux系统上:
|
||||
|
||||
```
|
||||
export OPENAI_API_KEY="your_OpenAI_API_key"
|
||||
```
|
||||
|
||||
在Windows系统上:
|
||||
|
||||
```
|
||||
$env:OPENAI_API_KEY="your_OpenAI_API_key"
|
||||
```
|
||||
|
||||
5. **构建您的软件:** 使用以下命令启动生成您的软件,将`[description_of_your_idea]`替换为您的想法描述,将`[project_name]`替换为您想要的项目名称:
|
||||
|
||||
```
|
||||
python3 run.py --task "[description_of_your_idea]" --name "[project_name]"
|
||||
```
|
||||
|
||||
6. **运行您的软件:** 生成后,您可以在`WareHouse`目录下的特定项目文件夹中找到您的软件,例如`project_name_DefaultOrganization_timestamp`。在该目录中运行以下命令来运行您的软件:
|
||||
|
||||
```
|
||||
cd WareHouse/project_name_DefaultOrganization_timestamp
|
||||
python3 main.py
|
||||
```
|
||||
|
||||
## ✨️ 进阶技能
|
||||
|
||||
有关更详细的信息,请参阅我们的[Wiki](https://chat.openai.com/wiki.md),您可以在其中找到:
|
||||
|
||||
- 所有命令运行参数的介绍。
|
||||
- 一个简单的设置本地Web演示的指南,其中包括增强可视化日志、重放演示和简单的ChatChain可视化工具。
|
||||
- ChatDev框架的概述。
|
||||
- ChatChain配置中的所有高级参数的全面介绍。
|
||||
- 自定义ChatDev的指南,包括:
|
||||
- ChatChain:设计您自己的软件开发流程(或任何其他流程),例如`DemandAnalysis -> Coding -> Testing -> Manual`。
|
||||
- Phase:在ChatChain内部设计您自己的Phase,比如`DemandAnalysis`。
|
||||
- Role:定义您公司内的各种智能体,例如“首席执行官”。
|
||||
|
||||
## 🤗 分享您的软件!
|
||||
|
||||
**代码:** 我们对您参与我们的开源项目表示热情欢迎。如果您遇到任何问题,请不要犹豫报告它们。如果您准备与我们分享您的工作,随时创建pull request!您的贡献非常宝贵。如果您需要帮助,请联系我们!
|
||||
|
||||
**公司:** 创建自己定制的“ChatDev公司”非常简单。此个性化设置涉及三个简单的配置JSON文件。请查看`CompanyConfig/Default`目录中提供的示例。有关自定义的详细说明,请参阅我们的[Wiki](https://chat.openai.com/wiki.md)。
|
||||
|
||||
**软件:** 每当您使用ChatDev开发软件时,都会生成一个包含所有必要信息的相应文件夹。与我们分享您的工作就像创建一个pull request一样简单。这是一个示例:执行命令`python3 run.py --task "design a 2048 game" --name "2048" --org "THUNLP" --config "Default"`。这将创建一个软件包并生成一个名为`/WareHouse/2048_THUNLP_timestamp`的文件夹。其中包括:
|
||||
|
||||
- 所有与2048游戏软件相关的文件和文档
|
||||
- 负责此软件的公司的配置文件,包括`CompanyConfig/Default`中的三个JSON配置文件
|
||||
- 描述软件构建过程的详细日志,可用于重播(`timestamp.log`)
|
||||
- 用于创建此软件的初始提示(`2048.prompt`)
|
||||
|
||||
以下是由ChatDev创建的一些示例:
|
||||
|
||||
<table style="width:100%">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>贡献者</th>
|
||||
<th>软件</th>
|
||||
<th>截图</th>
|
||||
<th>状态</th>
|
||||
<th>基座</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td rowspan="4"><a href="https://github.com/qianc62" target="_blank" rel="noopener noreferrer">https://github.com/qianc62</a></td>
|
||||
<td><a href="WareHouse/Website_THUNLP_20230725154612" target="_blank" rel="noopener noreferrer">A simple website</a></td>
|
||||
<td><img src="misc/website.png" width="200px"></td>
|
||||
<td>Perfect</td>
|
||||
<td>GPT3.5</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><a href="WareHouse/FlappyBird_THUNLP_20230726121145" target="_blank" rel="noopener noreferrer">FlappyBirds Game</a></td>
|
||||
<td><img src="misc/flappy_bird.png" width="200px"></td>
|
||||
<td>Perfect</td>
|
||||
<td>GPT3.5</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><a href="WareHouse/Gomoku_THUNLP_20230625201030" target="_blank" rel="noopener noreferrer">A Gomoku Game</a></td>
|
||||
<td><img src="misc/gomoku.png" width="200px"></td>
|
||||
<td>Perfect</td>
|
||||
<td>GPT3.5</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><a href="WareHouse/Calculator_THUNLP_20230628184918" target="_blank" rel="noopener noreferrer">A calculator with bottom icons generated by Agents</a></td>
|
||||
<td><img src="misc/calc.jpg" width="200px"></td>
|
||||
<td>Perfect</td>
|
||||
<td>GPT3.5</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td rowspan="17"><a href="https://github.com/thinkwee" target="_blank" rel="noopener noreferrer">https://github.com/thinkwee</a></td>
|
||||
<td><a href="WareHouse/ArtCanvas_THUNLP_20230825093558" target="_blank" rel="noopener noreferrer">Painter</a></td>
|
||||
<td><img src="misc/paint.png" width="200px"></td>
|
||||
<td>Perfect</td>
|
||||
<td>GPT3.5</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><a href="WareHouse/pingpong_THUNLP_20230817193956" target="_blank" rel="noopener noreferrer">PingPong Game</a></td>
|
||||
<td><img src="misc/pingpong.jpg" width="200px"></td>
|
||||
<td>Biased</td>
|
||||
<td>GPT3.5</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><a href="WareHouse/PixelRunner_THUNLP_20230825072339" target="_blank" rel="noopener noreferrer">PixelRunner</a></td>
|
||||
<td><img src="misc/jump_game.png" width="200px"></td>
|
||||
<td>Runnable</td>
|
||||
<td>GPT3.5</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><a href="WareHouse/MoneyCtrl_THUNLP_20230825093546" target="_blank" rel="noopener noreferrer">BudgetControl</a></td>
|
||||
<td><img src="misc/budget.png" width="200px"></td>
|
||||
<td>Biased</td>
|
||||
<td>GPT3.5</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><a href="WareHouse/PixelCraft_THUNLP_20230825072340" target="_blank" rel="noopener noreferrer">PixelCraft</a></td>
|
||||
<td><img src="misc/pixel_art.png" width="200px"></td>
|
||||
<td>Runnable</td>
|
||||
<td>GPT3.5</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><a href="WareHouse/MazeGenerator_THUNLP_20230825093601" target="_blank" rel="noopener noreferrer">MazeGenerator</a></td>
|
||||
<td><img src="misc/maze_generator.png" width="200px"></td>
|
||||
<td>Perfect</td>
|
||||
<td>GPT3.5</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><a href="WareHouse/Matchy_Match_THUNLP_20230825101854" target="_blank" rel="noopener noreferrer">Matchy_Match</a></td>
|
||||
<td><img src="misc/memory_card_game.png" width="200px"></td>
|
||||
<td>Perfect</td>
|
||||
<td>GPT3.5</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><a href="WareHouse/PasswordGenerator_THUNLP_20230825072337" target="_blank" rel="noopener noreferrer">Password Generator</a></td>
|
||||
<td><img src="misc/password_generator.png" width="200px"></td>
|
||||
<td>Perfect</td>
|
||||
<td>GPT3.5</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><a href="WareHouse/ToDo_THUNLP_20230825072331" target="_blank" rel="noopener noreferrer">Todo</a></td>
|
||||
<td><img src="misc/todo.png" width="200px"></td>
|
||||
<td>Perfect</td>
|
||||
<td>GPT3.5</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><a href="WareHouse/ExpenseEase_THUNLP_20230825093604" target="_blank" rel="noopener noreferrer">Expensechart</a></td>
|
||||
<td><img src="misc/expense_visualizer.png" width="200px"></td>
|
||||
<td>Perfect</td>
|
||||
<td>GPT3.5</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><a href="WareHouse/2048_THUNLP_20230822144615" target="_blank" rel="noopener noreferrer">2048 Game</a></td>
|
||||
<td><img src="misc/2048.png" width="200px"></td>
|
||||
<td>Perfect</td>
|
||||
<td>GPT3.5</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><a href="WareHouse/WordExpand_THUNLP_20230825093623" target="_blank" rel="noopener noreferrer">WordExpand</a></td>
|
||||
<td><img src="misc/vocab.png" width="200px"></td>
|
||||
<td>Perfect</td>
|
||||
<td>GPT3.5</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><a href="WareHouse/Fish_Tycoon_THUNLP_20230825093543" target="_blank" rel="noopener noreferrer">Fish Tycoon</a></td>
|
||||
<td><img src="misc/aquarium.png" width="200px"></td>
|
||||
<td>Biased</td>
|
||||
<td>GPT3.5</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><a href="WareHouse/DigitalClock_THUNLP_20230825093556" target="_blank" rel="noopener noreferrer">Digital Clock</a></td>
|
||||
<td><img src="misc/clock.png" width="200px"></td>
|
||||
<td>Perfect</td>
|
||||
<td>GPT3.5</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><a href="WareHouse/CurrencyWiz_THUNLP_20230825101851" target="_blank" rel="noopener noreferrer">CurrencyWiz</a></td>
|
||||
<td><img src="misc/currency_converter.png" width="200px"></td>
|
||||
<td>Perfect</td>
|
||||
<td>GPT3.5</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><a href="WareHouse/DesignDream_THUNLP_20230825072340" target="_blank" rel="noopener noreferrer">Design Dream</a></td>
|
||||
<td><img src="misc/home_design.png" width="200px"></td>
|
||||
<td>Biased</td>
|
||||
<td>GPT3.5</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><a href="WareHouse/DiceRollingSimulator_THUNLP_20230825072338" target="_blank" rel="noopener noreferrer">DiceRollingSimulator</a></td>
|
||||
<td><img src="misc/dice.png" width="200px"></td>
|
||||
<td>Perfect</td>
|
||||
<td>GPT3.5</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td rowspan="6"><a href="https://github.com/NA-Wen" target="_blank" rel="noopener noreferrer">https://github.com/NA-Wen</a></td>
|
||||
<td><a href="WareHouse/md2html_THUNLP_md2html" target="_blank" rel="noopener noreferrer">md2html</a></td>
|
||||
<td><img src="misc/markdown2html.png" width="200px"></td>
|
||||
<td>Runnable</td>
|
||||
<td>GPT3.5</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><a href="WareHouse/Gomoku_THUNLP_20230625201030" target="_blank" rel="noopener noreferrer">A Gomoku Game with assets generated by Agent</a></td>
|
||||
<td><img src="misc/gomoku_art.png" width="200px"></td>
|
||||
<td>Perfect</td>
|
||||
<td>GPT4</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><a href="WareHouse/mspaint_THUNLP_20230821204606" target="_blank" rel="noopener noreferrer">MsPaint</a></td>
|
||||
<td><img src="misc/mspaint.png" width="200px"></td>
|
||||
<td>Runnable</td>
|
||||
<td>GPT3.5</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><a href="WareHouse/ImgEditor_THUNLP_20230824142740" target="_blank" rel="noopener noreferrer">Image Editor</a></td>
|
||||
<td><img src="misc/image_editor.png" width="200px"></td>
|
||||
<td>Perfect</td>
|
||||
<td>GPT3.5</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><a href="WareHouse/ArtCanvas_THUNLP_20230825093558" target="_blank" rel="noopener noreferrer">ArtCanvas</a></td>
|
||||
<td><img src="misc/paint.png" width="200px"></td>
|
||||
<td>Perfect</td>
|
||||
<td>GPT3.5</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><a href="WareHouse/TicTacToe_THUNLP_20230825093547" target="_blank" rel="noopener noreferrer">TicTacToe</a></td>
|
||||
<td><img src="misc/tictactoe.png" width="200px"></td>
|
||||
<td>Runnable</td>
|
||||
<td>GPT3.5</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td rowspan="5"><a href="https://github.com/lijiahao2022" target="_blank" rel="noopener noreferrer">https://github.com/lijiahao2022</a></td>
|
||||
<td><a href="WareHouse/musicplayer_THUNLP_20230824113404" target="_blank" rel="noopener noreferrer">Music Player</a></td>
|
||||
<td><img src="misc/music_player.png" width="200px"></td>
|
||||
<td>Perfect</td>
|
||||
<td>GPT4</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><a href="WareHouse/Typing_THUNLP_20230824105537" target="_blank" rel="noopener noreferrer">Typing Test</a></td>
|
||||
<td><img src="misc/typing_test.png" width="200px"></td>
|
||||
<td>Perfect</td>
|
||||
<td>GPT3.5</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><a href="WareHouse/videoplayer_THUNLP_20230824233151" target="_blank" rel="noopener noreferrer">Video Player</a></td>
|
||||
<td><img src="misc/video_player.png" width="200px"></td>
|
||||
<td>Runnable</td>
|
||||
<td>GPT3.5</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><a href="WareHouse/timer_THUNLP_20230823091709" target="_blank" rel="noopener noreferrer">Timer</a></td>
|
||||
<td><img src="misc/timer.png" width="200px"></td>
|
||||
<td>Perfect</td>
|
||||
<td>GPT3.5</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><a href="WareHouse/BookBreeze_THUNLP_20230825072339" target="_blank" rel="noopener noreferrer">BookBreeze</a></td>
|
||||
<td><img src="misc/ebook_reader.png" width="200px"></td>
|
||||
<td>Runnable</td>
|
||||
<td>GPT3.5</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
|
||||
## 📑 引用
|
||||
|
||||
```
|
||||
@misc{qian2023communicative,
|
||||
title={Communicative Agents for Software Development},
|
||||
author={Chen Qian and Xin Cong and Wei Liu and Cheng Yang and Weize Chen and Yusheng Su and Yufan Dang and Jiahao Li and Juyuan Xu and Dahai Li and Zhiyuan Liu and Maosong Sun},
|
||||
year={2023},
|
||||
eprint={2307.07924},
|
||||
archivePrefix={arXiv},
|
||||
primaryClass={cs.SE}
|
||||
}
|
||||
```
|
||||
|
||||
## ⚖️ 许可证
|
||||
|
||||
- ChatDev的使用仅限于研究目的。
|
||||
- 源代码采用Apache 2.0许可证授权。
|
||||
- 数据集采用CC BY NC 4.0许可证授权,仅允许非商业用途。请注意,使用这些数据集训练的任何模型不应用于研究以外的其他目的。
|
331
README.md
Normal file
@ -0,0 +1,331 @@
|
||||
# Communicative Agents for Software Development
|
||||
|
||||
<p align="center">
|
||||
<img src='./misc/logo1.png' width=600>
|
||||
</p>
|
||||
|
||||
<p align="center">
|
||||
【English | <a href="README-Chinese.md">Chinese</a>】
|
||||
</p>
|
||||
|
||||
## 📖 Overview
|
||||
|
||||
- **ChatDev** stands as a **virtual software company** that operates through various **intelligent agents** holding different roles, including Chief Executive Officer, Chief Technology Officer, Programmer, Tester, and more. These agents form a multi-agent organizational structure and are united by a mission to "revolutionize the digital world through programming." The agents within ChatDev **collaborate** by participating in specialized functional seminars, including tasks such as designing, coding, testing, and documenting.
|
||||
- The primary objective of ChatDev is to offer an **easy-to-use**, **highly customizable** and **extendable** framework, which is based on large language models (LLMs) and serves as an ideal scenario for studying collective intelligence.
|
||||
|
||||
|
||||
## 📰 News
|
||||
|
||||
* **September 1, 2023: The Art mode is available now! You can use agent to generate images used in the software, try ``python3 run.py --config "Art"``.** See [example](WareHouse/gomokugameArtExample_THUNLP_20230831122822) here.
|
||||
* August 28, 2023: The system is publicly available.
|
||||
* August 17, 2023: The V1.0.0 version was ready for release.
|
||||
* July 30, 2023: Users can customize ChatChain, Phase, and Role settings. Additionally, both online Log mode and replay mode are now supported.
|
||||
* July 16, 2023: The [preprint paper](https://arxiv.org/abs/2307.07924) associated with this project was published.
|
||||
* June 30, 2023: The initial version of the `ChatDev` repository was released.
|
||||
|
||||
|
||||
## ❓ What Can ChatDev Do?
|
||||
|
||||
![intro](misc/intro.png)
|
||||
|
||||
|
||||
|
||||
|
||||
https://github.com/OpenBMB/ChatDev/assets/11889052/80d01d2f-677b-4399-ad8b-f7af9bb62b72
|
||||
|
||||
|
||||
|
||||
|
||||
## ⚡️ Quickstart
|
||||
|
||||
To get started, follow these steps:
|
||||
|
||||
1. **Clone the GitHub Repository:** Begin by cloning the repository using the command:
|
||||
```
|
||||
git clone https://github.com/OpenBMB/ChatDev.git
|
||||
```
|
||||
2. **Set Up Python Environment:** Ensure you have a version 3.9 or higher Python environment. You can create and activate this environment using the following commands, replacing `ChatDev_conda_env` with your preferred environment name:
|
||||
```
|
||||
conda create -n ChatDev_conda_env python=3.9 -y
|
||||
conda activate ChatDev_conda_env
|
||||
```
|
||||
3. **Install Dependencies:** Move into the `ChatDev` directory and install the necessary dependencies by running:
|
||||
```
|
||||
cd ChatDev
|
||||
pip3 install -r requirements.txt
|
||||
```
|
||||
4. **Set OpenAI API Key:** Export your OpenAI API key as an environment variable. Replace `"your_OpenAI_API_key"` with your actual API key. Remember that this environment variable is session-specific, so you need to set it again if you open a new terminal session.
|
||||
On Unix/Linux:
|
||||
```
|
||||
export OPENAI_API_KEY="your_OpenAI_API_key"
|
||||
```
|
||||
On Windows:
|
||||
```
|
||||
$env:OPENAI_API_KEY="your_OpenAI_API_key"
|
||||
```
|
||||
5. **Build Your Software:** Use the following command to initiate the building of your software, replacing `[description_of_your_idea]` with your idea's description and `[project_name]` with your desired project name:
|
||||
```
|
||||
python3 run.py --task "[description_of_your_idea]" --name "[project_name]"
|
||||
```
|
||||
6. **Run Your Software:** Once generated, you can find your software in the `WareHouse` directory under a specific project folder, such as `project_name_DefaultOrganization_timestamp`. Run your software using the following command within that directory:
|
||||
```
|
||||
cd WareHouse/project_name_DefaultOrganization_timestamp
|
||||
python3 main.py
|
||||
```
|
||||
|
||||
## ✨️ Advanced Skills
|
||||
|
||||
For more detailed information, please refer to our [Wiki](wiki.md), where you can find:
|
||||
|
||||
- An introduction to all command run parameters.
|
||||
- A straightforward guide for setting up a local web demo, which includes enhanced visualized logs, a replay demo, and a simple ChatChain Visualizer.
|
||||
- An overview of the ChatDev framework.
|
||||
- A comprehensive introduction to all advanced parameters in ChatChain configuration.
|
||||
- Guides for customizing ChatDev, including:
|
||||
- ChatChain: Design your own software development process (or any other process), such as ``DemandAnalysis -> Coding -> Testing -> Manual``.
|
||||
- Phase: Design your own phase within ChatChain, like ``DemandAnalysis``.
|
||||
- Role: Defining the various agents in your company, such as the ``Chief Executive Officer``.
|
||||
|
||||
|
||||
## 🤗 Share Your Software!
|
||||
|
||||
**Code**: We are enthusiastic about your interest in participating in our open-source project. If you come across any problems, don't hesitate to report them. Feel free to create a pull request if you have any inquiries or if you are prepared to share your work with us! Your contributions are highly valued. Please let me know if there's anything else you need assistance!
|
||||
|
||||
**Company**: Creating your own customized "ChatDev Company" is a breeze. This personalized setup involves three simple configuration JSON files. Check out the example provided in the ``CompanyConfig/Default`` directory. For detailed instructions on customization, refer to our [Wiki](wiki.md).
|
||||
|
||||
**Software**: Whenever you develop software using ChatDev, a corresponding folder is generated containing all the essential information. Sharing your work with us is as simple as making a pull request. Here's an example: execute the command ``python3 run.py --task "design a 2048 game" --name "2048" --org "THUNLP" --config "Default"``. This will create a software package and generate a folder named ``/WareHouse/2048_THUNLP_timestamp``. Inside, you'll find:
|
||||
- All the files and documents related to the 2048 game software
|
||||
- Configuration files of the company responsible for this software, including the three JSON config files from ``CompanyConfig/Default``
|
||||
- A comprehensive log detailing the software's building process that can be used to replay (``timestamp.log``)
|
||||
- The initial prompt used to create this software (``2048.prompt``)
|
||||
|
||||
Here are some examples created by ChatDev:
|
||||
|
||||
<table style="width:100%">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Contributor</th>
|
||||
<th>Software</th>
|
||||
<th>ScreenShot</th>
|
||||
<th>Status</th>
|
||||
<th>LLM</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td rowspan="4"><a href="https://github.com/qianc62" target="_blank" rel="noopener noreferrer">https://github.com/qianc62</a></td>
|
||||
<td><a href="WareHouse/Website_THUNLP_20230725154612" target="_blank" rel="noopener noreferrer">A simple website</a></td>
|
||||
<td><img src="misc/website.png" width="200px"></td>
|
||||
<td>Perfect</td>
|
||||
<td>GPT3.5</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><a href="WareHouse/FlappyBird_THUNLP_20230726121145" target="_blank" rel="noopener noreferrer">FlappyBirds Game</a></td>
|
||||
<td><img src="misc/flappy_bird.png" width="200px"></td>
|
||||
<td>Perfect</td>
|
||||
<td>GPT3.5</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><a href="WareHouse/Gomoku_THUNLP_20230625201030" target="_blank" rel="noopener noreferrer">A Gomoku Game</a></td>
|
||||
<td><img src="misc/gomoku.png" width="200px"></td>
|
||||
<td>Perfect</td>
|
||||
<td>GPT3.5</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><a href="WareHouse/Calculator_THUNLP_20230628184918" target="_blank" rel="noopener noreferrer">A calculator with bottom icons generated by Agents</a></td>
|
||||
<td><img src="misc/calc.jpg" width="200px"></td>
|
||||
<td>Perfect</td>
|
||||
<td>GPT3.5</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td rowspan="17"><a href="https://github.com/thinkwee" target="_blank" rel="noopener noreferrer">https://github.com/thinkwee</a></td>
|
||||
<td><a href="WareHouse/ArtCanvas_THUNLP_20230825093558" target="_blank" rel="noopener noreferrer">Painter</a></td>
|
||||
<td><img src="misc/paint.png" width="200px"></td>
|
||||
<td>Perfect</td>
|
||||
<td>GPT3.5</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><a href="WareHouse/pingpong_THUNLP_20230817193956" target="_blank" rel="noopener noreferrer">PingPong Game</a></td>
|
||||
<td><img src="misc/pingpong.jpg" width="200px"></td>
|
||||
<td>Biased</td>
|
||||
<td>GPT3.5</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><a href="WareHouse/PixelRunner_THUNLP_20230825072339" target="_blank" rel="noopener noreferrer">PixelRunner</a></td>
|
||||
<td><img src="misc/jump_game.png" width="200px"></td>
|
||||
<td>Runnable</td>
|
||||
<td>GPT3.5</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><a href="WareHouse/MoneyCtrl_THUNLP_20230825093546" target="_blank" rel="noopener noreferrer">BudgetControl</a></td>
|
||||
<td><img src="misc/budget.png" width="200px"></td>
|
||||
<td>Biased</td>
|
||||
<td>GPT3.5</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><a href="WareHouse/PixelCraft_THUNLP_20230825072340" target="_blank" rel="noopener noreferrer">PixelCraft</a></td>
|
||||
<td><img src="misc/pixel_art.png" width="200px"></td>
|
||||
<td>Runnable</td>
|
||||
<td>GPT3.5</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><a href="WareHouse/MazeGenerator_THUNLP_20230825093601" target="_blank" rel="noopener noreferrer">MazeGenerator</a></td>
|
||||
<td><img src="misc/maze_generator.png" width="200px"></td>
|
||||
<td>Perfect</td>
|
||||
<td>GPT3.5</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><a href="WareHouse/Matchy_Match_THUNLP_20230825101854" target="_blank" rel="noopener noreferrer">Matchy_Match</a></td>
|
||||
<td><img src="misc/memory_card_game.png" width="200px"></td>
|
||||
<td>Perfect</td>
|
||||
<td>GPT3.5</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><a href="WareHouse/PasswordGenerator_THUNLP_20230825072337" target="_blank" rel="noopener noreferrer">Password Generator</a></td>
|
||||
<td><img src="misc/password_generator.png" width="200px"></td>
|
||||
<td>Perfect</td>
|
||||
<td>GPT3.5</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><a href="WareHouse/ToDo_THUNLP_20230825072331" target="_blank" rel="noopener noreferrer">Todo</a></td>
|
||||
<td><img src="misc/todo.png" width="200px"></td>
|
||||
<td>Perfect</td>
|
||||
<td>GPT3.5</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><a href="WareHouse/ExpenseEase_THUNLP_20230825093604" target="_blank" rel="noopener noreferrer">Expensechart</a></td>
|
||||
<td><img src="misc/expense_visualizer.png" width="200px"></td>
|
||||
<td>Perfect</td>
|
||||
<td>GPT3.5</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><a href="WareHouse/2048_THUNLP_20230822144615" target="_blank" rel="noopener noreferrer">2048 Game</a></td>
|
||||
<td><img src="misc/2048.png" width="200px"></td>
|
||||
<td>Perfect</td>
|
||||
<td>GPT3.5</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><a href="WareHouse/WordExpand_THUNLP_20230825093623" target="_blank" rel="noopener noreferrer">WordExpand</a></td>
|
||||
<td><img src="misc/vocab.png" width="200px"></td>
|
||||
<td>Perfect</td>
|
||||
<td>GPT3.5</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><a href="WareHouse/Fish_Tycoon_THUNLP_20230825093543" target="_blank" rel="noopener noreferrer">Fish Tycoon</a></td>
|
||||
<td><img src="misc/aquarium.png" width="200px"></td>
|
||||
<td>Biased</td>
|
||||
<td>GPT3.5</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><a href="WareHouse/DigitalClock_THUNLP_20230825093556" target="_blank" rel="noopener noreferrer">Digital Clock</a></td>
|
||||
<td><img src="misc/clock.png" width="200px"></td>
|
||||
<td>Perfect</td>
|
||||
<td>GPT3.5</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><a href="WareHouse/CurrencyWiz_THUNLP_20230825101851" target="_blank" rel="noopener noreferrer">CurrencyWiz</a></td>
|
||||
<td><img src="misc/currency_converter.png" width="200px"></td>
|
||||
<td>Perfect</td>
|
||||
<td>GPT3.5</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><a href="WareHouse/DesignDream_THUNLP_20230825072340" target="_blank" rel="noopener noreferrer">Design Dream</a></td>
|
||||
<td><img src="misc/home_design.png" width="200px"></td>
|
||||
<td>Biased</td>
|
||||
<td>GPT3.5</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><a href="WareHouse/DiceRollingSimulator_THUNLP_20230825072338" target="_blank" rel="noopener noreferrer">DiceRollingSimulator</a></td>
|
||||
<td><img src="misc/dice.png" width="200px"></td>
|
||||
<td>Perfect</td>
|
||||
<td>GPT3.5</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td rowspan="6"><a href="https://github.com/NA-Wen" target="_blank" rel="noopener noreferrer">https://github.com/NA-Wen</a></td>
|
||||
<td><a href="WareHouse/md2html_THUNLP_md2html" target="_blank" rel="noopener noreferrer">md2html</a></td>
|
||||
<td><img src="misc/markdown2html.png" width="200px"></td>
|
||||
<td>Runnable</td>
|
||||
<td>GPT3.5</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><a href="WareHouse/Gomoku_THUNLP_20230625201030" target="_blank" rel="noopener noreferrer">A Gomoku Game with assets generated by Agent</a></td>
|
||||
<td><img src="misc/gomoku_art.png" width="200px"></td>
|
||||
<td>Perfect</td>
|
||||
<td>GPT4</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><a href="WareHouse/mspaint_THUNLP_20230821204606" target="_blank" rel="noopener noreferrer">MsPaint</a></td>
|
||||
<td><img src="misc/mspaint.png" width="200px"></td>
|
||||
<td>Runnable</td>
|
||||
<td>GPT3.5</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><a href="WareHouse/ImgEditor_THUNLP_20230824142740" target="_blank" rel="noopener noreferrer">Image Editor</a></td>
|
||||
<td><img src="misc/image_editor.png" width="200px"></td>
|
||||
<td>Perfect</td>
|
||||
<td>GPT3.5</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><a href="WareHouse/ArtCanvas_THUNLP_20230825093558" target="_blank" rel="noopener noreferrer">ArtCanvas</a></td>
|
||||
<td><img src="misc/paint.png" width="200px"></td>
|
||||
<td>Perfect</td>
|
||||
<td>GPT3.5</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><a href="WareHouse/TicTacToe_THUNLP_20230825093547" target="_blank" rel="noopener noreferrer">TicTacToe</a></td>
|
||||
<td><img src="misc/tictactoe.png" width="200px"></td>
|
||||
<td>Runnable</td>
|
||||
<td>GPT3.5</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td rowspan="5"><a href="https://github.com/lijiahao2022" target="_blank" rel="noopener noreferrer">https://github.com/lijiahao2022</a></td>
|
||||
<td><a href="WareHouse/musicplayer_THUNLP_20230824113404" target="_blank" rel="noopener noreferrer">Music Player</a></td>
|
||||
<td><img src="misc/music_player.png" width="200px"></td>
|
||||
<td>Perfect</td>
|
||||
<td>GPT4</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><a href="WareHouse/Typing_THUNLP_20230824105537" target="_blank" rel="noopener noreferrer">Typing Test</a></td>
|
||||
<td><img src="misc/typing_test.png" width="200px"></td>
|
||||
<td>Perfect</td>
|
||||
<td>GPT3.5</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><a href="WareHouse/videoplayer_THUNLP_20230824233151" target="_blank" rel="noopener noreferrer">Video Player</a></td>
|
||||
<td><img src="misc/video_player.png" width="200px"></td>
|
||||
<td>Runnable</td>
|
||||
<td>GPT3.5</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><a href="WareHouse/timer_THUNLP_20230823091709" target="_blank" rel="noopener noreferrer">Timer</a></td>
|
||||
<td><img src="misc/timer.png" width="200px"></td>
|
||||
<td>Perfect</td>
|
||||
<td>GPT3.5</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><a href="WareHouse/BookBreeze_THUNLP_20230825072339" target="_blank" rel="noopener noreferrer">BookBreeze</a></td>
|
||||
<td><img src="misc/ebook_reader.png" width="200px"></td>
|
||||
<td>Runnable</td>
|
||||
<td>GPT3.5</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
## 📑 Citation
|
||||
|
||||
```
|
||||
@misc{qian2023communicative,
|
||||
title={Communicative Agents for Software Development},
|
||||
author={Chen Qian and Xin Cong and Wei Liu and Cheng Yang and Weize Chen and Yusheng Su and Yufan Dang and Jiahao Li and Juyuan Xu and Dahai Li and Zhiyuan Liu and Maosong Sun},
|
||||
year={2023},
|
||||
eprint={2307.07924},
|
||||
archivePrefix={arXiv},
|
||||
primaryClass={cs.SE}
|
||||
}
|
||||
```
|
||||
|
||||
## ⚖️ License
|
||||
|
||||
- The purpose of ChatDev is exclusively for research purposes.
|
||||
- The source code is licensed under Apache 2.0.
|
||||
- The datasets are licensed under CC BY NC 4.0, which allows for non-commercial use only. It is important to note that any models trained using these datasets should not be employed for purposes other than research.
|
7874
WareHouse/2048_THUNLP_20230822144615/20230822144615.log
Normal file
1
WareHouse/2048_THUNLP_20230822144615/2048.prompt
Normal file
@ -0,0 +1 @@
|
||||
Design a simple 2048 game with 10*10 grids
|
101
WareHouse/2048_THUNLP_20230822144615/ChatChainConfig.json
Normal file
@ -0,0 +1,101 @@
|
||||
{
|
||||
"chain": [
|
||||
{
|
||||
"phase": "DemandAnalysis",
|
||||
"phaseType": "SimplePhase",
|
||||
"max_turn_step": 2,
|
||||
"need_reflect": "True"
|
||||
},
|
||||
{
|
||||
"phase": "LanguageChoose",
|
||||
"phaseType": "SimplePhase",
|
||||
"max_turn_step": 2,
|
||||
"need_reflect": "True"
|
||||
},
|
||||
{
|
||||
"phase": "Coding",
|
||||
"phaseType": "SimplePhase",
|
||||
"max_turn_step": 1,
|
||||
"need_reflect": "False"
|
||||
},
|
||||
{
|
||||
"phase": "CodeCompleteAll",
|
||||
"phaseType": "ComposedPhase",
|
||||
"cycleNum": 20,
|
||||
"Composition": [
|
||||
{
|
||||
"phase": "CodeComplete",
|
||||
"phaseType": "SimplePhase",
|
||||
"max_turn_step": 1,
|
||||
"need_reflect": "False"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"phase": "CodeReview",
|
||||
"phaseType": "ComposedPhase",
|
||||
"cycleNum": 5,
|
||||
"Composition": [
|
||||
{
|
||||
"phase": "CodeReviewComment",
|
||||
"phaseType": "SimplePhase",
|
||||
"max_turn_step": -1,
|
||||
"need_reflect": "False"
|
||||
},
|
||||
{
|
||||
"phase": "CodeReviewModification",
|
||||
"phaseType": "SimplePhase",
|
||||
"max_turn_step": -1,
|
||||
"need_reflect": "False"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"phase": "Test",
|
||||
"phaseType": "ComposedPhase",
|
||||
"cycleNum": 5,
|
||||
"Composition": [
|
||||
{
|
||||
"phase": "TestErrorSummary",
|
||||
"phaseType": "SimplePhase",
|
||||
"max_turn_step": -1,
|
||||
"need_reflect": "False"
|
||||
},
|
||||
{
|
||||
"phase": "TestModification",
|
||||
"phaseType": "SimplePhase",
|
||||
"max_turn_step": -1,
|
||||
"need_reflect": "False"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"phase": "EnvironmentDoc",
|
||||
"phaseType": "SimplePhase",
|
||||
"max_turn_step": 1,
|
||||
"need_reflect": "True"
|
||||
},
|
||||
{
|
||||
"phase": "Manual",
|
||||
"phaseType": "SimplePhase",
|
||||
"max_turn_step": 1,
|
||||
"need_reflect": "False"
|
||||
}
|
||||
],
|
||||
"recruitments": [
|
||||
"Chief Executive Officer",
|
||||
"Counselor",
|
||||
"Chief Human Resource Officer",
|
||||
"Chief Product Officer",
|
||||
"Chief Technology Officer",
|
||||
"Programmer",
|
||||
"Code Reviewer",
|
||||
"Software Test Engineer",
|
||||
"Chief Creative Officer"
|
||||
],
|
||||
"clear_structure": "True",
|
||||
"brainstorming": "False",
|
||||
"gui_design": "True",
|
||||
"git_management": "False",
|
||||
"self_improve": "True"
|
||||
}
|
302
WareHouse/2048_THUNLP_20230822144615/PhaseConfig.json
Normal file
@ -0,0 +1,302 @@
|
||||
{
|
||||
"DemandAnalysis": {
|
||||
"assistant_role_name": "Chief Product Officer",
|
||||
"user_role_name": "Chief Executive Officer",
|
||||
"phase_prompt": [
|
||||
"ChatDev has made products in the following form before:",
|
||||
"Image: can present information in line chart, bar chart, flow chart, cloud chart, Gantt chart, etc.",
|
||||
"Document: can present information via .docx files.",
|
||||
"PowerPoint: can present information via .pptx files.",
|
||||
"Excel: can present information via .xlsx files.",
|
||||
"PDF: can present information via .pdf files.",
|
||||
"Website: can present personal resume, tutorial, products, or ideas, via .html files.",
|
||||
"Application: can implement visualized game, software, tool, etc, via python.",
|
||||
"Dashboard: can display a panel visualizing real-time information.",
|
||||
"Mind Map: can represent ideas, with related concepts arranged around a core concept.",
|
||||
"As the {assistant_role}, to satisfy the new user's demand and the product should be realizable, you should keep discussing with me to decide which product modality do we want the product to be?",
|
||||
"Note that we must ONLY discuss the product modality and do not discuss anything else! Once we all have expressed our opinion(s) and agree with the results of the discussion unanimously, any of us must actively terminate the discussion by replying with only one line, which starts with a single word <INFO>, followed by our final product modality without any other words, e.g., \"<INFO> PowerPoint\"."
|
||||
]
|
||||
},
|
||||
"LanguageChoose": {
|
||||
"assistant_role_name": "Chief Technology Officer",
|
||||
"user_role_name": "Chief Executive Officer",
|
||||
"phase_prompt": [
|
||||
"According to the new user's task and some creative brainstorm ideas listed below: ",
|
||||
"Task: \"{task}\".",
|
||||
"Modality: \"{modality}\".",
|
||||
"Ideas: \"{ideas}\".",
|
||||
"We have decided to complete the task through a executable software implemented via a programming language. ",
|
||||
"As the {assistant_role}, to satisfy the new user's demand and make the software realizable, you should propose a concrete programming language. If python can complete this task via Python, please answer Python; otherwise, answer another programming language (e.g., Java, C++, etc,).",
|
||||
"Note that we must ONLY discuss the target programming language and do not discuss anything else! Once we all have expressed our opinion(s) and agree with the results of the discussion unanimously, any of us must actively terminate the discussion and conclude the best programming language we have discussed without any other words or reasons, return only one line using the format: \"<INFO> *\" where \"*\" represents a programming language."
|
||||
]
|
||||
},
|
||||
"Coding": {
|
||||
"assistant_role_name": "Programmer",
|
||||
"user_role_name": "Chief Technology Officer",
|
||||
"phase_prompt": [
|
||||
"According to the new user's task and our software designs listed below: ",
|
||||
"Task: \"{task}\".",
|
||||
"Modality: \"{modality}\".",
|
||||
"Programming Language: \"{language}\"",
|
||||
"Ideas:\"{ideas}\"",
|
||||
"We have decided to complete the task through a executable software with multiple files implemented via {language}. As the {assistant_role}, to satisfy the new user's demands, you should write one or multiple files and make sure that every detail of the architecture is, in the end, implemented as code. {gui}",
|
||||
"Think step by step and reason yourself to the right decisions to make sure we get it right.",
|
||||
"You will first lay out the names of the core classes, functions, methods that will be necessary, as well as a quick comment on their purpose.",
|
||||
"Then you will output the content of each file including complete code. Each file must strictly follow a markdown code block format, where the following tokens must be replaced such that \"FILENAME\" is the lowercase file name including the file extension, \"LANGUAGE\" in the programming language, \"DOCSTRING\" is a string literal specified in source code that is used to document a specific segment of code, and \"CODE\" is the original code:",
|
||||
"------",
|
||||
"FILENAME",
|
||||
"```LANGUAGE",
|
||||
"'''",
|
||||
"DOCSTRING",
|
||||
"'''",
|
||||
"CODE",
|
||||
"```",
|
||||
"------",
|
||||
"You will start with the \"main\" file, then go to the ones that are imported by that file, and so on.",
|
||||
"Please note that the code should be fully functional. Ensure to implement all functions. No placeholders (such as 'pass' in Python)."
|
||||
]
|
||||
},
|
||||
"ArtDesign": {
|
||||
"assistant_role_name": "Programmer",
|
||||
"user_role_name": "Chief Creative Officer",
|
||||
"phase_prompt": [
|
||||
"Our developed source codes and corresponding test reports are listed below: ",
|
||||
"Task: \"{task}\".",
|
||||
"Programming Language: \"{language}\"",
|
||||
"Source Codes:",
|
||||
"\"{codes}\"",
|
||||
"Note that each file must strictly follow a markdown code block format, where the following tokens must be replaced such that \"FILENAME\" is the lowercase file name including the file extension, \"LANGUAGE\" in the programming language, \"DOCSTRING\" is a string literal specified in source code that is used to document a specific segment of code, and \"CODE\" is the original code:",
|
||||
"FILENAME",
|
||||
"```LANGUAGE",
|
||||
"'''",
|
||||
"DOCSTRING",
|
||||
"'''",
|
||||
"CODE",
|
||||
"```",
|
||||
"As the {assistant_role}, to satisfy the new user's demand and equip the software with a beautiful graphical user interface (GUI), we will discuss and design many decorative images for GUI decoration. Now, we keep discussing the GUI beautification by listing some functionally independent elements in GUI that are being considered to be decorated by different pictures. For example, ten digits (0-9) in a calculator are functionally independent.",
|
||||
"To answer, use the format: \" FILENAME.png: DESCRIPTION\" where \"FILENAME\" is the filename of the image and \"DESCRIPTION\" denotes the detailed description of the independent elements. For example:",
|
||||
"'''",
|
||||
"button_1.png: The button with the number \"1\" on it.",
|
||||
"button_multiply.png: The button with the multiplication symbol (\"*\") on it.",
|
||||
"background.png: the background color to decorate the Go game",
|
||||
"'''",
|
||||
"Now, we keep discussing the to-be-decorated elements in the GUI and list all functionally independent elements as much as possible. If no further elements that are functionally independent or that should be further described, return only one line like \"<INFO> Finished\" in your reply."
|
||||
]
|
||||
},
|
||||
"ArtIntegration": {
|
||||
"assistant_role_name": "Programmer",
|
||||
"user_role_name": "Chief Creative Officer",
|
||||
"phase_prompt": [
|
||||
"Our developed source codes and corresponding test reports are listed below: ",
|
||||
"Task: \"{task}\".",
|
||||
"Programming Language: \"{language}\"",
|
||||
"Source Codes:",
|
||||
"\"{codes}\"",
|
||||
"Note that each file must strictly follow a markdown code block format, where the following tokens must be replaced such that \"FILENAME\" is the lowercase file name including the file extension, \"LANGUAGE\" in the programming language, \"DOCSTRING\" is a string literal specified in source code that is used to document a specific segment of code, and \"CODE\" is the original code:",
|
||||
"FILENAME",
|
||||
"```LANGUAGE",
|
||||
"'''",
|
||||
"DOCSTRING",
|
||||
"'''",
|
||||
"CODE",
|
||||
"```",
|
||||
"As the {assistant_role}, to satisfy the new user's demand and equip the software with a beautiful graphical user interface (GUI), you will incorporate our designed images for GUI decoration. Here are some ready-made high-quality pictures and corresponding descriptions:",
|
||||
"{images}",
|
||||
"Note that the designed images have a fixed size of 256x256 pixels and the images are located in the same directory as all the Python files; please dynamically scaling these images according to the size of GUI, and use \"self.*\" to avoid displaying-related problems caused by automatic garbage collection. For example:",
|
||||
"```",
|
||||
"self.image = ImageTk.PhotoImage(Image.open(\"./image.png\").resize((50, 50)))",
|
||||
"```",
|
||||
"Now, use some or all of the pictures into the GUI to make it more beautiful and creative. Output codes strictly following the required format mentioned above."
|
||||
]
|
||||
},
|
||||
"CodeComplete": {
|
||||
"assistant_role_name": "Programmer",
|
||||
"user_role_name": "Chief Technology Officer",
|
||||
"phase_prompt": [
|
||||
"According to the new user's task and our software designs listed below: ",
|
||||
"Task: \"{task}\".",
|
||||
"Modality: \"{modality}\".",
|
||||
"Programming Language: \"{language}\"",
|
||||
"Codes:",
|
||||
"\"{codes}\"",
|
||||
"Unimplemented File:",
|
||||
"\"{unimplemented_file}\"",
|
||||
"In our software, each file must strictly follow a markdown code block format, where the following tokens must be replaced such that \"FILENAME\" is the lowercase file name including the file extension, \"LANGUAGE\" in the programming language, \"DOCSTRING\" is a string literal specified in source code that is used to document a specific segment of code, and \"CODE\" is the original code:",
|
||||
"FILENAME",
|
||||
"```LANGUAGE",
|
||||
"'''",
|
||||
"DOCSTRING",
|
||||
"'''",
|
||||
"CODE",
|
||||
"```",
|
||||
"As the {assistant_role}, to satisfy the complete function of our developed software, you have to implement all methods in the {unimplemented_file} file which contains a unimplemented class. Now, implement all methods of the {unimplemented_file} and then output the implemented codes, strictly following the required format."
|
||||
]
|
||||
},
|
||||
"CodeReviewComment": {
|
||||
"assistant_role_name": "Code Reviewer",
|
||||
"user_role_name": "Programmer",
|
||||
"phase_prompt": [
|
||||
"According to the new user's task and our software designs: ",
|
||||
"Task: \"{task}\".",
|
||||
"Modality: \"{modality}\".",
|
||||
"Programming Language: \"{language}\"",
|
||||
"Ideas: \"{ideas}\"",
|
||||
"Codes:",
|
||||
"\"{codes}\"",
|
||||
"As the {assistant_role}, to make the software directly operable without further coding, ChatDev have formulated the following regulations:",
|
||||
"1) all referenced classes should be imported;",
|
||||
"2) all methods should be implemented;",
|
||||
"3) all methods need to have the necessary comments;",
|
||||
"4) no potential bugs;",
|
||||
"Now, you should review the codes in detail, propose one comment with the highest priority about the codes, and give me instructions on how to fix.",
|
||||
"Now, tell me your comment with the highest priority and corresponding suggestions on revision. If the codes are perfect and you have no comment on them, return only one line like \"<INFO> Finished\"."
|
||||
]
|
||||
},
|
||||
"CodeReviewModification": {
|
||||
"assistant_role_name": "Code Reviewer",
|
||||
"user_role_name": "Programmer",
|
||||
"phase_prompt": [
|
||||
"According to the new user's task, our designed product modality, languages and ideas, our developed first-edition source codes are listed below: ",
|
||||
"Task: \"{task}\".",
|
||||
"Modality: \"{modality}\".",
|
||||
"Programming Language: \"{language}\"",
|
||||
"Ideas: \"{ideas}\"",
|
||||
"Codes: ",
|
||||
"\"{codes}\"",
|
||||
"Comments on Codes:",
|
||||
"\"{comments}\"",
|
||||
"In the software, each file must strictly follow a markdown code block format, where the following tokens must be replaced such that \"FILENAME\" is the lowercase file name including the file extension, \"LANGUAGE\" in the programming language, \"DOCSTRING\" is a string literal specified in source code that is used to document a specific segment of code, and \"CODE\" is the original code. Format:",
|
||||
"FILENAME",
|
||||
"```LANGUAGE",
|
||||
"'''",
|
||||
"DOCSTRING",
|
||||
"'''",
|
||||
"CODE",
|
||||
"```",
|
||||
"As the {assistant_role}, to satisfy the new user's demand and make the software creative, executive and robust, you should modify corresponding codes according to the comments. Then, output the fixed codes strictly following the required format."
|
||||
]
|
||||
},
|
||||
"CodeReviewHuman": {
|
||||
"assistant_role_name": "Programmer",
|
||||
"user_role_name": "Code Reviewer",
|
||||
"phase_prompt": [
|
||||
"According to the new user's task, our designed product modality and three creative ideas, our developed first-edition source codes are listed below: ",
|
||||
"Task: \"{task}\".",
|
||||
"Modality: \"{modality}\".",
|
||||
"Programming Language: \"{language}\"",
|
||||
"Ideas: \"{ideas}\"",
|
||||
"Codes: ",
|
||||
"\"{codes}\"",
|
||||
"Comments on Codes:",
|
||||
"\"{comments}\"",
|
||||
"In the software, each file must strictly follow a markdown code block format, where the following tokens must be replaced such that \"FILENAME\" is the lowercase file name including the file extension, \"LANGUAGE\" in the programming language, \"DOCSTRING\" is a string literal specified in source code that is used to document a specific segment of code, and \"CODE\" is the original code. Format:",
|
||||
"FILENAME",
|
||||
"```LANGUAGE",
|
||||
"'''",
|
||||
"DOCSTRING",
|
||||
"'''",
|
||||
"CODE",
|
||||
"```",
|
||||
"As the {assistant_role}, to satisfy the new user's demand and make the software creative, executive and robust, you should modify corresponding codes according to the comments. Then, output the fixed codes strictly following the required format."
|
||||
]
|
||||
},
|
||||
"TestErrorSummary": {
|
||||
"assistant_role_name": "Programmer",
|
||||
"user_role_name": "Software Test Engineer",
|
||||
"phase_prompt": [
|
||||
"Our developed source codes and corresponding test reports are listed below: ",
|
||||
"Programming Language: \"{language}\"",
|
||||
"Source Codes:",
|
||||
"\"{codes}\"",
|
||||
"Test Reports of Source Codes:",
|
||||
"\"{test_reports}\"",
|
||||
"According to my test reports, please locate and summarize the bugs that cause the problem."
|
||||
]
|
||||
},
|
||||
"TestModification": {
|
||||
"assistant_role_name": "Programmer",
|
||||
"user_role_name": "Software Test Engineer",
|
||||
"phase_prompt": [
|
||||
"Our developed source codes and corresponding test reports are listed below: ",
|
||||
"Programming Language: \"{language}\"",
|
||||
"Source Codes:",
|
||||
"\"{codes}\"",
|
||||
"Test Reports of Source Codes:",
|
||||
"\"{test_reports}\"",
|
||||
"Error Summary of Test Reports:",
|
||||
"\"{error_summary}\"",
|
||||
"Note that each file must strictly follow a markdown code block format, where the following tokens must be replaced such that \"FILENAME\" is the lowercase file name including the file extension, \"LANGUAGE\" in the programming language, \"DOCSTRING\" is a string literal specified in source code that is used to document a specific segment of code, and \"CODE\" is the original code:",
|
||||
"FILENAME",
|
||||
"```LANGUAGE",
|
||||
"'''",
|
||||
"DOCSTRING",
|
||||
"'''",
|
||||
"CODE",
|
||||
"```",
|
||||
"As the {assistant_role}, to satisfy the new user's demand and make the software execute smoothly and robustly, you should modify the codes based on the error summary. Now, use the format exemplified above and modify the problematic codes based on the error summary. Output the codes that you fixed based on the test reported and corresponding explanations (strictly follow the format defined above, including FILENAME, LANGUAGE, DOCSTRING and CODE; incomplete \"TODO\" codes are strictly prohibited). If no bugs are reported, please return only one line like \"<INFO> Finished\"."
|
||||
]
|
||||
},
|
||||
"EnvironmentDoc": {
|
||||
"assistant_role_name": "Programmer",
|
||||
"user_role_name": "Chief Technology Officer",
|
||||
"phase_prompt": [
|
||||
"The new user's task and our developed codes are listed: ",
|
||||
"Task: \"{task}\".",
|
||||
"Modality: \"{modality}\".",
|
||||
"Programming Language: \"{language}\"",
|
||||
"Ideas: \"{ideas}\"",
|
||||
"Codes: ",
|
||||
"\"{codes}\"",
|
||||
"As the {assistant_role}, you should write a requirements.txt file, which is commonly used in Python projects to specify the dependencies or packages required for the project to run properly. It serves as a way to document and manage the project's dependencies in a standardized format. For example:",
|
||||
"requirements.txt",
|
||||
"```",
|
||||
"numpy==1.19.2",
|
||||
"pandas>=1.1.4",
|
||||
"```",
|
||||
"According to the codes and file format listed above, write a requirements.txt file to specify the dependencies or packages required for the project to run properly."
|
||||
]
|
||||
},
|
||||
"Manual": {
|
||||
"assistant_role_name": "Chief Product Officer",
|
||||
"user_role_name": "Chief Executive Officer",
|
||||
"phase_prompt": [
|
||||
"The new user's task, our developed codes and required dependencies are listed: ",
|
||||
"Task: \"{task}\".",
|
||||
"Modality: \"{modality}\".",
|
||||
"Programming Language: \"{language}\"",
|
||||
"Ideas: \"{ideas}\"",
|
||||
"Codes: ",
|
||||
"\"{codes}\"",
|
||||
"Requirements:",
|
||||
"\"{requirements}\"",
|
||||
"As the {assistant_role}, by using Markdown, you should write a manual.md file which is a detailed user manual to use the software, including introducing main functions of the software, how to install environment dependencies and how to use/play it. For example:",
|
||||
"manual.md",
|
||||
"```",
|
||||
"# LangChain",
|
||||
"Building applications with LLMs through composability",
|
||||
"Looking for the JS/TS version? Check out LangChain.js.",
|
||||
"**Production Support:** As you move your LangChains into production, we'd love to offer more comprehensive support.",
|
||||
"Please fill out this form and we'll set up a dedicated support Slack channel.",
|
||||
"## Quick Install",
|
||||
"`pip install langchain`",
|
||||
"or",
|
||||
"`conda install langchain -c conda-forge`",
|
||||
"## 🤔 What is this?",
|
||||
"Large language models (LLMs) are emerging as a transformative technology, enabling developers to build applications that they previously could not. However, using these LLMs in isolation is often insufficient for creating a truly powerful app - the real power comes when you can combine them with other sources of computation or knowledge.",
|
||||
"This library aims to assist in the development of those types of applications. Common examples of these applications include:",
|
||||
"**❓ Question Answering over specific documents**",
|
||||
"- Documentation",
|
||||
"- End-to-end Example: Question Answering over Notion Database",
|
||||
"**🤖 Agents**",
|
||||
"- Documentation",
|
||||
"- End-to-end Example: GPT+WolframAlpha",
|
||||
"## 📖 Documentation",
|
||||
"Please see [here](https://python.langchain.com) for full documentation on:",
|
||||
"- Getting started (installation, setting up the environment, simple examples)",
|
||||
"- How-To examples (demos, integrations, helper functions)",
|
||||
"- Reference (full API docs)",
|
||||
"- Resources (high-level explanation of core concepts)",
|
||||
"```"
|
||||
]
|
||||
}
|
||||
}
|
65
WareHouse/2048_THUNLP_20230822144615/RoleConfig.json
Normal file
@ -0,0 +1,65 @@
|
||||
{
|
||||
"Chief Executive Officer": [
|
||||
"{chatdev_prompt}",
|
||||
"You are Chief Executive Officer. Now, we are both working at ChatDev and we share a common interest in collaborating to successfully complete a task assigned by a new customer.",
|
||||
"Your main responsibilities include being an active decision-maker on users' demands and other key policy issues, leader, manager, and executor. Your decision-making role involves high-level decisions about policy and strategy; and your communicator role can involve speaking to the organization's management and employees.",
|
||||
"Here is a new customer's task: {task}.",
|
||||
"To complete the task, I will give you one or more instructions, and you must help me to write a specific solution that appropriately solves the requested instruction based on your expertise and my needs."
|
||||
],
|
||||
"Chief Product Officer": [
|
||||
"{chatdev_prompt}",
|
||||
"You are Chief Product Officer. we are both working at ChatDev. We share a common interest in collaborating to successfully complete a task assigned by a new customer.",
|
||||
"You are responsible for all product-related matters in ChatDev. Usually includes product design, product strategy, product vision, product innovation, project management and product marketing.",
|
||||
"Here is a new customer's task: {task}.",
|
||||
"To complete the task, you must write a response that appropriately solves the requested instruction based on your expertise and customer's needs."
|
||||
],
|
||||
"Counselor": [
|
||||
"{chatdev_prompt}",
|
||||
"You are Counselor. Now, we share a common interest in collaborating to successfully complete a task assigned by a new customer.",
|
||||
"Your main responsibilities include asking what user and customer think and provide your valuable suggestions. ",
|
||||
"Here is a new customer's task: {task}.",
|
||||
"To complete the task, I will give you one or more instructions, and you must help me to write a specific solution that appropriately solves the requested instruction based on your expertise and my needs."
|
||||
],
|
||||
"Chief Technology Officer": [
|
||||
"{chatdev_prompt}",
|
||||
"You are Chief Technology Officer. we are both working at ChatDev. We share a common interest in collaborating to successfully complete a task assigned by a new customer.",
|
||||
"You are very familiar to information technology. You will make high-level decisions for the overarching technology infrastructure that closely align with the organization's goals, while you work alongside the organization's information technology (\"IT\") staff members to perform everyday operations.",
|
||||
"Here is a new customer's task: {task}.",
|
||||
"To complete the task, You must write a response that appropriately solves the requested instruction based on your expertise and customer's needs."
|
||||
],
|
||||
"Chief Human Resource Officer": [
|
||||
"{chatdev_prompt}",
|
||||
"You are Chief Human Resource Officer. Now, we are both working at ChatDev and we share a common interest in collaborating to successfully complete a task assigned by a new customer.",
|
||||
"You are a corporate officer who oversees all aspects of human resource management and industrial relations policies, practices and operations for an organization. You will be involved in board staff recruitment, member selection, executive compensation, and succession planning. Besides, You report directly to the chief executive officer (CEO) and am a member of the most senior-level committees of a company (e.g., executive committee or office of CEO).",
|
||||
"Here is a new customer's task: {task}.",
|
||||
"To complete the task, you must write a response that appropriately solves the requested instruction based on your expertise and customer's needs."
|
||||
],
|
||||
"Programmer": [
|
||||
"{chatdev_prompt}",
|
||||
"You are Programmer. we are both working at ChatDev. We share a common interest in collaborating to successfully complete a task assigned by a new customer.",
|
||||
"You can write/create computer software or applications by providing a specific programming language to the computer. You have extensive computing and coding experience in many varieties of programming languages and platforms, such as Python, Java, C, C++, HTML, CSS, JavaScript, XML, SQL, PHP, etc,.",
|
||||
"Here is a new customer's task: {task}.",
|
||||
"To complete the task, you must write a response that appropriately solves the requested instruction based on your expertise and customer's needs."
|
||||
],
|
||||
"Code Reviewer": [
|
||||
"{chatdev_prompt}",
|
||||
"You are Code Reviewer. we are both working at ChatDev. We share a common interest in collaborating to successfully complete a task assigned by a new customer.",
|
||||
"You can help programmers to assess source codes for software troubleshooting, fix bugs to increase code quality and robustness, and offer proposals to improve the source codes.",
|
||||
"Here is a new customer's task: {task}.",
|
||||
"To complete the task, you must write a response that appropriately solves the requested instruction based on your expertise and customer's needs."
|
||||
],
|
||||
"Software Test Engineer": [
|
||||
"{chatdev_prompt}",
|
||||
"You are Software Test Engineer. we are both working at ChatDev. We share a common interest in collaborating to successfully complete a task assigned by a new customer.",
|
||||
"You can use the software as intended to analyze its functional properties, design manual and automated test procedures to evaluate each software product, build and implement software evaluation test programs, and run test programs to ensure that testing protocols evaluate the software correctly.",
|
||||
"Here is a new customer's task: {task}.",
|
||||
"To complete the task, you must write a response that appropriately solves the requested instruction based on your expertise and customer's needs."
|
||||
],
|
||||
"Chief Creative Officer": [
|
||||
"{chatdev_prompt}",
|
||||
"You are Chief Creative Officer. we are both working at ChatDev. We share a common interest in collaborating to successfully complete a task assigned by a new customer.",
|
||||
"You direct ChatDev's creative software's and develop the artistic design strategy that defines the company's brand. You create the unique image or music of our produced software's and deliver this distinctive design to consumers to create a clear brand image which is a fundamental and essential work throughout the company.",
|
||||
"Here is a new customer's task: {task}.",
|
||||
"To complete the task, you must write a response that appropriately solves the requested instruction based on your expertise and customer's needs."
|
||||
]
|
||||
}
|
103
WareHouse/2048_THUNLP_20230822144615/game.py
Normal file
@ -0,0 +1,103 @@
|
||||
'''
|
||||
Game Logic
|
||||
'''
|
||||
import random
|
||||
class Game:
|
||||
def __init__(self):
|
||||
self.grid = [[0] * 10 for _ in range(10)]
|
||||
self.add_random_tile()
|
||||
self.add_random_tile()
|
||||
def add_random_tile(self):
|
||||
empty_spots = []
|
||||
for row in range(10):
|
||||
for col in range(10):
|
||||
if self.grid[row][col] == 0:
|
||||
empty_spots.append((row, col))
|
||||
if empty_spots:
|
||||
row, col = random.choice(empty_spots)
|
||||
self.grid[row][col] = random.choice([2, 4])
|
||||
def move_up(self):
|
||||
self.move_tiles("up")
|
||||
self.merge_tiles("up")
|
||||
self.move_tiles("up")
|
||||
self.add_random_tile()
|
||||
def move_down(self):
|
||||
self.move_tiles("down")
|
||||
self.merge_tiles("down")
|
||||
self.move_tiles("down")
|
||||
self.add_random_tile()
|
||||
def move_left(self):
|
||||
self.move_tiles("left")
|
||||
self.merge_tiles("left")
|
||||
self.move_tiles("left")
|
||||
self.add_random_tile()
|
||||
def move_right(self):
|
||||
self.move_tiles("right")
|
||||
self.merge_tiles("right")
|
||||
self.move_tiles("right")
|
||||
self.add_random_tile()
|
||||
def move_tiles(self, direction):
|
||||
if direction == "up":
|
||||
for col in range(10):
|
||||
for row in range(1, 10):
|
||||
if self.grid[row][col] != 0:
|
||||
self.move_tile(row, col, -1, 0)
|
||||
elif direction == "down":
|
||||
for col in range(10):
|
||||
for row in range(8, -1, -1):
|
||||
if self.grid[row][col] != 0:
|
||||
self.move_tile(row, col, 1, 0)
|
||||
elif direction == "left":
|
||||
for row in range(10):
|
||||
for col in range(1, 10):
|
||||
if self.grid[row][col] != 0:
|
||||
self.move_tile(row, col, 0, -1)
|
||||
elif direction == "right":
|
||||
for row in range(10):
|
||||
for col in range(8, -1, -1):
|
||||
if self.grid[row][col] != 0:
|
||||
self.move_tile(row, col, 0, 1)
|
||||
def move_tile(self, row, col, row_offset, col_offset):
|
||||
value = self.grid[row][col]
|
||||
self.grid[row][col] = 0
|
||||
while 0 <= row + row_offset < 10 and 0 <= col + col_offset < 10 and self.grid[row + row_offset][col + col_offset] == 0:
|
||||
row += row_offset
|
||||
col += col_offset
|
||||
self.grid[row][col] = value
|
||||
def merge_tiles(self, direction):
|
||||
if direction == "up":
|
||||
for col in range(10):
|
||||
for row in range(1, 10):
|
||||
if self.grid[row][col] == self.grid[row - 1][col]:
|
||||
self.grid[row - 1][col] *= 2
|
||||
self.grid[row][col] = 0
|
||||
elif direction == "down":
|
||||
for col in range(10):
|
||||
for row in range(8, -1, -1):
|
||||
if self.grid[row][col] == self.grid[row + 1][col]:
|
||||
self.grid[row + 1][col] *= 2
|
||||
self.grid[row][col] = 0
|
||||
elif direction == "left":
|
||||
for row in range(10):
|
||||
for col in range(1, 10):
|
||||
if self.grid[row][col] == self.grid[row][col - 1]:
|
||||
self.grid[row][col - 1] *= 2
|
||||
self.grid[row][col] = 0
|
||||
elif direction == "right":
|
||||
for row in range(10):
|
||||
for col in range(8, -1, -1):
|
||||
if self.grid[row][col] == self.grid[row][col + 1]:
|
||||
self.grid[row][col + 1] *= 2
|
||||
self.grid[row][col] = 0
|
||||
def is_game_over(self):
|
||||
for row in range(10):
|
||||
for col in range(10):
|
||||
if self.grid[row][col] == 2048:
|
||||
return True
|
||||
if self.grid[row][col] == 0:
|
||||
return False
|
||||
if row < 9 and self.grid[row][col] == self.grid[row + 1][col]:
|
||||
return False
|
||||
if col < 9 and self.grid[row][col] == self.grid[row][col + 1]:
|
||||
return False
|
||||
return True
|
48
WareHouse/2048_THUNLP_20230822144615/main.py
Normal file
@ -0,0 +1,48 @@
|
||||
'''
|
||||
2048 Game
|
||||
'''
|
||||
import tkinter as tk
|
||||
from game import Game
|
||||
class GameApp:
|
||||
def __init__(self, master):
|
||||
self.master = master
|
||||
self.master.title("2048 Game")
|
||||
self.game = Game()
|
||||
self.create_widgets()
|
||||
def create_widgets(self):
|
||||
self.canvas = tk.Canvas(self.master, width=400, height=400, bg="white")
|
||||
self.canvas.pack()
|
||||
self.canvas.bind("<Key>", self.handle_keypress)
|
||||
self.canvas.focus_set()
|
||||
def handle_keypress(self, event):
|
||||
if event.keysym == "Up":
|
||||
self.game.move_up()
|
||||
elif event.keysym == "Down":
|
||||
self.game.move_down()
|
||||
elif event.keysym == "Left":
|
||||
self.game.move_left()
|
||||
elif event.keysym == "Right":
|
||||
self.game.move_right()
|
||||
self.update_grid()
|
||||
if self.game.is_game_over():
|
||||
self.canvas.unbind("<Key>")
|
||||
self.canvas.create_text(200, 200, text="Game Over", font=("Arial", 24), fill="red")
|
||||
def update_grid(self):
|
||||
self.canvas.delete("all")
|
||||
for row in range(10):
|
||||
for col in range(10):
|
||||
value = self.game.grid[row][col]
|
||||
x1 = col * 40
|
||||
y1 = row * 40
|
||||
x2 = x1 + 40
|
||||
y2 = y1 + 40
|
||||
self.canvas.create_rectangle(x1, y1, x2, y2, fill="light gray")
|
||||
if value != 0:
|
||||
self.canvas.create_text((x1 + x2) / 2, (y1 + y2) / 2, text=str(value))
|
||||
self.canvas.update()
|
||||
def main():
|
||||
root = tk.Tk()
|
||||
app = GameApp(root)
|
||||
root.mainloop()
|
||||
if __name__ == "__main__":
|
||||
main()
|
43
WareHouse/2048_THUNLP_20230822144615/manual.md
Normal file
@ -0,0 +1,43 @@
|
||||
# 2048 Game User Manual
|
||||
|
||||
## Introduction
|
||||
Welcome to the 2048 Game! This game is a simple implementation of the popular 2048 puzzle game. The goal of the game is to reach the 2048 tile by combining tiles with the same number to create new tiles with double the value. The game ends when the player reaches the 2048 tile or when there are no more valid moves available.
|
||||
|
||||
## Installation
|
||||
To play the 2048 Game, you need to have Python installed on your computer. You can download Python from the official website: https://www.python.org/downloads/
|
||||
|
||||
Once you have Python installed, you can follow these steps to install the game:
|
||||
|
||||
1. Download the game files from the provided source.
|
||||
2. Open a terminal or command prompt and navigate to the directory where you downloaded the game files.
|
||||
3. Run the following command to install the required dependencies:
|
||||
|
||||
```
|
||||
pip install -r requirements.txt
|
||||
```
|
||||
|
||||
## Starting the Game
|
||||
To start the game, open a terminal or command prompt and navigate to the directory where you downloaded the game files. Run the following command:
|
||||
|
||||
```
|
||||
python main.py
|
||||
```
|
||||
|
||||
A new window will open, displaying the game board.
|
||||
|
||||
## Playing the Game
|
||||
The game board consists of a 10x10 grid. Each tile on the grid has a value, which is initially set to either 2 or 4. The player can move the tiles in four directions: up, down, left, and right.
|
||||
|
||||
To make a move, use the arrow keys on your keyboard. Press the up arrow key to move the tiles up, the down arrow key to move the tiles down, the left arrow key to move the tiles left, and the right arrow key to move the tiles right.
|
||||
|
||||
After each move, the tiles will slide as far as possible in the chosen direction, merging if they have the same value. A new tile with a value of either 2 or 4 will appear in a random empty spot on the grid.
|
||||
|
||||
The game will display the current state of the grid after each move. If the game is over (either the player reaches the 2048 tile or there are no more valid moves available), a "Game Over" message will be displayed.
|
||||
|
||||
## Ending the Game
|
||||
The game ends when the player reaches the 2048 tile or when there are no more valid moves available. If the game is over, you can close the game window to exit the game.
|
||||
|
||||
## Troubleshooting
|
||||
If you encounter any issues while playing the game, please make sure you have installed the required dependencies correctly. If the problem persists, feel free to contact our support team for assistance.
|
||||
|
||||
Enjoy playing the 2048 Game!
|
29
WareHouse/2048_THUNLP_20230822144615/meta.txt
Normal file
@ -0,0 +1,29 @@
|
||||
Task:
|
||||
design a simple 2048 game with a 10x10 grid. the game should follow the standard rules of 2048, where the player combines tiles with the same number to create new tiles with double the value. the grid should initially contain two randomly placed tiles with a value of either 2 or 4. the player should be able to move the tiles in four directions: up, down, left, and right. when the player makes a move, the tiles should slide as far as possible in the chosen direction, merging if they have the same value. after each move, a new tile with a value of either 2 or 4 should appear in a random empty spot on the grid. the game should end when the player reaches the 2048 tile or when there are no more valid moves available. display the current state of the grid after each move and provide feedback to the player accordingly. ensure that the game runs smoothly and without any errors.
|
||||
|
||||
Config:
|
||||
ChatEnvConfig.clear_structure: True
|
||||
ChatEnvConfig.brainstorming: False
|
||||
|
||||
|
||||
Roster:
|
||||
Chief Executive Officer, Counselor, Chief Human Resource Officer, Chief Product Officer, Chief Technology Officer, Programmer, Code Reviewer, Software Test Engineer, Chief Creative Officer
|
||||
|
||||
Modality:
|
||||
application
|
||||
|
||||
Ideas:
|
||||
|
||||
|
||||
Language:
|
||||
Python
|
||||
|
||||
Code_Version:
|
||||
7.0
|
||||
|
||||
Porposed_images:
|
||||
0
|
||||
|
||||
Incorporated_images:
|
||||
0
|
||||
|
1
WareHouse/2048_THUNLP_20230822144615/requirements.txt
Normal file
@ -0,0 +1 @@
|
||||
tkinter==8.6
|
@ -0,0 +1 @@
|
||||
Develop a virtual painting studio app. Provide canvas, brushes, and a variety of colors for users to create digital artworks.
|
101
WareHouse/ArtCanvas_THUNLP_20230825093558/ChatChainConfig.json
Normal file
@ -0,0 +1,101 @@
|
||||
{
|
||||
"chain": [
|
||||
{
|
||||
"phase": "DemandAnalysis",
|
||||
"phaseType": "SimplePhase",
|
||||
"max_turn_step": 2,
|
||||
"need_reflect": "True"
|
||||
},
|
||||
{
|
||||
"phase": "LanguageChoose",
|
||||
"phaseType": "SimplePhase",
|
||||
"max_turn_step": 2,
|
||||
"need_reflect": "True"
|
||||
},
|
||||
{
|
||||
"phase": "Coding",
|
||||
"phaseType": "SimplePhase",
|
||||
"max_turn_step": 1,
|
||||
"need_reflect": "False"
|
||||
},
|
||||
{
|
||||
"phase": "CodeCompleteAll",
|
||||
"phaseType": "ComposedPhase",
|
||||
"cycleNum": 3,
|
||||
"Composition": [
|
||||
{
|
||||
"phase": "CodeComplete",
|
||||
"phaseType": "SimplePhase",
|
||||
"max_turn_step": 1,
|
||||
"need_reflect": "False"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"phase": "CodeReview",
|
||||
"phaseType": "ComposedPhase",
|
||||
"cycleNum": 3,
|
||||
"Composition": [
|
||||
{
|
||||
"phase": "CodeReviewComment",
|
||||
"phaseType": "SimplePhase",
|
||||
"max_turn_step": -1,
|
||||
"need_reflect": "False"
|
||||
},
|
||||
{
|
||||
"phase": "CodeReviewModification",
|
||||
"phaseType": "SimplePhase",
|
||||
"max_turn_step": -1,
|
||||
"need_reflect": "False"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"phase": "Test",
|
||||
"phaseType": "ComposedPhase",
|
||||
"cycleNum": 3,
|
||||
"Composition": [
|
||||
{
|
||||
"phase": "TestErrorSummary",
|
||||
"phaseType": "SimplePhase",
|
||||
"max_turn_step": -1,
|
||||
"need_reflect": "False"
|
||||
},
|
||||
{
|
||||
"phase": "TestModification",
|
||||
"phaseType": "SimplePhase",
|
||||
"max_turn_step": -1,
|
||||
"need_reflect": "False"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"phase": "EnvironmentDoc",
|
||||
"phaseType": "SimplePhase",
|
||||
"max_turn_step": 1,
|
||||
"need_reflect": "True"
|
||||
},
|
||||
{
|
||||
"phase": "Manual",
|
||||
"phaseType": "SimplePhase",
|
||||
"max_turn_step": 1,
|
||||
"need_reflect": "False"
|
||||
}
|
||||
],
|
||||
"recruitments": [
|
||||
"Chief Executive Officer",
|
||||
"Counselor",
|
||||
"Chief Human Resource Officer",
|
||||
"Chief Product Officer",
|
||||
"Chief Technology Officer",
|
||||
"Programmer",
|
||||
"Code Reviewer",
|
||||
"Software Test Engineer",
|
||||
"Chief Creative Officer"
|
||||
],
|
||||
"clear_structure": "True",
|
||||
"brainstorming": "False",
|
||||
"gui_design": "True",
|
||||
"git_management": "False",
|
||||
"self_improve": "False"
|
||||
}
|
301
WareHouse/ArtCanvas_THUNLP_20230825093558/PhaseConfig.json
Normal file
@ -0,0 +1,301 @@
|
||||
{
|
||||
"DemandAnalysis": {
|
||||
"assistant_role_name": "Chief Product Officer",
|
||||
"user_role_name": "Chief Executive Officer",
|
||||
"phase_prompt": [
|
||||
"ChatDev has made products in the following form before:",
|
||||
"Image: can present information in line chart, bar chart, flow chart, cloud chart, Gantt chart, etc.",
|
||||
"Document: can present information via .docx files.",
|
||||
"PowerPoint: can present information via .pptx files.",
|
||||
"Excel: can present information via .xlsx files.",
|
||||
"PDF: can present information via .pdf files.",
|
||||
"Website: can present personal resume, tutorial, products, or ideas, via .html files.",
|
||||
"Application: can implement visualized game, software, tool, etc, via python.",
|
||||
"Dashboard: can display a panel visualizing real-time information.",
|
||||
"Mind Map: can represent ideas, with related concepts arranged around a core concept.",
|
||||
"As the {assistant_role}, to satisfy the new user's demand and the product should be realizable, you should keep discussing with me to decide which product modality do we want the product to be?",
|
||||
"Note that we must ONLY discuss the product modality and do not discuss anything else! Once we all have expressed our opinion(s) and agree with the results of the discussion unanimously, any of us must actively terminate the discussion by replying with only one line, which starts with a single word <INFO>, followed by our final product modality without any other words, e.g., \"<INFO> PowerPoint\"."
|
||||
]
|
||||
},
|
||||
"LanguageChoose": {
|
||||
"assistant_role_name": "Chief Technology Officer",
|
||||
"user_role_name": "Chief Executive Officer",
|
||||
"phase_prompt": [
|
||||
"According to the new user's task and some creative brainstorm ideas listed below: ",
|
||||
"Task: \"{task}\".",
|
||||
"Modality: \"{modality}\".",
|
||||
"Ideas: \"{ideas}\".",
|
||||
"We have decided to complete the task through a executable software implemented via a programming language. ",
|
||||
"As the {assistant_role}, to satisfy the new user's demand and make the software realizable, you should propose a concrete programming language. If python can complete this task via Python, please answer Python; otherwise, answer another programming language (e.g., Java, C++, etc,).",
|
||||
"Note that we must ONLY discuss the target programming language and do not discuss anything else! Once we all have expressed our opinion(s) and agree with the results of the discussion unanimously, any of us must actively terminate the discussion and conclude the best programming language we have discussed without any other words or reasons, return only one line using the format: \"<INFO> *\" where \"*\" represents a programming language."
|
||||
]
|
||||
},
|
||||
"Coding": {
|
||||
"assistant_role_name": "Programmer",
|
||||
"user_role_name": "Chief Technology Officer",
|
||||
"phase_prompt": [
|
||||
"According to the new user's task and our software designs listed below: ",
|
||||
"Task: \"{task}\".",
|
||||
"Modality: \"{modality}\".",
|
||||
"Programming Language: \"{language}\"",
|
||||
"Ideas:\"{ideas}\"",
|
||||
"We have decided to complete the task through a executable software with multiple files implemented via {language}. As the {assistant_role}, to satisfy the new user's demands, you should write one or multiple files and make sure that every detail of the architecture is, in the end, implemented as code. {gui}",
|
||||
"Think step by step and reason yourself to the right decisions to make sure we get it right.",
|
||||
"You will first lay out the names of the core classes, functions, methods that will be necessary, as well as a quick comment on their purpose.",
|
||||
"Then you will output the content of each file including complete code. Each file must strictly follow a markdown code block format, where the following tokens must be replaced such that \"FILENAME\" is the lowercase file name including the file extension, \"LANGUAGE\" in the programming language, \"DOCSTRING\" is a string literal specified in source code that is used to document a specific segment of code, and \"CODE\" is the original code:",
|
||||
"FILENAME",
|
||||
"```LANGUAGE",
|
||||
"'''",
|
||||
"DOCSTRING",
|
||||
"'''",
|
||||
"CODE",
|
||||
"```",
|
||||
"You will start with the \"main\" file, then go to the ones that are imported by that file, and so on.",
|
||||
"Please note that the code should be fully functional. Ensure to implement all functions. No placeholders (such as 'pass' in Python)."
|
||||
]
|
||||
},
|
||||
"ArtDesign": {
|
||||
"assistant_role_name": "Programmer",
|
||||
"user_role_name": "Chief Creative Officer",
|
||||
"phase_prompt": [
|
||||
"Our developed source codes and corresponding test reports are listed below: ",
|
||||
"Task: \"{task}\".",
|
||||
"Programming Language: \"{language}\"",
|
||||
"Source Codes:",
|
||||
"\"{codes}\"",
|
||||
"Note that each file must strictly follow a markdown code block format, where the following tokens must be replaced such that \"FILENAME\" is the lowercase file name including the file extension, \"LANGUAGE\" in the programming language, \"DOCSTRING\" is a string literal specified in source code that is used to document a specific segment of code, and \"CODE\" is the original code:",
|
||||
"FILENAME",
|
||||
"```LANGUAGE",
|
||||
"'''",
|
||||
"DOCSTRING",
|
||||
"'''",
|
||||
"CODE",
|
||||
"```",
|
||||
"As the {assistant_role}, to satisfy the new user's demand and equip the software with a beautiful graphical user interface (GUI), we will discuss and design many decorative images for GUI decoration. Now, we keep discussing the GUI beautification by listing some functionally independent elements in GUI that are being considered to be decorated by different pictures. For example, ten digits (0-9) in a calculator are functionally independent.",
|
||||
"To answer, use the format: \" FILENAME.png: DESCRIPTION\" where \"FILENAME\" is the filename of the image and \"DESCRIPTION\" denotes the detailed description of the independent elements. For example:",
|
||||
"'''",
|
||||
"button_1.png: The button with the number \"1\" on it.",
|
||||
"button_multiply.png: The button with the multiplication symbol (\"*\") on it.",
|
||||
"background.png: the background color to decorate the Go game",
|
||||
"'''",
|
||||
"Now, we keep discussing the to-be-decorated elements in the GUI and list all functionally independent elements as much as possible. If no further elements that are functionally independent or that should be further described, return only one line like \"<INFO> Finished\" in your reply."
|
||||
]
|
||||
},
|
||||
"ArtIntegration": {
|
||||
"assistant_role_name": "Programmer",
|
||||
"user_role_name": "Chief Creative Officer",
|
||||
"phase_prompt": [
|
||||
"Our developed source codes and corresponding test reports are listed below: ",
|
||||
"Task: \"{task}\".",
|
||||
"Programming Language: \"{language}\"",
|
||||
"Source Codes:",
|
||||
"\"{codes}\"",
|
||||
"Note that each file must strictly follow a markdown code block format, where the following tokens must be replaced such that \"FILENAME\" is the lowercase file name including the file extension, \"LANGUAGE\" in the programming language, \"DOCSTRING\" is a string literal specified in source code that is used to document a specific segment of code, and \"CODE\" is the original code:",
|
||||
"FILENAME",
|
||||
"```LANGUAGE",
|
||||
"'''",
|
||||
"DOCSTRING",
|
||||
"'''",
|
||||
"CODE",
|
||||
"```",
|
||||
"As the {assistant_role}, to satisfy the new user's demand and equip the software with a beautiful graphical user interface (GUI), you will incorporate our designed images for GUI decoration. Here are some ready-made high-quality pictures and corresponding descriptions:",
|
||||
"{images}",
|
||||
"Note that the designed images have a fixed size of 256x256 pixels and the images are located in the same directory as all the Python files; please dynamically scaling these images according to the size of GUI, and use \"self.*\" to avoid displaying-related problems caused by automatic garbage collection. For example:",
|
||||
"```",
|
||||
"self.image = ImageTk.PhotoImage(Image.open(\"./image.png\").resize((50, 50)))",
|
||||
"```",
|
||||
"Now, use some or all of the pictures into the GUI to make it more beautiful and creative. Output codes strictly following the required format mentioned above."
|
||||
]
|
||||
},
|
||||
"CodeComplete": {
|
||||
"assistant_role_name": "Programmer",
|
||||
"user_role_name": "Chief Technology Officer",
|
||||
"phase_prompt": [
|
||||
"According to the new user's task and our software designs listed below: ",
|
||||
"Task: \"{task}\".",
|
||||
"Modality: \"{modality}\".",
|
||||
"Programming Language: \"{language}\"",
|
||||
"Codes:",
|
||||
"\"{codes}\"",
|
||||
"Unimplemented File:",
|
||||
"\"{unimplemented_file}\"",
|
||||
"In our software, each file must strictly follow a markdown code block format, where the following tokens must be replaced such that \"FILENAME\" is the lowercase file name including the file extension, \"LANGUAGE\" in the programming language, \"DOCSTRING\" is a string literal specified in source code that is used to document a specific segment of code, and \"CODE\" is the original code:",
|
||||
"FILENAME",
|
||||
"```LANGUAGE",
|
||||
"'''",
|
||||
"DOCSTRING",
|
||||
"'''",
|
||||
"CODE",
|
||||
"```",
|
||||
"As the {assistant_role}, to satisfy the complete function of our developed software, you have to implement all methods in the {unimplemented_file} file which contains a unimplemented class. Now, implement all methods of the {unimplemented_file} and all other codes needed, then output the fully implemented codes, strictly following the required format."
|
||||
]
|
||||
},
|
||||
"CodeReviewComment": {
|
||||
"assistant_role_name": "Code Reviewer",
|
||||
"user_role_name": "Programmer",
|
||||
"phase_prompt": [
|
||||
"According to the new user's task and our software designs: ",
|
||||
"Task: \"{task}\".",
|
||||
"Modality: \"{modality}\".",
|
||||
"Programming Language: \"{language}\"",
|
||||
"Ideas: \"{ideas}\"",
|
||||
"Codes:",
|
||||
"\"{codes}\"",
|
||||
"As the {assistant_role}, to make the software directly operable without further coding, ChatDev have formulated the following regulations:",
|
||||
"1) all referenced classes should be imported;",
|
||||
"2) all methods should be implemented;",
|
||||
"3) all methods need to have the necessary comments;",
|
||||
"4) no potential bugs;",
|
||||
"5) The entire project conforms to the tasks proposed by the user;",
|
||||
"6) most importantly, do not only check the errors in the code, but also the logic of code. Make sure that user can interact with generated software without losing any feature in the requirement;",
|
||||
"Now, you should check the above regulations one by one and review the codes in detail, propose one comment with the highest priority about the codes, and give me instructions on how to fix. Tell me your comment with the highest priority and corresponding suggestions on revision. If the codes are perfect and you have no comment on them, return only one line like \"<INFO> Finished\"."
|
||||
]
|
||||
},
|
||||
"CodeReviewModification": {
|
||||
"assistant_role_name": "Programmer",
|
||||
"user_role_name": "Code Reviewer",
|
||||
"phase_prompt": [
|
||||
"According to the new user's task, our designed product modality, languages and ideas, our developed first-edition source codes are listed below: ",
|
||||
"Task: \"{task}\".",
|
||||
"Modality: \"{modality}\".",
|
||||
"Programming Language: \"{language}\"",
|
||||
"Ideas: \"{ideas}\"",
|
||||
"Codes: ",
|
||||
"\"{codes}\"",
|
||||
"Comments on Codes:",
|
||||
"\"{comments}\"",
|
||||
"In the software, each file must strictly follow a markdown code block format, where the following tokens must be replaced such that \"FILENAME\" is the lowercase file name including the file extension, \"LANGUAGE\" in the programming language, \"DOCSTRING\" is a string literal specified in source code that is used to document a specific segment of code, and \"CODE\" is the original code. Format:",
|
||||
"FILENAME",
|
||||
"```LANGUAGE",
|
||||
"'''",
|
||||
"DOCSTRING",
|
||||
"'''",
|
||||
"CODE",
|
||||
"```",
|
||||
"As the {assistant_role}, to satisfy the new user's demand and make the software creative, executive and robust, you should modify corresponding codes according to the comments. Then, output the full and complete codes with all bugs fixed based on the comments. Return all codes strictly following the required format."
|
||||
]
|
||||
},
|
||||
"CodeReviewHuman": {
|
||||
"assistant_role_name": "Programmer",
|
||||
"user_role_name": "Code Reviewer",
|
||||
"phase_prompt": [
|
||||
"According to the new user's task, our designed product modality and three creative ideas, our developed first-edition source codes are listed below: ",
|
||||
"Task: \"{task}\".",
|
||||
"Modality: \"{modality}\".",
|
||||
"Programming Language: \"{language}\"",
|
||||
"Ideas: \"{ideas}\"",
|
||||
"Codes: ",
|
||||
"\"{codes}\"",
|
||||
"Comments on Codes:",
|
||||
"\"{comments}\"",
|
||||
"In the software, each file must strictly follow a markdown code block format, where the following tokens must be replaced such that \"FILENAME\" is the lowercase file name including the file extension, \"LANGUAGE\" in the programming language, \"DOCSTRING\" is a string literal specified in source code that is used to document a specific segment of code, and \"CODE\" is the original code. Format:",
|
||||
"FILENAME",
|
||||
"```LANGUAGE",
|
||||
"'''",
|
||||
"DOCSTRING",
|
||||
"'''",
|
||||
"CODE",
|
||||
"```",
|
||||
"As the {assistant_role}, to satisfy the new user's demand and make the software creative, executive and robust, you should modify corresponding codes according to the comments. Then, output the fixed codes strictly following the required format."
|
||||
]
|
||||
},
|
||||
"TestErrorSummary": {
|
||||
"assistant_role_name": "Programmer",
|
||||
"user_role_name": "Software Test Engineer",
|
||||
"phase_prompt": [
|
||||
"Our developed source codes and corresponding test reports are listed below: ",
|
||||
"Programming Language: \"{language}\"",
|
||||
"Source Codes:",
|
||||
"\"{codes}\"",
|
||||
"Test Reports of Source Codes:",
|
||||
"\"{test_reports}\"",
|
||||
"According to my test reports, please locate and summarize the bugs that cause the problem."
|
||||
]
|
||||
},
|
||||
"TestModification": {
|
||||
"assistant_role_name": "Programmer",
|
||||
"user_role_name": "Software Test Engineer",
|
||||
"phase_prompt": [
|
||||
"Our developed source codes and corresponding test reports are listed below: ",
|
||||
"Programming Language: \"{language}\"",
|
||||
"Source Codes:",
|
||||
"\"{codes}\"",
|
||||
"Test Reports of Source Codes:",
|
||||
"\"{test_reports}\"",
|
||||
"Error Summary of Test Reports:",
|
||||
"\"{error_summary}\"",
|
||||
"Note that each file must strictly follow a markdown code block format, where the following tokens must be replaced such that \"FILENAME\" is the lowercase file name including the file extension, \"LANGUAGE\" in the programming language, \"DOCSTRING\" is a string literal specified in source code that is used to document a specific segment of code, and \"CODE\" is the original code:",
|
||||
"FILENAME",
|
||||
"```LANGUAGE",
|
||||
"'''",
|
||||
"DOCSTRING",
|
||||
"'''",
|
||||
"CODE",
|
||||
"```",
|
||||
"As the {assistant_role}, to satisfy the new user's demand and make the software execute smoothly and robustly, you should modify the codes based on the error summary. Now, use the format exemplified above and modify the problematic codes based on the error summary. Output the codes that you fixed based on the test reported and corresponding explanations (strictly follow the format defined above, including FILENAME, LANGUAGE, DOCSTRING and CODE; incomplete \"TODO\" codes are strictly prohibited). If no bugs are reported, please return only one line like \"<INFO> Finished\"."
|
||||
]
|
||||
},
|
||||
"EnvironmentDoc": {
|
||||
"assistant_role_name": "Programmer",
|
||||
"user_role_name": "Chief Technology Officer",
|
||||
"phase_prompt": [
|
||||
"The new user's task and our developed codes are listed: ",
|
||||
"Task: \"{task}\".",
|
||||
"Modality: \"{modality}\".",
|
||||
"Programming Language: \"{language}\"",
|
||||
"Ideas: \"{ideas}\"",
|
||||
"Codes: ",
|
||||
"\"{codes}\"",
|
||||
"As the {assistant_role}, you should write a requirements.txt file, which is commonly used in Python projects to specify the dependencies or packages required for the project to run properly. It serves as a way to document and manage the project's dependencies in a standardized format. For example:",
|
||||
"requirements.txt",
|
||||
"```",
|
||||
"numpy==1.19.2",
|
||||
"pandas>=1.1.4",
|
||||
"```",
|
||||
"According to the codes and file format listed above, write a requirements.txt file to specify the dependencies or packages required for the project to run properly."
|
||||
]
|
||||
},
|
||||
"Manual": {
|
||||
"assistant_role_name": "Chief Product Officer",
|
||||
"user_role_name": "Chief Executive Officer",
|
||||
"phase_prompt": [
|
||||
"The new user's task, our developed codes and required dependencies are listed: ",
|
||||
"Task: \"{task}\".",
|
||||
"Modality: \"{modality}\".",
|
||||
"Programming Language: \"{language}\"",
|
||||
"Ideas: \"{ideas}\"",
|
||||
"Codes: ",
|
||||
"\"{codes}\"",
|
||||
"Requirements:",
|
||||
"\"{requirements}\"",
|
||||
"As the {assistant_role}, by using Markdown, you should write a manual.md file which is a detailed user manual to use the software, including introducing main functions of the software, how to install environment dependencies and how to use/play it. For example:",
|
||||
"manual.md",
|
||||
"```",
|
||||
"# LangChain",
|
||||
"Building applications with LLMs through composability",
|
||||
"Looking for the JS/TS version? Check out LangChain.js.",
|
||||
"**Production Support:** As you move your LangChains into production, we'd love to offer more comprehensive support.",
|
||||
"Please fill out this form and we'll set up a dedicated support Slack channel.",
|
||||
"## Quick Install",
|
||||
"`pip install langchain`",
|
||||
"or",
|
||||
"`conda install langchain -c conda-forge`",
|
||||
"## 🤔 What is this?",
|
||||
"Large language models (LLMs) are emerging as a transformative technology, enabling developers to build applications that they previously could not. However, using these LLMs in isolation is often insufficient for creating a truly powerful app - the real power comes when you can combine them with other sources of computation or knowledge.",
|
||||
"This library aims to assist in the development of those types of applications. Common examples of these applications include:",
|
||||
"**❓ Question Answering over specific documents**",
|
||||
"- Documentation",
|
||||
"- End-to-end Example: Question Answering over Notion Database",
|
||||
"**🤖 Agents**",
|
||||
"- Documentation",
|
||||
"- End-to-end Example: GPT+WolframAlpha",
|
||||
"## 📖 Documentation",
|
||||
"Please see [here](https://python.langchain.com) for full documentation on:",
|
||||
"- Getting started (installation, setting up the environment, simple examples)",
|
||||
"- How-To examples (demos, integrations, helper functions)",
|
||||
"- Reference (full API docs)",
|
||||
"- Resources (high-level explanation of core concepts)",
|
||||
"```"
|
||||
]
|
||||
}
|
||||
}
|
65
WareHouse/ArtCanvas_THUNLP_20230825093558/RoleConfig.json
Normal file
@ -0,0 +1,65 @@
|
||||
{
|
||||
"Chief Executive Officer": [
|
||||
"{chatdev_prompt}",
|
||||
"You are Chief Executive Officer. Now, we are both working at ChatDev and we share a common interest in collaborating to successfully complete a task assigned by a new customer.",
|
||||
"Your main responsibilities include being an active decision-maker on users' demands and other key policy issues, leader, manager, and executor. Your decision-making role involves high-level decisions about policy and strategy; and your communicator role can involve speaking to the organization's management and employees.",
|
||||
"Here is a new customer's task: {task}.",
|
||||
"To complete the task, I will give you one or more instructions, and you must help me to write a specific solution that appropriately solves the requested instruction based on your expertise and my needs."
|
||||
],
|
||||
"Chief Product Officer": [
|
||||
"{chatdev_prompt}",
|
||||
"You are Chief Product Officer. we are both working at ChatDev. We share a common interest in collaborating to successfully complete a task assigned by a new customer.",
|
||||
"You are responsible for all product-related matters in ChatDev. Usually includes product design, product strategy, product vision, product innovation, project management and product marketing.",
|
||||
"Here is a new customer's task: {task}.",
|
||||
"To complete the task, you must write a response that appropriately solves the requested instruction based on your expertise and customer's needs."
|
||||
],
|
||||
"Counselor": [
|
||||
"{chatdev_prompt}",
|
||||
"You are Counselor. Now, we share a common interest in collaborating to successfully complete a task assigned by a new customer.",
|
||||
"Your main responsibilities include asking what user and customer think and provide your valuable suggestions. ",
|
||||
"Here is a new customer's task: {task}.",
|
||||
"To complete the task, I will give you one or more instructions, and you must help me to write a specific solution that appropriately solves the requested instruction based on your expertise and my needs."
|
||||
],
|
||||
"Chief Technology Officer": [
|
||||
"{chatdev_prompt}",
|
||||
"You are Chief Technology Officer. we are both working at ChatDev. We share a common interest in collaborating to successfully complete a task assigned by a new customer.",
|
||||
"You are very familiar to information technology. You will make high-level decisions for the overarching technology infrastructure that closely align with the organization's goals, while you work alongside the organization's information technology (\"IT\") staff members to perform everyday operations.",
|
||||
"Here is a new customer's task: {task}.",
|
||||
"To complete the task, You must write a response that appropriately solves the requested instruction based on your expertise and customer's needs."
|
||||
],
|
||||
"Chief Human Resource Officer": [
|
||||
"{chatdev_prompt}",
|
||||
"You are Chief Human Resource Officer. Now, we are both working at ChatDev and we share a common interest in collaborating to successfully complete a task assigned by a new customer.",
|
||||
"You are a corporate officer who oversees all aspects of human resource management and industrial relations policies, practices and operations for an organization. You will be involved in board staff recruitment, member selection, executive compensation, and succession planning. Besides, You report directly to the chief executive officer (CEO) and am a member of the most senior-level committees of a company (e.g., executive committee or office of CEO).",
|
||||
"Here is a new customer's task: {task}.",
|
||||
"To complete the task, you must write a response that appropriately solves the requested instruction based on your expertise and customer's needs."
|
||||
],
|
||||
"Programmer": [
|
||||
"{chatdev_prompt}",
|
||||
"You are Programmer. we are both working at ChatDev. We share a common interest in collaborating to successfully complete a task assigned by a new customer.",
|
||||
"You can write/create computer software or applications by providing a specific programming language to the computer. You have extensive computing and coding experience in many varieties of programming languages and platforms, such as Python, Java, C, C++, HTML, CSS, JavaScript, XML, SQL, PHP, etc,.",
|
||||
"Here is a new customer's task: {task}.",
|
||||
"To complete the task, you must write a response that appropriately solves the requested instruction based on your expertise and customer's needs."
|
||||
],
|
||||
"Code Reviewer": [
|
||||
"{chatdev_prompt}",
|
||||
"You are Code Reviewer. we are both working at ChatDev. We share a common interest in collaborating to successfully complete a task assigned by a new customer.",
|
||||
"You can help programmers to assess source codes for software troubleshooting, fix bugs to increase code quality and robustness, and offer proposals to improve the source codes.",
|
||||
"Here is a new customer's task: {task}.",
|
||||
"To complete the task, you must write a response that appropriately solves the requested instruction based on your expertise and customer's needs."
|
||||
],
|
||||
"Software Test Engineer": [
|
||||
"{chatdev_prompt}",
|
||||
"You are Software Test Engineer. we are both working at ChatDev. We share a common interest in collaborating to successfully complete a task assigned by a new customer.",
|
||||
"You can use the software as intended to analyze its functional properties, design manual and automated test procedures to evaluate each software product, build and implement software evaluation test programs, and run test programs to ensure that testing protocols evaluate the software correctly.",
|
||||
"Here is a new customer's task: {task}.",
|
||||
"To complete the task, you must write a response that appropriately solves the requested instruction based on your expertise and customer's needs."
|
||||
],
|
||||
"Chief Creative Officer": [
|
||||
"{chatdev_prompt}",
|
||||
"You are Chief Creative Officer. we are both working at ChatDev. We share a common interest in collaborating to successfully complete a task assigned by a new customer.",
|
||||
"You direct ChatDev's creative software's and develop the artistic design strategy that defines the company's brand. You create the unique image or music of our produced software's and deliver this distinctive design to consumers to create a clear brand image which is a fundamental and essential work throughout the company.",
|
||||
"Here is a new customer's task: {task}.",
|
||||
"To complete the task, you must write a response that appropriately solves the requested instruction based on your expertise and customer's needs."
|
||||
]
|
||||
}
|
39
WareHouse/ArtCanvas_THUNLP_20230825093558/main.py
Normal file
@ -0,0 +1,39 @@
|
||||
'''
|
||||
Virtual Painting Studio App
|
||||
'''
|
||||
import tkinter as tk
|
||||
from tkinter import Canvas, Frame
|
||||
class App(tk.Tk):
|
||||
def __init__(self):
|
||||
super().__init__()
|
||||
self.title("Virtual Painting Studio")
|
||||
self.canvas = Canvas(self)
|
||||
self.canvas.pack()
|
||||
self.toolbar = Toolbar(self)
|
||||
self.toolbar.pack()
|
||||
class Canvas(tk.Canvas):
|
||||
def __init__(self, master):
|
||||
super().__init__(master, width=800, height=600, bg="white")
|
||||
self.bind("<B1-Motion>", self.draw)
|
||||
def draw(self, event):
|
||||
x, y = event.x, event.y
|
||||
brush_size = self.master.toolbar.get_brush_size()
|
||||
brush_color = self.master.toolbar.get_brush_color()
|
||||
self.create_oval(x-brush_size, y-brush_size, x+brush_size, y+brush_size, fill=brush_color)
|
||||
class Toolbar(Frame):
|
||||
def __init__(self, master):
|
||||
super().__init__(master)
|
||||
self.brush_size = tk.Scale(self, from_=1, to=10, orient=tk.HORIZONTAL, label="Brush Size")
|
||||
self.brush_size.set(5)
|
||||
self.brush_size.pack(side=tk.LEFT)
|
||||
self.brush_color = tk.StringVar()
|
||||
self.brush_color.set("black")
|
||||
self.color_menu = tk.OptionMenu(self, self.brush_color, "black", "red", "green", "blue")
|
||||
self.color_menu.pack(side=tk.LEFT)
|
||||
def get_brush_size(self):
|
||||
return self.brush_size.get()
|
||||
def get_brush_color(self):
|
||||
return self.brush_color.get()
|
||||
if __name__ == "__main__":
|
||||
app = App()
|
||||
app.mainloop()
|
75
WareHouse/ArtCanvas_THUNLP_20230825093558/manual.md
Normal file
@ -0,0 +1,75 @@
|
||||
# Virtual Painting Studio App User Manual
|
||||
|
||||
## Introduction
|
||||
|
||||
The Virtual Painting Studio App is a Python application that allows users to create digital artworks using a variety of colors and brushes. This user manual will guide you through the installation process and provide an overview of the main functions of the software.
|
||||
|
||||
## Installation
|
||||
|
||||
To install the Virtual Painting Studio App, follow these steps:
|
||||
|
||||
1. Make sure you have Python installed on your system. If not, download and install Python from the official website (https://www.python.org).
|
||||
|
||||
2. Download the source code of the app from the provided repository.
|
||||
|
||||
3. Open a terminal or command prompt and navigate to the directory where you downloaded the source code.
|
||||
|
||||
4. Create a virtual environment (optional but recommended) by running the following command:
|
||||
|
||||
```
|
||||
python -m venv venv
|
||||
```
|
||||
|
||||
5. Activate the virtual environment by running the appropriate command for your operating system:
|
||||
|
||||
- For Windows:
|
||||
|
||||
```
|
||||
venv\Scripts\activate
|
||||
```
|
||||
|
||||
- For macOS/Linux:
|
||||
|
||||
```
|
||||
source venv/bin/activate
|
||||
```
|
||||
|
||||
6. Install the required dependencies by running the following command:
|
||||
|
||||
```
|
||||
pip install -r requirements.txt
|
||||
```
|
||||
|
||||
7. Once the installation is complete, you are ready to use the Virtual Painting Studio App.
|
||||
|
||||
## Usage
|
||||
|
||||
To start the Virtual Painting Studio App, follow these steps:
|
||||
|
||||
1. Open a terminal or command prompt and navigate to the directory where you downloaded the source code.
|
||||
|
||||
2. Activate the virtual environment (if you created one) by running the appropriate command as mentioned in the installation steps.
|
||||
|
||||
3. Run the following command to start the app:
|
||||
|
||||
```
|
||||
python main.py
|
||||
```
|
||||
|
||||
4. The Virtual Painting Studio App window will open, displaying a canvas and a toolbar.
|
||||
|
||||
5. Use the toolbar to select the brush size and color.
|
||||
|
||||
6. Click and drag the mouse on the canvas to create digital artworks.
|
||||
|
||||
7. To change the brush size, move the slider on the toolbar.
|
||||
|
||||
8. To change the brush color, click on the color dropdown menu on the toolbar and select a color.
|
||||
|
||||
9. To save your artwork, click on the "File" menu and select "Save". Choose a location on your computer to save the artwork.
|
||||
|
||||
10. To exit the app, click on the close button (X) on the app window or press Ctrl+C in the terminal/command prompt.
|
||||
|
||||
## Conclusion
|
||||
|
||||
Congratulations! You have successfully installed and used the Virtual Painting Studio App. Enjoy creating digital artworks with a variety of colors and brushes. If you have any further questions or need assistance, please refer to the documentation or contact our support team. Happy painting!
|
29
WareHouse/ArtCanvas_THUNLP_20230825093558/meta.txt
Normal file
@ -0,0 +1,29 @@
|
||||
Task:
|
||||
Develop a virtual painting studio app. Provide canvas, brushes, and a variety of colors for users to create digital artworks.
|
||||
|
||||
Config:
|
||||
ChatEnvConfig.clear_structure: True
|
||||
ChatEnvConfig.brainstorming: False
|
||||
|
||||
|
||||
Roster:
|
||||
Chief Executive Officer, Counselor, Chief Human Resource Officer, Chief Product Officer, Chief Technology Officer, Programmer, Code Reviewer, Software Test Engineer, Chief Creative Officer
|
||||
|
||||
Modality:
|
||||
application
|
||||
|
||||
Ideas:
|
||||
|
||||
|
||||
Language:
|
||||
Python
|
||||
|
||||
Code_Version:
|
||||
5.0
|
||||
|
||||
Proposed_images:
|
||||
0
|
||||
|
||||
Incorporated_images:
|
||||
0
|
||||
|
1
WareHouse/BookBreeze_THUNLP_20230825072339/.py
Normal file
@ -0,0 +1 @@
|
||||
pip install mobi
|
@ -0,0 +1 @@
|
||||
Develop a simple e-book reader. Support basic formats and bookmarks. Use a modern GUI library. No external assets.
|
101
WareHouse/BookBreeze_THUNLP_20230825072339/ChatChainConfig.json
Normal file
@ -0,0 +1,101 @@
|
||||
{
|
||||
"chain": [
|
||||
{
|
||||
"phase": "DemandAnalysis",
|
||||
"phaseType": "SimplePhase",
|
||||
"max_turn_step": 2,
|
||||
"need_reflect": "True"
|
||||
},
|
||||
{
|
||||
"phase": "LanguageChoose",
|
||||
"phaseType": "SimplePhase",
|
||||
"max_turn_step": 2,
|
||||
"need_reflect": "True"
|
||||
},
|
||||
{
|
||||
"phase": "Coding",
|
||||
"phaseType": "SimplePhase",
|
||||
"max_turn_step": 1,
|
||||
"need_reflect": "False"
|
||||
},
|
||||
{
|
||||
"phase": "CodeCompleteAll",
|
||||
"phaseType": "ComposedPhase",
|
||||
"cycleNum": 10,
|
||||
"Composition": [
|
||||
{
|
||||
"phase": "CodeComplete",
|
||||
"phaseType": "SimplePhase",
|
||||
"max_turn_step": 1,
|
||||
"need_reflect": "False"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"phase": "CodeReview",
|
||||
"phaseType": "ComposedPhase",
|
||||
"cycleNum": 10,
|
||||
"Composition": [
|
||||
{
|
||||
"phase": "CodeReviewComment",
|
||||
"phaseType": "SimplePhase",
|
||||
"max_turn_step": -1,
|
||||
"need_reflect": "False"
|
||||
},
|
||||
{
|
||||
"phase": "CodeReviewModification",
|
||||
"phaseType": "SimplePhase",
|
||||
"max_turn_step": -1,
|
||||
"need_reflect": "False"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"phase": "Test",
|
||||
"phaseType": "ComposedPhase",
|
||||
"cycleNum": 10,
|
||||
"Composition": [
|
||||
{
|
||||
"phase": "TestErrorSummary",
|
||||
"phaseType": "SimplePhase",
|
||||
"max_turn_step": -1,
|
||||
"need_reflect": "False"
|
||||
},
|
||||
{
|
||||
"phase": "TestModification",
|
||||
"phaseType": "SimplePhase",
|
||||
"max_turn_step": -1,
|
||||
"need_reflect": "False"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"phase": "EnvironmentDoc",
|
||||
"phaseType": "SimplePhase",
|
||||
"max_turn_step": 1,
|
||||
"need_reflect": "True"
|
||||
},
|
||||
{
|
||||
"phase": "Manual",
|
||||
"phaseType": "SimplePhase",
|
||||
"max_turn_step": 1,
|
||||
"need_reflect": "False"
|
||||
}
|
||||
],
|
||||
"recruitments": [
|
||||
"Chief Executive Officer",
|
||||
"Counselor",
|
||||
"Chief Human Resource Officer",
|
||||
"Chief Product Officer",
|
||||
"Chief Technology Officer",
|
||||
"Programmer",
|
||||
"Code Reviewer",
|
||||
"Software Test Engineer",
|
||||
"Chief Creative Officer"
|
||||
],
|
||||
"clear_structure": "True",
|
||||
"brainstorming": "False",
|
||||
"gui_design": "True",
|
||||
"git_management": "False",
|
||||
"self_improve": "True"
|
||||
}
|
301
WareHouse/BookBreeze_THUNLP_20230825072339/PhaseConfig.json
Normal file
@ -0,0 +1,301 @@
|
||||
{
|
||||
"DemandAnalysis": {
|
||||
"assistant_role_name": "Chief Product Officer",
|
||||
"user_role_name": "Chief Executive Officer",
|
||||
"phase_prompt": [
|
||||
"ChatDev has made products in the following form before:",
|
||||
"Image: can present information in line chart, bar chart, flow chart, cloud chart, Gantt chart, etc.",
|
||||
"Document: can present information via .docx files.",
|
||||
"PowerPoint: can present information via .pptx files.",
|
||||
"Excel: can present information via .xlsx files.",
|
||||
"PDF: can present information via .pdf files.",
|
||||
"Website: can present personal resume, tutorial, products, or ideas, via .html files.",
|
||||
"Application: can implement visualized game, software, tool, etc, via python.",
|
||||
"Dashboard: can display a panel visualizing real-time information.",
|
||||
"Mind Map: can represent ideas, with related concepts arranged around a core concept.",
|
||||
"As the {assistant_role}, to satisfy the new user's demand and the product should be realizable, you should keep discussing with me to decide which product modality do we want the product to be?",
|
||||
"Note that we must ONLY discuss the product modality and do not discuss anything else! Once we all have expressed our opinion(s) and agree with the results of the discussion unanimously, any of us must actively terminate the discussion by replying with only one line, which starts with a single word <INFO>, followed by our final product modality without any other words, e.g., \"<INFO> PowerPoint\"."
|
||||
]
|
||||
},
|
||||
"LanguageChoose": {
|
||||
"assistant_role_name": "Chief Technology Officer",
|
||||
"user_role_name": "Chief Executive Officer",
|
||||
"phase_prompt": [
|
||||
"According to the new user's task and some creative brainstorm ideas listed below: ",
|
||||
"Task: \"{task}\".",
|
||||
"Modality: \"{modality}\".",
|
||||
"Ideas: \"{ideas}\".",
|
||||
"We have decided to complete the task through a executable software implemented via a programming language. ",
|
||||
"As the {assistant_role}, to satisfy the new user's demand and make the software realizable, you should propose a concrete programming language. If python can complete this task via Python, please answer Python; otherwise, answer another programming language (e.g., Java, C++, etc,).",
|
||||
"Note that we must ONLY discuss the target programming language and do not discuss anything else! Once we all have expressed our opinion(s) and agree with the results of the discussion unanimously, any of us must actively terminate the discussion and conclude the best programming language we have discussed without any other words or reasons, return only one line using the format: \"<INFO> *\" where \"*\" represents a programming language."
|
||||
]
|
||||
},
|
||||
"Coding": {
|
||||
"assistant_role_name": "Programmer",
|
||||
"user_role_name": "Chief Technology Officer",
|
||||
"phase_prompt": [
|
||||
"According to the new user's task and our software designs listed below: ",
|
||||
"Task: \"{task}\".",
|
||||
"Modality: \"{modality}\".",
|
||||
"Programming Language: \"{language}\"",
|
||||
"Ideas:\"{ideas}\"",
|
||||
"We have decided to complete the task through a executable software with multiple files implemented via {language}. As the {assistant_role}, to satisfy the new user's demands, you should write one or multiple files and make sure that every detail of the architecture is, in the end, implemented as code. {gui}",
|
||||
"Think step by step and reason yourself to the right decisions to make sure we get it right.",
|
||||
"You will first lay out the names of the core classes, functions, methods that will be necessary, as well as a quick comment on their purpose.",
|
||||
"Then you will output the content of each file including complete code. Each file must strictly follow a markdown code block format, where the following tokens must be replaced such that \"FILENAME\" is the lowercase file name including the file extension, \"LANGUAGE\" in the programming language, \"DOCSTRING\" is a string literal specified in source code that is used to document a specific segment of code, and \"CODE\" is the original code:",
|
||||
"FILENAME",
|
||||
"```LANGUAGE",
|
||||
"'''",
|
||||
"DOCSTRING",
|
||||
"'''",
|
||||
"CODE",
|
||||
"```",
|
||||
"You will start with the \"main\" file, then go to the ones that are imported by that file, and so on.",
|
||||
"Please note that the code should be fully functional. Ensure to implement all functions. No placeholders (such as 'pass' in Python)."
|
||||
]
|
||||
},
|
||||
"ArtDesign": {
|
||||
"assistant_role_name": "Programmer",
|
||||
"user_role_name": "Chief Creative Officer",
|
||||
"phase_prompt": [
|
||||
"Our developed source codes and corresponding test reports are listed below: ",
|
||||
"Task: \"{task}\".",
|
||||
"Programming Language: \"{language}\"",
|
||||
"Source Codes:",
|
||||
"\"{codes}\"",
|
||||
"Note that each file must strictly follow a markdown code block format, where the following tokens must be replaced such that \"FILENAME\" is the lowercase file name including the file extension, \"LANGUAGE\" in the programming language, \"DOCSTRING\" is a string literal specified in source code that is used to document a specific segment of code, and \"CODE\" is the original code:",
|
||||
"FILENAME",
|
||||
"```LANGUAGE",
|
||||
"'''",
|
||||
"DOCSTRING",
|
||||
"'''",
|
||||
"CODE",
|
||||
"```",
|
||||
"As the {assistant_role}, to satisfy the new user's demand and equip the software with a beautiful graphical user interface (GUI), we will discuss and design many decorative images for GUI decoration. Now, we keep discussing the GUI beautification by listing some functionally independent elements in GUI that are being considered to be decorated by different pictures. For example, ten digits (0-9) in a calculator are functionally independent.",
|
||||
"To answer, use the format: \" FILENAME.png: DESCRIPTION\" where \"FILENAME\" is the filename of the image and \"DESCRIPTION\" denotes the detailed description of the independent elements. For example:",
|
||||
"'''",
|
||||
"button_1.png: The button with the number \"1\" on it.",
|
||||
"button_multiply.png: The button with the multiplication symbol (\"*\") on it.",
|
||||
"background.png: the background color to decorate the Go game",
|
||||
"'''",
|
||||
"Now, we keep discussing the to-be-decorated elements in the GUI and list all functionally independent elements as much as possible. If no further elements that are functionally independent or that should be further described, return only one line like \"<INFO> Finished\" in your reply."
|
||||
]
|
||||
},
|
||||
"ArtIntegration": {
|
||||
"assistant_role_name": "Programmer",
|
||||
"user_role_name": "Chief Creative Officer",
|
||||
"phase_prompt": [
|
||||
"Our developed source codes and corresponding test reports are listed below: ",
|
||||
"Task: \"{task}\".",
|
||||
"Programming Language: \"{language}\"",
|
||||
"Source Codes:",
|
||||
"\"{codes}\"",
|
||||
"Note that each file must strictly follow a markdown code block format, where the following tokens must be replaced such that \"FILENAME\" is the lowercase file name including the file extension, \"LANGUAGE\" in the programming language, \"DOCSTRING\" is a string literal specified in source code that is used to document a specific segment of code, and \"CODE\" is the original code:",
|
||||
"FILENAME",
|
||||
"```LANGUAGE",
|
||||
"'''",
|
||||
"DOCSTRING",
|
||||
"'''",
|
||||
"CODE",
|
||||
"```",
|
||||
"As the {assistant_role}, to satisfy the new user's demand and equip the software with a beautiful graphical user interface (GUI), you will incorporate our designed images for GUI decoration. Here are some ready-made high-quality pictures and corresponding descriptions:",
|
||||
"{images}",
|
||||
"Note that the designed images have a fixed size of 256x256 pixels and the images are located in the same directory as all the Python files; please dynamically scaling these images according to the size of GUI, and use \"self.*\" to avoid displaying-related problems caused by automatic garbage collection. For example:",
|
||||
"```",
|
||||
"self.image = ImageTk.PhotoImage(Image.open(\"./image.png\").resize((50, 50)))",
|
||||
"```",
|
||||
"Now, use some or all of the pictures into the GUI to make it more beautiful and creative. Output codes strictly following the required format mentioned above."
|
||||
]
|
||||
},
|
||||
"CodeComplete": {
|
||||
"assistant_role_name": "Programmer",
|
||||
"user_role_name": "Chief Technology Officer",
|
||||
"phase_prompt": [
|
||||
"According to the new user's task and our software designs listed below: ",
|
||||
"Task: \"{task}\".",
|
||||
"Modality: \"{modality}\".",
|
||||
"Programming Language: \"{language}\"",
|
||||
"Codes:",
|
||||
"\"{codes}\"",
|
||||
"Unimplemented File:",
|
||||
"\"{unimplemented_file}\"",
|
||||
"In our software, each file must strictly follow a markdown code block format, where the following tokens must be replaced such that \"FILENAME\" is the lowercase file name including the file extension, \"LANGUAGE\" in the programming language, \"DOCSTRING\" is a string literal specified in source code that is used to document a specific segment of code, and \"CODE\" is the original code:",
|
||||
"FILENAME",
|
||||
"```LANGUAGE",
|
||||
"'''",
|
||||
"DOCSTRING",
|
||||
"'''",
|
||||
"CODE",
|
||||
"```",
|
||||
"As the {assistant_role}, to satisfy the complete function of our developed software, you have to implement all methods in the {unimplemented_file} file which contains a unimplemented class. Now, implement all methods of the {unimplemented_file} and all other codes needed, then output the fully implemented codes, strictly following the required format."
|
||||
]
|
||||
},
|
||||
"CodeReviewComment": {
|
||||
"assistant_role_name": "Code Reviewer",
|
||||
"user_role_name": "Programmer",
|
||||
"phase_prompt": [
|
||||
"According to the new user's task and our software designs: ",
|
||||
"Task: \"{task}\".",
|
||||
"Modality: \"{modality}\".",
|
||||
"Programming Language: \"{language}\"",
|
||||
"Ideas: \"{ideas}\"",
|
||||
"Codes:",
|
||||
"\"{codes}\"",
|
||||
"As the {assistant_role}, to make the software directly operable without further coding, ChatDev have formulated the following regulations:",
|
||||
"1) all referenced classes should be imported;",
|
||||
"2) all methods should be implemented;",
|
||||
"3) all methods need to have the necessary comments;",
|
||||
"4) no potential bugs;",
|
||||
"5) The entire project conforms to the tasks proposed by the user;",
|
||||
"6) most importantly, do not only check the errors in the code, but also the logic of code. Make sure that user can interact with generated software without losing any feature in the requirement;",
|
||||
"Now, you should check the above regulations one by one and review the codes in detail, propose one comment with the highest priority about the codes, and give me instructions on how to fix. Tell me your comment with the highest priority and corresponding suggestions on revision. If the codes are perfect and you have no comment on them, return only one line like \"<INFO> Finished\"."
|
||||
]
|
||||
},
|
||||
"CodeReviewModification": {
|
||||
"assistant_role_name": "Programmer",
|
||||
"user_role_name": "Code Reviewer",
|
||||
"phase_prompt": [
|
||||
"According to the new user's task, our designed product modality, languages and ideas, our developed first-edition source codes are listed below: ",
|
||||
"Task: \"{task}\".",
|
||||
"Modality: \"{modality}\".",
|
||||
"Programming Language: \"{language}\"",
|
||||
"Ideas: \"{ideas}\"",
|
||||
"Codes: ",
|
||||
"\"{codes}\"",
|
||||
"Comments on Codes:",
|
||||
"\"{comments}\"",
|
||||
"In the software, each file must strictly follow a markdown code block format, where the following tokens must be replaced such that \"FILENAME\" is the lowercase file name including the file extension, \"LANGUAGE\" in the programming language, \"DOCSTRING\" is a string literal specified in source code that is used to document a specific segment of code, and \"CODE\" is the original code. Format:",
|
||||
"FILENAME",
|
||||
"```LANGUAGE",
|
||||
"'''",
|
||||
"DOCSTRING",
|
||||
"'''",
|
||||
"CODE",
|
||||
"```",
|
||||
"As the {assistant_role}, to satisfy the new user's demand and make the software creative, executive and robust, you should modify corresponding codes according to the comments. Then, output the full and complete codes with all bugs fixed based on the comments. Return all codes strictly following the required format."
|
||||
]
|
||||
},
|
||||
"CodeReviewHuman": {
|
||||
"assistant_role_name": "Programmer",
|
||||
"user_role_name": "Code Reviewer",
|
||||
"phase_prompt": [
|
||||
"According to the new user's task, our designed product modality and three creative ideas, our developed first-edition source codes are listed below: ",
|
||||
"Task: \"{task}\".",
|
||||
"Modality: \"{modality}\".",
|
||||
"Programming Language: \"{language}\"",
|
||||
"Ideas: \"{ideas}\"",
|
||||
"Codes: ",
|
||||
"\"{codes}\"",
|
||||
"Comments on Codes:",
|
||||
"\"{comments}\"",
|
||||
"In the software, each file must strictly follow a markdown code block format, where the following tokens must be replaced such that \"FILENAME\" is the lowercase file name including the file extension, \"LANGUAGE\" in the programming language, \"DOCSTRING\" is a string literal specified in source code that is used to document a specific segment of code, and \"CODE\" is the original code. Format:",
|
||||
"FILENAME",
|
||||
"```LANGUAGE",
|
||||
"'''",
|
||||
"DOCSTRING",
|
||||
"'''",
|
||||
"CODE",
|
||||
"```",
|
||||
"As the {assistant_role}, to satisfy the new user's demand and make the software creative, executive and robust, you should modify corresponding codes according to the comments. Then, output the fixed codes strictly following the required format."
|
||||
]
|
||||
},
|
||||
"TestErrorSummary": {
|
||||
"assistant_role_name": "Programmer",
|
||||
"user_role_name": "Software Test Engineer",
|
||||
"phase_prompt": [
|
||||
"Our developed source codes and corresponding test reports are listed below: ",
|
||||
"Programming Language: \"{language}\"",
|
||||
"Source Codes:",
|
||||
"\"{codes}\"",
|
||||
"Test Reports of Source Codes:",
|
||||
"\"{test_reports}\"",
|
||||
"According to my test reports, please locate and summarize the bugs that cause the problem."
|
||||
]
|
||||
},
|
||||
"TestModification": {
|
||||
"assistant_role_name": "Programmer",
|
||||
"user_role_name": "Software Test Engineer",
|
||||
"phase_prompt": [
|
||||
"Our developed source codes and corresponding test reports are listed below: ",
|
||||
"Programming Language: \"{language}\"",
|
||||
"Source Codes:",
|
||||
"\"{codes}\"",
|
||||
"Test Reports of Source Codes:",
|
||||
"\"{test_reports}\"",
|
||||
"Error Summary of Test Reports:",
|
||||
"\"{error_summary}\"",
|
||||
"Note that each file must strictly follow a markdown code block format, where the following tokens must be replaced such that \"FILENAME\" is the lowercase file name including the file extension, \"LANGUAGE\" in the programming language, \"DOCSTRING\" is a string literal specified in source code that is used to document a specific segment of code, and \"CODE\" is the original code:",
|
||||
"FILENAME",
|
||||
"```LANGUAGE",
|
||||
"'''",
|
||||
"DOCSTRING",
|
||||
"'''",
|
||||
"CODE",
|
||||
"```",
|
||||
"As the {assistant_role}, to satisfy the new user's demand and make the software execute smoothly and robustly, you should modify the codes based on the error summary. Now, use the format exemplified above and modify the problematic codes based on the error summary. Output the codes that you fixed based on the test reported and corresponding explanations (strictly follow the format defined above, including FILENAME, LANGUAGE, DOCSTRING and CODE; incomplete \"TODO\" codes are strictly prohibited). If no bugs are reported, please return only one line like \"<INFO> Finished\"."
|
||||
]
|
||||
},
|
||||
"EnvironmentDoc": {
|
||||
"assistant_role_name": "Programmer",
|
||||
"user_role_name": "Chief Technology Officer",
|
||||
"phase_prompt": [
|
||||
"The new user's task and our developed codes are listed: ",
|
||||
"Task: \"{task}\".",
|
||||
"Modality: \"{modality}\".",
|
||||
"Programming Language: \"{language}\"",
|
||||
"Ideas: \"{ideas}\"",
|
||||
"Codes: ",
|
||||
"\"{codes}\"",
|
||||
"As the {assistant_role}, you should write a requirements.txt file, which is commonly used in Python projects to specify the dependencies or packages required for the project to run properly. It serves as a way to document and manage the project's dependencies in a standardized format. For example:",
|
||||
"requirements.txt",
|
||||
"```",
|
||||
"numpy==1.19.2",
|
||||
"pandas>=1.1.4",
|
||||
"```",
|
||||
"According to the codes and file format listed above, write a requirements.txt file to specify the dependencies or packages required for the project to run properly."
|
||||
]
|
||||
},
|
||||
"Manual": {
|
||||
"assistant_role_name": "Chief Product Officer",
|
||||
"user_role_name": "Chief Executive Officer",
|
||||
"phase_prompt": [
|
||||
"The new user's task, our developed codes and required dependencies are listed: ",
|
||||
"Task: \"{task}\".",
|
||||
"Modality: \"{modality}\".",
|
||||
"Programming Language: \"{language}\"",
|
||||
"Ideas: \"{ideas}\"",
|
||||
"Codes: ",
|
||||
"\"{codes}\"",
|
||||
"Requirements:",
|
||||
"\"{requirements}\"",
|
||||
"As the {assistant_role}, by using Markdown, you should write a manual.md file which is a detailed user manual to use the software, including introducing main functions of the software, how to install environment dependencies and how to use/play it. For example:",
|
||||
"manual.md",
|
||||
"```",
|
||||
"# LangChain",
|
||||
"Building applications with LLMs through composability",
|
||||
"Looking for the JS/TS version? Check out LangChain.js.",
|
||||
"**Production Support:** As you move your LangChains into production, we'd love to offer more comprehensive support.",
|
||||
"Please fill out this form and we'll set up a dedicated support Slack channel.",
|
||||
"## Quick Install",
|
||||
"`pip install langchain`",
|
||||
"or",
|
||||
"`conda install langchain -c conda-forge`",
|
||||
"## 🤔 What is this?",
|
||||
"Large language models (LLMs) are emerging as a transformative technology, enabling developers to build applications that they previously could not. However, using these LLMs in isolation is often insufficient for creating a truly powerful app - the real power comes when you can combine them with other sources of computation or knowledge.",
|
||||
"This library aims to assist in the development of those types of applications. Common examples of these applications include:",
|
||||
"**❓ Question Answering over specific documents**",
|
||||
"- Documentation",
|
||||
"- End-to-end Example: Question Answering over Notion Database",
|
||||
"**🤖 Agents**",
|
||||
"- Documentation",
|
||||
"- End-to-end Example: GPT+WolframAlpha",
|
||||
"## 📖 Documentation",
|
||||
"Please see [here](https://python.langchain.com) for full documentation on:",
|
||||
"- Getting started (installation, setting up the environment, simple examples)",
|
||||
"- How-To examples (demos, integrations, helper functions)",
|
||||
"- Reference (full API docs)",
|
||||
"- Resources (high-level explanation of core concepts)",
|
||||
"```"
|
||||
]
|
||||
}
|
||||
}
|
65
WareHouse/BookBreeze_THUNLP_20230825072339/RoleConfig.json
Normal file
@ -0,0 +1,65 @@
|
||||
{
|
||||
"Chief Executive Officer": [
|
||||
"{chatdev_prompt}",
|
||||
"You are Chief Executive Officer. Now, we are both working at ChatDev and we share a common interest in collaborating to successfully complete a task assigned by a new customer.",
|
||||
"Your main responsibilities include being an active decision-maker on users' demands and other key policy issues, leader, manager, and executor. Your decision-making role involves high-level decisions about policy and strategy; and your communicator role can involve speaking to the organization's management and employees.",
|
||||
"Here is a new customer's task: {task}.",
|
||||
"To complete the task, I will give you one or more instructions, and you must help me to write a specific solution that appropriately solves the requested instruction based on your expertise and my needs."
|
||||
],
|
||||
"Chief Product Officer": [
|
||||
"{chatdev_prompt}",
|
||||
"You are Chief Product Officer. we are both working at ChatDev. We share a common interest in collaborating to successfully complete a task assigned by a new customer.",
|
||||
"You are responsible for all product-related matters in ChatDev. Usually includes product design, product strategy, product vision, product innovation, project management and product marketing.",
|
||||
"Here is a new customer's task: {task}.",
|
||||
"To complete the task, you must write a response that appropriately solves the requested instruction based on your expertise and customer's needs."
|
||||
],
|
||||
"Counselor": [
|
||||
"{chatdev_prompt}",
|
||||
"You are Counselor. Now, we share a common interest in collaborating to successfully complete a task assigned by a new customer.",
|
||||
"Your main responsibilities include asking what user and customer think and provide your valuable suggestions. ",
|
||||
"Here is a new customer's task: {task}.",
|
||||
"To complete the task, I will give you one or more instructions, and you must help me to write a specific solution that appropriately solves the requested instruction based on your expertise and my needs."
|
||||
],
|
||||
"Chief Technology Officer": [
|
||||
"{chatdev_prompt}",
|
||||
"You are Chief Technology Officer. we are both working at ChatDev. We share a common interest in collaborating to successfully complete a task assigned by a new customer.",
|
||||
"You are very familiar to information technology. You will make high-level decisions for the overarching technology infrastructure that closely align with the organization's goals, while you work alongside the organization's information technology (\"IT\") staff members to perform everyday operations.",
|
||||
"Here is a new customer's task: {task}.",
|
||||
"To complete the task, You must write a response that appropriately solves the requested instruction based on your expertise and customer's needs."
|
||||
],
|
||||
"Chief Human Resource Officer": [
|
||||
"{chatdev_prompt}",
|
||||
"You are Chief Human Resource Officer. Now, we are both working at ChatDev and we share a common interest in collaborating to successfully complete a task assigned by a new customer.",
|
||||
"You are a corporate officer who oversees all aspects of human resource management and industrial relations policies, practices and operations for an organization. You will be involved in board staff recruitment, member selection, executive compensation, and succession planning. Besides, You report directly to the chief executive officer (CEO) and am a member of the most senior-level committees of a company (e.g., executive committee or office of CEO).",
|
||||
"Here is a new customer's task: {task}.",
|
||||
"To complete the task, you must write a response that appropriately solves the requested instruction based on your expertise and customer's needs."
|
||||
],
|
||||
"Programmer": [
|
||||
"{chatdev_prompt}",
|
||||
"You are Programmer. we are both working at ChatDev. We share a common interest in collaborating to successfully complete a task assigned by a new customer.",
|
||||
"You can write/create computer software or applications by providing a specific programming language to the computer. You have extensive computing and coding experience in many varieties of programming languages and platforms, such as Python, Java, C, C++, HTML, CSS, JavaScript, XML, SQL, PHP, etc,.",
|
||||
"Here is a new customer's task: {task}.",
|
||||
"To complete the task, you must write a response that appropriately solves the requested instruction based on your expertise and customer's needs."
|
||||
],
|
||||
"Code Reviewer": [
|
||||
"{chatdev_prompt}",
|
||||
"You are Code Reviewer. we are both working at ChatDev. We share a common interest in collaborating to successfully complete a task assigned by a new customer.",
|
||||
"You can help programmers to assess source codes for software troubleshooting, fix bugs to increase code quality and robustness, and offer proposals to improve the source codes.",
|
||||
"Here is a new customer's task: {task}.",
|
||||
"To complete the task, you must write a response that appropriately solves the requested instruction based on your expertise and customer's needs."
|
||||
],
|
||||
"Software Test Engineer": [
|
||||
"{chatdev_prompt}",
|
||||
"You are Software Test Engineer. we are both working at ChatDev. We share a common interest in collaborating to successfully complete a task assigned by a new customer.",
|
||||
"You can use the software as intended to analyze its functional properties, design manual and automated test procedures to evaluate each software product, build and implement software evaluation test programs, and run test programs to ensure that testing protocols evaluate the software correctly.",
|
||||
"Here is a new customer's task: {task}.",
|
||||
"To complete the task, you must write a response that appropriately solves the requested instruction based on your expertise and customer's needs."
|
||||
],
|
||||
"Chief Creative Officer": [
|
||||
"{chatdev_prompt}",
|
||||
"You are Chief Creative Officer. we are both working at ChatDev. We share a common interest in collaborating to successfully complete a task assigned by a new customer.",
|
||||
"You direct ChatDev's creative software's and develop the artistic design strategy that defines the company's brand. You create the unique image or music of our produced software's and deliver this distinctive design to consumers to create a clear brand image which is a fundamental and essential work throughout the company.",
|
||||
"Here is a new customer's task: {task}.",
|
||||
"To complete the task, you must write a response that appropriately solves the requested instruction based on your expertise and customer's needs."
|
||||
]
|
||||
}
|
80
WareHouse/BookBreeze_THUNLP_20230825072339/ebook_reader.py
Normal file
@ -0,0 +1,80 @@
|
||||
'''
|
||||
This file contains the EbookReader class which represents the e-book reader application.
|
||||
'''
|
||||
import tkinter as tk
|
||||
from tkinter import filedialog
|
||||
from tkinter import messagebox
|
||||
import PyPDF2
|
||||
import ebooklib
|
||||
from ebooklib import epub
|
||||
import mobi
|
||||
class EbookReader:
|
||||
def __init__(self):
|
||||
self.root = tk.Tk()
|
||||
self.root.title("E-book Reader")
|
||||
self.root.geometry("800x600")
|
||||
self.current_book = None
|
||||
self.bookmarks = []
|
||||
self.create_menu()
|
||||
self.create_book_display()
|
||||
self.create_bookmarks_panel()
|
||||
def create_menu(self):
|
||||
menu_bar = tk.Menu(self.root)
|
||||
file_menu = tk.Menu(menu_bar, tearoff=0)
|
||||
file_menu.add_command(label="Open", command=self.open_book)
|
||||
file_menu.add_command(label="Exit", command=self.root.quit)
|
||||
menu_bar.add_cascade(label="File", menu=file_menu)
|
||||
self.root.config(menu=menu_bar)
|
||||
def create_book_display(self):
|
||||
self.book_display = tk.Text(self.root, wrap=tk.WORD)
|
||||
self.book_display.pack(fill=tk.BOTH, expand=True)
|
||||
def create_bookmarks_panel(self):
|
||||
self.bookmarks_panel = tk.Frame(self.root)
|
||||
self.bookmarks_panel.pack(side=tk.RIGHT, fill=tk.Y)
|
||||
self.bookmarks_label = tk.Label(self.bookmarks_panel, text="Bookmarks")
|
||||
self.bookmarks_label.pack()
|
||||
self.bookmarks_listbox = tk.Listbox(self.bookmarks_panel)
|
||||
self.bookmarks_listbox.pack(fill=tk.BOTH, expand=True)
|
||||
self.add_bookmark_button = tk.Button(self.bookmarks_panel, text="Add Bookmark", command=self.add_bookmark)
|
||||
self.add_bookmark_button.pack()
|
||||
self.remove_bookmark_button = tk.Button(self.bookmarks_panel, text="Remove Bookmark", command=self.remove_bookmark)
|
||||
self.remove_bookmark_button.pack()
|
||||
def open_book(self):
|
||||
filetypes = [("PDF Files", "*.pdf"), ("EPUB Files", "*.epub"), ("MOBI Files", "*.mobi")]
|
||||
filepath = filedialog.askopenfilename(filetypes=filetypes)
|
||||
if filepath:
|
||||
self.current_book = filepath
|
||||
self.book_display.delete(1.0, tk.END)
|
||||
self.book_display.insert(tk.END, f"Opening book: {filepath}")
|
||||
if filepath.endswith(".pdf"):
|
||||
pdf_file = open(filepath, "rb")
|
||||
pdf_reader = PyPDF2.PdfReader(pdf_file)
|
||||
num_pages = len(pdf_reader.pages)
|
||||
for page_num in range(num_pages):
|
||||
page = pdf_reader.pages[page_num]
|
||||
self.book_display.insert(tk.END, page.extract_text())
|
||||
pdf_file.close()
|
||||
elif filepath.endswith(".epub"):
|
||||
book = epub.read_epub(filepath)
|
||||
for item in book.get_items():
|
||||
if item.get_type() == ebooklib.ITEM_DOCUMENT:
|
||||
self.book_display.insert(tk.END, item.get_content())
|
||||
elif filepath.endswith(".mobi"):
|
||||
mobi_book = mobi.open(filepath)
|
||||
for i in range(mobi_book.num_pages):
|
||||
self.book_display.insert(tk.END, mobi_book.read_page(i))
|
||||
else:
|
||||
messagebox.showinfo("No File Selected", "No e-book file selected.")
|
||||
def add_bookmark(self):
|
||||
if self.current_book:
|
||||
bookmark = self.book_display.index(tk.INSERT)
|
||||
self.bookmarks.append(bookmark)
|
||||
self.bookmarks_listbox.insert(tk.END, f"Bookmark {len(self.bookmarks)}")
|
||||
def remove_bookmark(self):
|
||||
selected_index = self.bookmarks_listbox.curselection()
|
||||
if selected_index:
|
||||
bookmark_index = selected_index[0]
|
||||
self.bookmarks.pop(bookmark_index)
|
||||
self.bookmarks_listbox.delete(selected_index)
|
||||
def start(self):
|
||||
self.root.mainloop()
|
11
WareHouse/BookBreeze_THUNLP_20230825072339/main.py
Normal file
@ -0,0 +1,11 @@
|
||||
'''
|
||||
This is the main file of the e-book reader application.
|
||||
'''
|
||||
from ebook_reader import EbookReader
|
||||
def main():
|
||||
# Create an instance of the EbookReader
|
||||
reader = EbookReader()
|
||||
# Start the application
|
||||
reader.start()
|
||||
if __name__ == "__main__":
|
||||
main()
|
66
WareHouse/BookBreeze_THUNLP_20230825072339/manual.md
Normal file
@ -0,0 +1,66 @@
|
||||
# E-book Reader User Manual
|
||||
|
||||
## Introduction
|
||||
|
||||
The E-book Reader is a simple application that allows users to read electronic books in various formats such as PDF, EPUB, and MOBI. It provides functionality for users to add and manage bookmarks within the e-books. This user manual will guide you through the installation process and explain how to use the application effectively.
|
||||
|
||||
## Installation
|
||||
|
||||
To use the E-book Reader, you need to have Python 3.x installed on your system. Follow these steps to install the necessary dependencies and run the application:
|
||||
|
||||
1. Open a terminal or command prompt.
|
||||
2. Navigate to the directory where you have downloaded the E-book Reader files.
|
||||
3. Run the following command to install the required dependencies:
|
||||
|
||||
```
|
||||
pip install -r requirements.txt
|
||||
```
|
||||
|
||||
4. Once the dependencies are installed, you can run the application by executing the following command:
|
||||
|
||||
```
|
||||
python main.py
|
||||
```
|
||||
|
||||
## Main Functions
|
||||
|
||||
### Open an E-book
|
||||
|
||||
To open an e-book, follow these steps:
|
||||
|
||||
1. Click on the "File" menu at the top of the application window.
|
||||
2. Select "Open" from the dropdown menu.
|
||||
3. Choose an e-book file in PDF, EPUB, or MOBI format from your file system.
|
||||
4. The content of the e-book will be displayed in the main window.
|
||||
|
||||
### Add a Bookmark
|
||||
|
||||
To add a bookmark within an e-book, follow these steps:
|
||||
|
||||
1. While reading the e-book, navigate to the desired page.
|
||||
2. Click on the "Add Bookmark" button in the bookmarks panel on the right side of the application window.
|
||||
3. A new bookmark will be added to the bookmarks list.
|
||||
|
||||
### Remove a Bookmark
|
||||
|
||||
To remove a bookmark, follow these steps:
|
||||
|
||||
1. Click on the bookmark you want to remove in the bookmarks list.
|
||||
2. Click on the "Remove Bookmark" button in the bookmarks panel.
|
||||
3. The selected bookmark will be removed from the bookmarks list.
|
||||
|
||||
### Exit the Application
|
||||
|
||||
To exit the application, follow these steps:
|
||||
|
||||
1. Click on the "File" menu at the top of the application window.
|
||||
2. Select "Exit" from the dropdown menu.
|
||||
3. The application will be closed.
|
||||
|
||||
## Compatibility
|
||||
|
||||
The E-book Reader is built using Python and the Tkinter library for the graphical user interface. It can be run seamlessly on any compatible device or operating system that supports Python and Tkinter.
|
||||
|
||||
## Conclusion
|
||||
|
||||
The E-book Reader provides a user-friendly experience for reading electronic books in various formats. With its support for PDF, EPUB, and MOBI files, as well as the ability to add and manage bookmarks, it offers a robust and self-contained solution for e-book reading. Enjoy your reading experience with the E-book Reader!
|
29
WareHouse/BookBreeze_THUNLP_20230825072339/meta.txt
Normal file
@ -0,0 +1,29 @@
|
||||
Task:
|
||||
develop a simple e-book reader that allows users to read electronic books in various formats. the software should support basic formats such as pdf, epub, and mobi, and provide functionality for users to add and manage bookmarks within the e-books. to ensure a user-friendly experience, the e-book reader should be built using a modern gui library that provides intuitive navigation and interactive features. it is important to note that the software should not rely on any external assets, ensuring that all necessary resources are included within the application itself. the goal is to create a robust and self-contained e-book reader that can be run seamlessly on any compatible device or operating system.
|
||||
|
||||
Config:
|
||||
ChatEnvConfig.clear_structure: True
|
||||
ChatEnvConfig.brainstorming: False
|
||||
|
||||
|
||||
Roster:
|
||||
Chief Executive Officer, Counselor, Chief Human Resource Officer, Chief Product Officer, Chief Technology Officer, Programmer, Code Reviewer, Software Test Engineer, Chief Creative Officer
|
||||
|
||||
Modality:
|
||||
application
|
||||
|
||||
Ideas:
|
||||
|
||||
|
||||
Language:
|
||||
Python
|
||||
|
||||
Code_Version:
|
||||
13.0
|
||||
|
||||
Proposed_images:
|
||||
0
|
||||
|
||||
Incorporated_images:
|
||||
0
|
||||
|
20
WareHouse/BookBreeze_THUNLP_20230825072339/readme.md
Normal file
@ -0,0 +1,20 @@
|
||||
# E-book Reader
|
||||
This is a simple e-book reader application that allows users to read electronic books in various formats. The application supports basic formats such as PDF, EPUB, and MOBI. It provides functionality for users to add and manage bookmarks within the e-books.
|
||||
## Features
|
||||
- Open e-books in PDF, EPUB, and MOBI formats
|
||||
- Display the content of the e-books
|
||||
- Add and remove bookmarks within the e-books
|
||||
## Requirements
|
||||
- Python 3.x
|
||||
- tkinter library
|
||||
- PyPDF2 library
|
||||
- ebooklib library
|
||||
- mobi library
|
||||
## Usage
|
||||
1. Run the `main.py` file to start the application.
|
||||
2. Click on the "File" menu and select "Open" to choose an e-book file.
|
||||
3. The content of the e-book will be displayed in the main window.
|
||||
4. Use the buttons in the bookmarks panel to add or remove bookmarks.
|
||||
5. To exit the application, click on the "File" menu and select "Exit".
|
||||
## License
|
||||
This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.
|
@ -0,0 +1,3 @@
|
||||
PyPDF2==1.26.0
|
||||
ebooklib==0.17.1
|
||||
mobi==0.1.0
|
@ -0,0 +1,6 @@
|
||||
[2023-28-06 18:49:18 INFO] AgentTech Starts (20230628184918)
|
||||
|
||||
[2023-28-06 18:49:18 INFO] log_filename: 20230628184918.log
|
||||
|
||||
[2023-28-06 18:49:33 INFO] AgentTech Ends (20230628184933)
|
||||
|
BIN
WareHouse/Calculator_THUNLP_20230628184918/button_0.png
Normal file
After Width: | Height: | Size: 192 KiB |
BIN
WareHouse/Calculator_THUNLP_20230628184918/button_1.png
Normal file
After Width: | Height: | Size: 192 KiB |
BIN
WareHouse/Calculator_THUNLP_20230628184918/button_2.png
Normal file
After Width: | Height: | Size: 192 KiB |
BIN
WareHouse/Calculator_THUNLP_20230628184918/button_3.png
Normal file
After Width: | Height: | Size: 192 KiB |
BIN
WareHouse/Calculator_THUNLP_20230628184918/button_4.png
Normal file
After Width: | Height: | Size: 192 KiB |
BIN
WareHouse/Calculator_THUNLP_20230628184918/button_5.png
Normal file
After Width: | Height: | Size: 192 KiB |
BIN
WareHouse/Calculator_THUNLP_20230628184918/button_6.png
Normal file
After Width: | Height: | Size: 192 KiB |
BIN
WareHouse/Calculator_THUNLP_20230628184918/button_7.png
Normal file
After Width: | Height: | Size: 192 KiB |
BIN
WareHouse/Calculator_THUNLP_20230628184918/button_8.png
Normal file
After Width: | Height: | Size: 192 KiB |
BIN
WareHouse/Calculator_THUNLP_20230628184918/button_9.png
Normal file
After Width: | Height: | Size: 192 KiB |
BIN
WareHouse/Calculator_THUNLP_20230628184918/button_decimal.png
Normal file
After Width: | Height: | Size: 192 KiB |
BIN
WareHouse/Calculator_THUNLP_20230628184918/button_divide.png
Normal file
After Width: | Height: | Size: 192 KiB |
BIN
WareHouse/Calculator_THUNLP_20230628184918/button_equal.png
Normal file
After Width: | Height: | Size: 192 KiB |
BIN
WareHouse/Calculator_THUNLP_20230628184918/button_minus.png
Normal file
After Width: | Height: | Size: 192 KiB |
BIN
WareHouse/Calculator_THUNLP_20230628184918/button_multiply.png
Normal file
After Width: | Height: | Size: 192 KiB |
BIN
WareHouse/Calculator_THUNLP_20230628184918/button_plus.png
Normal file
After Width: | Height: | Size: 192 KiB |
43
WareHouse/Calculator_THUNLP_20230628184918/calculator.py
Normal file
@ -0,0 +1,43 @@
|
||||
'''
|
||||
This file contains the Calculator class that defines the calculator GUI and its functionality.
|
||||
'''
|
||||
import tkinter as tk
|
||||
from PIL import Image, ImageTk
|
||||
class Calculator:
|
||||
def __init__(self, root):
|
||||
self.root = root
|
||||
self.root.title("Basic Calculator")
|
||||
self.entry = tk.Entry(self.root, width=30)
|
||||
self.entry.grid(row=0, column=0, columnspan=4, padx=10, pady=10)
|
||||
self.create_buttons()
|
||||
def create_buttons(self):
|
||||
buttons = [
|
||||
("7", "button_7.png"), ("8", "button_8.png"), ("9", "button_9.png"), ("/", "button_divide.png"),
|
||||
("4", "button_4.png"), ("5", "button_5.png"), ("6", "button_6.png"), ("*", "button_multiply.png"),
|
||||
("1", "button_1.png"), ("2", "button_2.png"), ("3", "button_3.png"), ("-", "button_minus.png"),
|
||||
("0", "button_0.png"), (".", "button_decimal.png"), ("=", "button_equal.png"), ("+", "button_plus.png")
|
||||
]
|
||||
row = 1
|
||||
col = 0
|
||||
for button_text, image_file in buttons:
|
||||
image = Image.open(image_file).resize((50, 50))
|
||||
photo = ImageTk.PhotoImage(image)
|
||||
button = tk.Button(self.root, image=photo, command=lambda button_text=button_text: self.button_click(button_text))
|
||||
button.image = photo
|
||||
button.grid(row=row, column=col, padx=5, pady=5)
|
||||
col += 1
|
||||
if col > 3:
|
||||
col = 0
|
||||
row += 1
|
||||
def button_click(self, button_text):
|
||||
current_value = self.entry.get()
|
||||
if button_text == "=":
|
||||
try:
|
||||
result = eval(current_value)
|
||||
self.entry.delete(0, tk.END)
|
||||
self.entry.insert(tk.END, str(result))
|
||||
except:
|
||||
self.entry.delete(0, tk.END)
|
||||
self.entry.insert(tk.END, "Error")
|
||||
else:
|
||||
self.entry.insert(tk.END, button_text)
|
9
WareHouse/Calculator_THUNLP_20230628184918/main.py
Normal file
@ -0,0 +1,9 @@
|
||||
'''
|
||||
This is the main file that initializes the calculator GUI.
|
||||
'''
|
||||
import tkinter as tk
|
||||
from calculator import Calculator
|
||||
if __name__ == "__main__":
|
||||
root = tk.Tk()
|
||||
calculator = Calculator(root)
|
||||
root.mainloop()
|
15
WareHouse/Calculator_THUNLP_20230628184918/meta.txt
Normal file
@ -0,0 +1,15 @@
|
||||
Task:
|
||||
|
||||
|
||||
Roster:
|
||||
Chief Executive Officer, Counselor, Chief Human Resource Officer, Chief Product Officer, Chief Technology Officer, Programmer, Code Reviewer, Software Test Engineer, Chief Creative Officer
|
||||
|
||||
Modality:
|
||||
|
||||
|
||||
Ideas:
|
||||
|
||||
|
||||
Language:
|
||||
|
||||
|
101
WareHouse/CurrencyWiz_THUNLP_20230825101851/ChatChainConfig.json
Normal file
@ -0,0 +1,101 @@
|
||||
{
|
||||
"chain": [
|
||||
{
|
||||
"phase": "DemandAnalysis",
|
||||
"phaseType": "SimplePhase",
|
||||
"max_turn_step": 2,
|
||||
"need_reflect": "True"
|
||||
},
|
||||
{
|
||||
"phase": "LanguageChoose",
|
||||
"phaseType": "SimplePhase",
|
||||
"max_turn_step": 2,
|
||||
"need_reflect": "True"
|
||||
},
|
||||
{
|
||||
"phase": "Coding",
|
||||
"phaseType": "SimplePhase",
|
||||
"max_turn_step": 1,
|
||||
"need_reflect": "False"
|
||||
},
|
||||
{
|
||||
"phase": "CodeCompleteAll",
|
||||
"phaseType": "ComposedPhase",
|
||||
"cycleNum": 10,
|
||||
"Composition": [
|
||||
{
|
||||
"phase": "CodeComplete",
|
||||
"phaseType": "SimplePhase",
|
||||
"max_turn_step": 1,
|
||||
"need_reflect": "False"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"phase": "CodeReview",
|
||||
"phaseType": "ComposedPhase",
|
||||
"cycleNum": 10,
|
||||
"Composition": [
|
||||
{
|
||||
"phase": "CodeReviewComment",
|
||||
"phaseType": "SimplePhase",
|
||||
"max_turn_step": -1,
|
||||
"need_reflect": "False"
|
||||
},
|
||||
{
|
||||
"phase": "CodeReviewModification",
|
||||
"phaseType": "SimplePhase",
|
||||
"max_turn_step": -1,
|
||||
"need_reflect": "False"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"phase": "Test",
|
||||
"phaseType": "ComposedPhase",
|
||||
"cycleNum": 10,
|
||||
"Composition": [
|
||||
{
|
||||
"phase": "TestErrorSummary",
|
||||
"phaseType": "SimplePhase",
|
||||
"max_turn_step": -1,
|
||||
"need_reflect": "False"
|
||||
},
|
||||
{
|
||||
"phase": "TestModification",
|
||||
"phaseType": "SimplePhase",
|
||||
"max_turn_step": -1,
|
||||
"need_reflect": "False"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"phase": "EnvironmentDoc",
|
||||
"phaseType": "SimplePhase",
|
||||
"max_turn_step": 1,
|
||||
"need_reflect": "True"
|
||||
},
|
||||
{
|
||||
"phase": "Manual",
|
||||
"phaseType": "SimplePhase",
|
||||
"max_turn_step": 1,
|
||||
"need_reflect": "False"
|
||||
}
|
||||
],
|
||||
"recruitments": [
|
||||
"Chief Executive Officer",
|
||||
"Counselor",
|
||||
"Chief Human Resource Officer",
|
||||
"Chief Product Officer",
|
||||
"Chief Technology Officer",
|
||||
"Programmer",
|
||||
"Code Reviewer",
|
||||
"Software Test Engineer",
|
||||
"Chief Creative Officer"
|
||||
],
|
||||
"clear_structure": "True",
|
||||
"brainstorming": "False",
|
||||
"gui_design": "True",
|
||||
"git_management": "False",
|
||||
"self_improve": "False"
|
||||
}
|
@ -0,0 +1 @@
|
||||
Design a currency converter app. Fetch real-time exchange rates online. Ensure a modern and intuitive GUI. No external assets.
|
301
WareHouse/CurrencyWiz_THUNLP_20230825101851/PhaseConfig.json
Normal file
@ -0,0 +1,301 @@
|
||||
{
|
||||
"DemandAnalysis": {
|
||||
"assistant_role_name": "Chief Product Officer",
|
||||
"user_role_name": "Chief Executive Officer",
|
||||
"phase_prompt": [
|
||||
"ChatDev has made products in the following form before:",
|
||||
"Image: can present information in line chart, bar chart, flow chart, cloud chart, Gantt chart, etc.",
|
||||
"Document: can present information via .docx files.",
|
||||
"PowerPoint: can present information via .pptx files.",
|
||||
"Excel: can present information via .xlsx files.",
|
||||
"PDF: can present information via .pdf files.",
|
||||
"Website: can present personal resume, tutorial, products, or ideas, via .html files.",
|
||||
"Application: can implement visualized game, software, tool, etc, via python.",
|
||||
"Dashboard: can display a panel visualizing real-time information.",
|
||||
"Mind Map: can represent ideas, with related concepts arranged around a core concept.",
|
||||
"As the {assistant_role}, to satisfy the new user's demand and the product should be realizable, you should keep discussing with me to decide which product modality do we want the product to be?",
|
||||
"Note that we must ONLY discuss the product modality and do not discuss anything else! Once we all have expressed our opinion(s) and agree with the results of the discussion unanimously, any of us must actively terminate the discussion by replying with only one line, which starts with a single word <INFO>, followed by our final product modality without any other words, e.g., \"<INFO> PowerPoint\"."
|
||||
]
|
||||
},
|
||||
"LanguageChoose": {
|
||||
"assistant_role_name": "Chief Technology Officer",
|
||||
"user_role_name": "Chief Executive Officer",
|
||||
"phase_prompt": [
|
||||
"According to the new user's task and some creative brainstorm ideas listed below: ",
|
||||
"Task: \"{task}\".",
|
||||
"Modality: \"{modality}\".",
|
||||
"Ideas: \"{ideas}\".",
|
||||
"We have decided to complete the task through a executable software implemented via a programming language. ",
|
||||
"As the {assistant_role}, to satisfy the new user's demand and make the software realizable, you should propose a concrete programming language. If python can complete this task via Python, please answer Python; otherwise, answer another programming language (e.g., Java, C++, etc,).",
|
||||
"Note that we must ONLY discuss the target programming language and do not discuss anything else! Once we all have expressed our opinion(s) and agree with the results of the discussion unanimously, any of us must actively terminate the discussion and conclude the best programming language we have discussed without any other words or reasons, return only one line using the format: \"<INFO> *\" where \"*\" represents a programming language."
|
||||
]
|
||||
},
|
||||
"Coding": {
|
||||
"assistant_role_name": "Programmer",
|
||||
"user_role_name": "Chief Technology Officer",
|
||||
"phase_prompt": [
|
||||
"According to the new user's task and our software designs listed below: ",
|
||||
"Task: \"{task}\".",
|
||||
"Modality: \"{modality}\".",
|
||||
"Programming Language: \"{language}\"",
|
||||
"Ideas:\"{ideas}\"",
|
||||
"We have decided to complete the task through a executable software with multiple files implemented via {language}. As the {assistant_role}, to satisfy the new user's demands, you should write one or multiple files and make sure that every detail of the architecture is, in the end, implemented as code. {gui}",
|
||||
"Think step by step and reason yourself to the right decisions to make sure we get it right.",
|
||||
"You will first lay out the names of the core classes, functions, methods that will be necessary, as well as a quick comment on their purpose.",
|
||||
"Then you will output the content of each file including complete code. Each file must strictly follow a markdown code block format, where the following tokens must be replaced such that \"FILENAME\" is the lowercase file name including the file extension, \"LANGUAGE\" in the programming language, \"DOCSTRING\" is a string literal specified in source code that is used to document a specific segment of code, and \"CODE\" is the original code:",
|
||||
"FILENAME",
|
||||
"```LANGUAGE",
|
||||
"'''",
|
||||
"DOCSTRING",
|
||||
"'''",
|
||||
"CODE",
|
||||
"```",
|
||||
"You will start with the \"main\" file, then go to the ones that are imported by that file, and so on.",
|
||||
"Please note that the code should be fully functional. Ensure to implement all functions. No placeholders (such as 'pass' in Python)."
|
||||
]
|
||||
},
|
||||
"ArtDesign": {
|
||||
"assistant_role_name": "Programmer",
|
||||
"user_role_name": "Chief Creative Officer",
|
||||
"phase_prompt": [
|
||||
"Our developed source codes and corresponding test reports are listed below: ",
|
||||
"Task: \"{task}\".",
|
||||
"Programming Language: \"{language}\"",
|
||||
"Source Codes:",
|
||||
"\"{codes}\"",
|
||||
"Note that each file must strictly follow a markdown code block format, where the following tokens must be replaced such that \"FILENAME\" is the lowercase file name including the file extension, \"LANGUAGE\" in the programming language, \"DOCSTRING\" is a string literal specified in source code that is used to document a specific segment of code, and \"CODE\" is the original code:",
|
||||
"FILENAME",
|
||||
"```LANGUAGE",
|
||||
"'''",
|
||||
"DOCSTRING",
|
||||
"'''",
|
||||
"CODE",
|
||||
"```",
|
||||
"As the {assistant_role}, to satisfy the new user's demand and equip the software with a beautiful graphical user interface (GUI), we will discuss and design many decorative images for GUI decoration. Now, we keep discussing the GUI beautification by listing some functionally independent elements in GUI that are being considered to be decorated by different pictures. For example, ten digits (0-9) in a calculator are functionally independent.",
|
||||
"To answer, use the format: \" FILENAME.png: DESCRIPTION\" where \"FILENAME\" is the filename of the image and \"DESCRIPTION\" denotes the detailed description of the independent elements. For example:",
|
||||
"'''",
|
||||
"button_1.png: The button with the number \"1\" on it.",
|
||||
"button_multiply.png: The button with the multiplication symbol (\"*\") on it.",
|
||||
"background.png: the background color to decorate the Go game",
|
||||
"'''",
|
||||
"Now, we keep discussing the to-be-decorated elements in the GUI and list all functionally independent elements as much as possible. If no further elements that are functionally independent or that should be further described, return only one line like \"<INFO> Finished\" in your reply."
|
||||
]
|
||||
},
|
||||
"ArtIntegration": {
|
||||
"assistant_role_name": "Programmer",
|
||||
"user_role_name": "Chief Creative Officer",
|
||||
"phase_prompt": [
|
||||
"Our developed source codes and corresponding test reports are listed below: ",
|
||||
"Task: \"{task}\".",
|
||||
"Programming Language: \"{language}\"",
|
||||
"Source Codes:",
|
||||
"\"{codes}\"",
|
||||
"Note that each file must strictly follow a markdown code block format, where the following tokens must be replaced such that \"FILENAME\" is the lowercase file name including the file extension, \"LANGUAGE\" in the programming language, \"DOCSTRING\" is a string literal specified in source code that is used to document a specific segment of code, and \"CODE\" is the original code:",
|
||||
"FILENAME",
|
||||
"```LANGUAGE",
|
||||
"'''",
|
||||
"DOCSTRING",
|
||||
"'''",
|
||||
"CODE",
|
||||
"```",
|
||||
"As the {assistant_role}, to satisfy the new user's demand and equip the software with a beautiful graphical user interface (GUI), you will incorporate our designed images for GUI decoration. Here are some ready-made high-quality pictures and corresponding descriptions:",
|
||||
"{images}",
|
||||
"Note that the designed images have a fixed size of 256x256 pixels and the images are located in the same directory as all the Python files; please dynamically scaling these images according to the size of GUI, and use \"self.*\" to avoid displaying-related problems caused by automatic garbage collection. For example:",
|
||||
"```",
|
||||
"self.image = ImageTk.PhotoImage(Image.open(\"./image.png\").resize((50, 50)))",
|
||||
"```",
|
||||
"Now, use some or all of the pictures into the GUI to make it more beautiful and creative. Output codes strictly following the required format mentioned above."
|
||||
]
|
||||
},
|
||||
"CodeComplete": {
|
||||
"assistant_role_name": "Programmer",
|
||||
"user_role_name": "Chief Technology Officer",
|
||||
"phase_prompt": [
|
||||
"According to the new user's task and our software designs listed below: ",
|
||||
"Task: \"{task}\".",
|
||||
"Modality: \"{modality}\".",
|
||||
"Programming Language: \"{language}\"",
|
||||
"Codes:",
|
||||
"\"{codes}\"",
|
||||
"Unimplemented File:",
|
||||
"\"{unimplemented_file}\"",
|
||||
"In our software, each file must strictly follow a markdown code block format, where the following tokens must be replaced such that \"FILENAME\" is the lowercase file name including the file extension, \"LANGUAGE\" in the programming language, \"DOCSTRING\" is a string literal specified in source code that is used to document a specific segment of code, and \"CODE\" is the original code:",
|
||||
"FILENAME",
|
||||
"```LANGUAGE",
|
||||
"'''",
|
||||
"DOCSTRING",
|
||||
"'''",
|
||||
"CODE",
|
||||
"```",
|
||||
"As the {assistant_role}, to satisfy the complete function of our developed software, you have to implement all methods in the {unimplemented_file} file which contains a unimplemented class. Now, implement all methods of the {unimplemented_file} and all other codes needed, then output the fully implemented codes, strictly following the required format."
|
||||
]
|
||||
},
|
||||
"CodeReviewComment": {
|
||||
"assistant_role_name": "Code Reviewer",
|
||||
"user_role_name": "Programmer",
|
||||
"phase_prompt": [
|
||||
"According to the new user's task and our software designs: ",
|
||||
"Task: \"{task}\".",
|
||||
"Modality: \"{modality}\".",
|
||||
"Programming Language: \"{language}\"",
|
||||
"Ideas: \"{ideas}\"",
|
||||
"Codes:",
|
||||
"\"{codes}\"",
|
||||
"As the {assistant_role}, to make the software directly operable without further coding, ChatDev have formulated the following regulations:",
|
||||
"1) all referenced classes should be imported;",
|
||||
"2) all methods should be implemented;",
|
||||
"3) all methods need to have the necessary comments;",
|
||||
"4) no potential bugs;",
|
||||
"5) The entire project conforms to the tasks proposed by the user;",
|
||||
"6) most importantly, do not only check the errors in the code, but also the logic of code. Make sure that user can interact with generated software without losing any feature in the requirement;",
|
||||
"Now, you should check the above regulations one by one and review the codes in detail, propose one comment with the highest priority about the codes, and give me instructions on how to fix. Tell me your comment with the highest priority and corresponding suggestions on revision. If the codes are perfect and you have no comment on them, return only one line like \"<INFO> Finished\"."
|
||||
]
|
||||
},
|
||||
"CodeReviewModification": {
|
||||
"assistant_role_name": "Programmer",
|
||||
"user_role_name": "Code Reviewer",
|
||||
"phase_prompt": [
|
||||
"According to the new user's task, our designed product modality, languages and ideas, our developed first-edition source codes are listed below: ",
|
||||
"Task: \"{task}\".",
|
||||
"Modality: \"{modality}\".",
|
||||
"Programming Language: \"{language}\"",
|
||||
"Ideas: \"{ideas}\"",
|
||||
"Codes: ",
|
||||
"\"{codes}\"",
|
||||
"Comments on Codes:",
|
||||
"\"{comments}\"",
|
||||
"In the software, each file must strictly follow a markdown code block format, where the following tokens must be replaced such that \"FILENAME\" is the lowercase file name including the file extension, \"LANGUAGE\" in the programming language, \"DOCSTRING\" is a string literal specified in source code that is used to document a specific segment of code, and \"CODE\" is the original code. Format:",
|
||||
"FILENAME",
|
||||
"```LANGUAGE",
|
||||
"'''",
|
||||
"DOCSTRING",
|
||||
"'''",
|
||||
"CODE",
|
||||
"```",
|
||||
"As the {assistant_role}, to satisfy the new user's demand and make the software creative, executive and robust, you should modify corresponding codes according to the comments. Then, output the full and complete codes with all bugs fixed based on the comments. Return all codes strictly following the required format."
|
||||
]
|
||||
},
|
||||
"CodeReviewHuman": {
|
||||
"assistant_role_name": "Programmer",
|
||||
"user_role_name": "Code Reviewer",
|
||||
"phase_prompt": [
|
||||
"According to the new user's task, our designed product modality and three creative ideas, our developed first-edition source codes are listed below: ",
|
||||
"Task: \"{task}\".",
|
||||
"Modality: \"{modality}\".",
|
||||
"Programming Language: \"{language}\"",
|
||||
"Ideas: \"{ideas}\"",
|
||||
"Codes: ",
|
||||
"\"{codes}\"",
|
||||
"Comments on Codes:",
|
||||
"\"{comments}\"",
|
||||
"In the software, each file must strictly follow a markdown code block format, where the following tokens must be replaced such that \"FILENAME\" is the lowercase file name including the file extension, \"LANGUAGE\" in the programming language, \"DOCSTRING\" is a string literal specified in source code that is used to document a specific segment of code, and \"CODE\" is the original code. Format:",
|
||||
"FILENAME",
|
||||
"```LANGUAGE",
|
||||
"'''",
|
||||
"DOCSTRING",
|
||||
"'''",
|
||||
"CODE",
|
||||
"```",
|
||||
"As the {assistant_role}, to satisfy the new user's demand and make the software creative, executive and robust, you should modify corresponding codes according to the comments. Then, output the fixed codes strictly following the required format."
|
||||
]
|
||||
},
|
||||
"TestErrorSummary": {
|
||||
"assistant_role_name": "Programmer",
|
||||
"user_role_name": "Software Test Engineer",
|
||||
"phase_prompt": [
|
||||
"Our developed source codes and corresponding test reports are listed below: ",
|
||||
"Programming Language: \"{language}\"",
|
||||
"Source Codes:",
|
||||
"\"{codes}\"",
|
||||
"Test Reports of Source Codes:",
|
||||
"\"{test_reports}\"",
|
||||
"According to my test reports, please locate and summarize the bugs that cause the problem."
|
||||
]
|
||||
},
|
||||
"TestModification": {
|
||||
"assistant_role_name": "Programmer",
|
||||
"user_role_name": "Software Test Engineer",
|
||||
"phase_prompt": [
|
||||
"Our developed source codes and corresponding test reports are listed below: ",
|
||||
"Programming Language: \"{language}\"",
|
||||
"Source Codes:",
|
||||
"\"{codes}\"",
|
||||
"Test Reports of Source Codes:",
|
||||
"\"{test_reports}\"",
|
||||
"Error Summary of Test Reports:",
|
||||
"\"{error_summary}\"",
|
||||
"Note that each file must strictly follow a markdown code block format, where the following tokens must be replaced such that \"FILENAME\" is the lowercase file name including the file extension, \"LANGUAGE\" in the programming language, \"DOCSTRING\" is a string literal specified in source code that is used to document a specific segment of code, and \"CODE\" is the original code:",
|
||||
"FILENAME",
|
||||
"```LANGUAGE",
|
||||
"'''",
|
||||
"DOCSTRING",
|
||||
"'''",
|
||||
"CODE",
|
||||
"```",
|
||||
"As the {assistant_role}, to satisfy the new user's demand and make the software execute smoothly and robustly, you should modify the codes based on the error summary. Now, use the format exemplified above and modify the problematic codes based on the error summary. Output the codes that you fixed based on the test reported and corresponding explanations (strictly follow the format defined above, including FILENAME, LANGUAGE, DOCSTRING and CODE; incomplete \"TODO\" codes are strictly prohibited). If no bugs are reported, please return only one line like \"<INFO> Finished\"."
|
||||
]
|
||||
},
|
||||
"EnvironmentDoc": {
|
||||
"assistant_role_name": "Programmer",
|
||||
"user_role_name": "Chief Technology Officer",
|
||||
"phase_prompt": [
|
||||
"The new user's task and our developed codes are listed: ",
|
||||
"Task: \"{task}\".",
|
||||
"Modality: \"{modality}\".",
|
||||
"Programming Language: \"{language}\"",
|
||||
"Ideas: \"{ideas}\"",
|
||||
"Codes: ",
|
||||
"\"{codes}\"",
|
||||
"As the {assistant_role}, you should write a requirements.txt file, which is commonly used in Python projects to specify the dependencies or packages required for the project to run properly. It serves as a way to document and manage the project's dependencies in a standardized format. For example:",
|
||||
"requirements.txt",
|
||||
"```",
|
||||
"numpy==1.19.2",
|
||||
"pandas>=1.1.4",
|
||||
"```",
|
||||
"According to the codes and file format listed above, write a requirements.txt file to specify the dependencies or packages required for the project to run properly."
|
||||
]
|
||||
},
|
||||
"Manual": {
|
||||
"assistant_role_name": "Chief Product Officer",
|
||||
"user_role_name": "Chief Executive Officer",
|
||||
"phase_prompt": [
|
||||
"The new user's task, our developed codes and required dependencies are listed: ",
|
||||
"Task: \"{task}\".",
|
||||
"Modality: \"{modality}\".",
|
||||
"Programming Language: \"{language}\"",
|
||||
"Ideas: \"{ideas}\"",
|
||||
"Codes: ",
|
||||
"\"{codes}\"",
|
||||
"Requirements:",
|
||||
"\"{requirements}\"",
|
||||
"As the {assistant_role}, by using Markdown, you should write a manual.md file which is a detailed user manual to use the software, including introducing main functions of the software, how to install environment dependencies and how to use/play it. For example:",
|
||||
"manual.md",
|
||||
"```",
|
||||
"# LangChain",
|
||||
"Building applications with LLMs through composability",
|
||||
"Looking for the JS/TS version? Check out LangChain.js.",
|
||||
"**Production Support:** As you move your LangChains into production, we'd love to offer more comprehensive support.",
|
||||
"Please fill out this form and we'll set up a dedicated support Slack channel.",
|
||||
"## Quick Install",
|
||||
"`pip install langchain`",
|
||||
"or",
|
||||
"`conda install langchain -c conda-forge`",
|
||||
"## 🤔 What is this?",
|
||||
"Large language models (LLMs) are emerging as a transformative technology, enabling developers to build applications that they previously could not. However, using these LLMs in isolation is often insufficient for creating a truly powerful app - the real power comes when you can combine them with other sources of computation or knowledge.",
|
||||
"This library aims to assist in the development of those types of applications. Common examples of these applications include:",
|
||||
"**❓ Question Answering over specific documents**",
|
||||
"- Documentation",
|
||||
"- End-to-end Example: Question Answering over Notion Database",
|
||||
"**🤖 Agents**",
|
||||
"- Documentation",
|
||||
"- End-to-end Example: GPT+WolframAlpha",
|
||||
"## 📖 Documentation",
|
||||
"Please see [here](https://python.langchain.com) for full documentation on:",
|
||||
"- Getting started (installation, setting up the environment, simple examples)",
|
||||
"- How-To examples (demos, integrations, helper functions)",
|
||||
"- Reference (full API docs)",
|
||||
"- Resources (high-level explanation of core concepts)",
|
||||
"```"
|
||||
]
|
||||
}
|
||||
}
|
65
WareHouse/CurrencyWiz_THUNLP_20230825101851/RoleConfig.json
Normal file
@ -0,0 +1,65 @@
|
||||
{
|
||||
"Chief Executive Officer": [
|
||||
"{chatdev_prompt}",
|
||||
"You are Chief Executive Officer. Now, we are both working at ChatDev and we share a common interest in collaborating to successfully complete a task assigned by a new customer.",
|
||||
"Your main responsibilities include being an active decision-maker on users' demands and other key policy issues, leader, manager, and executor. Your decision-making role involves high-level decisions about policy and strategy; and your communicator role can involve speaking to the organization's management and employees.",
|
||||
"Here is a new customer's task: {task}.",
|
||||
"To complete the task, I will give you one or more instructions, and you must help me to write a specific solution that appropriately solves the requested instruction based on your expertise and my needs."
|
||||
],
|
||||
"Chief Product Officer": [
|
||||
"{chatdev_prompt}",
|
||||
"You are Chief Product Officer. we are both working at ChatDev. We share a common interest in collaborating to successfully complete a task assigned by a new customer.",
|
||||
"You are responsible for all product-related matters in ChatDev. Usually includes product design, product strategy, product vision, product innovation, project management and product marketing.",
|
||||
"Here is a new customer's task: {task}.",
|
||||
"To complete the task, you must write a response that appropriately solves the requested instruction based on your expertise and customer's needs."
|
||||
],
|
||||
"Counselor": [
|
||||
"{chatdev_prompt}",
|
||||
"You are Counselor. Now, we share a common interest in collaborating to successfully complete a task assigned by a new customer.",
|
||||
"Your main responsibilities include asking what user and customer think and provide your valuable suggestions. ",
|
||||
"Here is a new customer's task: {task}.",
|
||||
"To complete the task, I will give you one or more instructions, and you must help me to write a specific solution that appropriately solves the requested instruction based on your expertise and my needs."
|
||||
],
|
||||
"Chief Technology Officer": [
|
||||
"{chatdev_prompt}",
|
||||
"You are Chief Technology Officer. we are both working at ChatDev. We share a common interest in collaborating to successfully complete a task assigned by a new customer.",
|
||||
"You are very familiar to information technology. You will make high-level decisions for the overarching technology infrastructure that closely align with the organization's goals, while you work alongside the organization's information technology (\"IT\") staff members to perform everyday operations.",
|
||||
"Here is a new customer's task: {task}.",
|
||||
"To complete the task, You must write a response that appropriately solves the requested instruction based on your expertise and customer's needs."
|
||||
],
|
||||
"Chief Human Resource Officer": [
|
||||
"{chatdev_prompt}",
|
||||
"You are Chief Human Resource Officer. Now, we are both working at ChatDev and we share a common interest in collaborating to successfully complete a task assigned by a new customer.",
|
||||
"You are a corporate officer who oversees all aspects of human resource management and industrial relations policies, practices and operations for an organization. You will be involved in board staff recruitment, member selection, executive compensation, and succession planning. Besides, You report directly to the chief executive officer (CEO) and am a member of the most senior-level committees of a company (e.g., executive committee or office of CEO).",
|
||||
"Here is a new customer's task: {task}.",
|
||||
"To complete the task, you must write a response that appropriately solves the requested instruction based on your expertise and customer's needs."
|
||||
],
|
||||
"Programmer": [
|
||||
"{chatdev_prompt}",
|
||||
"You are Programmer. we are both working at ChatDev. We share a common interest in collaborating to successfully complete a task assigned by a new customer.",
|
||||
"You can write/create computer software or applications by providing a specific programming language to the computer. You have extensive computing and coding experience in many varieties of programming languages and platforms, such as Python, Java, C, C++, HTML, CSS, JavaScript, XML, SQL, PHP, etc,.",
|
||||
"Here is a new customer's task: {task}.",
|
||||
"To complete the task, you must write a response that appropriately solves the requested instruction based on your expertise and customer's needs."
|
||||
],
|
||||
"Code Reviewer": [
|
||||
"{chatdev_prompt}",
|
||||
"You are Code Reviewer. we are both working at ChatDev. We share a common interest in collaborating to successfully complete a task assigned by a new customer.",
|
||||
"You can help programmers to assess source codes for software troubleshooting, fix bugs to increase code quality and robustness, and offer proposals to improve the source codes.",
|
||||
"Here is a new customer's task: {task}.",
|
||||
"To complete the task, you must write a response that appropriately solves the requested instruction based on your expertise and customer's needs."
|
||||
],
|
||||
"Software Test Engineer": [
|
||||
"{chatdev_prompt}",
|
||||
"You are Software Test Engineer. we are both working at ChatDev. We share a common interest in collaborating to successfully complete a task assigned by a new customer.",
|
||||
"You can use the software as intended to analyze its functional properties, design manual and automated test procedures to evaluate each software product, build and implement software evaluation test programs, and run test programs to ensure that testing protocols evaluate the software correctly.",
|
||||
"Here is a new customer's task: {task}.",
|
||||
"To complete the task, you must write a response that appropriately solves the requested instruction based on your expertise and customer's needs."
|
||||
],
|
||||
"Chief Creative Officer": [
|
||||
"{chatdev_prompt}",
|
||||
"You are Chief Creative Officer. we are both working at ChatDev. We share a common interest in collaborating to successfully complete a task assigned by a new customer.",
|
||||
"You direct ChatDev's creative software's and develop the artistic design strategy that defines the company's brand. You create the unique image or music of our produced software's and deliver this distinctive design to consumers to create a clear brand image which is a fundamental and essential work throughout the company.",
|
||||
"Here is a new customer's task: {task}.",
|
||||
"To complete the task, you must write a response that appropriately solves the requested instruction based on your expertise and customer's needs."
|
||||
]
|
||||
}
|
54
WareHouse/CurrencyWiz_THUNLP_20230825101851/main.py
Normal file
@ -0,0 +1,54 @@
|
||||
'''
|
||||
Currency Converter App
|
||||
Fetches real-time exchange rates online and provides a modern and intuitive GUI.
|
||||
Author: Programmer
|
||||
'''
|
||||
import tkinter as tk
|
||||
import requests
|
||||
class CurrencyConverterApp:
|
||||
def __init__(self):
|
||||
self.window = tk.Tk()
|
||||
self.window.title("Currency Converter")
|
||||
self.amount_label = tk.Label(self.window, text="Amount:")
|
||||
self.amount_label.pack()
|
||||
self.amount_entry = tk.Entry(self.window)
|
||||
self.amount_entry.pack()
|
||||
self.from_currency_label = tk.Label(self.window, text="From Currency:")
|
||||
self.from_currency_label.pack()
|
||||
self.from_currency_entry = tk.Entry(self.window)
|
||||
self.from_currency_entry.pack()
|
||||
self.to_currency_label = tk.Label(self.window, text="To Currency:")
|
||||
self.to_currency_label.pack()
|
||||
self.to_currency_entry = tk.Entry(self.window)
|
||||
self.to_currency_entry.pack()
|
||||
self.convert_button = tk.Button(self.window, text="Convert", command=self.convert)
|
||||
self.convert_button.pack()
|
||||
self.result_label = tk.Label(self.window, text="")
|
||||
self.result_label.pack()
|
||||
def run(self):
|
||||
self.window.mainloop()
|
||||
def convert(self):
|
||||
amount = float(self.amount_entry.get())
|
||||
from_currency = self.from_currency_entry.get().upper()
|
||||
to_currency = self.to_currency_entry.get().upper()
|
||||
if from_currency == to_currency:
|
||||
self.result_label.config(text="Cannot convert between the same currency.")
|
||||
return
|
||||
try:
|
||||
response = requests.get(f"https://api.exchangerate-api.com/v4/latest/{from_currency}")
|
||||
response.raise_for_status() # Add this line to raise an exception if the request fails
|
||||
exchange_rates = response.json()["rates"]
|
||||
if to_currency in exchange_rates:
|
||||
converted_amount = amount * exchange_rates[to_currency]
|
||||
self.result_label.config(text=f"{amount} {from_currency} = {converted_amount} {to_currency}")
|
||||
else:
|
||||
self.result_label.config(text=f"Invalid currency: {to_currency}")
|
||||
except requests.exceptions.RequestException as e:
|
||||
self.result_label.config(text="Failed to fetch exchange rates. Please try again later.")
|
||||
print(f"RequestException: {e}")
|
||||
except requests.exceptions.HTTPError as e:
|
||||
self.result_label.config(text="Failed to fetch exchange rates. Please try again later.")
|
||||
print(f"HTTPError: {e}")
|
||||
if __name__ == "__main__":
|
||||
app = CurrencyConverterApp()
|
||||
app.run()
|
52
WareHouse/CurrencyWiz_THUNLP_20230825101851/manual.md
Normal file
@ -0,0 +1,52 @@
|
||||
# Currency Converter App User Manual
|
||||
|
||||
## Introduction
|
||||
|
||||
The Currency Converter App is a Python application that allows users to convert currencies using real-time exchange rates fetched from an online API. The app provides a modern and intuitive graphical user interface (GUI) for a seamless user experience.
|
||||
|
||||
## Installation
|
||||
|
||||
To use the Currency Converter App, follow these steps:
|
||||
|
||||
1. Install Python: If you don't have Python installed on your system, download and install it from the official Python website (https://www.python.org).
|
||||
|
||||
2. Install Dependencies: Open a terminal or command prompt and run the following command to install the required dependencies:
|
||||
|
||||
```
|
||||
pip install tkinter requests
|
||||
```
|
||||
|
||||
3. Download the Source Code: Download the source code of the Currency Converter App from the provided repository or copy the code from the task description.
|
||||
|
||||
## Usage
|
||||
|
||||
To use the Currency Converter App, follow these steps:
|
||||
|
||||
1. Run the App: Open a terminal or command prompt, navigate to the directory where you saved the source code, and run the following command:
|
||||
|
||||
```
|
||||
python main.py
|
||||
```
|
||||
|
||||
2. GUI Overview: The Currency Converter App window will open, displaying the following elements:
|
||||
|
||||
- Amount Label: Enter the amount you want to convert.
|
||||
- Amount Entry: Enter the amount you want to convert.
|
||||
- From Currency Label: Enter the currency you want to convert from.
|
||||
- From Currency Entry: Enter the currency you want to convert from.
|
||||
- To Currency Label: Enter the currency you want to convert to.
|
||||
- To Currency Entry: Enter the currency you want to convert to.
|
||||
- Convert Button: Click this button to perform the currency conversion.
|
||||
- Result Label: Displays the converted amount and currencies.
|
||||
|
||||
3. Perform Currency Conversion: Enter the amount, from currency, and to currency in the respective entry fields. Then, click the "Convert" button to fetch the real-time exchange rates and display the converted amount in the result label.
|
||||
|
||||
4. Error Handling: If there is an error in fetching the exchange rates or the currencies are invalid, an appropriate error message will be displayed in the result label.
|
||||
|
||||
5. Repeat Conversion: You can repeat the currency conversion by entering new values and clicking the "Convert" button again.
|
||||
|
||||
## Conclusion
|
||||
|
||||
The Currency Converter App provides a convenient way to convert currencies using real-time exchange rates. With its modern and intuitive GUI, users can easily perform currency conversions with accurate results. Enjoy using the app and have a great experience!
|
||||
|
||||
For any further assistance or support, please contact our customer support team.
|
29
WareHouse/CurrencyWiz_THUNLP_20230825101851/meta.txt
Normal file
@ -0,0 +1,29 @@
|
||||
Task:
|
||||
Design a currency converter app. Fetch real-time exchange rates online. Ensure a modern and intuitive GUI. No external assets.
|
||||
|
||||
Config:
|
||||
ChatEnvConfig.clear_structure: True
|
||||
ChatEnvConfig.brainstorming: False
|
||||
|
||||
|
||||
Roster:
|
||||
Chief Executive Officer, Counselor, Chief Human Resource Officer, Chief Product Officer, Chief Technology Officer, Programmer, Code Reviewer, Software Test Engineer, Chief Creative Officer
|
||||
|
||||
Modality:
|
||||
application
|
||||
|
||||
Ideas:
|
||||
|
||||
|
||||
Language:
|
||||
Python
|
||||
|
||||
Code_Version:
|
||||
12.0
|
||||
|
||||
Proposed_images:
|
||||
0
|
||||
|
||||
Incorporated_images:
|
||||
0
|
||||
|
101
WareHouse/DesignDream_THUNLP_20230825072340/ChatChainConfig.json
Normal file
@ -0,0 +1,101 @@
|
||||
{
|
||||
"chain": [
|
||||
{
|
||||
"phase": "DemandAnalysis",
|
||||
"phaseType": "SimplePhase",
|
||||
"max_turn_step": 2,
|
||||
"need_reflect": "True"
|
||||
},
|
||||
{
|
||||
"phase": "LanguageChoose",
|
||||
"phaseType": "SimplePhase",
|
||||
"max_turn_step": 2,
|
||||
"need_reflect": "True"
|
||||
},
|
||||
{
|
||||
"phase": "Coding",
|
||||
"phaseType": "SimplePhase",
|
||||
"max_turn_step": 1,
|
||||
"need_reflect": "False"
|
||||
},
|
||||
{
|
||||
"phase": "CodeCompleteAll",
|
||||
"phaseType": "ComposedPhase",
|
||||
"cycleNum": 10,
|
||||
"Composition": [
|
||||
{
|
||||
"phase": "CodeComplete",
|
||||
"phaseType": "SimplePhase",
|
||||
"max_turn_step": 1,
|
||||
"need_reflect": "False"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"phase": "CodeReview",
|
||||
"phaseType": "ComposedPhase",
|
||||
"cycleNum": 10,
|
||||
"Composition": [
|
||||
{
|
||||
"phase": "CodeReviewComment",
|
||||
"phaseType": "SimplePhase",
|
||||
"max_turn_step": -1,
|
||||
"need_reflect": "False"
|
||||
},
|
||||
{
|
||||
"phase": "CodeReviewModification",
|
||||
"phaseType": "SimplePhase",
|
||||
"max_turn_step": -1,
|
||||
"need_reflect": "False"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"phase": "Test",
|
||||
"phaseType": "ComposedPhase",
|
||||
"cycleNum": 10,
|
||||
"Composition": [
|
||||
{
|
||||
"phase": "TestErrorSummary",
|
||||
"phaseType": "SimplePhase",
|
||||
"max_turn_step": -1,
|
||||
"need_reflect": "False"
|
||||
},
|
||||
{
|
||||
"phase": "TestModification",
|
||||
"phaseType": "SimplePhase",
|
||||
"max_turn_step": -1,
|
||||
"need_reflect": "False"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"phase": "EnvironmentDoc",
|
||||
"phaseType": "SimplePhase",
|
||||
"max_turn_step": 1,
|
||||
"need_reflect": "True"
|
||||
},
|
||||
{
|
||||
"phase": "Manual",
|
||||
"phaseType": "SimplePhase",
|
||||
"max_turn_step": 1,
|
||||
"need_reflect": "False"
|
||||
}
|
||||
],
|
||||
"recruitments": [
|
||||
"Chief Executive Officer",
|
||||
"Counselor",
|
||||
"Chief Human Resource Officer",
|
||||
"Chief Product Officer",
|
||||
"Chief Technology Officer",
|
||||
"Programmer",
|
||||
"Code Reviewer",
|
||||
"Software Test Engineer",
|
||||
"Chief Creative Officer"
|
||||
],
|
||||
"clear_structure": "True",
|
||||
"brainstorming": "False",
|
||||
"gui_design": "True",
|
||||
"git_management": "False",
|
||||
"self_improve": "True"
|
||||
}
|
@ -0,0 +1 @@
|
||||
Create a virtual interior design app. Allow users to decorate and furnish rooms using different styles and furniture.
|
301
WareHouse/DesignDream_THUNLP_20230825072340/PhaseConfig.json
Normal file
@ -0,0 +1,301 @@
|
||||
{
|
||||
"DemandAnalysis": {
|
||||
"assistant_role_name": "Chief Product Officer",
|
||||
"user_role_name": "Chief Executive Officer",
|
||||
"phase_prompt": [
|
||||
"ChatDev has made products in the following form before:",
|
||||
"Image: can present information in line chart, bar chart, flow chart, cloud chart, Gantt chart, etc.",
|
||||
"Document: can present information via .docx files.",
|
||||
"PowerPoint: can present information via .pptx files.",
|
||||
"Excel: can present information via .xlsx files.",
|
||||
"PDF: can present information via .pdf files.",
|
||||
"Website: can present personal resume, tutorial, products, or ideas, via .html files.",
|
||||
"Application: can implement visualized game, software, tool, etc, via python.",
|
||||
"Dashboard: can display a panel visualizing real-time information.",
|
||||
"Mind Map: can represent ideas, with related concepts arranged around a core concept.",
|
||||
"As the {assistant_role}, to satisfy the new user's demand and the product should be realizable, you should keep discussing with me to decide which product modality do we want the product to be?",
|
||||
"Note that we must ONLY discuss the product modality and do not discuss anything else! Once we all have expressed our opinion(s) and agree with the results of the discussion unanimously, any of us must actively terminate the discussion by replying with only one line, which starts with a single word <INFO>, followed by our final product modality without any other words, e.g., \"<INFO> PowerPoint\"."
|
||||
]
|
||||
},
|
||||
"LanguageChoose": {
|
||||
"assistant_role_name": "Chief Technology Officer",
|
||||
"user_role_name": "Chief Executive Officer",
|
||||
"phase_prompt": [
|
||||
"According to the new user's task and some creative brainstorm ideas listed below: ",
|
||||
"Task: \"{task}\".",
|
||||
"Modality: \"{modality}\".",
|
||||
"Ideas: \"{ideas}\".",
|
||||
"We have decided to complete the task through a executable software implemented via a programming language. ",
|
||||
"As the {assistant_role}, to satisfy the new user's demand and make the software realizable, you should propose a concrete programming language. If python can complete this task via Python, please answer Python; otherwise, answer another programming language (e.g., Java, C++, etc,).",
|
||||
"Note that we must ONLY discuss the target programming language and do not discuss anything else! Once we all have expressed our opinion(s) and agree with the results of the discussion unanimously, any of us must actively terminate the discussion and conclude the best programming language we have discussed without any other words or reasons, return only one line using the format: \"<INFO> *\" where \"*\" represents a programming language."
|
||||
]
|
||||
},
|
||||
"Coding": {
|
||||
"assistant_role_name": "Programmer",
|
||||
"user_role_name": "Chief Technology Officer",
|
||||
"phase_prompt": [
|
||||
"According to the new user's task and our software designs listed below: ",
|
||||
"Task: \"{task}\".",
|
||||
"Modality: \"{modality}\".",
|
||||
"Programming Language: \"{language}\"",
|
||||
"Ideas:\"{ideas}\"",
|
||||
"We have decided to complete the task through a executable software with multiple files implemented via {language}. As the {assistant_role}, to satisfy the new user's demands, you should write one or multiple files and make sure that every detail of the architecture is, in the end, implemented as code. {gui}",
|
||||
"Think step by step and reason yourself to the right decisions to make sure we get it right.",
|
||||
"You will first lay out the names of the core classes, functions, methods that will be necessary, as well as a quick comment on their purpose.",
|
||||
"Then you will output the content of each file including complete code. Each file must strictly follow a markdown code block format, where the following tokens must be replaced such that \"FILENAME\" is the lowercase file name including the file extension, \"LANGUAGE\" in the programming language, \"DOCSTRING\" is a string literal specified in source code that is used to document a specific segment of code, and \"CODE\" is the original code:",
|
||||
"FILENAME",
|
||||
"```LANGUAGE",
|
||||
"'''",
|
||||
"DOCSTRING",
|
||||
"'''",
|
||||
"CODE",
|
||||
"```",
|
||||
"You will start with the \"main\" file, then go to the ones that are imported by that file, and so on.",
|
||||
"Please note that the code should be fully functional. Ensure to implement all functions. No placeholders (such as 'pass' in Python)."
|
||||
]
|
||||
},
|
||||
"ArtDesign": {
|
||||
"assistant_role_name": "Programmer",
|
||||
"user_role_name": "Chief Creative Officer",
|
||||
"phase_prompt": [
|
||||
"Our developed source codes and corresponding test reports are listed below: ",
|
||||
"Task: \"{task}\".",
|
||||
"Programming Language: \"{language}\"",
|
||||
"Source Codes:",
|
||||
"\"{codes}\"",
|
||||
"Note that each file must strictly follow a markdown code block format, where the following tokens must be replaced such that \"FILENAME\" is the lowercase file name including the file extension, \"LANGUAGE\" in the programming language, \"DOCSTRING\" is a string literal specified in source code that is used to document a specific segment of code, and \"CODE\" is the original code:",
|
||||
"FILENAME",
|
||||
"```LANGUAGE",
|
||||
"'''",
|
||||
"DOCSTRING",
|
||||
"'''",
|
||||
"CODE",
|
||||
"```",
|
||||
"As the {assistant_role}, to satisfy the new user's demand and equip the software with a beautiful graphical user interface (GUI), we will discuss and design many decorative images for GUI decoration. Now, we keep discussing the GUI beautification by listing some functionally independent elements in GUI that are being considered to be decorated by different pictures. For example, ten digits (0-9) in a calculator are functionally independent.",
|
||||
"To answer, use the format: \" FILENAME.png: DESCRIPTION\" where \"FILENAME\" is the filename of the image and \"DESCRIPTION\" denotes the detailed description of the independent elements. For example:",
|
||||
"'''",
|
||||
"button_1.png: The button with the number \"1\" on it.",
|
||||
"button_multiply.png: The button with the multiplication symbol (\"*\") on it.",
|
||||
"background.png: the background color to decorate the Go game",
|
||||
"'''",
|
||||
"Now, we keep discussing the to-be-decorated elements in the GUI and list all functionally independent elements as much as possible. If no further elements that are functionally independent or that should be further described, return only one line like \"<INFO> Finished\" in your reply."
|
||||
]
|
||||
},
|
||||
"ArtIntegration": {
|
||||
"assistant_role_name": "Programmer",
|
||||
"user_role_name": "Chief Creative Officer",
|
||||
"phase_prompt": [
|
||||
"Our developed source codes and corresponding test reports are listed below: ",
|
||||
"Task: \"{task}\".",
|
||||
"Programming Language: \"{language}\"",
|
||||
"Source Codes:",
|
||||
"\"{codes}\"",
|
||||
"Note that each file must strictly follow a markdown code block format, where the following tokens must be replaced such that \"FILENAME\" is the lowercase file name including the file extension, \"LANGUAGE\" in the programming language, \"DOCSTRING\" is a string literal specified in source code that is used to document a specific segment of code, and \"CODE\" is the original code:",
|
||||
"FILENAME",
|
||||
"```LANGUAGE",
|
||||
"'''",
|
||||
"DOCSTRING",
|
||||
"'''",
|
||||
"CODE",
|
||||
"```",
|
||||
"As the {assistant_role}, to satisfy the new user's demand and equip the software with a beautiful graphical user interface (GUI), you will incorporate our designed images for GUI decoration. Here are some ready-made high-quality pictures and corresponding descriptions:",
|
||||
"{images}",
|
||||
"Note that the designed images have a fixed size of 256x256 pixels and the images are located in the same directory as all the Python files; please dynamically scaling these images according to the size of GUI, and use \"self.*\" to avoid displaying-related problems caused by automatic garbage collection. For example:",
|
||||
"```",
|
||||
"self.image = ImageTk.PhotoImage(Image.open(\"./image.png\").resize((50, 50)))",
|
||||
"```",
|
||||
"Now, use some or all of the pictures into the GUI to make it more beautiful and creative. Output codes strictly following the required format mentioned above."
|
||||
]
|
||||
},
|
||||
"CodeComplete": {
|
||||
"assistant_role_name": "Programmer",
|
||||
"user_role_name": "Chief Technology Officer",
|
||||
"phase_prompt": [
|
||||
"According to the new user's task and our software designs listed below: ",
|
||||
"Task: \"{task}\".",
|
||||
"Modality: \"{modality}\".",
|
||||
"Programming Language: \"{language}\"",
|
||||
"Codes:",
|
||||
"\"{codes}\"",
|
||||
"Unimplemented File:",
|
||||
"\"{unimplemented_file}\"",
|
||||
"In our software, each file must strictly follow a markdown code block format, where the following tokens must be replaced such that \"FILENAME\" is the lowercase file name including the file extension, \"LANGUAGE\" in the programming language, \"DOCSTRING\" is a string literal specified in source code that is used to document a specific segment of code, and \"CODE\" is the original code:",
|
||||
"FILENAME",
|
||||
"```LANGUAGE",
|
||||
"'''",
|
||||
"DOCSTRING",
|
||||
"'''",
|
||||
"CODE",
|
||||
"```",
|
||||
"As the {assistant_role}, to satisfy the complete function of our developed software, you have to implement all methods in the {unimplemented_file} file which contains a unimplemented class. Now, implement all methods of the {unimplemented_file} and all other codes needed, then output the fully implemented codes, strictly following the required format."
|
||||
]
|
||||
},
|
||||
"CodeReviewComment": {
|
||||
"assistant_role_name": "Code Reviewer",
|
||||
"user_role_name": "Programmer",
|
||||
"phase_prompt": [
|
||||
"According to the new user's task and our software designs: ",
|
||||
"Task: \"{task}\".",
|
||||
"Modality: \"{modality}\".",
|
||||
"Programming Language: \"{language}\"",
|
||||
"Ideas: \"{ideas}\"",
|
||||
"Codes:",
|
||||
"\"{codes}\"",
|
||||
"As the {assistant_role}, to make the software directly operable without further coding, ChatDev have formulated the following regulations:",
|
||||
"1) all referenced classes should be imported;",
|
||||
"2) all methods should be implemented;",
|
||||
"3) all methods need to have the necessary comments;",
|
||||
"4) no potential bugs;",
|
||||
"5) The entire project conforms to the tasks proposed by the user;",
|
||||
"6) most importantly, do not only check the errors in the code, but also the logic of code. Make sure that user can interact with generated software without losing any feature in the requirement;",
|
||||
"Now, you should check the above regulations one by one and review the codes in detail, propose one comment with the highest priority about the codes, and give me instructions on how to fix. Tell me your comment with the highest priority and corresponding suggestions on revision. If the codes are perfect and you have no comment on them, return only one line like \"<INFO> Finished\"."
|
||||
]
|
||||
},
|
||||
"CodeReviewModification": {
|
||||
"assistant_role_name": "Programmer",
|
||||
"user_role_name": "Code Reviewer",
|
||||
"phase_prompt": [
|
||||
"According to the new user's task, our designed product modality, languages and ideas, our developed first-edition source codes are listed below: ",
|
||||
"Task: \"{task}\".",
|
||||
"Modality: \"{modality}\".",
|
||||
"Programming Language: \"{language}\"",
|
||||
"Ideas: \"{ideas}\"",
|
||||
"Codes: ",
|
||||
"\"{codes}\"",
|
||||
"Comments on Codes:",
|
||||
"\"{comments}\"",
|
||||
"In the software, each file must strictly follow a markdown code block format, where the following tokens must be replaced such that \"FILENAME\" is the lowercase file name including the file extension, \"LANGUAGE\" in the programming language, \"DOCSTRING\" is a string literal specified in source code that is used to document a specific segment of code, and \"CODE\" is the original code. Format:",
|
||||
"FILENAME",
|
||||
"```LANGUAGE",
|
||||
"'''",
|
||||
"DOCSTRING",
|
||||
"'''",
|
||||
"CODE",
|
||||
"```",
|
||||
"As the {assistant_role}, to satisfy the new user's demand and make the software creative, executive and robust, you should modify corresponding codes according to the comments. Then, output the full and complete codes with all bugs fixed based on the comments. Return all codes strictly following the required format."
|
||||
]
|
||||
},
|
||||
"CodeReviewHuman": {
|
||||
"assistant_role_name": "Programmer",
|
||||
"user_role_name": "Code Reviewer",
|
||||
"phase_prompt": [
|
||||
"According to the new user's task, our designed product modality and three creative ideas, our developed first-edition source codes are listed below: ",
|
||||
"Task: \"{task}\".",
|
||||
"Modality: \"{modality}\".",
|
||||
"Programming Language: \"{language}\"",
|
||||
"Ideas: \"{ideas}\"",
|
||||
"Codes: ",
|
||||
"\"{codes}\"",
|
||||
"Comments on Codes:",
|
||||
"\"{comments}\"",
|
||||
"In the software, each file must strictly follow a markdown code block format, where the following tokens must be replaced such that \"FILENAME\" is the lowercase file name including the file extension, \"LANGUAGE\" in the programming language, \"DOCSTRING\" is a string literal specified in source code that is used to document a specific segment of code, and \"CODE\" is the original code. Format:",
|
||||
"FILENAME",
|
||||
"```LANGUAGE",
|
||||
"'''",
|
||||
"DOCSTRING",
|
||||
"'''",
|
||||
"CODE",
|
||||
"```",
|
||||
"As the {assistant_role}, to satisfy the new user's demand and make the software creative, executive and robust, you should modify corresponding codes according to the comments. Then, output the fixed codes strictly following the required format."
|
||||
]
|
||||
},
|
||||
"TestErrorSummary": {
|
||||
"assistant_role_name": "Programmer",
|
||||
"user_role_name": "Software Test Engineer",
|
||||
"phase_prompt": [
|
||||
"Our developed source codes and corresponding test reports are listed below: ",
|
||||
"Programming Language: \"{language}\"",
|
||||
"Source Codes:",
|
||||
"\"{codes}\"",
|
||||
"Test Reports of Source Codes:",
|
||||
"\"{test_reports}\"",
|
||||
"According to my test reports, please locate and summarize the bugs that cause the problem."
|
||||
]
|
||||
},
|
||||
"TestModification": {
|
||||
"assistant_role_name": "Programmer",
|
||||
"user_role_name": "Software Test Engineer",
|
||||
"phase_prompt": [
|
||||
"Our developed source codes and corresponding test reports are listed below: ",
|
||||
"Programming Language: \"{language}\"",
|
||||
"Source Codes:",
|
||||
"\"{codes}\"",
|
||||
"Test Reports of Source Codes:",
|
||||
"\"{test_reports}\"",
|
||||
"Error Summary of Test Reports:",
|
||||
"\"{error_summary}\"",
|
||||
"Note that each file must strictly follow a markdown code block format, where the following tokens must be replaced such that \"FILENAME\" is the lowercase file name including the file extension, \"LANGUAGE\" in the programming language, \"DOCSTRING\" is a string literal specified in source code that is used to document a specific segment of code, and \"CODE\" is the original code:",
|
||||
"FILENAME",
|
||||
"```LANGUAGE",
|
||||
"'''",
|
||||
"DOCSTRING",
|
||||
"'''",
|
||||
"CODE",
|
||||
"```",
|
||||
"As the {assistant_role}, to satisfy the new user's demand and make the software execute smoothly and robustly, you should modify the codes based on the error summary. Now, use the format exemplified above and modify the problematic codes based on the error summary. Output the codes that you fixed based on the test reported and corresponding explanations (strictly follow the format defined above, including FILENAME, LANGUAGE, DOCSTRING and CODE; incomplete \"TODO\" codes are strictly prohibited). If no bugs are reported, please return only one line like \"<INFO> Finished\"."
|
||||
]
|
||||
},
|
||||
"EnvironmentDoc": {
|
||||
"assistant_role_name": "Programmer",
|
||||
"user_role_name": "Chief Technology Officer",
|
||||
"phase_prompt": [
|
||||
"The new user's task and our developed codes are listed: ",
|
||||
"Task: \"{task}\".",
|
||||
"Modality: \"{modality}\".",
|
||||
"Programming Language: \"{language}\"",
|
||||
"Ideas: \"{ideas}\"",
|
||||
"Codes: ",
|
||||
"\"{codes}\"",
|
||||
"As the {assistant_role}, you should write a requirements.txt file, which is commonly used in Python projects to specify the dependencies or packages required for the project to run properly. It serves as a way to document and manage the project's dependencies in a standardized format. For example:",
|
||||
"requirements.txt",
|
||||
"```",
|
||||
"numpy==1.19.2",
|
||||
"pandas>=1.1.4",
|
||||
"```",
|
||||
"According to the codes and file format listed above, write a requirements.txt file to specify the dependencies or packages required for the project to run properly."
|
||||
]
|
||||
},
|
||||
"Manual": {
|
||||
"assistant_role_name": "Chief Product Officer",
|
||||
"user_role_name": "Chief Executive Officer",
|
||||
"phase_prompt": [
|
||||
"The new user's task, our developed codes and required dependencies are listed: ",
|
||||
"Task: \"{task}\".",
|
||||
"Modality: \"{modality}\".",
|
||||
"Programming Language: \"{language}\"",
|
||||
"Ideas: \"{ideas}\"",
|
||||
"Codes: ",
|
||||
"\"{codes}\"",
|
||||
"Requirements:",
|
||||
"\"{requirements}\"",
|
||||
"As the {assistant_role}, by using Markdown, you should write a manual.md file which is a detailed user manual to use the software, including introducing main functions of the software, how to install environment dependencies and how to use/play it. For example:",
|
||||
"manual.md",
|
||||
"```",
|
||||
"# LangChain",
|
||||
"Building applications with LLMs through composability",
|
||||
"Looking for the JS/TS version? Check out LangChain.js.",
|
||||
"**Production Support:** As you move your LangChains into production, we'd love to offer more comprehensive support.",
|
||||
"Please fill out this form and we'll set up a dedicated support Slack channel.",
|
||||
"## Quick Install",
|
||||
"`pip install langchain`",
|
||||
"or",
|
||||
"`conda install langchain -c conda-forge`",
|
||||
"## 🤔 What is this?",
|
||||
"Large language models (LLMs) are emerging as a transformative technology, enabling developers to build applications that they previously could not. However, using these LLMs in isolation is often insufficient for creating a truly powerful app - the real power comes when you can combine them with other sources of computation or knowledge.",
|
||||
"This library aims to assist in the development of those types of applications. Common examples of these applications include:",
|
||||
"**❓ Question Answering over specific documents**",
|
||||
"- Documentation",
|
||||
"- End-to-end Example: Question Answering over Notion Database",
|
||||
"**🤖 Agents**",
|
||||
"- Documentation",
|
||||
"- End-to-end Example: GPT+WolframAlpha",
|
||||
"## 📖 Documentation",
|
||||
"Please see [here](https://python.langchain.com) for full documentation on:",
|
||||
"- Getting started (installation, setting up the environment, simple examples)",
|
||||
"- How-To examples (demos, integrations, helper functions)",
|
||||
"- Reference (full API docs)",
|
||||
"- Resources (high-level explanation of core concepts)",
|
||||
"```"
|
||||
]
|
||||
}
|
||||
}
|
65
WareHouse/DesignDream_THUNLP_20230825072340/RoleConfig.json
Normal file
@ -0,0 +1,65 @@
|
||||
{
|
||||
"Chief Executive Officer": [
|
||||
"{chatdev_prompt}",
|
||||
"You are Chief Executive Officer. Now, we are both working at ChatDev and we share a common interest in collaborating to successfully complete a task assigned by a new customer.",
|
||||
"Your main responsibilities include being an active decision-maker on users' demands and other key policy issues, leader, manager, and executor. Your decision-making role involves high-level decisions about policy and strategy; and your communicator role can involve speaking to the organization's management and employees.",
|
||||
"Here is a new customer's task: {task}.",
|
||||
"To complete the task, I will give you one or more instructions, and you must help me to write a specific solution that appropriately solves the requested instruction based on your expertise and my needs."
|
||||
],
|
||||
"Chief Product Officer": [
|
||||
"{chatdev_prompt}",
|
||||
"You are Chief Product Officer. we are both working at ChatDev. We share a common interest in collaborating to successfully complete a task assigned by a new customer.",
|
||||
"You are responsible for all product-related matters in ChatDev. Usually includes product design, product strategy, product vision, product innovation, project management and product marketing.",
|
||||
"Here is a new customer's task: {task}.",
|
||||
"To complete the task, you must write a response that appropriately solves the requested instruction based on your expertise and customer's needs."
|
||||
],
|
||||
"Counselor": [
|
||||
"{chatdev_prompt}",
|
||||
"You are Counselor. Now, we share a common interest in collaborating to successfully complete a task assigned by a new customer.",
|
||||
"Your main responsibilities include asking what user and customer think and provide your valuable suggestions. ",
|
||||
"Here is a new customer's task: {task}.",
|
||||
"To complete the task, I will give you one or more instructions, and you must help me to write a specific solution that appropriately solves the requested instruction based on your expertise and my needs."
|
||||
],
|
||||
"Chief Technology Officer": [
|
||||
"{chatdev_prompt}",
|
||||
"You are Chief Technology Officer. we are both working at ChatDev. We share a common interest in collaborating to successfully complete a task assigned by a new customer.",
|
||||
"You are very familiar to information technology. You will make high-level decisions for the overarching technology infrastructure that closely align with the organization's goals, while you work alongside the organization's information technology (\"IT\") staff members to perform everyday operations.",
|
||||
"Here is a new customer's task: {task}.",
|
||||
"To complete the task, You must write a response that appropriately solves the requested instruction based on your expertise and customer's needs."
|
||||
],
|
||||
"Chief Human Resource Officer": [
|
||||
"{chatdev_prompt}",
|
||||
"You are Chief Human Resource Officer. Now, we are both working at ChatDev and we share a common interest in collaborating to successfully complete a task assigned by a new customer.",
|
||||
"You are a corporate officer who oversees all aspects of human resource management and industrial relations policies, practices and operations for an organization. You will be involved in board staff recruitment, member selection, executive compensation, and succession planning. Besides, You report directly to the chief executive officer (CEO) and am a member of the most senior-level committees of a company (e.g., executive committee or office of CEO).",
|
||||
"Here is a new customer's task: {task}.",
|
||||
"To complete the task, you must write a response that appropriately solves the requested instruction based on your expertise and customer's needs."
|
||||
],
|
||||
"Programmer": [
|
||||
"{chatdev_prompt}",
|
||||
"You are Programmer. we are both working at ChatDev. We share a common interest in collaborating to successfully complete a task assigned by a new customer.",
|
||||
"You can write/create computer software or applications by providing a specific programming language to the computer. You have extensive computing and coding experience in many varieties of programming languages and platforms, such as Python, Java, C, C++, HTML, CSS, JavaScript, XML, SQL, PHP, etc,.",
|
||||
"Here is a new customer's task: {task}.",
|
||||
"To complete the task, you must write a response that appropriately solves the requested instruction based on your expertise and customer's needs."
|
||||
],
|
||||
"Code Reviewer": [
|
||||
"{chatdev_prompt}",
|
||||
"You are Code Reviewer. we are both working at ChatDev. We share a common interest in collaborating to successfully complete a task assigned by a new customer.",
|
||||
"You can help programmers to assess source codes for software troubleshooting, fix bugs to increase code quality and robustness, and offer proposals to improve the source codes.",
|
||||
"Here is a new customer's task: {task}.",
|
||||
"To complete the task, you must write a response that appropriately solves the requested instruction based on your expertise and customer's needs."
|
||||
],
|
||||
"Software Test Engineer": [
|
||||
"{chatdev_prompt}",
|
||||
"You are Software Test Engineer. we are both working at ChatDev. We share a common interest in collaborating to successfully complete a task assigned by a new customer.",
|
||||
"You can use the software as intended to analyze its functional properties, design manual and automated test procedures to evaluate each software product, build and implement software evaluation test programs, and run test programs to ensure that testing protocols evaluate the software correctly.",
|
||||
"Here is a new customer's task: {task}.",
|
||||
"To complete the task, you must write a response that appropriately solves the requested instruction based on your expertise and customer's needs."
|
||||
],
|
||||
"Chief Creative Officer": [
|
||||
"{chatdev_prompt}",
|
||||
"You are Chief Creative Officer. we are both working at ChatDev. We share a common interest in collaborating to successfully complete a task assigned by a new customer.",
|
||||
"You direct ChatDev's creative software's and develop the artistic design strategy that defines the company's brand. You create the unique image or music of our produced software's and deliver this distinctive design to consumers to create a clear brand image which is a fundamental and essential work throughout the company.",
|
||||
"Here is a new customer's task: {task}.",
|
||||
"To complete the task, you must write a response that appropriately solves the requested instruction based on your expertise and customer's needs."
|
||||
]
|
||||
}
|
82
WareHouse/DesignDream_THUNLP_20230825072340/main.py
Normal file
@ -0,0 +1,82 @@
|
||||
'''
|
||||
This is the main file of the virtual interior design application. It provides the entry point for the application and handles the user interface.
|
||||
'''
|
||||
import tkinter as tk
|
||||
from room import Room
|
||||
class Application(tk.Tk):
|
||||
def __init__(self):
|
||||
super().__init__()
|
||||
self.title("Virtual Interior Design Application")
|
||||
self.geometry("800x600")
|
||||
self.room = Room()
|
||||
self.create_menu()
|
||||
self.create_toolbar()
|
||||
self.create_canvas()
|
||||
def create_menu(self):
|
||||
# Create menu bar and menus
|
||||
menu_bar = tk.Menu(self)
|
||||
self.config(menu=menu_bar)
|
||||
file_menu = tk.Menu(menu_bar, tearoff=0)
|
||||
menu_bar.add_cascade(label="File", menu=file_menu)
|
||||
file_menu.add_command(label="Save", command=self.save_design)
|
||||
file_menu.add_command(label="Load", command=self.load_design)
|
||||
file_menu.add_separator()
|
||||
file_menu.add_command(label="Exit", command=self.quit)
|
||||
edit_menu = tk.Menu(menu_bar, tearoff=0)
|
||||
menu_bar.add_cascade(label="Edit", menu=edit_menu)
|
||||
edit_menu.add_command(label="Undo", command=self.undo)
|
||||
edit_menu.add_command(label="Redo", command=self.redo)
|
||||
def create_toolbar(self):
|
||||
# Create toolbar with furniture options
|
||||
toolbar = tk.Frame(self)
|
||||
toolbar.pack(side=tk.TOP, fill=tk.X)
|
||||
# Add furniture buttons to the toolbar
|
||||
button1 = tk.Button(toolbar, text="Chair", command=self.add_chair)
|
||||
button1.pack(side=tk.LEFT)
|
||||
button2 = tk.Button(toolbar, text="Table", command=self.add_table)
|
||||
button2.pack(side=tk.LEFT)
|
||||
# Add more furniture buttons as needed
|
||||
def create_canvas(self):
|
||||
# Create canvas to display the room
|
||||
self.canvas = tk.Canvas(self)
|
||||
self.canvas.pack(side=tk.TOP, fill=tk.BOTH, expand=True)
|
||||
# Bind mouse events to canvas
|
||||
self.canvas.bind("<Button-1>", self.on_canvas_click)
|
||||
self.canvas.bind("<B1-Motion>", self.on_canvas_drag)
|
||||
def add_chair(self):
|
||||
# Add a chair to the room
|
||||
self.room.add_furniture("chair")
|
||||
self.update_canvas()
|
||||
def add_table(self):
|
||||
# Add a table to the room
|
||||
self.room.add_furniture("table")
|
||||
self.update_canvas()
|
||||
def update_canvas(self):
|
||||
# Clear canvas and redraw room and furniture
|
||||
self.canvas.delete("all")
|
||||
self.room.draw(self.canvas)
|
||||
def on_canvas_click(self, event):
|
||||
# Handle click event on canvas
|
||||
self.room.select_furniture(event.x, event.y)
|
||||
def on_canvas_drag(self, event):
|
||||
# Handle drag event on canvas
|
||||
self.room.move_selected_furniture(event.x, event.y)
|
||||
self.update_canvas()
|
||||
def save_design(self):
|
||||
# Save the current room design
|
||||
self.room.save_design()
|
||||
def load_design(self):
|
||||
# Load a saved room design
|
||||
self.room.load_design()
|
||||
self.update_canvas()
|
||||
def undo(self):
|
||||
# Undo the last action
|
||||
self.room.undo()
|
||||
self.update_canvas()
|
||||
def redo(self):
|
||||
# Redo the last undone action
|
||||
self.room.redo()
|
||||
self.update_canvas()
|
||||
if __name__ == "__main__":
|
||||
app = Application()
|
||||
app.mainloop()
|
103
WareHouse/DesignDream_THUNLP_20230825072340/manual.md
Normal file
@ -0,0 +1,103 @@
|
||||
# Virtual Interior Design Application User Manual
|
||||
|
||||
## Introduction
|
||||
|
||||
Welcome to the Virtual Interior Design Application! This application allows you to decorate and furnish virtual rooms using a wide range of styles and furniture options. You can customize the dimensions and placement of furniture, experiment with color schemes and textures for walls, floors, and other surfaces, and even save and share your room designs with others. The application provides an intuitive user interface that makes it easy to navigate through different rooms and select furniture items from a comprehensive catalog.
|
||||
|
||||
## Installation
|
||||
|
||||
To use the Virtual Interior Design Application, you need to have Python installed on your computer. You can download Python from the official website: [https://www.python.org/downloads/](https://www.python.org/downloads/)
|
||||
|
||||
Once you have Python installed, you can install the required dependencies by running the following command in your terminal or command prompt:
|
||||
|
||||
```
|
||||
pip install -r requirements.txt
|
||||
```
|
||||
|
||||
## Getting Started
|
||||
|
||||
To start the Virtual Interior Design Application, navigate to the directory where the code files are located and run the following command in your terminal or command prompt:
|
||||
|
||||
```
|
||||
python main.py
|
||||
```
|
||||
|
||||
This will launch the application and open the main window.
|
||||
|
||||
## User Interface
|
||||
|
||||
The Virtual Interior Design Application has a user-friendly interface that allows you to easily navigate through different rooms and select furniture items. Here is an overview of the main components of the user interface:
|
||||
|
||||
1. Menu Bar: The menu bar at the top of the application window provides access to various commands and options, such as saving and loading room designs, undoing and redoing actions, and exiting the application.
|
||||
|
||||
2. Toolbar: The toolbar below the menu bar contains buttons for selecting different furniture items. You can click on a button to add the corresponding furniture item to the room.
|
||||
|
||||
3. Canvas: The canvas in the main area of the application window displays the room and the furniture items. You can click on a furniture item to select it, and then drag it to move it around the room.
|
||||
|
||||
## Using the Application
|
||||
|
||||
### Adding Furniture
|
||||
|
||||
To add furniture to the room, follow these steps:
|
||||
|
||||
1. Click on the desired furniture item button in the toolbar. For example, if you want to add a chair, click on the "Chair" button.
|
||||
|
||||
2. Move your mouse cursor to the desired location in the room.
|
||||
|
||||
3. Click on the canvas to place the furniture item at the selected location.
|
||||
|
||||
### Customizing Furniture
|
||||
|
||||
To customize the dimensions and placement of furniture, follow these steps:
|
||||
|
||||
1. Select the furniture item by clicking on it in the room.
|
||||
|
||||
2. Drag the furniture item to move it to a new location.
|
||||
|
||||
### Experimenting with Color Schemes and Textures
|
||||
|
||||
To experiment with color schemes and textures for walls, floors, and other surfaces, follow these steps:
|
||||
|
||||
1. Click on the canvas to select the room.
|
||||
|
||||
2. Use the menu options or toolbar buttons to change the color or texture of the selected surface.
|
||||
|
||||
### Saving and Loading Room Designs
|
||||
|
||||
To save a room design, follow these steps:
|
||||
|
||||
1. Click on the "File" menu in the menu bar.
|
||||
|
||||
2. Select the "Save" option.
|
||||
|
||||
3. Choose a location on your computer to save the design file.
|
||||
|
||||
To load a saved room design, follow these steps:
|
||||
|
||||
1. Click on the "File" menu in the menu bar.
|
||||
|
||||
2. Select the "Load" option.
|
||||
|
||||
3. Choose the design file from your computer.
|
||||
|
||||
### Sharing Room Designs
|
||||
|
||||
To share a room design with others, follow these steps:
|
||||
|
||||
1. Save the room design using the steps mentioned above.
|
||||
|
||||
2. Share the design file with others via email, messaging apps, or file-sharing platforms.
|
||||
|
||||
### Receiving Recommendations
|
||||
|
||||
The Virtual Interior Design Application can provide recommendations for furniture and decor based on your preferences. To receive recommendations, follow these steps:
|
||||
|
||||
1. Click on the "Edit" menu in the menu bar.
|
||||
|
||||
2. Select the "Recommendations" option.
|
||||
|
||||
3. Follow the prompts to provide your preferences and receive recommendations.
|
||||
|
||||
## Conclusion
|
||||
|
||||
Congratulations! You are now ready to use the Virtual Interior Design Application. Have fun decorating and furnishing virtual rooms with a wide range of styles and furniture options. If you have any questions or need further assistance, please refer to the documentation or contact our support team. Happy designing!
|
29
WareHouse/DesignDream_THUNLP_20230825072340/meta.txt
Normal file
@ -0,0 +1,29 @@
|
||||
Task:
|
||||
create a virtual interior design application that provides users with the ability to decorate and furnish rooms using a wide range of styles and furniture options. the application should have an intuitive user interface that allows users to easily navigate through different rooms and select furniture items from a comprehensive catalog. users should be able to customize the dimensions and placement of furniture within the virtual rooms, as well as experiment with various color schemes and textures for walls, floors, and other surfaces. the application should also include features such as the ability to save and load room designs, share designs with others, and receive recommendations for furniture and decor based on user preferences. it is crucial that the software is developed to ensure accurate rendering of room layouts and furniture arrangements, providing users with an accurate representation of their design choices.
|
||||
|
||||
Config:
|
||||
ChatEnvConfig.clear_structure: True
|
||||
ChatEnvConfig.brainstorming: False
|
||||
|
||||
|
||||
Roster:
|
||||
Chief Executive Officer, Counselor, Chief Human Resource Officer, Chief Product Officer, Chief Technology Officer, Programmer, Code Reviewer, Software Test Engineer, Chief Creative Officer
|
||||
|
||||
Modality:
|
||||
application
|
||||
|
||||
Ideas:
|
||||
|
||||
|
||||
Language:
|
||||
Python
|
||||
|
||||
Code_Version:
|
||||
15.0
|
||||
|
||||
Proposed_images:
|
||||
0
|
||||
|
||||
Incorporated_images:
|
||||
0
|
||||
|
@ -0,0 +1 @@
|
||||
tkinter==8.6
|
85
WareHouse/DesignDream_THUNLP_20230825072340/room.py
Normal file
@ -0,0 +1,85 @@
|
||||
'''
|
||||
This file defines the Room class, which represents a virtual room in the interior design application.
|
||||
'''
|
||||
class Room:
|
||||
def __init__(self):
|
||||
self.furniture = []
|
||||
self.selected_furniture = None
|
||||
self.undo_stack = []
|
||||
self.redo_stack = []
|
||||
def add_furniture(self, furniture_type):
|
||||
# Add a furniture item to the room
|
||||
furniture = Furniture(furniture_type)
|
||||
self.furniture.append(furniture)
|
||||
self.selected_furniture = furniture
|
||||
def select_furniture(self, x, y):
|
||||
# Select a furniture item based on the given coordinates
|
||||
for furniture in self.furniture:
|
||||
if furniture.contains_point(x, y):
|
||||
self.selected_furniture = furniture
|
||||
break
|
||||
def move_selected_furniture(self, x, y):
|
||||
# Move the selected furniture item to the given coordinates
|
||||
if self.selected_furniture is not None:
|
||||
self.selected_furniture.move(x, y)
|
||||
def draw(self, canvas):
|
||||
# Draw the room and furniture on the canvas
|
||||
# Draw room walls, floor, etc.
|
||||
canvas.create_rectangle(0, 0, 800, 600, fill="white")
|
||||
for furniture in self.furniture:
|
||||
furniture.draw(canvas)
|
||||
def save_design(self):
|
||||
# Save the current room design to a file
|
||||
# Serialize the room object and write to a file
|
||||
with open("design.txt", "w") as file:
|
||||
for furniture in self.furniture:
|
||||
file.write(furniture.type + "," + str(furniture.x) + "," + str(furniture.y) + "\n")
|
||||
def load_design(self):
|
||||
# Load a saved room design from a file
|
||||
# Read the serialized room object from a file and deserialize
|
||||
self.furniture = []
|
||||
with open("design.txt", "r") as file:
|
||||
for line in file:
|
||||
furniture_data = line.strip().split(",")
|
||||
furniture_type = furniture_data[0]
|
||||
furniture_x = int(furniture_data[1])
|
||||
furniture_y = int(furniture_data[2])
|
||||
furniture = Furniture(furniture_type, furniture_x, furniture_y)
|
||||
self.furniture.append(furniture)
|
||||
def undo(self):
|
||||
# Undo the last action
|
||||
if len(self.undo_stack) > 0:
|
||||
action = self.undo_stack.pop()
|
||||
action.undo()
|
||||
self.redo_stack.append(action)
|
||||
def redo(self):
|
||||
# Redo the last undone action
|
||||
if len(self.redo_stack) > 0:
|
||||
action = self.redo_stack.pop()
|
||||
action.redo()
|
||||
class Furniture:
|
||||
def __init__(self, furniture_type, x=0, y=0):
|
||||
self.type = furniture_type
|
||||
self.x = x
|
||||
self.y = y
|
||||
def contains_point(self, x, y):
|
||||
# Check if the furniture item contains the given point
|
||||
# Use dimensions and position to determine containment
|
||||
return self.x <= x <= self.x + 50 and self.y <= y <= self.y + 50
|
||||
def move(self, x, y):
|
||||
# Move the furniture item to the given coordinates
|
||||
self.x = x
|
||||
self.y = y
|
||||
def draw(self, canvas):
|
||||
# Draw the furniture item on the canvas
|
||||
if self.type == "chair":
|
||||
canvas.create_rectangle(self.x, self.y, self.x + 50, self.y + 50, fill="brown")
|
||||
elif self.type == "table":
|
||||
canvas.create_rectangle(self.x, self.y, self.x + 100, self.y + 100, fill="gray")
|
||||
class Action:
|
||||
def __init__(self):
|
||||
pass
|
||||
def undo(self):
|
||||
pass
|
||||
def redo(self):
|
||||
pass
|
@ -0,0 +1,101 @@
|
||||
{
|
||||
"chain": [
|
||||
{
|
||||
"phase": "DemandAnalysis",
|
||||
"phaseType": "SimplePhase",
|
||||
"max_turn_step": 2,
|
||||
"need_reflect": "True"
|
||||
},
|
||||
{
|
||||
"phase": "LanguageChoose",
|
||||
"phaseType": "SimplePhase",
|
||||
"max_turn_step": 2,
|
||||
"need_reflect": "True"
|
||||
},
|
||||
{
|
||||
"phase": "Coding",
|
||||
"phaseType": "SimplePhase",
|
||||
"max_turn_step": 1,
|
||||
"need_reflect": "False"
|
||||
},
|
||||
{
|
||||
"phase": "CodeCompleteAll",
|
||||
"phaseType": "ComposedPhase",
|
||||
"cycleNum": 10,
|
||||
"Composition": [
|
||||
{
|
||||
"phase": "CodeComplete",
|
||||
"phaseType": "SimplePhase",
|
||||
"max_turn_step": 1,
|
||||
"need_reflect": "False"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"phase": "CodeReview",
|
||||
"phaseType": "ComposedPhase",
|
||||
"cycleNum": 10,
|
||||
"Composition": [
|
||||
{
|
||||
"phase": "CodeReviewComment",
|
||||
"phaseType": "SimplePhase",
|
||||
"max_turn_step": -1,
|
||||
"need_reflect": "False"
|
||||
},
|
||||
{
|
||||
"phase": "CodeReviewModification",
|
||||
"phaseType": "SimplePhase",
|
||||
"max_turn_step": -1,
|
||||
"need_reflect": "False"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"phase": "Test",
|
||||
"phaseType": "ComposedPhase",
|
||||
"cycleNum": 10,
|
||||
"Composition": [
|
||||
{
|
||||
"phase": "TestErrorSummary",
|
||||
"phaseType": "SimplePhase",
|
||||
"max_turn_step": -1,
|
||||
"need_reflect": "False"
|
||||
},
|
||||
{
|
||||
"phase": "TestModification",
|
||||
"phaseType": "SimplePhase",
|
||||
"max_turn_step": -1,
|
||||
"need_reflect": "False"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"phase": "EnvironmentDoc",
|
||||
"phaseType": "SimplePhase",
|
||||
"max_turn_step": 1,
|
||||
"need_reflect": "True"
|
||||
},
|
||||
{
|
||||
"phase": "Manual",
|
||||
"phaseType": "SimplePhase",
|
||||
"max_turn_step": 1,
|
||||
"need_reflect": "False"
|
||||
}
|
||||
],
|
||||
"recruitments": [
|
||||
"Chief Executive Officer",
|
||||
"Counselor",
|
||||
"Chief Human Resource Officer",
|
||||
"Chief Product Officer",
|
||||
"Chief Technology Officer",
|
||||
"Programmer",
|
||||
"Code Reviewer",
|
||||
"Software Test Engineer",
|
||||
"Chief Creative Officer"
|
||||
],
|
||||
"clear_structure": "True",
|
||||
"brainstorming": "False",
|
||||
"gui_design": "True",
|
||||
"git_management": "False",
|
||||
"self_improve": "True"
|
||||
}
|
@ -0,0 +1 @@
|
||||
Build a basic dice rolling simulator that lets users roll dice of different numbers of sides and displays the outcomes.
|
@ -0,0 +1,301 @@
|
||||
{
|
||||
"DemandAnalysis": {
|
||||
"assistant_role_name": "Chief Product Officer",
|
||||
"user_role_name": "Chief Executive Officer",
|
||||
"phase_prompt": [
|
||||
"ChatDev has made products in the following form before:",
|
||||
"Image: can present information in line chart, bar chart, flow chart, cloud chart, Gantt chart, etc.",
|
||||
"Document: can present information via .docx files.",
|
||||
"PowerPoint: can present information via .pptx files.",
|
||||
"Excel: can present information via .xlsx files.",
|
||||
"PDF: can present information via .pdf files.",
|
||||
"Website: can present personal resume, tutorial, products, or ideas, via .html files.",
|
||||
"Application: can implement visualized game, software, tool, etc, via python.",
|
||||
"Dashboard: can display a panel visualizing real-time information.",
|
||||
"Mind Map: can represent ideas, with related concepts arranged around a core concept.",
|
||||
"As the {assistant_role}, to satisfy the new user's demand and the product should be realizable, you should keep discussing with me to decide which product modality do we want the product to be?",
|
||||
"Note that we must ONLY discuss the product modality and do not discuss anything else! Once we all have expressed our opinion(s) and agree with the results of the discussion unanimously, any of us must actively terminate the discussion by replying with only one line, which starts with a single word <INFO>, followed by our final product modality without any other words, e.g., \"<INFO> PowerPoint\"."
|
||||
]
|
||||
},
|
||||
"LanguageChoose": {
|
||||
"assistant_role_name": "Chief Technology Officer",
|
||||
"user_role_name": "Chief Executive Officer",
|
||||
"phase_prompt": [
|
||||
"According to the new user's task and some creative brainstorm ideas listed below: ",
|
||||
"Task: \"{task}\".",
|
||||
"Modality: \"{modality}\".",
|
||||
"Ideas: \"{ideas}\".",
|
||||
"We have decided to complete the task through a executable software implemented via a programming language. ",
|
||||
"As the {assistant_role}, to satisfy the new user's demand and make the software realizable, you should propose a concrete programming language. If python can complete this task via Python, please answer Python; otherwise, answer another programming language (e.g., Java, C++, etc,).",
|
||||
"Note that we must ONLY discuss the target programming language and do not discuss anything else! Once we all have expressed our opinion(s) and agree with the results of the discussion unanimously, any of us must actively terminate the discussion and conclude the best programming language we have discussed without any other words or reasons, return only one line using the format: \"<INFO> *\" where \"*\" represents a programming language."
|
||||
]
|
||||
},
|
||||
"Coding": {
|
||||
"assistant_role_name": "Programmer",
|
||||
"user_role_name": "Chief Technology Officer",
|
||||
"phase_prompt": [
|
||||
"According to the new user's task and our software designs listed below: ",
|
||||
"Task: \"{task}\".",
|
||||
"Modality: \"{modality}\".",
|
||||
"Programming Language: \"{language}\"",
|
||||
"Ideas:\"{ideas}\"",
|
||||
"We have decided to complete the task through a executable software with multiple files implemented via {language}. As the {assistant_role}, to satisfy the new user's demands, you should write one or multiple files and make sure that every detail of the architecture is, in the end, implemented as code. {gui}",
|
||||
"Think step by step and reason yourself to the right decisions to make sure we get it right.",
|
||||
"You will first lay out the names of the core classes, functions, methods that will be necessary, as well as a quick comment on their purpose.",
|
||||
"Then you will output the content of each file including complete code. Each file must strictly follow a markdown code block format, where the following tokens must be replaced such that \"FILENAME\" is the lowercase file name including the file extension, \"LANGUAGE\" in the programming language, \"DOCSTRING\" is a string literal specified in source code that is used to document a specific segment of code, and \"CODE\" is the original code:",
|
||||
"FILENAME",
|
||||
"```LANGUAGE",
|
||||
"'''",
|
||||
"DOCSTRING",
|
||||
"'''",
|
||||
"CODE",
|
||||
"```",
|
||||
"You will start with the \"main\" file, then go to the ones that are imported by that file, and so on.",
|
||||
"Please note that the code should be fully functional. Ensure to implement all functions. No placeholders (such as 'pass' in Python)."
|
||||
]
|
||||
},
|
||||
"ArtDesign": {
|
||||
"assistant_role_name": "Programmer",
|
||||
"user_role_name": "Chief Creative Officer",
|
||||
"phase_prompt": [
|
||||
"Our developed source codes and corresponding test reports are listed below: ",
|
||||
"Task: \"{task}\".",
|
||||
"Programming Language: \"{language}\"",
|
||||
"Source Codes:",
|
||||
"\"{codes}\"",
|
||||
"Note that each file must strictly follow a markdown code block format, where the following tokens must be replaced such that \"FILENAME\" is the lowercase file name including the file extension, \"LANGUAGE\" in the programming language, \"DOCSTRING\" is a string literal specified in source code that is used to document a specific segment of code, and \"CODE\" is the original code:",
|
||||
"FILENAME",
|
||||
"```LANGUAGE",
|
||||
"'''",
|
||||
"DOCSTRING",
|
||||
"'''",
|
||||
"CODE",
|
||||
"```",
|
||||
"As the {assistant_role}, to satisfy the new user's demand and equip the software with a beautiful graphical user interface (GUI), we will discuss and design many decorative images for GUI decoration. Now, we keep discussing the GUI beautification by listing some functionally independent elements in GUI that are being considered to be decorated by different pictures. For example, ten digits (0-9) in a calculator are functionally independent.",
|
||||
"To answer, use the format: \" FILENAME.png: DESCRIPTION\" where \"FILENAME\" is the filename of the image and \"DESCRIPTION\" denotes the detailed description of the independent elements. For example:",
|
||||
"'''",
|
||||
"button_1.png: The button with the number \"1\" on it.",
|
||||
"button_multiply.png: The button with the multiplication symbol (\"*\") on it.",
|
||||
"background.png: the background color to decorate the Go game",
|
||||
"'''",
|
||||
"Now, we keep discussing the to-be-decorated elements in the GUI and list all functionally independent elements as much as possible. If no further elements that are functionally independent or that should be further described, return only one line like \"<INFO> Finished\" in your reply."
|
||||
]
|
||||
},
|
||||
"ArtIntegration": {
|
||||
"assistant_role_name": "Programmer",
|
||||
"user_role_name": "Chief Creative Officer",
|
||||
"phase_prompt": [
|
||||
"Our developed source codes and corresponding test reports are listed below: ",
|
||||
"Task: \"{task}\".",
|
||||
"Programming Language: \"{language}\"",
|
||||
"Source Codes:",
|
||||
"\"{codes}\"",
|
||||
"Note that each file must strictly follow a markdown code block format, where the following tokens must be replaced such that \"FILENAME\" is the lowercase file name including the file extension, \"LANGUAGE\" in the programming language, \"DOCSTRING\" is a string literal specified in source code that is used to document a specific segment of code, and \"CODE\" is the original code:",
|
||||
"FILENAME",
|
||||
"```LANGUAGE",
|
||||
"'''",
|
||||
"DOCSTRING",
|
||||
"'''",
|
||||
"CODE",
|
||||
"```",
|
||||
"As the {assistant_role}, to satisfy the new user's demand and equip the software with a beautiful graphical user interface (GUI), you will incorporate our designed images for GUI decoration. Here are some ready-made high-quality pictures and corresponding descriptions:",
|
||||
"{images}",
|
||||
"Note that the designed images have a fixed size of 256x256 pixels and the images are located in the same directory as all the Python files; please dynamically scaling these images according to the size of GUI, and use \"self.*\" to avoid displaying-related problems caused by automatic garbage collection. For example:",
|
||||
"```",
|
||||
"self.image = ImageTk.PhotoImage(Image.open(\"./image.png\").resize((50, 50)))",
|
||||
"```",
|
||||
"Now, use some or all of the pictures into the GUI to make it more beautiful and creative. Output codes strictly following the required format mentioned above."
|
||||
]
|
||||
},
|
||||
"CodeComplete": {
|
||||
"assistant_role_name": "Programmer",
|
||||
"user_role_name": "Chief Technology Officer",
|
||||
"phase_prompt": [
|
||||
"According to the new user's task and our software designs listed below: ",
|
||||
"Task: \"{task}\".",
|
||||
"Modality: \"{modality}\".",
|
||||
"Programming Language: \"{language}\"",
|
||||
"Codes:",
|
||||
"\"{codes}\"",
|
||||
"Unimplemented File:",
|
||||
"\"{unimplemented_file}\"",
|
||||
"In our software, each file must strictly follow a markdown code block format, where the following tokens must be replaced such that \"FILENAME\" is the lowercase file name including the file extension, \"LANGUAGE\" in the programming language, \"DOCSTRING\" is a string literal specified in source code that is used to document a specific segment of code, and \"CODE\" is the original code:",
|
||||
"FILENAME",
|
||||
"```LANGUAGE",
|
||||
"'''",
|
||||
"DOCSTRING",
|
||||
"'''",
|
||||
"CODE",
|
||||
"```",
|
||||
"As the {assistant_role}, to satisfy the complete function of our developed software, you have to implement all methods in the {unimplemented_file} file which contains a unimplemented class. Now, implement all methods of the {unimplemented_file} and all other codes needed, then output the fully implemented codes, strictly following the required format."
|
||||
]
|
||||
},
|
||||
"CodeReviewComment": {
|
||||
"assistant_role_name": "Code Reviewer",
|
||||
"user_role_name": "Programmer",
|
||||
"phase_prompt": [
|
||||
"According to the new user's task and our software designs: ",
|
||||
"Task: \"{task}\".",
|
||||
"Modality: \"{modality}\".",
|
||||
"Programming Language: \"{language}\"",
|
||||
"Ideas: \"{ideas}\"",
|
||||
"Codes:",
|
||||
"\"{codes}\"",
|
||||
"As the {assistant_role}, to make the software directly operable without further coding, ChatDev have formulated the following regulations:",
|
||||
"1) all referenced classes should be imported;",
|
||||
"2) all methods should be implemented;",
|
||||
"3) all methods need to have the necessary comments;",
|
||||
"4) no potential bugs;",
|
||||
"5) The entire project conforms to the tasks proposed by the user;",
|
||||
"6) most importantly, do not only check the errors in the code, but also the logic of code. Make sure that user can interact with generated software without losing any feature in the requirement;",
|
||||
"Now, you should check the above regulations one by one and review the codes in detail, propose one comment with the highest priority about the codes, and give me instructions on how to fix. Tell me your comment with the highest priority and corresponding suggestions on revision. If the codes are perfect and you have no comment on them, return only one line like \"<INFO> Finished\"."
|
||||
]
|
||||
},
|
||||
"CodeReviewModification": {
|
||||
"assistant_role_name": "Programmer",
|
||||
"user_role_name": "Code Reviewer",
|
||||
"phase_prompt": [
|
||||
"According to the new user's task, our designed product modality, languages and ideas, our developed first-edition source codes are listed below: ",
|
||||
"Task: \"{task}\".",
|
||||
"Modality: \"{modality}\".",
|
||||
"Programming Language: \"{language}\"",
|
||||
"Ideas: \"{ideas}\"",
|
||||
"Codes: ",
|
||||
"\"{codes}\"",
|
||||
"Comments on Codes:",
|
||||
"\"{comments}\"",
|
||||
"In the software, each file must strictly follow a markdown code block format, where the following tokens must be replaced such that \"FILENAME\" is the lowercase file name including the file extension, \"LANGUAGE\" in the programming language, \"DOCSTRING\" is a string literal specified in source code that is used to document a specific segment of code, and \"CODE\" is the original code. Format:",
|
||||
"FILENAME",
|
||||
"```LANGUAGE",
|
||||
"'''",
|
||||
"DOCSTRING",
|
||||
"'''",
|
||||
"CODE",
|
||||
"```",
|
||||
"As the {assistant_role}, to satisfy the new user's demand and make the software creative, executive and robust, you should modify corresponding codes according to the comments. Then, output the full and complete codes with all bugs fixed based on the comments. Return all codes strictly following the required format."
|
||||
]
|
||||
},
|
||||
"CodeReviewHuman": {
|
||||
"assistant_role_name": "Programmer",
|
||||
"user_role_name": "Code Reviewer",
|
||||
"phase_prompt": [
|
||||
"According to the new user's task, our designed product modality and three creative ideas, our developed first-edition source codes are listed below: ",
|
||||
"Task: \"{task}\".",
|
||||
"Modality: \"{modality}\".",
|
||||
"Programming Language: \"{language}\"",
|
||||
"Ideas: \"{ideas}\"",
|
||||
"Codes: ",
|
||||
"\"{codes}\"",
|
||||
"Comments on Codes:",
|
||||
"\"{comments}\"",
|
||||
"In the software, each file must strictly follow a markdown code block format, where the following tokens must be replaced such that \"FILENAME\" is the lowercase file name including the file extension, \"LANGUAGE\" in the programming language, \"DOCSTRING\" is a string literal specified in source code that is used to document a specific segment of code, and \"CODE\" is the original code. Format:",
|
||||
"FILENAME",
|
||||
"```LANGUAGE",
|
||||
"'''",
|
||||
"DOCSTRING",
|
||||
"'''",
|
||||
"CODE",
|
||||
"```",
|
||||
"As the {assistant_role}, to satisfy the new user's demand and make the software creative, executive and robust, you should modify corresponding codes according to the comments. Then, output the fixed codes strictly following the required format."
|
||||
]
|
||||
},
|
||||
"TestErrorSummary": {
|
||||
"assistant_role_name": "Programmer",
|
||||
"user_role_name": "Software Test Engineer",
|
||||
"phase_prompt": [
|
||||
"Our developed source codes and corresponding test reports are listed below: ",
|
||||
"Programming Language: \"{language}\"",
|
||||
"Source Codes:",
|
||||
"\"{codes}\"",
|
||||
"Test Reports of Source Codes:",
|
||||
"\"{test_reports}\"",
|
||||
"According to my test reports, please locate and summarize the bugs that cause the problem."
|
||||
]
|
||||
},
|
||||
"TestModification": {
|
||||
"assistant_role_name": "Programmer",
|
||||
"user_role_name": "Software Test Engineer",
|
||||
"phase_prompt": [
|
||||
"Our developed source codes and corresponding test reports are listed below: ",
|
||||
"Programming Language: \"{language}\"",
|
||||
"Source Codes:",
|
||||
"\"{codes}\"",
|
||||
"Test Reports of Source Codes:",
|
||||
"\"{test_reports}\"",
|
||||
"Error Summary of Test Reports:",
|
||||
"\"{error_summary}\"",
|
||||
"Note that each file must strictly follow a markdown code block format, where the following tokens must be replaced such that \"FILENAME\" is the lowercase file name including the file extension, \"LANGUAGE\" in the programming language, \"DOCSTRING\" is a string literal specified in source code that is used to document a specific segment of code, and \"CODE\" is the original code:",
|
||||
"FILENAME",
|
||||
"```LANGUAGE",
|
||||
"'''",
|
||||
"DOCSTRING",
|
||||
"'''",
|
||||
"CODE",
|
||||
"```",
|
||||
"As the {assistant_role}, to satisfy the new user's demand and make the software execute smoothly and robustly, you should modify the codes based on the error summary. Now, use the format exemplified above and modify the problematic codes based on the error summary. Output the codes that you fixed based on the test reported and corresponding explanations (strictly follow the format defined above, including FILENAME, LANGUAGE, DOCSTRING and CODE; incomplete \"TODO\" codes are strictly prohibited). If no bugs are reported, please return only one line like \"<INFO> Finished\"."
|
||||
]
|
||||
},
|
||||
"EnvironmentDoc": {
|
||||
"assistant_role_name": "Programmer",
|
||||
"user_role_name": "Chief Technology Officer",
|
||||
"phase_prompt": [
|
||||
"The new user's task and our developed codes are listed: ",
|
||||
"Task: \"{task}\".",
|
||||
"Modality: \"{modality}\".",
|
||||
"Programming Language: \"{language}\"",
|
||||
"Ideas: \"{ideas}\"",
|
||||
"Codes: ",
|
||||
"\"{codes}\"",
|
||||
"As the {assistant_role}, you should write a requirements.txt file, which is commonly used in Python projects to specify the dependencies or packages required for the project to run properly. It serves as a way to document and manage the project's dependencies in a standardized format. For example:",
|
||||
"requirements.txt",
|
||||
"```",
|
||||
"numpy==1.19.2",
|
||||
"pandas>=1.1.4",
|
||||
"```",
|
||||
"According to the codes and file format listed above, write a requirements.txt file to specify the dependencies or packages required for the project to run properly."
|
||||
]
|
||||
},
|
||||
"Manual": {
|
||||
"assistant_role_name": "Chief Product Officer",
|
||||
"user_role_name": "Chief Executive Officer",
|
||||
"phase_prompt": [
|
||||
"The new user's task, our developed codes and required dependencies are listed: ",
|
||||
"Task: \"{task}\".",
|
||||
"Modality: \"{modality}\".",
|
||||
"Programming Language: \"{language}\"",
|
||||
"Ideas: \"{ideas}\"",
|
||||
"Codes: ",
|
||||
"\"{codes}\"",
|
||||
"Requirements:",
|
||||
"\"{requirements}\"",
|
||||
"As the {assistant_role}, by using Markdown, you should write a manual.md file which is a detailed user manual to use the software, including introducing main functions of the software, how to install environment dependencies and how to use/play it. For example:",
|
||||
"manual.md",
|
||||
"```",
|
||||
"# LangChain",
|
||||
"Building applications with LLMs through composability",
|
||||
"Looking for the JS/TS version? Check out LangChain.js.",
|
||||
"**Production Support:** As you move your LangChains into production, we'd love to offer more comprehensive support.",
|
||||
"Please fill out this form and we'll set up a dedicated support Slack channel.",
|
||||
"## Quick Install",
|
||||
"`pip install langchain`",
|
||||
"or",
|
||||
"`conda install langchain -c conda-forge`",
|
||||
"## 🤔 What is this?",
|
||||
"Large language models (LLMs) are emerging as a transformative technology, enabling developers to build applications that they previously could not. However, using these LLMs in isolation is often insufficient for creating a truly powerful app - the real power comes when you can combine them with other sources of computation or knowledge.",
|
||||
"This library aims to assist in the development of those types of applications. Common examples of these applications include:",
|
||||
"**❓ Question Answering over specific documents**",
|
||||
"- Documentation",
|
||||
"- End-to-end Example: Question Answering over Notion Database",
|
||||
"**🤖 Agents**",
|
||||
"- Documentation",
|
||||
"- End-to-end Example: GPT+WolframAlpha",
|
||||
"## 📖 Documentation",
|
||||
"Please see [here](https://python.langchain.com) for full documentation on:",
|
||||
"- Getting started (installation, setting up the environment, simple examples)",
|
||||
"- How-To examples (demos, integrations, helper functions)",
|
||||
"- Reference (full API docs)",
|
||||
"- Resources (high-level explanation of core concepts)",
|
||||
"```"
|
||||
]
|
||||
}
|
||||
}
|
@ -0,0 +1,65 @@
|
||||
{
|
||||
"Chief Executive Officer": [
|
||||
"{chatdev_prompt}",
|
||||
"You are Chief Executive Officer. Now, we are both working at ChatDev and we share a common interest in collaborating to successfully complete a task assigned by a new customer.",
|
||||
"Your main responsibilities include being an active decision-maker on users' demands and other key policy issues, leader, manager, and executor. Your decision-making role involves high-level decisions about policy and strategy; and your communicator role can involve speaking to the organization's management and employees.",
|
||||
"Here is a new customer's task: {task}.",
|
||||
"To complete the task, I will give you one or more instructions, and you must help me to write a specific solution that appropriately solves the requested instruction based on your expertise and my needs."
|
||||
],
|
||||
"Chief Product Officer": [
|
||||
"{chatdev_prompt}",
|
||||
"You are Chief Product Officer. we are both working at ChatDev. We share a common interest in collaborating to successfully complete a task assigned by a new customer.",
|
||||
"You are responsible for all product-related matters in ChatDev. Usually includes product design, product strategy, product vision, product innovation, project management and product marketing.",
|
||||
"Here is a new customer's task: {task}.",
|
||||
"To complete the task, you must write a response that appropriately solves the requested instruction based on your expertise and customer's needs."
|
||||
],
|
||||
"Counselor": [
|
||||
"{chatdev_prompt}",
|
||||
"You are Counselor. Now, we share a common interest in collaborating to successfully complete a task assigned by a new customer.",
|
||||
"Your main responsibilities include asking what user and customer think and provide your valuable suggestions. ",
|
||||
"Here is a new customer's task: {task}.",
|
||||
"To complete the task, I will give you one or more instructions, and you must help me to write a specific solution that appropriately solves the requested instruction based on your expertise and my needs."
|
||||
],
|
||||
"Chief Technology Officer": [
|
||||
"{chatdev_prompt}",
|
||||
"You are Chief Technology Officer. we are both working at ChatDev. We share a common interest in collaborating to successfully complete a task assigned by a new customer.",
|
||||
"You are very familiar to information technology. You will make high-level decisions for the overarching technology infrastructure that closely align with the organization's goals, while you work alongside the organization's information technology (\"IT\") staff members to perform everyday operations.",
|
||||
"Here is a new customer's task: {task}.",
|
||||
"To complete the task, You must write a response that appropriately solves the requested instruction based on your expertise and customer's needs."
|
||||
],
|
||||
"Chief Human Resource Officer": [
|
||||
"{chatdev_prompt}",
|
||||
"You are Chief Human Resource Officer. Now, we are both working at ChatDev and we share a common interest in collaborating to successfully complete a task assigned by a new customer.",
|
||||
"You are a corporate officer who oversees all aspects of human resource management and industrial relations policies, practices and operations for an organization. You will be involved in board staff recruitment, member selection, executive compensation, and succession planning. Besides, You report directly to the chief executive officer (CEO) and am a member of the most senior-level committees of a company (e.g., executive committee or office of CEO).",
|
||||
"Here is a new customer's task: {task}.",
|
||||
"To complete the task, you must write a response that appropriately solves the requested instruction based on your expertise and customer's needs."
|
||||
],
|
||||
"Programmer": [
|
||||
"{chatdev_prompt}",
|
||||
"You are Programmer. we are both working at ChatDev. We share a common interest in collaborating to successfully complete a task assigned by a new customer.",
|
||||
"You can write/create computer software or applications by providing a specific programming language to the computer. You have extensive computing and coding experience in many varieties of programming languages and platforms, such as Python, Java, C, C++, HTML, CSS, JavaScript, XML, SQL, PHP, etc,.",
|
||||
"Here is a new customer's task: {task}.",
|
||||
"To complete the task, you must write a response that appropriately solves the requested instruction based on your expertise and customer's needs."
|
||||
],
|
||||
"Code Reviewer": [
|
||||
"{chatdev_prompt}",
|
||||
"You are Code Reviewer. we are both working at ChatDev. We share a common interest in collaborating to successfully complete a task assigned by a new customer.",
|
||||
"You can help programmers to assess source codes for software troubleshooting, fix bugs to increase code quality and robustness, and offer proposals to improve the source codes.",
|
||||
"Here is a new customer's task: {task}.",
|
||||
"To complete the task, you must write a response that appropriately solves the requested instruction based on your expertise and customer's needs."
|
||||
],
|
||||
"Software Test Engineer": [
|
||||
"{chatdev_prompt}",
|
||||
"You are Software Test Engineer. we are both working at ChatDev. We share a common interest in collaborating to successfully complete a task assigned by a new customer.",
|
||||
"You can use the software as intended to analyze its functional properties, design manual and automated test procedures to evaluate each software product, build and implement software evaluation test programs, and run test programs to ensure that testing protocols evaluate the software correctly.",
|
||||
"Here is a new customer's task: {task}.",
|
||||
"To complete the task, you must write a response that appropriately solves the requested instruction based on your expertise and customer's needs."
|
||||
],
|
||||
"Chief Creative Officer": [
|
||||
"{chatdev_prompt}",
|
||||
"You are Chief Creative Officer. we are both working at ChatDev. We share a common interest in collaborating to successfully complete a task assigned by a new customer.",
|
||||
"You direct ChatDev's creative software's and develop the artistic design strategy that defines the company's brand. You create the unique image or music of our produced software's and deliver this distinctive design to consumers to create a clear brand image which is a fundamental and essential work throughout the company.",
|
||||
"Here is a new customer's task: {task}.",
|
||||
"To complete the task, you must write a response that appropriately solves the requested instruction based on your expertise and customer's needs."
|
||||
]
|
||||
}
|
@ -0,0 +1,6 @@
|
||||
import random
|
||||
class Dice:
|
||||
def __init__(self, num_sides):
|
||||
self.num_sides = num_sides
|
||||
def roll(self):
|
||||
return random.randint(1, self.num_sides)
|
33
WareHouse/DiceRollingSimulator_THUNLP_20230825072338/main.py
Normal file
@ -0,0 +1,33 @@
|
||||
import tkinter as tk
|
||||
from dice import Dice
|
||||
class DiceRollerApp:
|
||||
def __init__(self):
|
||||
self.window = tk.Tk()
|
||||
self.window.title("Dice Roller")
|
||||
self.label = tk.Label(self.window, text="Enter the number of sides on the dice:")
|
||||
self.label.pack()
|
||||
self.entry = tk.Entry(self.window)
|
||||
self.entry.pack()
|
||||
self.button = tk.Button(self.window, text="Roll Dice", command=self.roll_dice)
|
||||
self.button.pack()
|
||||
self.result_label = tk.Label(self.window, text="")
|
||||
self.result_label.pack()
|
||||
self.dice = None
|
||||
def roll_dice(self):
|
||||
num_sides = self.entry.get()
|
||||
try:
|
||||
num_sides = int(num_sides)
|
||||
except ValueError:
|
||||
self.result_label.config(text="Invalid input. Please enter a valid number of sides.")
|
||||
return
|
||||
if num_sides <= 0:
|
||||
self.result_label.config(text="Number of sides must be a positive integer.")
|
||||
return
|
||||
self.dice = Dice(num_sides)
|
||||
roll_result = self.dice.roll()
|
||||
self.result_label.config(text=f"The dice rolled: {roll_result}")
|
||||
def run(self):
|
||||
self.window.mainloop()
|
||||
if __name__ == "__main__":
|
||||
app = DiceRollerApp()
|
||||
app.run()
|
@ -0,0 +1,61 @@
|
||||
# Dice Rolling Software User Manual
|
||||
|
||||
## Introduction
|
||||
The Dice Rolling Software is a Python application that allows users to simulate rolling dice with varying numbers of sides. The program prompts the user to input the number of sides on the dice they want to roll, generates a random number between 1 and the maximum number of sides specified by the user, and displays the outcome of the dice roll.
|
||||
|
||||
## Installation
|
||||
To use the Dice Rolling Software, you need to have Python installed on your computer. You can download Python from the official website: https://www.python.org/downloads/
|
||||
|
||||
Once Python is installed, you can follow these steps to install the required dependencies:
|
||||
|
||||
1. Open a command prompt or terminal.
|
||||
2. Navigate to the directory where you have saved the software files.
|
||||
3. Run the following command to install the required dependencies:
|
||||
|
||||
```
|
||||
pip install -r requirements.txt
|
||||
```
|
||||
|
||||
## Usage
|
||||
To run the Dice Rolling Software, follow these steps:
|
||||
|
||||
1. Open a command prompt or terminal.
|
||||
2. Navigate to the directory where you have saved the software files.
|
||||
3. Run the following command:
|
||||
|
||||
```
|
||||
python main.py
|
||||
```
|
||||
|
||||
4. The software window will open, displaying a label asking you to enter the number of sides on the dice.
|
||||
5. Enter a valid number of sides and click the "Roll Dice" button.
|
||||
6. The software will generate a random number between 1 and the maximum number of sides specified by you.
|
||||
7. The outcome of the dice roll will be displayed in the software window.
|
||||
8. You can continue rolling dice by entering a new number of sides and clicking the "Roll Dice" button.
|
||||
9. To exit the program, close the software window.
|
||||
|
||||
## Error Handling
|
||||
The Dice Rolling Software handles invalid inputs gracefully. If you enter an invalid number of sides (e.g., a non-integer or a negative number), an error message will be displayed in the software window. You will be prompted to enter a valid number of sides before rolling the dice again.
|
||||
|
||||
## Example
|
||||
Here is an example of how to use the Dice Rolling Software:
|
||||
|
||||
1. Open a command prompt or terminal.
|
||||
2. Navigate to the directory where you have saved the software files.
|
||||
3. Run the following command:
|
||||
|
||||
```
|
||||
python main.py
|
||||
```
|
||||
|
||||
4. The software window will open.
|
||||
5. Enter the number of sides on the dice (e.g., 6 for a standard six-sided die).
|
||||
6. Click the "Roll Dice" button.
|
||||
7. The software will generate a random number between 1 and 6 and display the outcome of the dice roll.
|
||||
8. Enter a new number of sides (e.g., 20 for a twenty-sided die) and click the "Roll Dice" button.
|
||||
9. The software will generate a random number between 1 and 20 and display the outcome of the dice roll.
|
||||
10. Continue rolling dice as desired.
|
||||
11. To exit the program, close the software window.
|
||||
|
||||
## Conclusion
|
||||
The Dice Rolling Software provides a simple and intuitive way to simulate rolling dice with varying numbers of sides. It handles invalid inputs gracefully and allows you to roll dice until you choose to exit the program. Enjoy rolling the virtual dice!
|
@ -0,0 +1,29 @@
|
||||
Task:
|
||||
design a software that simulates dice rolling. the software should allow users to roll dice with varying numbers of sides and display the outcomes accurately. the program should prompt the user to input the number of sides on the dice they want to roll. after receiving the input, the software should generate a random number between 1 and the maximum number of sides specified by the user. the program should then display the outcome of the dice roll to the user. ensure that the software handles invalid inputs gracefully, displaying an error message and prompting the user to enter a valid number of sides if an invalid input is detected. the software should continue to prompt the user for dice rolls until they choose to exit the program.
|
||||
|
||||
Config:
|
||||
ChatEnvConfig.clear_structure: True
|
||||
ChatEnvConfig.brainstorming: False
|
||||
|
||||
|
||||
Roster:
|
||||
Chief Executive Officer, Counselor, Chief Human Resource Officer, Chief Product Officer, Chief Technology Officer, Programmer, Code Reviewer, Software Test Engineer, Chief Creative Officer
|
||||
|
||||
Modality:
|
||||
application
|
||||
|
||||
Ideas:
|
||||
|
||||
|
||||
Language:
|
||||
Python
|
||||
|
||||
Code_Version:
|
||||
12.0
|
||||
|
||||
Proposed_images:
|
||||
0
|
||||
|
||||
Incorporated_images:
|
||||
0
|
||||
|
@ -0,0 +1 @@
|
||||
tkinter
|
2
WareHouse/DigitalClock_THUNLP_20230825093556/.py
Normal file
@ -0,0 +1,2 @@
|
||||
from datetime import datetime
|
||||
import tkinter as tk
|
@ -0,0 +1,101 @@
|
||||
{
|
||||
"chain": [
|
||||
{
|
||||
"phase": "DemandAnalysis",
|
||||
"phaseType": "SimplePhase",
|
||||
"max_turn_step": 2,
|
||||
"need_reflect": "True"
|
||||
},
|
||||
{
|
||||
"phase": "LanguageChoose",
|
||||
"phaseType": "SimplePhase",
|
||||
"max_turn_step": 2,
|
||||
"need_reflect": "True"
|
||||
},
|
||||
{
|
||||
"phase": "Coding",
|
||||
"phaseType": "SimplePhase",
|
||||
"max_turn_step": 1,
|
||||
"need_reflect": "False"
|
||||
},
|
||||
{
|
||||
"phase": "CodeCompleteAll",
|
||||
"phaseType": "ComposedPhase",
|
||||
"cycleNum": 3,
|
||||
"Composition": [
|
||||
{
|
||||
"phase": "CodeComplete",
|
||||
"phaseType": "SimplePhase",
|
||||
"max_turn_step": 1,
|
||||
"need_reflect": "False"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"phase": "CodeReview",
|
||||
"phaseType": "ComposedPhase",
|
||||
"cycleNum": 3,
|
||||
"Composition": [
|
||||
{
|
||||
"phase": "CodeReviewComment",
|
||||
"phaseType": "SimplePhase",
|
||||
"max_turn_step": -1,
|
||||
"need_reflect": "False"
|
||||
},
|
||||
{
|
||||
"phase": "CodeReviewModification",
|
||||
"phaseType": "SimplePhase",
|
||||
"max_turn_step": -1,
|
||||
"need_reflect": "False"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"phase": "Test",
|
||||
"phaseType": "ComposedPhase",
|
||||
"cycleNum": 3,
|
||||
"Composition": [
|
||||
{
|
||||
"phase": "TestErrorSummary",
|
||||
"phaseType": "SimplePhase",
|
||||
"max_turn_step": -1,
|
||||
"need_reflect": "False"
|
||||
},
|
||||
{
|
||||
"phase": "TestModification",
|
||||
"phaseType": "SimplePhase",
|
||||
"max_turn_step": -1,
|
||||
"need_reflect": "False"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"phase": "EnvironmentDoc",
|
||||
"phaseType": "SimplePhase",
|
||||
"max_turn_step": 1,
|
||||
"need_reflect": "True"
|
||||
},
|
||||
{
|
||||
"phase": "Manual",
|
||||
"phaseType": "SimplePhase",
|
||||
"max_turn_step": 1,
|
||||
"need_reflect": "False"
|
||||
}
|
||||
],
|
||||
"recruitments": [
|
||||
"Chief Executive Officer",
|
||||
"Counselor",
|
||||
"Chief Human Resource Officer",
|
||||
"Chief Product Officer",
|
||||
"Chief Technology Officer",
|
||||
"Programmer",
|
||||
"Code Reviewer",
|
||||
"Software Test Engineer",
|
||||
"Chief Creative Officer"
|
||||
],
|
||||
"clear_structure": "True",
|
||||
"brainstorming": "False",
|
||||
"gui_design": "True",
|
||||
"git_management": "False",
|
||||
"self_improve": "False"
|
||||
}
|
@ -0,0 +1 @@
|
||||
Design a simple digital clock application that displays the current time in a 12-hour or 24-hour format.
|
301
WareHouse/DigitalClock_THUNLP_20230825093556/PhaseConfig.json
Normal file
@ -0,0 +1,301 @@
|
||||
{
|
||||
"DemandAnalysis": {
|
||||
"assistant_role_name": "Chief Product Officer",
|
||||
"user_role_name": "Chief Executive Officer",
|
||||
"phase_prompt": [
|
||||
"ChatDev has made products in the following form before:",
|
||||
"Image: can present information in line chart, bar chart, flow chart, cloud chart, Gantt chart, etc.",
|
||||
"Document: can present information via .docx files.",
|
||||
"PowerPoint: can present information via .pptx files.",
|
||||
"Excel: can present information via .xlsx files.",
|
||||
"PDF: can present information via .pdf files.",
|
||||
"Website: can present personal resume, tutorial, products, or ideas, via .html files.",
|
||||
"Application: can implement visualized game, software, tool, etc, via python.",
|
||||
"Dashboard: can display a panel visualizing real-time information.",
|
||||
"Mind Map: can represent ideas, with related concepts arranged around a core concept.",
|
||||
"As the {assistant_role}, to satisfy the new user's demand and the product should be realizable, you should keep discussing with me to decide which product modality do we want the product to be?",
|
||||
"Note that we must ONLY discuss the product modality and do not discuss anything else! Once we all have expressed our opinion(s) and agree with the results of the discussion unanimously, any of us must actively terminate the discussion by replying with only one line, which starts with a single word <INFO>, followed by our final product modality without any other words, e.g., \"<INFO> PowerPoint\"."
|
||||
]
|
||||
},
|
||||
"LanguageChoose": {
|
||||
"assistant_role_name": "Chief Technology Officer",
|
||||
"user_role_name": "Chief Executive Officer",
|
||||
"phase_prompt": [
|
||||
"According to the new user's task and some creative brainstorm ideas listed below: ",
|
||||
"Task: \"{task}\".",
|
||||
"Modality: \"{modality}\".",
|
||||
"Ideas: \"{ideas}\".",
|
||||
"We have decided to complete the task through a executable software implemented via a programming language. ",
|
||||
"As the {assistant_role}, to satisfy the new user's demand and make the software realizable, you should propose a concrete programming language. If python can complete this task via Python, please answer Python; otherwise, answer another programming language (e.g., Java, C++, etc,).",
|
||||
"Note that we must ONLY discuss the target programming language and do not discuss anything else! Once we all have expressed our opinion(s) and agree with the results of the discussion unanimously, any of us must actively terminate the discussion and conclude the best programming language we have discussed without any other words or reasons, return only one line using the format: \"<INFO> *\" where \"*\" represents a programming language."
|
||||
]
|
||||
},
|
||||
"Coding": {
|
||||
"assistant_role_name": "Programmer",
|
||||
"user_role_name": "Chief Technology Officer",
|
||||
"phase_prompt": [
|
||||
"According to the new user's task and our software designs listed below: ",
|
||||
"Task: \"{task}\".",
|
||||
"Modality: \"{modality}\".",
|
||||
"Programming Language: \"{language}\"",
|
||||
"Ideas:\"{ideas}\"",
|
||||
"We have decided to complete the task through a executable software with multiple files implemented via {language}. As the {assistant_role}, to satisfy the new user's demands, you should write one or multiple files and make sure that every detail of the architecture is, in the end, implemented as code. {gui}",
|
||||
"Think step by step and reason yourself to the right decisions to make sure we get it right.",
|
||||
"You will first lay out the names of the core classes, functions, methods that will be necessary, as well as a quick comment on their purpose.",
|
||||
"Then you will output the content of each file including complete code. Each file must strictly follow a markdown code block format, where the following tokens must be replaced such that \"FILENAME\" is the lowercase file name including the file extension, \"LANGUAGE\" in the programming language, \"DOCSTRING\" is a string literal specified in source code that is used to document a specific segment of code, and \"CODE\" is the original code:",
|
||||
"FILENAME",
|
||||
"```LANGUAGE",
|
||||
"'''",
|
||||
"DOCSTRING",
|
||||
"'''",
|
||||
"CODE",
|
||||
"```",
|
||||
"You will start with the \"main\" file, then go to the ones that are imported by that file, and so on.",
|
||||
"Please note that the code should be fully functional. Ensure to implement all functions. No placeholders (such as 'pass' in Python)."
|
||||
]
|
||||
},
|
||||
"ArtDesign": {
|
||||
"assistant_role_name": "Programmer",
|
||||
"user_role_name": "Chief Creative Officer",
|
||||
"phase_prompt": [
|
||||
"Our developed source codes and corresponding test reports are listed below: ",
|
||||
"Task: \"{task}\".",
|
||||
"Programming Language: \"{language}\"",
|
||||
"Source Codes:",
|
||||
"\"{codes}\"",
|
||||
"Note that each file must strictly follow a markdown code block format, where the following tokens must be replaced such that \"FILENAME\" is the lowercase file name including the file extension, \"LANGUAGE\" in the programming language, \"DOCSTRING\" is a string literal specified in source code that is used to document a specific segment of code, and \"CODE\" is the original code:",
|
||||
"FILENAME",
|
||||
"```LANGUAGE",
|
||||
"'''",
|
||||
"DOCSTRING",
|
||||
"'''",
|
||||
"CODE",
|
||||
"```",
|
||||
"As the {assistant_role}, to satisfy the new user's demand and equip the software with a beautiful graphical user interface (GUI), we will discuss and design many decorative images for GUI decoration. Now, we keep discussing the GUI beautification by listing some functionally independent elements in GUI that are being considered to be decorated by different pictures. For example, ten digits (0-9) in a calculator are functionally independent.",
|
||||
"To answer, use the format: \" FILENAME.png: DESCRIPTION\" where \"FILENAME\" is the filename of the image and \"DESCRIPTION\" denotes the detailed description of the independent elements. For example:",
|
||||
"'''",
|
||||
"button_1.png: The button with the number \"1\" on it.",
|
||||
"button_multiply.png: The button with the multiplication symbol (\"*\") on it.",
|
||||
"background.png: the background color to decorate the Go game",
|
||||
"'''",
|
||||
"Now, we keep discussing the to-be-decorated elements in the GUI and list all functionally independent elements as much as possible. If no further elements that are functionally independent or that should be further described, return only one line like \"<INFO> Finished\" in your reply."
|
||||
]
|
||||
},
|
||||
"ArtIntegration": {
|
||||
"assistant_role_name": "Programmer",
|
||||
"user_role_name": "Chief Creative Officer",
|
||||
"phase_prompt": [
|
||||
"Our developed source codes and corresponding test reports are listed below: ",
|
||||
"Task: \"{task}\".",
|
||||
"Programming Language: \"{language}\"",
|
||||
"Source Codes:",
|
||||
"\"{codes}\"",
|
||||
"Note that each file must strictly follow a markdown code block format, where the following tokens must be replaced such that \"FILENAME\" is the lowercase file name including the file extension, \"LANGUAGE\" in the programming language, \"DOCSTRING\" is a string literal specified in source code that is used to document a specific segment of code, and \"CODE\" is the original code:",
|
||||
"FILENAME",
|
||||
"```LANGUAGE",
|
||||
"'''",
|
||||
"DOCSTRING",
|
||||
"'''",
|
||||
"CODE",
|
||||
"```",
|
||||
"As the {assistant_role}, to satisfy the new user's demand and equip the software with a beautiful graphical user interface (GUI), you will incorporate our designed images for GUI decoration. Here are some ready-made high-quality pictures and corresponding descriptions:",
|
||||
"{images}",
|
||||
"Note that the designed images have a fixed size of 256x256 pixels and the images are located in the same directory as all the Python files; please dynamically scaling these images according to the size of GUI, and use \"self.*\" to avoid displaying-related problems caused by automatic garbage collection. For example:",
|
||||
"```",
|
||||
"self.image = ImageTk.PhotoImage(Image.open(\"./image.png\").resize((50, 50)))",
|
||||
"```",
|
||||
"Now, use some or all of the pictures into the GUI to make it more beautiful and creative. Output codes strictly following the required format mentioned above."
|
||||
]
|
||||
},
|
||||
"CodeComplete": {
|
||||
"assistant_role_name": "Programmer",
|
||||
"user_role_name": "Chief Technology Officer",
|
||||
"phase_prompt": [
|
||||
"According to the new user's task and our software designs listed below: ",
|
||||
"Task: \"{task}\".",
|
||||
"Modality: \"{modality}\".",
|
||||
"Programming Language: \"{language}\"",
|
||||
"Codes:",
|
||||
"\"{codes}\"",
|
||||
"Unimplemented File:",
|
||||
"\"{unimplemented_file}\"",
|
||||
"In our software, each file must strictly follow a markdown code block format, where the following tokens must be replaced such that \"FILENAME\" is the lowercase file name including the file extension, \"LANGUAGE\" in the programming language, \"DOCSTRING\" is a string literal specified in source code that is used to document a specific segment of code, and \"CODE\" is the original code:",
|
||||
"FILENAME",
|
||||
"```LANGUAGE",
|
||||
"'''",
|
||||
"DOCSTRING",
|
||||
"'''",
|
||||
"CODE",
|
||||
"```",
|
||||
"As the {assistant_role}, to satisfy the complete function of our developed software, you have to implement all methods in the {unimplemented_file} file which contains a unimplemented class. Now, implement all methods of the {unimplemented_file} and all other codes needed, then output the fully implemented codes, strictly following the required format."
|
||||
]
|
||||
},
|
||||
"CodeReviewComment": {
|
||||
"assistant_role_name": "Code Reviewer",
|
||||
"user_role_name": "Programmer",
|
||||
"phase_prompt": [
|
||||
"According to the new user's task and our software designs: ",
|
||||
"Task: \"{task}\".",
|
||||
"Modality: \"{modality}\".",
|
||||
"Programming Language: \"{language}\"",
|
||||
"Ideas: \"{ideas}\"",
|
||||
"Codes:",
|
||||
"\"{codes}\"",
|
||||
"As the {assistant_role}, to make the software directly operable without further coding, ChatDev have formulated the following regulations:",
|
||||
"1) all referenced classes should be imported;",
|
||||
"2) all methods should be implemented;",
|
||||
"3) all methods need to have the necessary comments;",
|
||||
"4) no potential bugs;",
|
||||
"5) The entire project conforms to the tasks proposed by the user;",
|
||||
"6) most importantly, do not only check the errors in the code, but also the logic of code. Make sure that user can interact with generated software without losing any feature in the requirement;",
|
||||
"Now, you should check the above regulations one by one and review the codes in detail, propose one comment with the highest priority about the codes, and give me instructions on how to fix. Tell me your comment with the highest priority and corresponding suggestions on revision. If the codes are perfect and you have no comment on them, return only one line like \"<INFO> Finished\"."
|
||||
]
|
||||
},
|
||||
"CodeReviewModification": {
|
||||
"assistant_role_name": "Programmer",
|
||||
"user_role_name": "Code Reviewer",
|
||||
"phase_prompt": [
|
||||
"According to the new user's task, our designed product modality, languages and ideas, our developed first-edition source codes are listed below: ",
|
||||
"Task: \"{task}\".",
|
||||
"Modality: \"{modality}\".",
|
||||
"Programming Language: \"{language}\"",
|
||||
"Ideas: \"{ideas}\"",
|
||||
"Codes: ",
|
||||
"\"{codes}\"",
|
||||
"Comments on Codes:",
|
||||
"\"{comments}\"",
|
||||
"In the software, each file must strictly follow a markdown code block format, where the following tokens must be replaced such that \"FILENAME\" is the lowercase file name including the file extension, \"LANGUAGE\" in the programming language, \"DOCSTRING\" is a string literal specified in source code that is used to document a specific segment of code, and \"CODE\" is the original code. Format:",
|
||||
"FILENAME",
|
||||
"```LANGUAGE",
|
||||
"'''",
|
||||
"DOCSTRING",
|
||||
"'''",
|
||||
"CODE",
|
||||
"```",
|
||||
"As the {assistant_role}, to satisfy the new user's demand and make the software creative, executive and robust, you should modify corresponding codes according to the comments. Then, output the full and complete codes with all bugs fixed based on the comments. Return all codes strictly following the required format."
|
||||
]
|
||||
},
|
||||
"CodeReviewHuman": {
|
||||
"assistant_role_name": "Programmer",
|
||||
"user_role_name": "Code Reviewer",
|
||||
"phase_prompt": [
|
||||
"According to the new user's task, our designed product modality and three creative ideas, our developed first-edition source codes are listed below: ",
|
||||
"Task: \"{task}\".",
|
||||
"Modality: \"{modality}\".",
|
||||
"Programming Language: \"{language}\"",
|
||||
"Ideas: \"{ideas}\"",
|
||||
"Codes: ",
|
||||
"\"{codes}\"",
|
||||
"Comments on Codes:",
|
||||
"\"{comments}\"",
|
||||
"In the software, each file must strictly follow a markdown code block format, where the following tokens must be replaced such that \"FILENAME\" is the lowercase file name including the file extension, \"LANGUAGE\" in the programming language, \"DOCSTRING\" is a string literal specified in source code that is used to document a specific segment of code, and \"CODE\" is the original code. Format:",
|
||||
"FILENAME",
|
||||
"```LANGUAGE",
|
||||
"'''",
|
||||
"DOCSTRING",
|
||||
"'''",
|
||||
"CODE",
|
||||
"```",
|
||||
"As the {assistant_role}, to satisfy the new user's demand and make the software creative, executive and robust, you should modify corresponding codes according to the comments. Then, output the fixed codes strictly following the required format."
|
||||
]
|
||||
},
|
||||
"TestErrorSummary": {
|
||||
"assistant_role_name": "Programmer",
|
||||
"user_role_name": "Software Test Engineer",
|
||||
"phase_prompt": [
|
||||
"Our developed source codes and corresponding test reports are listed below: ",
|
||||
"Programming Language: \"{language}\"",
|
||||
"Source Codes:",
|
||||
"\"{codes}\"",
|
||||
"Test Reports of Source Codes:",
|
||||
"\"{test_reports}\"",
|
||||
"According to my test reports, please locate and summarize the bugs that cause the problem."
|
||||
]
|
||||
},
|
||||
"TestModification": {
|
||||
"assistant_role_name": "Programmer",
|
||||
"user_role_name": "Software Test Engineer",
|
||||
"phase_prompt": [
|
||||
"Our developed source codes and corresponding test reports are listed below: ",
|
||||
"Programming Language: \"{language}\"",
|
||||
"Source Codes:",
|
||||
"\"{codes}\"",
|
||||
"Test Reports of Source Codes:",
|
||||
"\"{test_reports}\"",
|
||||
"Error Summary of Test Reports:",
|
||||
"\"{error_summary}\"",
|
||||
"Note that each file must strictly follow a markdown code block format, where the following tokens must be replaced such that \"FILENAME\" is the lowercase file name including the file extension, \"LANGUAGE\" in the programming language, \"DOCSTRING\" is a string literal specified in source code that is used to document a specific segment of code, and \"CODE\" is the original code:",
|
||||
"FILENAME",
|
||||
"```LANGUAGE",
|
||||
"'''",
|
||||
"DOCSTRING",
|
||||
"'''",
|
||||
"CODE",
|
||||
"```",
|
||||
"As the {assistant_role}, to satisfy the new user's demand and make the software execute smoothly and robustly, you should modify the codes based on the error summary. Now, use the format exemplified above and modify the problematic codes based on the error summary. Output the codes that you fixed based on the test reported and corresponding explanations (strictly follow the format defined above, including FILENAME, LANGUAGE, DOCSTRING and CODE; incomplete \"TODO\" codes are strictly prohibited). If no bugs are reported, please return only one line like \"<INFO> Finished\"."
|
||||
]
|
||||
},
|
||||
"EnvironmentDoc": {
|
||||
"assistant_role_name": "Programmer",
|
||||
"user_role_name": "Chief Technology Officer",
|
||||
"phase_prompt": [
|
||||
"The new user's task and our developed codes are listed: ",
|
||||
"Task: \"{task}\".",
|
||||
"Modality: \"{modality}\".",
|
||||
"Programming Language: \"{language}\"",
|
||||
"Ideas: \"{ideas}\"",
|
||||
"Codes: ",
|
||||
"\"{codes}\"",
|
||||
"As the {assistant_role}, you should write a requirements.txt file, which is commonly used in Python projects to specify the dependencies or packages required for the project to run properly. It serves as a way to document and manage the project's dependencies in a standardized format. For example:",
|
||||
"requirements.txt",
|
||||
"```",
|
||||
"numpy==1.19.2",
|
||||
"pandas>=1.1.4",
|
||||
"```",
|
||||
"According to the codes and file format listed above, write a requirements.txt file to specify the dependencies or packages required for the project to run properly."
|
||||
]
|
||||
},
|
||||
"Manual": {
|
||||
"assistant_role_name": "Chief Product Officer",
|
||||
"user_role_name": "Chief Executive Officer",
|
||||
"phase_prompt": [
|
||||
"The new user's task, our developed codes and required dependencies are listed: ",
|
||||
"Task: \"{task}\".",
|
||||
"Modality: \"{modality}\".",
|
||||
"Programming Language: \"{language}\"",
|
||||
"Ideas: \"{ideas}\"",
|
||||
"Codes: ",
|
||||
"\"{codes}\"",
|
||||
"Requirements:",
|
||||
"\"{requirements}\"",
|
||||
"As the {assistant_role}, by using Markdown, you should write a manual.md file which is a detailed user manual to use the software, including introducing main functions of the software, how to install environment dependencies and how to use/play it. For example:",
|
||||
"manual.md",
|
||||
"```",
|
||||
"# LangChain",
|
||||
"Building applications with LLMs through composability",
|
||||
"Looking for the JS/TS version? Check out LangChain.js.",
|
||||
"**Production Support:** As you move your LangChains into production, we'd love to offer more comprehensive support.",
|
||||
"Please fill out this form and we'll set up a dedicated support Slack channel.",
|
||||
"## Quick Install",
|
||||
"`pip install langchain`",
|
||||
"or",
|
||||
"`conda install langchain -c conda-forge`",
|
||||
"## 🤔 What is this?",
|
||||
"Large language models (LLMs) are emerging as a transformative technology, enabling developers to build applications that they previously could not. However, using these LLMs in isolation is often insufficient for creating a truly powerful app - the real power comes when you can combine them with other sources of computation or knowledge.",
|
||||
"This library aims to assist in the development of those types of applications. Common examples of these applications include:",
|
||||
"**❓ Question Answering over specific documents**",
|
||||
"- Documentation",
|
||||
"- End-to-end Example: Question Answering over Notion Database",
|
||||
"**🤖 Agents**",
|
||||
"- Documentation",
|
||||
"- End-to-end Example: GPT+WolframAlpha",
|
||||
"## 📖 Documentation",
|
||||
"Please see [here](https://python.langchain.com) for full documentation on:",
|
||||
"- Getting started (installation, setting up the environment, simple examples)",
|
||||
"- How-To examples (demos, integrations, helper functions)",
|
||||
"- Reference (full API docs)",
|
||||
"- Resources (high-level explanation of core concepts)",
|
||||
"```"
|
||||
]
|
||||
}
|
||||
}
|
65
WareHouse/DigitalClock_THUNLP_20230825093556/RoleConfig.json
Normal file
@ -0,0 +1,65 @@
|
||||
{
|
||||
"Chief Executive Officer": [
|
||||
"{chatdev_prompt}",
|
||||
"You are Chief Executive Officer. Now, we are both working at ChatDev and we share a common interest in collaborating to successfully complete a task assigned by a new customer.",
|
||||
"Your main responsibilities include being an active decision-maker on users' demands and other key policy issues, leader, manager, and executor. Your decision-making role involves high-level decisions about policy and strategy; and your communicator role can involve speaking to the organization's management and employees.",
|
||||
"Here is a new customer's task: {task}.",
|
||||
"To complete the task, I will give you one or more instructions, and you must help me to write a specific solution that appropriately solves the requested instruction based on your expertise and my needs."
|
||||
],
|
||||
"Chief Product Officer": [
|
||||
"{chatdev_prompt}",
|
||||
"You are Chief Product Officer. we are both working at ChatDev. We share a common interest in collaborating to successfully complete a task assigned by a new customer.",
|
||||
"You are responsible for all product-related matters in ChatDev. Usually includes product design, product strategy, product vision, product innovation, project management and product marketing.",
|
||||
"Here is a new customer's task: {task}.",
|
||||
"To complete the task, you must write a response that appropriately solves the requested instruction based on your expertise and customer's needs."
|
||||
],
|
||||
"Counselor": [
|
||||
"{chatdev_prompt}",
|
||||
"You are Counselor. Now, we share a common interest in collaborating to successfully complete a task assigned by a new customer.",
|
||||
"Your main responsibilities include asking what user and customer think and provide your valuable suggestions. ",
|
||||
"Here is a new customer's task: {task}.",
|
||||
"To complete the task, I will give you one or more instructions, and you must help me to write a specific solution that appropriately solves the requested instruction based on your expertise and my needs."
|
||||
],
|
||||
"Chief Technology Officer": [
|
||||
"{chatdev_prompt}",
|
||||
"You are Chief Technology Officer. we are both working at ChatDev. We share a common interest in collaborating to successfully complete a task assigned by a new customer.",
|
||||
"You are very familiar to information technology. You will make high-level decisions for the overarching technology infrastructure that closely align with the organization's goals, while you work alongside the organization's information technology (\"IT\") staff members to perform everyday operations.",
|
||||
"Here is a new customer's task: {task}.",
|
||||
"To complete the task, You must write a response that appropriately solves the requested instruction based on your expertise and customer's needs."
|
||||
],
|
||||
"Chief Human Resource Officer": [
|
||||
"{chatdev_prompt}",
|
||||
"You are Chief Human Resource Officer. Now, we are both working at ChatDev and we share a common interest in collaborating to successfully complete a task assigned by a new customer.",
|
||||
"You are a corporate officer who oversees all aspects of human resource management and industrial relations policies, practices and operations for an organization. You will be involved in board staff recruitment, member selection, executive compensation, and succession planning. Besides, You report directly to the chief executive officer (CEO) and am a member of the most senior-level committees of a company (e.g., executive committee or office of CEO).",
|
||||
"Here is a new customer's task: {task}.",
|
||||
"To complete the task, you must write a response that appropriately solves the requested instruction based on your expertise and customer's needs."
|
||||
],
|
||||
"Programmer": [
|
||||
"{chatdev_prompt}",
|
||||
"You are Programmer. we are both working at ChatDev. We share a common interest in collaborating to successfully complete a task assigned by a new customer.",
|
||||
"You can write/create computer software or applications by providing a specific programming language to the computer. You have extensive computing and coding experience in many varieties of programming languages and platforms, such as Python, Java, C, C++, HTML, CSS, JavaScript, XML, SQL, PHP, etc,.",
|
||||
"Here is a new customer's task: {task}.",
|
||||
"To complete the task, you must write a response that appropriately solves the requested instruction based on your expertise and customer's needs."
|
||||
],
|
||||
"Code Reviewer": [
|
||||
"{chatdev_prompt}",
|
||||
"You are Code Reviewer. we are both working at ChatDev. We share a common interest in collaborating to successfully complete a task assigned by a new customer.",
|
||||
"You can help programmers to assess source codes for software troubleshooting, fix bugs to increase code quality and robustness, and offer proposals to improve the source codes.",
|
||||
"Here is a new customer's task: {task}.",
|
||||
"To complete the task, you must write a response that appropriately solves the requested instruction based on your expertise and customer's needs."
|
||||
],
|
||||
"Software Test Engineer": [
|
||||
"{chatdev_prompt}",
|
||||
"You are Software Test Engineer. we are both working at ChatDev. We share a common interest in collaborating to successfully complete a task assigned by a new customer.",
|
||||
"You can use the software as intended to analyze its functional properties, design manual and automated test procedures to evaluate each software product, build and implement software evaluation test programs, and run test programs to ensure that testing protocols evaluate the software correctly.",
|
||||
"Here is a new customer's task: {task}.",
|
||||
"To complete the task, you must write a response that appropriately solves the requested instruction based on your expertise and customer's needs."
|
||||
],
|
||||
"Chief Creative Officer": [
|
||||
"{chatdev_prompt}",
|
||||
"You are Chief Creative Officer. we are both working at ChatDev. We share a common interest in collaborating to successfully complete a task assigned by a new customer.",
|
||||
"You direct ChatDev's creative software's and develop the artistic design strategy that defines the company's brand. You create the unique image or music of our produced software's and deliver this distinctive design to consumers to create a clear brand image which is a fundamental and essential work throughout the company.",
|
||||
"Here is a new customer's task: {task}.",
|
||||
"To complete the task, you must write a response that appropriately solves the requested instruction based on your expertise and customer's needs."
|
||||
]
|
||||
}
|
30
WareHouse/DigitalClock_THUNLP_20230825093556/main.py
Normal file
@ -0,0 +1,30 @@
|
||||
'''
|
||||
This is the main file for the digital clock application.
|
||||
It initializes the GUI and starts the clock.
|
||||
'''
|
||||
import tkinter as tk
|
||||
from datetime import datetime
|
||||
class DigitalClockApp:
|
||||
def __init__(self, root):
|
||||
"""
|
||||
Initializes the DigitalClockApp class.
|
||||
Args:
|
||||
root (tkinter.Tk): The root window of the application.
|
||||
"""
|
||||
self.root = root
|
||||
self.root.title("Digital Clock")
|
||||
self.time_label = tk.Label(root, font=("Arial", 80), bg="black", fg="white")
|
||||
self.time_label.pack(padx=50, pady=50)
|
||||
self.update_clock()
|
||||
def update_clock(self):
|
||||
"""
|
||||
Updates the clock label with the current time.
|
||||
This method is called every second to update the clock label with the current time.
|
||||
"""
|
||||
current_time = datetime.now().strftime("%H:%M:%S")
|
||||
self.time_label.config(text=current_time)
|
||||
self.root.after(1000, self.update_clock)
|
||||
if __name__ == "__main__":
|
||||
root = tk.Tk()
|
||||
app = DigitalClockApp(root)
|
||||
root.mainloop()
|
55
WareHouse/DigitalClock_THUNLP_20230825093556/manual.md
Normal file
@ -0,0 +1,55 @@
|
||||
# Digital Clock Application User Manual
|
||||
|
||||
## Introduction
|
||||
The Digital Clock Application is a simple mobile app that displays the current time in either a 12-hour or 24-hour format. It provides a convenient and easy-to-use interface for users to check the time on their mobile devices.
|
||||
|
||||
## Main Functions
|
||||
The Digital Clock Application offers the following main functions:
|
||||
|
||||
1. Display Current Time: The app displays the current time on the screen in a large font size, making it easy to read.
|
||||
|
||||
2. 12-hour or 24-hour Format: Users can choose between a 12-hour or 24-hour time format based on their preference.
|
||||
|
||||
## Installation
|
||||
|
||||
To install and run the Digital Clock Application, please follow these steps:
|
||||
|
||||
1. Ensure that you have Python installed on your system. If not, you can download and install Python from the official website: [Python.org](https://www.python.org/).
|
||||
|
||||
2. Download the source code files for the Digital Clock Application.
|
||||
|
||||
3. Open a terminal or command prompt and navigate to the directory where you downloaded the source code files.
|
||||
|
||||
4. Install the required dependencies by running the following command:
|
||||
|
||||
```
|
||||
pip install -r requirements.txt
|
||||
```
|
||||
|
||||
This will install the necessary packages, including `tkinter` and `datetime`.
|
||||
|
||||
## Usage
|
||||
|
||||
To use the Digital Clock Application, follow these steps:
|
||||
|
||||
1. Open a terminal or command prompt and navigate to the directory where you downloaded the source code files.
|
||||
|
||||
2. Run the following command to start the application:
|
||||
|
||||
```
|
||||
python main.py
|
||||
```
|
||||
|
||||
3. The Digital Clock Application window will open, displaying the current time.
|
||||
|
||||
4. To switch between the 12-hour and 24-hour time format, click on the "Settings" button in the application window.
|
||||
|
||||
5. In the settings menu, select your preferred time format and click "Save".
|
||||
|
||||
6. The application will automatically update the time display according to your chosen format.
|
||||
|
||||
7. To exit the application, simply close the application window.
|
||||
|
||||
## Conclusion
|
||||
|
||||
The Digital Clock Application provides a simple and convenient way to check the current time on your mobile device. With its easy-to-use interface and customizable time format, it offers a user-friendly experience for users. Enjoy using the Digital Clock Application!
|
29
WareHouse/DigitalClock_THUNLP_20230825093556/meta.txt
Normal file
@ -0,0 +1,29 @@
|
||||
Task:
|
||||
Design a simple digital clock application that displays the current time in a 12-hour or 24-hour format.
|
||||
|
||||
Config:
|
||||
ChatEnvConfig.clear_structure: True
|
||||
ChatEnvConfig.brainstorming: False
|
||||
|
||||
|
||||
Roster:
|
||||
Chief Executive Officer, Counselor, Chief Human Resource Officer, Chief Product Officer, Chief Technology Officer, Programmer, Code Reviewer, Software Test Engineer, Chief Creative Officer
|
||||
|
||||
Modality:
|
||||
i agree with your suggestion a mobile application would indeed be the best modality for a digital clock application it offers the flexibility and convenience of being accessible on various mobile devices, along with additional features that enhance the user experience let's proceed with developing a mobile app for the digital clock
|
||||
|
||||
Ideas:
|
||||
|
||||
|
||||
Language:
|
||||
Python
|
||||
|
||||
Code_Version:
|
||||
5.0
|
||||
|
||||
Proposed_images:
|
||||
0
|
||||
|
||||
Incorporated_images:
|
||||
0
|
||||
|
101
WareHouse/ExpenseEase_THUNLP_20230825093604/ChatChainConfig.json
Normal file
@ -0,0 +1,101 @@
|
||||
{
|
||||
"chain": [
|
||||
{
|
||||
"phase": "DemandAnalysis",
|
||||
"phaseType": "SimplePhase",
|
||||
"max_turn_step": 2,
|
||||
"need_reflect": "True"
|
||||
},
|
||||
{
|
||||
"phase": "LanguageChoose",
|
||||
"phaseType": "SimplePhase",
|
||||
"max_turn_step": 2,
|
||||
"need_reflect": "True"
|
||||
},
|
||||
{
|
||||
"phase": "Coding",
|
||||
"phaseType": "SimplePhase",
|
||||
"max_turn_step": 1,
|
||||
"need_reflect": "False"
|
||||
},
|
||||
{
|
||||
"phase": "CodeCompleteAll",
|
||||
"phaseType": "ComposedPhase",
|
||||
"cycleNum": 3,
|
||||
"Composition": [
|
||||
{
|
||||
"phase": "CodeComplete",
|
||||
"phaseType": "SimplePhase",
|
||||
"max_turn_step": 1,
|
||||
"need_reflect": "False"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"phase": "CodeReview",
|
||||
"phaseType": "ComposedPhase",
|
||||
"cycleNum": 3,
|
||||
"Composition": [
|
||||
{
|
||||
"phase": "CodeReviewComment",
|
||||
"phaseType": "SimplePhase",
|
||||
"max_turn_step": -1,
|
||||
"need_reflect": "False"
|
||||
},
|
||||
{
|
||||
"phase": "CodeReviewModification",
|
||||
"phaseType": "SimplePhase",
|
||||
"max_turn_step": -1,
|
||||
"need_reflect": "False"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"phase": "Test",
|
||||
"phaseType": "ComposedPhase",
|
||||
"cycleNum": 3,
|
||||
"Composition": [
|
||||
{
|
||||
"phase": "TestErrorSummary",
|
||||
"phaseType": "SimplePhase",
|
||||
"max_turn_step": -1,
|
||||
"need_reflect": "False"
|
||||
},
|
||||
{
|
||||
"phase": "TestModification",
|
||||
"phaseType": "SimplePhase",
|
||||
"max_turn_step": -1,
|
||||
"need_reflect": "False"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"phase": "EnvironmentDoc",
|
||||
"phaseType": "SimplePhase",
|
||||
"max_turn_step": 1,
|
||||
"need_reflect": "True"
|
||||
},
|
||||
{
|
||||
"phase": "Manual",
|
||||
"phaseType": "SimplePhase",
|
||||
"max_turn_step": 1,
|
||||
"need_reflect": "False"
|
||||
}
|
||||
],
|
||||
"recruitments": [
|
||||
"Chief Executive Officer",
|
||||
"Counselor",
|
||||
"Chief Human Resource Officer",
|
||||
"Chief Product Officer",
|
||||
"Chief Technology Officer",
|
||||
"Programmer",
|
||||
"Code Reviewer",
|
||||
"Software Test Engineer",
|
||||
"Chief Creative Officer"
|
||||
],
|
||||
"clear_structure": "True",
|
||||
"brainstorming": "False",
|
||||
"gui_design": "True",
|
||||
"git_management": "False",
|
||||
"self_improve": "False"
|
||||
}
|
@ -0,0 +1 @@
|
||||
Develop a simple expense tracker. Allow input of expenses and visualize data. Use a modern GUI library. No external assets.
|
301
WareHouse/ExpenseEase_THUNLP_20230825093604/PhaseConfig.json
Normal file
@ -0,0 +1,301 @@
|
||||
{
|
||||
"DemandAnalysis": {
|
||||
"assistant_role_name": "Chief Product Officer",
|
||||
"user_role_name": "Chief Executive Officer",
|
||||
"phase_prompt": [
|
||||
"ChatDev has made products in the following form before:",
|
||||
"Image: can present information in line chart, bar chart, flow chart, cloud chart, Gantt chart, etc.",
|
||||
"Document: can present information via .docx files.",
|
||||
"PowerPoint: can present information via .pptx files.",
|
||||
"Excel: can present information via .xlsx files.",
|
||||
"PDF: can present information via .pdf files.",
|
||||
"Website: can present personal resume, tutorial, products, or ideas, via .html files.",
|
||||
"Application: can implement visualized game, software, tool, etc, via python.",
|
||||
"Dashboard: can display a panel visualizing real-time information.",
|
||||
"Mind Map: can represent ideas, with related concepts arranged around a core concept.",
|
||||
"As the {assistant_role}, to satisfy the new user's demand and the product should be realizable, you should keep discussing with me to decide which product modality do we want the product to be?",
|
||||
"Note that we must ONLY discuss the product modality and do not discuss anything else! Once we all have expressed our opinion(s) and agree with the results of the discussion unanimously, any of us must actively terminate the discussion by replying with only one line, which starts with a single word <INFO>, followed by our final product modality without any other words, e.g., \"<INFO> PowerPoint\"."
|
||||
]
|
||||
},
|
||||
"LanguageChoose": {
|
||||
"assistant_role_name": "Chief Technology Officer",
|
||||
"user_role_name": "Chief Executive Officer",
|
||||
"phase_prompt": [
|
||||
"According to the new user's task and some creative brainstorm ideas listed below: ",
|
||||
"Task: \"{task}\".",
|
||||
"Modality: \"{modality}\".",
|
||||
"Ideas: \"{ideas}\".",
|
||||
"We have decided to complete the task through a executable software implemented via a programming language. ",
|
||||
"As the {assistant_role}, to satisfy the new user's demand and make the software realizable, you should propose a concrete programming language. If python can complete this task via Python, please answer Python; otherwise, answer another programming language (e.g., Java, C++, etc,).",
|
||||
"Note that we must ONLY discuss the target programming language and do not discuss anything else! Once we all have expressed our opinion(s) and agree with the results of the discussion unanimously, any of us must actively terminate the discussion and conclude the best programming language we have discussed without any other words or reasons, return only one line using the format: \"<INFO> *\" where \"*\" represents a programming language."
|
||||
]
|
||||
},
|
||||
"Coding": {
|
||||
"assistant_role_name": "Programmer",
|
||||
"user_role_name": "Chief Technology Officer",
|
||||
"phase_prompt": [
|
||||
"According to the new user's task and our software designs listed below: ",
|
||||
"Task: \"{task}\".",
|
||||
"Modality: \"{modality}\".",
|
||||
"Programming Language: \"{language}\"",
|
||||
"Ideas:\"{ideas}\"",
|
||||
"We have decided to complete the task through a executable software with multiple files implemented via {language}. As the {assistant_role}, to satisfy the new user's demands, you should write one or multiple files and make sure that every detail of the architecture is, in the end, implemented as code. {gui}",
|
||||
"Think step by step and reason yourself to the right decisions to make sure we get it right.",
|
||||
"You will first lay out the names of the core classes, functions, methods that will be necessary, as well as a quick comment on their purpose.",
|
||||
"Then you will output the content of each file including complete code. Each file must strictly follow a markdown code block format, where the following tokens must be replaced such that \"FILENAME\" is the lowercase file name including the file extension, \"LANGUAGE\" in the programming language, \"DOCSTRING\" is a string literal specified in source code that is used to document a specific segment of code, and \"CODE\" is the original code:",
|
||||
"FILENAME",
|
||||
"```LANGUAGE",
|
||||
"'''",
|
||||
"DOCSTRING",
|
||||
"'''",
|
||||
"CODE",
|
||||
"```",
|
||||
"You will start with the \"main\" file, then go to the ones that are imported by that file, and so on.",
|
||||
"Please note that the code should be fully functional. Ensure to implement all functions. No placeholders (such as 'pass' in Python)."
|
||||
]
|
||||
},
|
||||
"ArtDesign": {
|
||||
"assistant_role_name": "Programmer",
|
||||
"user_role_name": "Chief Creative Officer",
|
||||
"phase_prompt": [
|
||||
"Our developed source codes and corresponding test reports are listed below: ",
|
||||
"Task: \"{task}\".",
|
||||
"Programming Language: \"{language}\"",
|
||||
"Source Codes:",
|
||||
"\"{codes}\"",
|
||||
"Note that each file must strictly follow a markdown code block format, where the following tokens must be replaced such that \"FILENAME\" is the lowercase file name including the file extension, \"LANGUAGE\" in the programming language, \"DOCSTRING\" is a string literal specified in source code that is used to document a specific segment of code, and \"CODE\" is the original code:",
|
||||
"FILENAME",
|
||||
"```LANGUAGE",
|
||||
"'''",
|
||||
"DOCSTRING",
|
||||
"'''",
|
||||
"CODE",
|
||||
"```",
|
||||
"As the {assistant_role}, to satisfy the new user's demand and equip the software with a beautiful graphical user interface (GUI), we will discuss and design many decorative images for GUI decoration. Now, we keep discussing the GUI beautification by listing some functionally independent elements in GUI that are being considered to be decorated by different pictures. For example, ten digits (0-9) in a calculator are functionally independent.",
|
||||
"To answer, use the format: \" FILENAME.png: DESCRIPTION\" where \"FILENAME\" is the filename of the image and \"DESCRIPTION\" denotes the detailed description of the independent elements. For example:",
|
||||
"'''",
|
||||
"button_1.png: The button with the number \"1\" on it.",
|
||||
"button_multiply.png: The button with the multiplication symbol (\"*\") on it.",
|
||||
"background.png: the background color to decorate the Go game",
|
||||
"'''",
|
||||
"Now, we keep discussing the to-be-decorated elements in the GUI and list all functionally independent elements as much as possible. If no further elements that are functionally independent or that should be further described, return only one line like \"<INFO> Finished\" in your reply."
|
||||
]
|
||||
},
|
||||
"ArtIntegration": {
|
||||
"assistant_role_name": "Programmer",
|
||||
"user_role_name": "Chief Creative Officer",
|
||||
"phase_prompt": [
|
||||
"Our developed source codes and corresponding test reports are listed below: ",
|
||||
"Task: \"{task}\".",
|
||||
"Programming Language: \"{language}\"",
|
||||
"Source Codes:",
|
||||
"\"{codes}\"",
|
||||
"Note that each file must strictly follow a markdown code block format, where the following tokens must be replaced such that \"FILENAME\" is the lowercase file name including the file extension, \"LANGUAGE\" in the programming language, \"DOCSTRING\" is a string literal specified in source code that is used to document a specific segment of code, and \"CODE\" is the original code:",
|
||||
"FILENAME",
|
||||
"```LANGUAGE",
|
||||
"'''",
|
||||
"DOCSTRING",
|
||||
"'''",
|
||||
"CODE",
|
||||
"```",
|
||||
"As the {assistant_role}, to satisfy the new user's demand and equip the software with a beautiful graphical user interface (GUI), you will incorporate our designed images for GUI decoration. Here are some ready-made high-quality pictures and corresponding descriptions:",
|
||||
"{images}",
|
||||
"Note that the designed images have a fixed size of 256x256 pixels and the images are located in the same directory as all the Python files; please dynamically scaling these images according to the size of GUI, and use \"self.*\" to avoid displaying-related problems caused by automatic garbage collection. For example:",
|
||||
"```",
|
||||
"self.image = ImageTk.PhotoImage(Image.open(\"./image.png\").resize((50, 50)))",
|
||||
"```",
|
||||
"Now, use some or all of the pictures into the GUI to make it more beautiful and creative. Output codes strictly following the required format mentioned above."
|
||||
]
|
||||
},
|
||||
"CodeComplete": {
|
||||
"assistant_role_name": "Programmer",
|
||||
"user_role_name": "Chief Technology Officer",
|
||||
"phase_prompt": [
|
||||
"According to the new user's task and our software designs listed below: ",
|
||||
"Task: \"{task}\".",
|
||||
"Modality: \"{modality}\".",
|
||||
"Programming Language: \"{language}\"",
|
||||
"Codes:",
|
||||
"\"{codes}\"",
|
||||
"Unimplemented File:",
|
||||
"\"{unimplemented_file}\"",
|
||||
"In our software, each file must strictly follow a markdown code block format, where the following tokens must be replaced such that \"FILENAME\" is the lowercase file name including the file extension, \"LANGUAGE\" in the programming language, \"DOCSTRING\" is a string literal specified in source code that is used to document a specific segment of code, and \"CODE\" is the original code:",
|
||||
"FILENAME",
|
||||
"```LANGUAGE",
|
||||
"'''",
|
||||
"DOCSTRING",
|
||||
"'''",
|
||||
"CODE",
|
||||
"```",
|
||||
"As the {assistant_role}, to satisfy the complete function of our developed software, you have to implement all methods in the {unimplemented_file} file which contains a unimplemented class. Now, implement all methods of the {unimplemented_file} and all other codes needed, then output the fully implemented codes, strictly following the required format."
|
||||
]
|
||||
},
|
||||
"CodeReviewComment": {
|
||||
"assistant_role_name": "Code Reviewer",
|
||||
"user_role_name": "Programmer",
|
||||
"phase_prompt": [
|
||||
"According to the new user's task and our software designs: ",
|
||||
"Task: \"{task}\".",
|
||||
"Modality: \"{modality}\".",
|
||||
"Programming Language: \"{language}\"",
|
||||
"Ideas: \"{ideas}\"",
|
||||
"Codes:",
|
||||
"\"{codes}\"",
|
||||
"As the {assistant_role}, to make the software directly operable without further coding, ChatDev have formulated the following regulations:",
|
||||
"1) all referenced classes should be imported;",
|
||||
"2) all methods should be implemented;",
|
||||
"3) all methods need to have the necessary comments;",
|
||||
"4) no potential bugs;",
|
||||
"5) The entire project conforms to the tasks proposed by the user;",
|
||||
"6) most importantly, do not only check the errors in the code, but also the logic of code. Make sure that user can interact with generated software without losing any feature in the requirement;",
|
||||
"Now, you should check the above regulations one by one and review the codes in detail, propose one comment with the highest priority about the codes, and give me instructions on how to fix. Tell me your comment with the highest priority and corresponding suggestions on revision. If the codes are perfect and you have no comment on them, return only one line like \"<INFO> Finished\"."
|
||||
]
|
||||
},
|
||||
"CodeReviewModification": {
|
||||
"assistant_role_name": "Programmer",
|
||||
"user_role_name": "Code Reviewer",
|
||||
"phase_prompt": [
|
||||
"According to the new user's task, our designed product modality, languages and ideas, our developed first-edition source codes are listed below: ",
|
||||
"Task: \"{task}\".",
|
||||
"Modality: \"{modality}\".",
|
||||
"Programming Language: \"{language}\"",
|
||||
"Ideas: \"{ideas}\"",
|
||||
"Codes: ",
|
||||
"\"{codes}\"",
|
||||
"Comments on Codes:",
|
||||
"\"{comments}\"",
|
||||
"In the software, each file must strictly follow a markdown code block format, where the following tokens must be replaced such that \"FILENAME\" is the lowercase file name including the file extension, \"LANGUAGE\" in the programming language, \"DOCSTRING\" is a string literal specified in source code that is used to document a specific segment of code, and \"CODE\" is the original code. Format:",
|
||||
"FILENAME",
|
||||
"```LANGUAGE",
|
||||
"'''",
|
||||
"DOCSTRING",
|
||||
"'''",
|
||||
"CODE",
|
||||
"```",
|
||||
"As the {assistant_role}, to satisfy the new user's demand and make the software creative, executive and robust, you should modify corresponding codes according to the comments. Then, output the full and complete codes with all bugs fixed based on the comments. Return all codes strictly following the required format."
|
||||
]
|
||||
},
|
||||
"CodeReviewHuman": {
|
||||
"assistant_role_name": "Programmer",
|
||||
"user_role_name": "Code Reviewer",
|
||||
"phase_prompt": [
|
||||
"According to the new user's task, our designed product modality and three creative ideas, our developed first-edition source codes are listed below: ",
|
||||
"Task: \"{task}\".",
|
||||
"Modality: \"{modality}\".",
|
||||
"Programming Language: \"{language}\"",
|
||||
"Ideas: \"{ideas}\"",
|
||||
"Codes: ",
|
||||
"\"{codes}\"",
|
||||
"Comments on Codes:",
|
||||
"\"{comments}\"",
|
||||
"In the software, each file must strictly follow a markdown code block format, where the following tokens must be replaced such that \"FILENAME\" is the lowercase file name including the file extension, \"LANGUAGE\" in the programming language, \"DOCSTRING\" is a string literal specified in source code that is used to document a specific segment of code, and \"CODE\" is the original code. Format:",
|
||||
"FILENAME",
|
||||
"```LANGUAGE",
|
||||
"'''",
|
||||
"DOCSTRING",
|
||||
"'''",
|
||||
"CODE",
|
||||
"```",
|
||||
"As the {assistant_role}, to satisfy the new user's demand and make the software creative, executive and robust, you should modify corresponding codes according to the comments. Then, output the fixed codes strictly following the required format."
|
||||
]
|
||||
},
|
||||
"TestErrorSummary": {
|
||||
"assistant_role_name": "Programmer",
|
||||
"user_role_name": "Software Test Engineer",
|
||||
"phase_prompt": [
|
||||
"Our developed source codes and corresponding test reports are listed below: ",
|
||||
"Programming Language: \"{language}\"",
|
||||
"Source Codes:",
|
||||
"\"{codes}\"",
|
||||
"Test Reports of Source Codes:",
|
||||
"\"{test_reports}\"",
|
||||
"According to my test reports, please locate and summarize the bugs that cause the problem."
|
||||
]
|
||||
},
|
||||
"TestModification": {
|
||||
"assistant_role_name": "Programmer",
|
||||
"user_role_name": "Software Test Engineer",
|
||||
"phase_prompt": [
|
||||
"Our developed source codes and corresponding test reports are listed below: ",
|
||||
"Programming Language: \"{language}\"",
|
||||
"Source Codes:",
|
||||
"\"{codes}\"",
|
||||
"Test Reports of Source Codes:",
|
||||
"\"{test_reports}\"",
|
||||
"Error Summary of Test Reports:",
|
||||
"\"{error_summary}\"",
|
||||
"Note that each file must strictly follow a markdown code block format, where the following tokens must be replaced such that \"FILENAME\" is the lowercase file name including the file extension, \"LANGUAGE\" in the programming language, \"DOCSTRING\" is a string literal specified in source code that is used to document a specific segment of code, and \"CODE\" is the original code:",
|
||||
"FILENAME",
|
||||
"```LANGUAGE",
|
||||
"'''",
|
||||
"DOCSTRING",
|
||||
"'''",
|
||||
"CODE",
|
||||
"```",
|
||||
"As the {assistant_role}, to satisfy the new user's demand and make the software execute smoothly and robustly, you should modify the codes based on the error summary. Now, use the format exemplified above and modify the problematic codes based on the error summary. Output the codes that you fixed based on the test reported and corresponding explanations (strictly follow the format defined above, including FILENAME, LANGUAGE, DOCSTRING and CODE; incomplete \"TODO\" codes are strictly prohibited). If no bugs are reported, please return only one line like \"<INFO> Finished\"."
|
||||
]
|
||||
},
|
||||
"EnvironmentDoc": {
|
||||
"assistant_role_name": "Programmer",
|
||||
"user_role_name": "Chief Technology Officer",
|
||||
"phase_prompt": [
|
||||
"The new user's task and our developed codes are listed: ",
|
||||
"Task: \"{task}\".",
|
||||
"Modality: \"{modality}\".",
|
||||
"Programming Language: \"{language}\"",
|
||||
"Ideas: \"{ideas}\"",
|
||||
"Codes: ",
|
||||
"\"{codes}\"",
|
||||
"As the {assistant_role}, you should write a requirements.txt file, which is commonly used in Python projects to specify the dependencies or packages required for the project to run properly. It serves as a way to document and manage the project's dependencies in a standardized format. For example:",
|
||||
"requirements.txt",
|
||||
"```",
|
||||
"numpy==1.19.2",
|
||||
"pandas>=1.1.4",
|
||||
"```",
|
||||
"According to the codes and file format listed above, write a requirements.txt file to specify the dependencies or packages required for the project to run properly."
|
||||
]
|
||||
},
|
||||
"Manual": {
|
||||
"assistant_role_name": "Chief Product Officer",
|
||||
"user_role_name": "Chief Executive Officer",
|
||||
"phase_prompt": [
|
||||
"The new user's task, our developed codes and required dependencies are listed: ",
|
||||
"Task: \"{task}\".",
|
||||
"Modality: \"{modality}\".",
|
||||
"Programming Language: \"{language}\"",
|
||||
"Ideas: \"{ideas}\"",
|
||||
"Codes: ",
|
||||
"\"{codes}\"",
|
||||
"Requirements:",
|
||||
"\"{requirements}\"",
|
||||
"As the {assistant_role}, by using Markdown, you should write a manual.md file which is a detailed user manual to use the software, including introducing main functions of the software, how to install environment dependencies and how to use/play it. For example:",
|
||||
"manual.md",
|
||||
"```",
|
||||
"# LangChain",
|
||||
"Building applications with LLMs through composability",
|
||||
"Looking for the JS/TS version? Check out LangChain.js.",
|
||||
"**Production Support:** As you move your LangChains into production, we'd love to offer more comprehensive support.",
|
||||
"Please fill out this form and we'll set up a dedicated support Slack channel.",
|
||||
"## Quick Install",
|
||||
"`pip install langchain`",
|
||||
"or",
|
||||
"`conda install langchain -c conda-forge`",
|
||||
"## 🤔 What is this?",
|
||||
"Large language models (LLMs) are emerging as a transformative technology, enabling developers to build applications that they previously could not. However, using these LLMs in isolation is often insufficient for creating a truly powerful app - the real power comes when you can combine them with other sources of computation or knowledge.",
|
||||
"This library aims to assist in the development of those types of applications. Common examples of these applications include:",
|
||||
"**❓ Question Answering over specific documents**",
|
||||
"- Documentation",
|
||||
"- End-to-end Example: Question Answering over Notion Database",
|
||||
"**🤖 Agents**",
|
||||
"- Documentation",
|
||||
"- End-to-end Example: GPT+WolframAlpha",
|
||||
"## 📖 Documentation",
|
||||
"Please see [here](https://python.langchain.com) for full documentation on:",
|
||||
"- Getting started (installation, setting up the environment, simple examples)",
|
||||
"- How-To examples (demos, integrations, helper functions)",
|
||||
"- Reference (full API docs)",
|
||||
"- Resources (high-level explanation of core concepts)",
|
||||
"```"
|
||||
]
|
||||
}
|
||||
}
|