项目名:FaceWall(思过) 项目作者:巴云琦 项目功能:见readme.md

This commit is contained in:
byq 2023-10-26 10:58:05 +08:00
parent 954456bd61
commit 689f689c76
35 changed files with 8511 additions and 3000 deletions

View File

@ -0,0 +1 @@
Create a memo software called FaceWall, which is easy for company employees to use; The main functions include: 1. Task list: provide a task list module, employees can add, edit and mark tasks as completed; 2. Schedule: including a calendar, you can see the employee's daily work tasks and completion; 3. Search function: Provide basic search function, employees can easily find tasks and notes; 4. Brief note: Provide an essay record function, you can open and record their current ideas in the fastest way.

File diff suppressed because one or more lines are too long

View File

@ -0,0 +1,73 @@
import tkinter as tk
from tkinter import simpledialog
import os
class BriefNote(tk.Frame):
def __init__(self, master):
super().__init__(master)
self.note_text = tk.Text(self, height=10, width=30)
self.note_text.grid(row=0, column=0, padx=10, pady=10, sticky="nsew")
# 添加滚动条以支持滚动查看长文本
scrollbar = tk.Scrollbar(self)
scrollbar.grid(row=0, column=1, sticky="ns")
self.note_text.config(yscrollcommand=scrollbar.set)
scrollbar.config(command=self.note_text.yview)
self.file_listbox = tk.Listbox(self, height=10, width=20)
self.file_listbox.grid(row=0, column=2, padx=10, pady=10, sticky="nsew")
self.load_saved_files()
self.save_button = tk.Button(self, text="Save", command=self.save_note)
self.save_button.grid(row=1, column=0, sticky="ew")
self.open_button = tk.Button(self, text="Open", command=self.open_note)
self.open_button.grid(row=1, column=1, sticky="ew")
self.delete_button = tk.Button(self, text="Delete", command=self.delete_note)
self.delete_button.grid(row=1, column=2, sticky="ew")
def save_note(self):
note = self.note_text.get(1.0, tk.END)
if note.strip():
file_name = self.get_user_file_name()
if file_name:
file_path = os.path.join(os.path.dirname(__file__), file_name)
with open(file_path, "w") as file:
file.write(note)
self.note_text.delete(1.0, tk.END) # 清空文本框内容
self.load_saved_files()
print("Note saved as:", file_name)
def open_note(self):
selected_file = self.file_listbox.curselection()
if selected_file:
file_name = self.file_listbox.get(selected_file)
file_path = os.path.join(os.path.dirname(__file__), file_name)
with open(file_path, "r") as file:
note = file.read()
self.note_text.delete(1.0, tk.END)
self.note_text.insert(tk.END, note)
def load_saved_files(self):
file_names = [f for f in os.listdir(os.path.dirname(__file__)) if f.endswith(".txt") and (f != "meta.txt" and f != "requirements.txt")]
self.file_listbox.delete(0, tk.END)
for file_name in file_names:
self.file_listbox.insert(tk.END, file_name)
def get_user_file_name(self):
user_file_name = tk.simpledialog.askstring("File Name", "Enter a file name (e.g., my_note):")
if user_file_name:
return user_file_name + '.txt'
def delete_note(self):
selected_file = self.file_listbox.curselection()
if selected_file:
file_name = self.file_listbox.get(selected_file)
file_path = os.path.join(os.path.dirname(__file__), file_name)
os.remove(file_path) # 删除文件
self.load_saved_files() # 重新加载已保存的文件列表
if __name__ == "__main__":
root = tk.Tk()
app = BriefNote(root)
app.pack()
root.mainloop()

View File

@ -0,0 +1,19 @@
'''
FaceWall - Memo Software for Company Employees
This is the main file of the FaceWall software. It initializes the application and sets up the graphical user interface.
'''
import tkinter as tk
from task_list import TaskList
from brief_note import BriefNote
class FaceWallApp:
def __init__(self, root):
self.root = root
self.root.title("FaceWall")
self.task_list = TaskList(root)
self.brief_note = BriefNote(root)
self.task_list.pack()
self.brief_note.pack()
if __name__ == "__main__":
root = tk.Tk()
app = FaceWallApp(root)
root.mainloop()

View File

@ -0,0 +1,96 @@
# FaceWall User Manual
## Introduction
Welcome to FaceWall, a memo software designed to make task management and note-taking easy for company employees. FaceWall provides several key features to help you stay organized and productive:
1. Task List: Create, edit, and mark tasks as completed.
2. Schedule: View your daily work tasks and completion.
3. Search: Easily find tasks and notes.
4. Brief Note: Record your current ideas in the fastest way.
This user manual will guide you through the installation process, explain how to use each feature, and provide tips for maximizing your productivity with FaceWall.
## Installation
To use FaceWall, you need to install the required dependencies. Follow the steps below to set up the environment:
1. Ensure you have Python installed on your computer. If not, download and install Python from the official website (https://www.python.org).
2. Open a terminal or command prompt.
3. Navigate to the directory where you have downloaded the FaceWall code.
4. Run the following command to install the required dependencies:
```
pip install -r requirements.txt
```
5. Wait for the installation to complete.
Congratulations! You have successfully installed FaceWall and its dependencies.
## Getting Started
To start using FaceWall, follow the steps below:
1. Open a terminal or command prompt.
2. Navigate to the directory where you have downloaded the FaceWall code.
3. Run the following command to start the application:
```
python main.py
```
4. The FaceWall application window will open.
## Task List
The Task List module allows you to manage your tasks. Follow the instructions below to use this feature:
1. In the Task List section of the FaceWall application, you will see an input field and an "Add Task" button.
2. To add a new task, enter the task description in the input field and click the "Add Task" button.
3. The task will be added to the task list below.
4. To edit a task, select the task from the list and click the "Edit Task" button. Enter the new task description in the input field and click the "Edit Task" button again to save the changes.
5. To mark a task as completed, select the task from the list and click the "Mark as Completed" button. The task will be visually marked as completed.
## Schedule
The Schedule module allows you to view your daily work tasks and completion. Follow the instructions below to use this feature:
1. In the Schedule section of the FaceWall application, you will see a label and a text area.
2. The text area will display your daily work tasks and their completion status.
3. The schedule is automatically updated based on your tasks in the Task List module.
## Search
The Search module allows you to easily find tasks and notes. Follow the instructions below to use this feature:
1. In the Search section of the FaceWall application, you will see an input field and a "Search" button.
2. To search for a task or note, enter the search query in the input field and click the "Search" button.
3. The search results will be displayed in the list below.
## Brief Note
The Brief Note module allows you to record your current ideas quickly. Follow the instructions below to use this feature:
1. In the Brief Note section of the FaceWall application, you will see a text area and a "Save" button.
2. Enter your current idea or note in the text area.
3. To save the note, click the "Save" button. The note will be saved to a file or database.
## Conclusion
Congratulations! You have learned how to install and use FaceWall, a memo software designed to make task management and note-taking easy for company employees. Use the Task List, Schedule, Search, and Brief Note modules to stay organized and productive. Enjoy using FaceWall!

View File

@ -0,0 +1,30 @@
Task:
Create a memo software called FaceWall, which is easy for company employees to use; The main functions include: 1. Task list: provide a task list module, employees can add, edit and mark tasks as completed; 2. Schedule: including a calendar, you can see the employee's daily work tasks and completion; 3. Search function: Provide basic search function, employees can easily find tasks and notes; 4. Brief note: Provide an essay record function, you can open and record their current ideas in the fastest way.
Config:
ChatEnvConfig.clear_structure: True
ChatEnvConfig.git_management: False
ChatEnvConfig.gui_design: True
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:
web application
Ideas:
Language:
Python
Code_Version:
4.0
Proposed_images:
0
Incorporated_images:
0

View File

@ -0,0 +1,18 @@
# readme.md
Author: ModelBest@bayunqi
在ChatDev的基础上进行了增删改目前“思过”备忘录允许用户添加、编辑、删除和标记任务为已完成。用户可以管理任务并在任务列表中进行操作。另外也允许用户保存和管理文本笔记同时提供了一些基本的文件操作功能。用户可以保存、打开和删除笔记以及指定文件名以保存笔记。
## Brief_note
- 文本输入框: 左侧的文本输入框允许用户输入笔记内容,可以滚动查看长文本。
- 滚动条: 如果笔记内容太长,它会自动添加滚动条以便查看整个文本。
- 文件名显示框: 右侧的文件名显示框列出了已保存的txt文件。
- 保存按钮: "Save" 按钮用于保存当前输入的笔记内容为txt文件保存后清空文本输入框。
- 打开按钮: "Open" 按钮允许用户从已保存的文件列表中选择一个文件,然后在文本输入框中查看其内容。
- 删除按钮: "Delete" 按钮用于删除选定的文件,然后重新加载已保存的文件列表。
- 输入文件名: 当用户点击 "Save" 按钮时它会提示用户输入文件名用户可以输入一个文件名然后自动将其保存为txt文件。
## TaskList
- 任务输入框: 用户可以在任务输入框中输入任务描述。
- 添加任务按钮: 用户点击 "Add Task" 按钮,将当前输入的任务添加到任务列表中。
- 任务列表框: 显示所有已添加的任务,用户可以在列表中选择任务进行编辑、删除和标记为已完成。
- 编辑任务按钮: 用户可以选择一个任务并点击 "Edit Task" 按钮,然后可以编辑所选任务的描述。
- 删除任务按钮: 用户可以选择一个任务并点击 "Delete Task" 按钮,将所选任务从任务列表中删除。
- 标记为已完成按钮: 用户可以选择一个任务并点击 "Mark as Completed" 按钮,该任务的文本颜色将变为灰色以指示已完成

View File

@ -0,0 +1 @@
tkinter==8.6

View File

@ -0,0 +1,46 @@
'''
Task List Module
This module provides the task list functionality. Employees can add, edit, and mark tasks as completed.
'''
import tkinter as tk
class TaskList(tk.Frame):
def __init__(self, master):
super().__init__(master)
self.tasks = []
self.task_entry = tk.Entry(self)
self.task_entry.pack()
self.add_button = tk.Button(self, text="Add Task", command=self.add_task)
self.add_button.pack()
self.task_listbox = tk.Listbox(self)
self.task_listbox.pack()
self.edit_button = tk.Button(self, text="Edit Task", command=self.edit_task)
self.edit_button.pack()
self.delete_button = tk.Button(self, text="Delete Task", command=self.delete_task)
self.delete_button.pack()
self.complete_button = tk.Button(self, text="Mark as Completed", command=self.mark_completed)
self.complete_button.pack()
def add_task(self):
task = self.task_entry.get()
if task:
self.tasks.append(task)
self.task_listbox.insert(tk.END, task)
self.task_entry.delete(0, tk.END)
def edit_task(self):
selected_task = self.task_listbox.curselection()
if selected_task:
task = self.task_entry.get()
if task:
self.tasks[selected_task[0]] = task
self.task_listbox.delete(selected_task)
self.task_listbox.insert(selected_task, task)
self.task_entry.delete(0, tk.END)
def delete_task(self):
selected_task = self.task_listbox.curselection()
if selected_task:
index = selected_task[0]
self.tasks.pop(index)
self.task_listbox.delete(selected_task)
def mark_completed(self):
selected_task = self.task_listbox.curselection()
if selected_task:
self.task_listbox.itemconfig(selected_task, fg="gray")

View 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"
}

View File

@ -0,0 +1 @@
Create a Texas Hold'em Poker game that adheres to the official No Limit Texas Hold'em rules. The game should simulate a poker tournament with 1 human player and 4 AI characters. Each player, including the human player and AI characters, starts with $1000 in chips.

View File

@ -0,0 +1,98 @@
[2023-06-10 03:37:07 INFO] **[Preprocessing]**
**ChatDev Starts** (20231006033707)
**Timestamp**: 20231006033707
**config_path**: C:\Users\piema\ChatDev\CompanyConfig\Default\ChatChainConfig.json
**config_phase_path**: C:\Users\piema\ChatDev\CompanyConfig\Default\PhaseConfig.json
**config_role_path**: C:\Users\piema\ChatDev\CompanyConfig\Default\RoleConfig.json
**task_prompt**: Create a Texas Hold'em Poker game that adheres to the official No Limit Texas Hold'em rules. The game should simulate a poker tournament with 1 human player and 4 AI characters. Each player, including the human player and AI characters, starts with $1000 in chips.
**project_name**: Gomoku
**Log File**: C:\Users\piema\ChatDev\WareHouse\Gomoku_DefaultOrganization_20231006033707.log
**ChatDevConfig**:
ChatEnvConfig.clear_structure: True
ChatEnvConfig.git_management: False
ChatEnvConfig.gui_design: True
**ChatGPTConfig**:
ChatGPTConfig(temperature=0.2, top_p=1.0, n=1, stream=False, stop=None, max_tokens=None, presence_penalty=0.0, frequency_penalty=0.0, logit_bias={}, user='')
[2023-06-10 03:37:09 INFO] flask app.py did not start for online log
[2023-06-10 03:37:09 INFO] System: **[chatting]**
| Parameter | Value |
| --- | --- |
| **task_prompt** | Create a Texas Hold'em Poker game that adheres to the official No Limit Texas Hold'em rules. The game should simulate a poker tournament with 1 human player and 4 AI characters. Each player, including the human player and AI characters, starts with $1000 in chips. |
| **need_reflect** | True |
| **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 , followed by our final product modality without any other words, e.g., " PowerPoint". |
| **phase_name** | DemandAnalysis |
| **assistant_role_prompt** | {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. |
| **user_role_prompt** | {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. |
| **chat_turn_limit** | 10 |
| **placeholders** | {} |
| **model_type** | ModelType.GPT_3_5_TURBO |
[2023-06-10 03:37:11 INFO] flask app.py did not start for online log
[2023-06-10 03:37:11 INFO] System: **[RolePlaying]**
| Parameter | Value |
| --- | --- |
| **assistant_role_name** | Chief Product Officer |
| **user_role_name** | Chief Executive Officer |
| **assistant_role_prompt** | {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. |
| **user_role_prompt** | {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. |
| **task_prompt** | Create a Texas Hold'em Poker game that adheres to the official No Limit Texas Hold'em rules. The game should simulate a poker tournament with 1 human player and 4 AI characters. Each player, including the human player and AI characters, starts with $1000 in chips. |
| **with_task_specify** | False |
| **model_type** | ModelType.GPT_3_5_TURBO |
[2023-06-10 03:37:13 INFO] flask app.py did not start for online log
[2023-06-10 03:37:13 INFO] Chief Executive Officer: **[Start Chat]**
[ChatDev is a software company powered by multiple intelligent agents, such as chief executive officer, chief human resources officer, chief product officer, chief technology officer, etc, with a multi-agent organizational structure and the mission of "changing the digital world through programming".
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: Create a Texas Hold'em Poker game that adheres to the official No Limit Texas Hold'em rules. The game should simulate a poker tournament with 1 human player and 4 AI characters. Each player, including the human player and AI characters, starts with $1000 in chips..
To complete the task, you must write a response that appropriately solves the requested instruction based on your expertise and customer's needs.]
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 Chief Product Officer, 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".
[2023-06-10 03:37:15 INFO] flask app.py did not start for online log
[2023-06-10 03:37:16 INFO] error_code=insufficient_quota error_message='You exceeded your current quota, please check your plan and billing details.' error_param=None error_type=insufficient_quota message='OpenAI API error received' stream_error=False
[2023-06-10 03:37:21 INFO] error_code=insufficient_quota error_message='You exceeded your current quota, please check your plan and billing details.' error_param=None error_type=insufficient_quota message='OpenAI API error received' stream_error=False
[2023-06-10 03:37:29 INFO] error_code=insufficient_quota error_message='You exceeded your current quota, please check your plan and billing details.' error_param=None error_type=insufficient_quota message='OpenAI API error received' stream_error=False
[2023-06-10 03:37:34 INFO] error_code=insufficient_quota error_message='You exceeded your current quota, please check your plan and billing details.' error_param=None error_type=insufficient_quota message='OpenAI API error received' stream_error=False
[2023-06-10 03:37:42 INFO] error_code=insufficient_quota error_message='You exceeded your current quota, please check your plan and billing details.' error_param=None error_type=insufficient_quota message='OpenAI API error received' stream_error=False

View File

@ -0,0 +1,277 @@
{
"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."
]
},
"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)",
"```"
]
}
}

View 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."
]
}

@ -1 +0,0 @@
Subproject commit e0396448114be2e320564cdfbe6bcf4082dd4e42

View File

@ -1 +0,0 @@
[Write a Python program that generates company business card.Your program should accept name,title and email information entered by the user. Then, the designed business card image should contain these three pieces of information.I hope there will be a unified slogan in the lower right corner of the business card: AGI For Lives and there here is a company name in the upper right corner: ModelBest. Finally, the program should save the business card image to a file, allowing the user to specify the file name and format (e.g., PNG, JPG).Make sure to provide a user-friendly interface that guides the user through the process of inputting the data and specifying the file name and format for the business card image. Test your program with various inputs to ensure it generates valid business card and handles different data types gracefully.]

View File

@ -1,61 +0,0 @@
'''
This is the main file that runs the business card generator program.
'''
import tkinter as tk
from tkinter import filedialog
from PIL import Image, ImageDraw, ImageFont
class BusinessCardGenerator:
def __init__(self):
self.root = tk.Tk()
self.root.title("Business Card Generator")
self.name_label = tk.Label(self.root, text="Name:")
self.name_label.pack()
self.name_entry = tk.Entry(self.root)
self.name_entry.pack()
self.title_label = tk.Label(self.root, text="Title:")
self.title_label.pack()
self.title_entry = tk.Entry(self.root)
self.title_entry.pack()
self.email_label = tk.Label(self.root, text="Email:")
self.email_label.pack()
self.email_entry = tk.Entry(self.root)
self.email_entry.pack()
self.generate_button = tk.Button(self.root, text="Generate", command=self.generate_business_card)
self.generate_button.pack()
self.root.mainloop()
def generate_business_card(self):
name = self.name_entry.get()
title = self.title_entry.get()
email = self.email_entry.get()
image = Image.new("RGB", (500, 300), (53, 154, 256))
draw = ImageDraw.Draw(image)
# Draw company name
company_name = "ModelBest"
company_name_font = ImageFont.truetype("/Library/Fonts/Arial Unicode.ttf", 24)
company_name_width, company_name_height = draw.textsize(company_name, font=company_name_font)
draw.text((400 - company_name_width, 20), company_name, font=company_name_font, fill="black")
# Draw name
name_font = ImageFont.truetype("/Library/Fonts/Arial Unicode.ttf", 18)
name_width, name_height = draw.textsize(name, font=name_font)
draw.text((20, 100), name, font=name_font, fill="black")
# Draw title
title_font = ImageFont.truetype("/Library/Fonts/Arial Unicode.ttf", 14)
title_width, title_height = draw.textsize(title, font=title_font)
draw.text((20, 140), title, font=title_font, fill="black")
# Draw email
email_font = ImageFont.truetype("/Library/Fonts/Arial Unicode.ttf", 14)
email_width, email_height = draw.textsize(email, font=email_font)
draw.text((20, 180), email, font=email_font, fill="black")
# Draw slogan
slogan = "AGI For Lives"
slogan_font = ImageFont.truetype("/Library/Fonts/Arial Unicode.ttf", 12)
slogan_width, slogan_height = draw.textsize(slogan, font=slogan_font)
draw.text((400 - slogan_width, 280 - slogan_height), slogan, font=slogan_font, fill="black")
file_path = filedialog.asksaveasfilename(defaultextension=".png", filetypes=[("PNG Image", "*.png"), ("JPEG Image", "*.jpg")])
if file_path:
image.save(file_path)
print("Business card saved successfully!")
else:
print("Business card not saved.")
if __name__ == "__main__":
BusinessCardGenerator()

View File

@ -1,65 +0,0 @@
# ChatDev Business Card Generator User Manual
## Introduction
Welcome to the ChatDev Business Card Generator! This software allows you to easily generate professional business cards with customized information. The generated business card will include the name, title, and email information provided by the user. Additionally, the business card will feature the company name "ModelBest" in the upper right corner and the slogan "AGI For Lives" in the lower right corner.
## Installation
To use the ChatDev Business Card Generator, 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 Python is installed, you can follow these steps to install the necessary dependencies:
1. Open a terminal or command prompt.
2. Navigate to the directory where you have saved the "main.py" file.
3. Run the following command to install the required dependencies:
```bash
pip install tkinter pillow
```
## Usage
To generate a business card using the ChatDev Business Card Generator, follow these steps:
1. Open a terminal or command prompt.
2. Navigate to the directory where you have saved the "main.py" file.
3. Run the following command to start the program:
```bash
python main.py
```
4. A window will appear with input fields for the name, title, and email. Enter the required information in the respective fields.
5. Click the "Generate" button to create the business card.
6. A file dialog will open, allowing you to choose the file name and format (PNG or JPG) for the business card image. Select the desired options and click "Save".
7. The business card image will be saved to the specified file location.
8. You will see a message indicating whether the business card was saved successfully or not.
## Example
Here is an example of how to use the ChatDev Business Card Generator:
1. Open a terminal or command prompt.
2. Navigate to the directory where you have saved the "main.py" file.
3. Run the following command to start the program:
```bash
python main.py
```
4. Enter the following information in the input fields:
- Name: John Doe
- Title: Software Engineer
- Email: john.doe@example.com
5. Click the "Generate" button.
6. Choose a file name and format for the business card image (e.g., "business_card.png").
7. Click "Save".
8. The business card image will be saved to the specified file location.
9. You will see a message indicating that the business card was saved successfully.
## Conclusion
Congratulations! You have successfully generated a professional business card using the ChatDev Business Card Generator. Feel free to experiment with different inputs and formats to create unique business cards for yourself or your colleagues. If you have any questions or encounter any issues, please don't hesitate to reach out to our support team for assistance. Happy generating!

View File

@ -1,30 +0,0 @@
Task:
[Write a Python program that generates company business card.Your program should accept name,title and email information entered by the user. Then, the designed business card image should contain these three pieces of information.I hope there will be a unified slogan in the lower right corner of the business card: AGI For Lives and there here is a company name in the upper right corner: ModelBest. Finally, the program should save the business card image to a file, allowing the user to specify the file name and format (e.g., PNG, JPG).Make sure to provide a user-friendly interface that guides the user through the process of inputting the data and specifying the file name and format for the business card image. Test your program with various inputs to ensure it generates valid business card and handles different data types gracefully.]
Config:
ChatEnvConfig.clear_structure: True
ChatEnvConfig.git_management: False
ChatEnvConfig.gui_design: True
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:
image
Ideas:
Language:
Python
Code_Version:
4.0
Proposed_images:
0
Incorporated_images:
0

View 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"
}

View File

@ -0,0 +1,277 @@
{
"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."
]
},
"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)",
"```"
]
}
}

View 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."
]
}

View File

@ -0,0 +1,13 @@
import tkinter as tk
class DemoGUI:
def __init__(self, root):
self.root = root
self.root.title("Demo GUI")
self.create_widgets()
def create_widgets(self):
self.label = tk.Label(self.root, text="Hello, World!")
self.label.pack()
self.button = tk.Button(self.root, text="Click Me", command=self.button_clicked)
self.button.pack()
def button_clicked(self):
self.label.config(text="Button Clicked!")

View File

@ -0,0 +1,11 @@
'''
This is the main file that runs the demo.
'''
import tkinter as tk
from demo_gui import DemoGUI
def main():
root = tk.Tk()
demo_gui = DemoGUI(root)
root.mainloop()
if __name__ == "__main__":
main()

View File

@ -0,0 +1,55 @@
# ChatDev Demo
## Introduction
Welcome to ChatDev Demo! This software is a simple demo that showcases a basic graphical user interface (GUI) using Python and the tkinter library. In this manual, you will find instructions on how to install the necessary dependencies and how to use the software.
## Installation
To install the required dependencies, 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 Downloads](https://www.python.org/downloads/)
2. Open a terminal or command prompt.
3. Navigate to the directory where you have saved the demo files.
4. Run the following command to install the dependencies:
```shell
pip install -r requirements.txt
```
5. Wait for the installation to complete.
## Usage
To run the ChatDev Demo, please follow these steps:
1. Open a terminal or command prompt.
2. Navigate to the directory where you have saved the demo files.
3. Run the following command to start the demo:
```shell
python main.py
```
4. A GUI window will open with a label displaying "Hello, World!" and a button labeled "Click Me".
5. Click the "Click Me" button to see the label text change to "Button Clicked!".
6. You can close the GUI window by clicking the close button or by pressing the "X" button.
## Conclusion
Congratulations! You have successfully installed and used the ChatDev Demo. This simple demo showcases the basic functionality of a GUI using Python and the tkinter library. Feel free to explore and modify the code to create your own GUI applications.
If you have any questions or need further assistance, please don't hesitate to reach out to our support team. We are here to help you.
Happy coding!
---
Note: This manual is written in Markdown format. You can use any Markdown editor or viewer to read and format the content.

View File

@ -0,0 +1,30 @@
Task:
show me a simple demo
Config:
ChatEnvConfig.clear_structure: True
ChatEnvConfig.git_management: False
ChatEnvConfig.gui_design: True
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:
website
Ideas:
Language:
Python
Code_Version:
4.0
Proposed_images:
0
Incorporated_images:
0

View File

@ -0,0 +1 @@
tkinter

View File

@ -0,0 +1 @@
show me a simple demo