openbmb / chatdev Goto Github PK
View Code? Open in Web Editor NEWCreate Customized Software using Natural Language Idea (through LLM-powered Multi-Agent Collaboration)
Home Page: https://arxiv.org/abs/2307.07924
License: Apache License 2.0
Create Customized Software using Natural Language Idea (through LLM-powered Multi-Agent Collaboration)
Home Page: https://arxiv.org/abs/2307.07924
License: Apache License 2.0
No location specified to use existing code for input.
No 'client supplied materials' folder equiv.
#openAI
OPENAI_BASE_URL
OPENAI_API_KEY
example
#cladue2
cladue2_BASE_URL
cladue2_API_KEY
These parameters can be replaced with a configuration file, preferably with other APIs to increase their flexibility
Command: python run.py --task "basic clock" --name "basic clock"
Output:
**[Preprocessing]**
**ChatDev Starts** (20230901174100)
**Timestamp**: 20230901174100
**config_path**: C:\Users\siddh\OneDrive\Desktop\MLSidh\cool_stuff\ChatDev\CompanyConfig\Default\ChatChainConfig.json
**config_phase_path**: C:\Users\siddh\OneDrive\Desktop\MLSidh\cool_stuff\ChatDev\CompanyConfig\Default\PhaseConfig.json
**config_role_path**: C:\Users\siddh\OneDrive\Desktop\MLSidh\cool_stuff\ChatDev\CompanyConfig\Default\RoleConfig.json
**task_prompt**: basic clock
**project_name**: basic clock
**Log File**: C:\Users\siddh\OneDrive\Desktop\MLSidh\cool_stuff\ChatDev\WareHouse\basic clock_DefaultOrganization_20230901174100.log
**ChatDevConfig**:
ChatEnvConfig.clear_structure: True
ChatEnvConfig.brainstorming: False
**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='')
System: **[chatting]**
| Parameter | Value |
| --- | --- |
| **task_prompt** | basic clock |
| **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 |
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** | basic clock |
| **with_task_specify** | False |
| **model_type** | ModelType.GPT_3_5_TURBO |
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: basic clock.
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".
**[OpenAI_Usage_Info Receive]**
prompt_tokens: 426
completion_tokens: 66
total_tokens: 492
**[OpenAI_Usage_Info Receive]**
prompt_tokens: 533
completion_tokens: 67
total_tokens: 600
Chief Product Officer: **Chief Product Officer<->Chief Executive Officer on : DemandAnalysis, turn 0**
[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 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: basic clock.
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.]
I think for a basic clock, a simple and straightforward modality would be a website. It can be easily accessed by users on various devices and can display the time in a clear and user-friendly manner. Additionally, a website allows for easy customization and can be enhanced with additional features such as alarms or time zone conversions if needed.
Chief Executive Officer: **Chief Product Officer<->Chief Executive Officer on : DemandAnalysis, turn 0**
[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: basic clock.
To complete the task, you must write a response that appropriately solves the requested instruction based on your expertise and customer's needs.]
I agree with your suggestion. A website would indeed be a suitable modality for a basic clock. It provides the flexibility to display the time in a clear and user-friendly manner, and can be accessed easily on different devices. It also allows for customization and potential future enhancements. Let's proceed with developing a website for the basic clock.
**[OpenAI_Usage_Info Receive]**
prompt_tokens: 567
completion_tokens: 4
total_tokens: 571
Chief Product Officer: **Chief Product Officer<->Chief Executive Officer on : DemandAnalysis, turn 1**
[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 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: basic clock.
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.]
<INFO> Website
**[Seminar Conclusion]**:
<INFO> Website
System: **[chatting]**
| Parameter | Value |
| --- | --- |
| **task_prompt** | basic clock |
| **need_reflect** | True |
| **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: " " where "" represents a programming language. |
| **phase_name** | LanguageChoose |
| **assistant_role_prompt** | {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. |
| **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** | {'task': 'basic clock', 'modality': 'website', 'ideas': ''} |
| **model_type** | ModelType.GPT_3_5_TURBO |
System: **[RolePlaying]**
| Parameter | Value |
| --- | --- |
| **assistant_role_name** | Chief Technology Officer |
| **user_role_name** | Chief Executive Officer |
| **assistant_role_prompt** | {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. |
| **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** | basic clock |
| **with_task_specify** | False |
| **model_type** | ModelType.GPT_3_5_TURBO |
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 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: basic clock.
To complete the task, You must write a response that appropriately solves the requested instruction based on your expertise and customer's needs.]
According to the new user's task and some creative brainstorm ideas listed below:
Task: "basic clock".
Modality: "website".
Ideas: "".
We have decided to complete the task through a executable software implemented via a programming language.
As the Chief Technology Officer, 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.
**[OpenAI_Usage_Info Receive]**
prompt_tokens: 365
completion_tokens: 4
total_tokens: 369
Chief Technology Officer: **Chief Technology Officer<->Chief Executive Officer on : LanguageChoose, turn 0**
[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 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: basic clock.
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.]
<INFO> Python
**[Seminar Conclusion]**:
<INFO> Python
System: **[chatting]**
| Parameter | Value |
| --- | --- |
| **task_prompt** | basic clock |
| **need_reflect** | False |
| **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). |
| **phase_name** | Coding |
| **assistant_role_prompt** | {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. |
| **user_role_prompt** | {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. |
| **chat_turn_limit** | 1 |
| **placeholders** | {'task': 'basic clock', 'modality': 'website', 'ideas': '', 'language': ' Python', 'gui': 'The software should be equipped with graphical user interface (GUI) so that user can visually and graphically use it; so you must choose a GUI framework (e.g., in Python, you can implement GUI via tkinter, Pygame, Flexx, PyGUI, etc,).'} |
| **model_type** | ModelType.GPT_3_5_TURBO |
System: **[RolePlaying]**
| Parameter | Value |
| --- | --- |
| **assistant_role_name** | Programmer |
| **user_role_name** | Chief Technology Officer |
| **assistant_role_prompt** | {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. |
| **user_role_prompt** | {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. |
| **task_prompt** | basic clock |
| **with_task_specify** | False |
| **model_type** | ModelType.GPT_3_5_TURBO |
Chief Technology 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 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: basic clock.
To complete the task, you must write a response that appropriately solves the requested instruction based on your expertise and customer's needs.]
According to the new user's task and our software designs listed below:
Task: "basic clock".
Modality: "website".
Programming Language: " Python"
Ideas:""
We have decided to complete the task through a executable software with multiple files implemented via Python. As the Programmer, 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. The software should be equipped with graphical user interface (GUI) so that user can visually and graphically use it; so you must choose a GUI framework (e.g., in Python, you can implement GUI via tkinter, Pygame, Flexx, PyGUI, etc,).
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).
**[OpenAI_Usage_Info Receive]**
prompt_tokens: 539
completion_tokens: 935
total_tokens: 1474
Programmer: **Programmer<->Chief Technology Officer on : Coding, turn 0**
[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 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: basic clock.
To complete the task, You must write a response that appropriately solves the requested instruction based on your expertise and customer's needs.]
main.py
import tkinter as tk
from datetime import datetime
class ClockApp:
def __init__(self, root):
self.root = root
self.root.title("Basic Clock")
self.time_label = tk.Label(root, font=("Arial", 80))
self.time_label.pack(pady=50)
self.update_time()
def update_time(self):
current_time = datetime.now().strftime("%H:%M:%S")
self.time_label.config(text=current_time)
self.root.after(1000, self.update_time)
if __name__ == "__main__":
root = tk.Tk()
clock_app = ClockApp(root)
root.mainloop()
In the main.py file, we import the necessary modules, including tkinter for GUI functionality and datetime for getting the current time. We define a class called ClockApp that represents the main application. In the constructor, we create a window using tkinter and set its title. We also create a label widget to display the time. The update_time method is responsible for updating the time label every second. Finally, we create an instance of the ClockApp class and start the main event loop.
This file serves as the entry point for the program and handles the GUI setup and event loop.
Next, we'll create a file called utils.py to contain utility functions used by the main application.
utils.py
def format_time(hour, minute, second):
return f"{hour:02d}:{minute:02d}:{second:02d}"
In the utils.py file, we define a single utility function called format_time. This function takes hour, minute, and second as input and returns a formatted string representation of the time in the format "HH:MM:SS".
Now, let's create a file called clock.py to encapsulate the clock functionality.
clock.py
from datetime import datetime
from utils import format_time
class Clock:
def __init__(self):
self.hour = 0
self.minute = 0
self.second = 0
def update_time(self):
current_time = datetime.now()
self.hour = current_time.hour
self.minute = current_time.minute
self.second = current_time.second
def get_formatted_time(self):
return format_time(self.hour, self.minute, self.second)
In the clock.py file, we define a class called Clock. This class represents the clock functionality of the program. In the constructor, we initialize the hour, minute, and second attributes to 0. The update_time method updates the current time by accessing the datetime module. The get_formatted_time method returns the formatted time using the format_time utility function from utils.py.
Finally, we'll create a file called app.py to bring everything together.
app.py
from tkinter import Tk, Label
from clock import Clock
class ClockApp:
def __init__(self, root):
self.root = root
self.root.title("Basic Clock")
self.time_label = Label(root, font=("Arial", 80))
self.time_label.pack(pady=50)
self.clock = Clock()
self.update_time()
def update_time(self):
self.clock.update_time()
formatted_time = self.clock.get_formatted_time()
self.time_label.config(text=formatted_time)
self.root.after(1000, self.update_time)
if __name__ == "__main__":
root = Tk()
clock_app = ClockApp(root)
root.mainloop()
In the app.py file, we import the necessary modules and classes. We define a class called ClockApp, which is responsible for setting up the GUI and updating the time label. In the constructor, we create a window using Tkinter and set its title. We also create a label widget to display the time. We create an instance of the Clock class from clock.py and store it as an attribute of the ClockApp instance. The update_time method updates the clock time, gets the formatted time, and updates the label text. Finally, we create an instance of the ClockApp class and start the main event loop.
This file brings together the GUI, clock functionality, and utility functions to create the complete basic clock application.
**[Seminar Conclusion]**:
main.py
import tkinter as tk
from datetime import datetime
class ClockApp:
def __init__(self, root):
self.root = root
self.root.title("Basic Clock")
self.time_label = tk.Label(root, font=("Arial", 80))
self.time_label.pack(pady=50)
self.update_time()
def update_time(self):
current_time = datetime.now().strftime("%H:%M:%S")
self.time_label.config(text=current_time)
self.root.after(1000, self.update_time)
if __name__ == "__main__":
root = tk.Tk()
clock_app = ClockApp(root)
root.mainloop()
In the main.py file, we import the necessary modules, including tkinter for GUI functionality and datetime for getting the current time. We define a class called ClockApp that represents the main application. In the constructor, we create a window using tkinter and set its title. We also create a label widget to display the time. The update_time method is responsible for updating the time label every second. Finally, we create an instance of the ClockApp class and start the main event loop.
This file serves as the entry point for the program and handles the GUI setup and event loop.
Next, we'll create a file called utils.py to contain utility functions used by the main application.
utils.py
def format_time(hour, minute, second):
return f"{hour:02d}:{minute:02d}:{second:02d}"
In the utils.py file, we define a single utility function called format_time. This function takes hour, minute, and second as input and returns a formatted string representation of the time in the format "HH:MM:SS".
Now, let's create a file called clock.py to encapsulate the clock functionality.
clock.py
from datetime import datetime
from utils import format_time
class Clock:
def __init__(self):
self.hour = 0
self.minute = 0
self.second = 0
def update_time(self):
current_time = datetime.now()
self.hour = current_time.hour
self.minute = current_time.minute
self.second = current_time.second
def get_formatted_time(self):
return format_time(self.hour, self.minute, self.second)
In the clock.py file, we define a class called Clock. This class represents the clock functionality of the program. In the constructor, we initialize the hour, minute, and second attributes to 0. The update_time method updates the current time by accessing the datetime module. The get_formatted_time method returns the formatted time using the format_time utility function from utils.py.
Finally, we'll create a file called app.py to bring everything together.
app.py
from tkinter import Tk, Label
from clock import Clock
class ClockApp:
def __init__(self, root):
self.root = root
self.root.title("Basic Clock")
self.time_label = Label(root, font=("Arial", 80))
self.time_label.pack(pady=50)
self.clock = Clock()
self.update_time()
def update_time(self):
self.clock.update_time()
formatted_time = self.clock.get_formatted_time()
self.time_label.config(text=formatted_time)
self.root.after(1000, self.update_time)
if __name__ == "__main__":
root = Tk()
clock_app = ClockApp(root)
root.mainloop()
In the app.py file, we import the necessary modules and classes. We define a class called ClockApp, which is responsible for setting up the GUI and updating the time label. In the constructor, we create a window using Tkinter and set its title. We also create a label widget to display the time. We create an instance of the Clock class from clock.py and store it as an attribute of the ClockApp instance. The update_time method updates the clock time, gets the formatted time, and updates the label text. Finally, we create an instance of the ClockApp class and start the main event loop.
This file brings together the GUI, clock functionality, and utility functions to create the complete basic clock application.
**[Update Codes]**
main.py updated.
--- Old
+++ New
@@ -1 +1,22 @@
-# None
+'''
+This file contains the main application logic for the basic clock program.
+'''
+from tkinter import Tk, Label
+from clock import Clock
+class ClockApp:
+ def __init__(self, root):
+ self.root = root
+ self.root.title("Basic Clock")
+ self.time_label = Label(root, font=("Arial", 80))
+ self.time_label.pack(pady=50)
+ self.clock = Clock()
+ self.update_time()
+ def update_time(self):
+ self.clock.update_time()
+ formatted_time = self.clock.get_formatted_time()
+ self.time_label.config(text=formatted_time)
+ self.root.after(1000, self.update_time)
+if __name__ == "__main__":
+ root = Tk()
+ clock_app = ClockApp(root)
+ root.mainloop()
**[Update Codes]**
utils.py updated.
'''
'''
--- Old
+++ New
@@ -1 +1,5 @@
-# None
+'''
+This file contains utility functions for the basic clock program.
+'''
+def format_time(hour, minute, second):
+ return f"{hour:02d}:{minute:02d}:{second:02d}"
**[Update Codes]**
clock.py updated.
'''
'''
--- Old
+++ New
@@ -1 +1,17 @@
-# None
+'''
+This file contains the Clock class for the basic clock program.
+'''
+from datetime import datetime
+from utils import format_time
+class Clock:
+ def __init__(self):
+ self.hour = 0
+ self.minute = 0
+ self.second = 0
+ def update_time(self):
+ current_time = datetime.now()
+ self.hour = current_time.hour
+ self.minute = current_time.minute
+ self.second = current_time.second
+ def get_formatted_time(self):
+ return format_time(self.hour, self.minute, self.second)
**[Rewrite Codes]**
ChatDev\WareHouse\basic clock_DefaultOrganization_20230901174100\main.py Wrote
ChatDev\WareHouse\basic clock_DefaultOrganization_20230901174100\utils.py Wrote
ChatDev\WareHouse\basic clock_DefaultOrganization_20230901174100\clock.py Wrote
dir: \ChatDev\WareHouse\basic clock_DefaultOrganization_20230901174100
Traceback (most recent call last):
File "\ChatDev\run.py", line 111, in <module>
chat_chain.execute_chain()
File "\ChatDev\chatdev\chat_chain.py", line 164, in execute_chain
self.execute_step(phase_item)
File "\ChatDev\chatdev\chat_chain.py", line 134, in execute_step
self.chat_env = self.phases[phase].execute(self.chat_env,
File "\ChatDev\chatdev\phase.py", line 306, in execute
chat_env = self.update_chat_env(chat_env)
File "\ChatDev\chatdev\phase.py", line 360, in update_chat_env
log_and_print_online("**[Software Info]**:\n\n {}".format(get_info(chat_env.env_dict['directory'],self.log_filepath)))
File "\ChatDev\chatdev\utils.py", line 20, in log_and_print_online
print(role + "\n")
File "\local\programs\python\python39\lib\encodings\cp1252.py", line 19, in encode
return codecs.charmap_encode(input,self.errors,encoding_table)[0]
UnicodeEncodeError: 'charmap' codec can't encode character '\U0001f4b0' in position 29: character maps to <undefined>
Thanks to nice project !
I wanted to run this project but I got this Error while running run.py.
Is there any way to avoid this error?
Traceback (most recent call last):
File "/home/jovyan/ghq/github.com/OpenBMB/ChatDev/run.py", line 111, in <module>
chat_chain.execute_chain()
File "/home/jovyan/ghq/github.com/OpenBMB/ChatDev/chatdev/chat_chain.py", line 164, in execute_chain
self.execute_step(phase_item)
File "/home/jovyan/ghq/github.com/OpenBMB/ChatDev/chatdev/chat_chain.py", line 153, in execute_step
self.chat_env = compose_phase_instance.execute(self.chat_env)
File "/home/jovyan/ghq/github.com/OpenBMB/ChatDev/chatdev/composed_phase.py", line 150, in execute
chat_env = self.phases[phase].execute(chat_env,
File "/home/jovyan/ghq/github.com/OpenBMB/ChatDev/chatdev/phase.py", line 294, in execute
self.chatting(chat_env=chat_env,
File "/home/jovyan/ghq/github.com/OpenBMB/ChatDev/chatdev/utils.py", line 77, in wrapper
return func(*args, **kwargs)
File "/home/jovyan/ghq/github.com/OpenBMB/ChatDev/chatdev/phase.py", line 137, in chatting
if isinstance(assistant_response.msg, ChatMessage):
File "/home/jovyan/ghq/github.com/OpenBMB/ChatDev/camel/agents/chat_agent.py", line 53, in msg
raise RuntimeError("error in ChatAgentResponse, info:{}".format(str(self.info)))
RuntimeError: error in ChatAgentResponse, info:{'id': None, 'usage': None, 'termination_reasons': ['max_tokens_exceeded_by_camel'], 'num_tokens': 16398}
Recommend adding current limiting function.
This is error.
openai.error.RateLimitError: Rate limit reached for 10KTPM-200RPM in organization org-xxxxxxx on tokens per min. Limit: 10000 / min. Please try again in 6ms. Contact us through our help center at help.openai.com if you continue to have issues.
rate limit refer to https://github.com/geekan/MetaGPT/blob/main/metagpt/provider/openai_api.py
I've been trying to follow the documentation related to the 'chatchain params' but found it somewhat challenging to comprehend and apply. It would be incredibly beneficial for the user community if this section could be revisited and possibly expanded upon for clarity.
Understanding and implementing features based on the documentation is crucial, especially for newcomers to the project or those who might not have an in-depth background on the subject.
I appreciate all the hard work that has gone into this project, and a clearer documentation would significantly help in reducing the barrier to entry and potential misconfigurations. Thank you for your understanding and consideration.
This app looked cool, but it makes dogshit GUI apps, and you've hidden away the function to enable it in some obscure flag and refused to tell anyone how to use it :/
Example:
export OPENAI_PROXY="http://127.0.0.1:7890"
I think 🤔 it's my future crypto for my life changer
How to setup a connection by reverse_proxy_url if I am not able to access from the countries banned by Openai?
GreenLife_DefaultOrganization_20230920150110.log
I've tried making an uni-app,but it cannot generate correct files for uni-app.
If it's starts before you are ready, how do you stop it?
Please add support to connect falcon and llama models with this .
openai.api_key = "..."
openai.api_base = "https://example-endpoint.openai.azure.com"
How do I change the base url of the called API?
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "D:\ProgramData\Anaconda3\envs\chatdev\lib\site-packages\requests\adapters.py", line 486, in send
resp = conn.urlopen(
File "D:\ProgramData\Anaconda3\envs\chatdev\lib\site-packages\urllib3\connectionpool.py", line 874, in urlopen
return self.urlopen(
File "D:\ProgramData\Anaconda3\envs\chatdev\lib\site-packages\urllib3\connectionpool.py", line 874, in urlopen
return self.urlopen(
File "D:\ProgramData\Anaconda3\envs\chatdev\lib\site-packages\urllib3\connectionpool.py", line 844, in urlopen
retries = retries.increment(
File "D:\ProgramData\Anaconda3\envs\chatdev\lib\site-packages\urllib3\util\retry.py", line 515, in increment
raise MaxRetryError(_pool, url, reason) from reason # type: ignore[arg-type]
urllib3.exceptions.MaxRetryError: HTTPSConnectionPool(host='api.openai.com', port=443): Max retries exceeded with url: /v1/chat/completions (Caused by SSLError(SSLError(1, '[SSL: SSLV3_ALERT_HANDSHAKE_FAILURE] sslv3 alert handshake failure (_ssl.c:1007)')))
thanks
这是咋回事,我在win10 中跑代码出现这个问题解决一下
Use Microsoft Guidance framework for agent communications
https://github.com/guidance-ai/guidance
This would allow each agent's output to be structured and controlled accordingly to their roles.
This YouTube video explains it well :
https://youtu.be/69bH4IHZivs?si=RkdCcQRARFT84bof
Hey Devs,
let me start by saying that this programme is great. Well done on your work, and thanks for sharing it.
My question is: is there any plan to allow for the integration of local models?
Even a just section in the documentation would be great.
Have a good day
theWW
Anyone facing the same issue when executing the idea and project name? I installed Conda env all requirements are satisfied.
File "C:\ChatDev\run.py", line 19, in
from camel.typing import ModelType
File "C:\ChatDev\camel_init_.py", line 14, in
import camel.agents
File "C:\ChatDev\camel\agents_init_.py", line 15, in
from .chat_agent import ChatAgent
File "C:\ChatDev\camel\agents\chat_agent.py", line 17, in
from tenacity import retry
ModuleNotFoundError: No module named 'tenacity'
Hello,
Suppose the generated code isn't functioning properly or encounters issues. What would be the recommended approach for rectifying the problem and providing feedback?
What's the difference between ChatDev and MetaGPT?
Could you manage this more gracefully please? currently just errors out instead of managing rate.
Several times the agents will be working on a flask app and the index.html etc will be created within the project folder, instead of the agent creating a template folder, then the index.html inside. Any way to work around this. I would like to avoid manually fixing this every time. Thank you for this repo, it's really great work.
Hi,
I get an error when running a task. Any idea how to fix it?
==>
"
Traceback (most recent call last):
File "/opt/homebrew/lib/python3.11/site-packages/tenacity/init.py", line 382, in call
result = fn(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^
File "/Users/andreas/Documents/GitHub/ChatDev/camel/utils.py", line 147, in wrapper
raise ValueError('OpenAI API key not found.')
ValueError: OpenAI API key not found.
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/Users/andreas/Documents/GitHub/ChatDev/run.py", line 111, in
chat_chain.execute_chain()
File "/Users/andreas/Documents/GitHub/ChatDev/chatdev/chat_chain.py", line 163, in execute_chain
self.execute_step(phase_item)
File "/Users/andreas/Documents/GitHub/ChatDev/chatdev/chat_chain.py", line 133, in execute_step
self.chat_env = self.phases[phase].execute(self.chat_env,
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/andreas/Documents/GitHub/ChatDev/chatdev/phase.py", line 294, in execute
self.chatting(chat_env=chat_env,
File "/Users/andreas/Documents/GitHub/ChatDev/chatdev/utils.py", line 77, in wrapper
return func(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^
File "/Users/andreas/Documents/GitHub/ChatDev/chatdev/phase.py", line 131, in chatting
assistant_response, user_response = role_play_session.step(input_user_msg, chat_turn_limit == 1)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/andreas/Documents/GitHub/ChatDev/camel/agents/role_playing.py", line 242, in step
assistant_response = self.assistant_agent.step(user_msg_rst)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/homebrew/lib/python3.11/site-packages/tenacity/init.py", line 289, in wrapped_f
return self(f, *args, **kw)
^^^^^^^^^^^^^^^^^^^^
File "/opt/homebrew/lib/python3.11/site-packages/tenacity/init.py", line 379, in call
do = self.iter(retry_state=retry_state)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/homebrew/lib/python3.11/site-packages/tenacity/init.py", line 326, in iter
raise retry_exc from fut.exception()
tenacity.RetryError: RetryError[<Future at 0x117af3550 state=finished raised ValueError>]
"
Thanks in advance!
用chatglm2 6B效果怎么样
When I follow all the steps and set up a Conda env, I can't seem to execute the application. After I enter my product Idea and the product name, it comes back with:
Traceback (most recent call last):
File "E:\ChatDeveloper\ChatDev\run.py", line 19, in
from camel.typing import ModelType
File "E:\ChatDeveloper\ChatDev\camel_init_.py", line 14, in
import camel.agents
File "E:\ChatDeveloper\ChatDev\camel\agents_init_.py", line 15, in
from .chat_agent import ChatAgent
File "E:\ChatDeveloper\ChatDev\camel\agents\chat_agent.py", line 24, in
from camel.model_backend import ModelBackend, ModelFactory
File "E:\ChatDeveloper\ChatDev\camel\model_backend.py", line 21, in
from chatdev.utils import log_and_print_online
File "E:\ChatDeveloper\ChatDev\chatdev\utils.py", line 9, in
from online_log.app import send_msg
File "E:\ChatDeveloper\ChatDev\online_log\app.py", line 5, in
from flask import Flask, send_from_directory, request, jsonify
ModuleNotFoundError: No module named 'flask'
I did a pip list and this is the result:
(ChatDev_conda_env) E:\ChatDeveloper\ChatDev>pip list
Package Version
aiohttp 3.8.4
aiosignal 1.3.1
astroid 2.15.0
async-timeout 4.0.2
attrs 23.1.0
autopep8 1.6.0
bidict 0.22.1
blinker 1.6.2
certifi 2023.5.7
cfgv 3.3.1
charset-normalizer 3.1.0
click 8.1.6
colorama 0.4.6
dill 0.3.6
distlib 0.3.6
docstring-to-markdown 0.11
filelock 3.12.2
flake8 6.0.0
Flask 2.3.2
Flask-SocketIO 5.3.4
frozenlist 1.3.3
identify 2.5.24
idna 3.4
importlib-metadata 6.8.0
install 1.3.5
isort 5.12.0
itsdangerous 2.1.2
jedi 0.18.2
jieba 0.42.1
Jinja2 3.1.2
lazy-object-proxy 1.9.0
Markdown 3.4.4
MarkupSafe 2.1.3
mccabe 0.7.0
multidict 6.0.4
nodeenv 1.8.0
numpy 1.24.3
openai 0.27.8
packaging 23.0
parso 0.8.3
Pillow 9.5.0
pip 23.2.1
platformdirs 3.5.3
pluggy 1.2.0
pre-commit 3.3.3
pycodestyle 2.10.0
pydocstyle 6.2.3
pyflakes 3.0.1
pygame 2.5.1
pylint 2.17.0
PySocks 1.7.1
python-engineio 4.5.1
python-lsp-jsonrpc 1.0.0
python-lsp-server 1.7.1
python-socketio 5.8.0
pytoolconfig 1.2.5
PyYAML 6.0
regex 2023.6.3
requests 2.31.0
retrying 1.3.4
rope 1.7.0
setuptools 68.0.0
six 1.16.0
snowballstemmer 2.2.0
tenacity 8.2.2
tiktoken 0.4.0
timeout-decorator 0.5.0
toml 0.10.2
tomli 2.0.1
tomlkit 0.11.6
tqdm 4.65.0
typing_extensions 4.5.0
ujson 5.7.0
urllib3 2.0.3
virtualenv 20.23.0
Werkzeug 2.3.6
whatthepatch 1.0.4
wheel 0.38.4
wrapt 1.15.0
yapf 0.32.0
yarl 1.9.2
zipp 3.16.2
Whats going wrong?
Detailed requirements:
"Chat Dev presents an exciting and innovative approach to the traditional LLM agent, albeit with room for improvement. While its current output may be entry-level, this isn't anyone's fault; it's a result of Chat GPT requiring meticulous checks for data accuracy.
To address this, Chat Dev employs a role system for program creation and task definition. I propose incorporating my LLM-based analysis tool into the process. This tool, which you can find here (https://github.com/Nbtguyoriginal/Pybonce), selects a directory, iterates through its Python files, sends batches of information to Chat GPT with predefined rules, displays the analysis results to the user, and logs the data.
My idea is to integrate my tool as the final step in quality assurance. It will thoroughly check the generated files for consistency and suggest any necessary modifications before the project is ready for market. Your feedback and contributions to the tool are greatly appreciated. Thank you for considering this opportunity to enhance our project. 📚"
Pybonce was inspired by thechat dev webconsole
Hi,
how can i reopen a project and let chatdev check the project and finish the missing parts`?
This creates a hard to notice error in chatdev.chat_env.exist_bugs which is caused by incorrect subprocess spawning on windows.
support claude 2, and support auto analysis github repo and write code based on public repo
The finished product was ok, but I want to rerun the project without it having to do all the work again but inject a simple instruction that would make the finished product better.
I asked it to create a gui chess board and run the knights journey from a starting position I pick by clicking with my mouse button. It basically created this, but when I ran it and selected the starting position it froze. I want to send the product back through the assembly line with a minor change. Is this possible?
Describe the feature you'd like
Azure openai is the only option in areas where OPENAI cannot be accessed, would like to add this feature
Additional context
nothing
I have created a project named Flippers
that is named Flippers_DefaultOrganization_20230909143816
as folder now I want to re run this with chatDev. How to do this ? What I mean is I want to continue development further from available code from previous run of chatDev or my personal manually made project.
Does it have a feature to read and modify existing codebase
Hi!
Amazing project. I was wondering if it's planned to support more languages other than Python
How does this project differ from AgenVerse, which seems quite similar. Is this is using AgentVerse under-the-hood?
Also, any plans of adding support for agents to use ToolLlama in the future?
阿里云国际版可以用**大陆地区的服务器,但是需要实名认证才可以使用。国际版使用**香港和海外其它地区都是免实名免备案的。
阿里云国际服务器租用,请联系阿里云国际代理商免客服小狮子(小飞机 @xiaoshizi999)免费邀请开号 代充值美金余额
Hello!
First of all, thank you very much for the amazing research work and the open source code. It's really amazing stuff and great learning!
I wanted to file an issue:
When I try to run the online_log/app.py
I am able to upload the ChaiChainConfig.json
but when I try to do a replay and upload the log file, the "File Upload" button is unresponsive.
The logs are quite readable and so is the json file, but it would be super cool if I was able to re run the log visualiser.
I'm on Mac OS, tested on Safari, Chrome and Firefox
Thanks in advance!
I got this error when try to use GPT_4 the gpt3 turbo was good but the problem is with GPT_4
Traceback (most recent call last):
File "D:\VSC_PROJECTS\ChatDev_Human2.venv\lib\site-packages\tenacity_init_.py", line 382, in call
result = fn(*args, **kwargs)
File "D:\VSC_PROJECTS\ChatDev_Human2.venv\ChatDev\camel\utils.py", line 145, in wrapper
return func(self, *args, **kwargs)
File "D:\VSC_PROJECTS\ChatDev_Human2.venv\ChatDev\camel\agents\chat_agent.py", line 191, in step
response = self.model_backend.run(messages=openai_messages)
File "D:\VSC_PROJECTS\ChatDev_Human2.venv\ChatDev\camel\model_backend.py", line 69, in run
response = openai.ChatCompletion.create(*args, **kwargs,
File "D:\VSC_PROJECTS\ChatDev_Human2.venv\lib\site-packages\openai\api_resources\chat_completion.py", line 25, in create
return super().create(*args, **kwargs)
File "D:\VSC_PROJECTS\ChatDev_Human2.venv\lib\site-packages\openai\api_resources\abstract\engine_api_resource.py", line 153, in create
response, _, api_key = requestor.request(
File "D:\VSC_PROJECTS\ChatDev_Human2.venv\lib\site-packages\openai\api_requestor.py", line 298, in request
resp, got_stream = self._interpret_response(result, stream)
File "D:\VSC_PROJECTS\ChatDev_Human2.venv\lib\site-packages\openai\api_requestor.py", line 700, in _interpret_response
self._interpret_response_line(
File "D:\VSC_PROJECTS\ChatDev_Human2.venv\lib\site-packages\openai\api_requestor.py", line 763, in _interpret_response_line
raise self.handle_error_response(
openai.error.RateLimitError: Rate limit reached for 10KTPM-200RPM in organization org-BeYMpkHWmgmdJenGBYmjb6Dq on tokens per min. Limit: 10000 / min. Please try again in
6ms. Contact us through our help center at help.openai.com if you continue to have issues.
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "D:\VSC_PROJECTS\ChatDev_Human2.venv\ChatDev\run.py", line 111, in
chat_chain.execute_chain()
File "D:\VSC_PROJECTS\ChatDev_Human2.venv\ChatDev\chatdev\chat_chain.py", line 163, in execute_chain
self.execute_step(phase_item)
File "D:\VSC_PROJECTS\ChatDev_Human2.venv\ChatDev\chatdev\chat_chain.py", line 133, in execute_step
self.chat_env = self.phases[phase].execute(self.chat_env,
File "D:\VSC_PROJECTS\ChatDev_Human2.venv\ChatDev\chatdev\phase.py", line 294, in execute
self.chatting(chat_env=chat_env,
File "D:\VSC_PROJECTS\ChatDev_Human2.venv\ChatDev\chatdev\utils.py", line 77, in wrapper
return func(*args, **kwargs)
File "D:\VSC_PROJECTS\ChatDev_Human2.venv\ChatDev\chatdev\phase.py", line 131, in chatting
assistant_response, user_response = role_play_session.step(input_user_msg, chat_turn_limit == 1)
File "D:\VSC_PROJECTS\ChatDev_Human2.venv\ChatDev\camel\agents\role_playing.py", line 261, in step
user_response = self.user_agent.step(assistant_msg_rst)
File "D:\VSC_PROJECTS\ChatDev_Human2.venv\lib\site-packages\tenacity_init_.py", line 289, in wrapped_f
return self(f, *args, **kw)
File "D:\VSC_PROJECTS\ChatDev_Human2.venv\lib\site-packages\tenacity_init_.py", line 379, in call
do = self.iter(retry_state=retry_state)
File "D:\VSC_PROJECTS\ChatDev_Human2.venv\lib\site-packages\tenacity_init_.py", line 326, in iter
raise retry_exc from fut.exception()
tenacity.RetryError: RetryError[<Future at 0x23a9cd131f0 state=finished raised RateLimitError>]
You're currently on 3.8k stars. If you're interested to get community-dev traction, a Discord would help to centralize it.
Command I ran :
python3 run.py --task "I want to create a buying/selling website like OLX and quickr but the main differentiator factor between them and us is that we want to have easier product listing process that uses AI/ML on each step to make the process more intuitive and easy to use for the user. for example we want to have a camera video firstly to detect what products are available in the video the seller is shooting to the by object detection, after that we want to do image segmentation of each oject that is present in the video , then we want to use LLM to list to possible list of parameters of the specification of the detected object for each object, then if a particular parameter of the specifications is detectable from the video we can add value of that parameter but the remaining parameters can be added by having a step by step conversation with the user about the detected object, Now here we want to add new functionality in this that is adding a geolocation tagging for each object, for example we can add longitude and latitude data to each object's specification. then we store the video clip and the specification data in appropriate format in our server. then once the user has done this for all required objects the listed objects will show in the user's dashboard , the listed items by the user. after that there is a edit and mark-as-sold button from which the user can edit the specifications and delete a product or mark as sold. then we want to also use the nerf technology to display 3d of the detected object. We also want to have this phenomenon in our webapp that is flipping, which means if you want to buy something and someone else wants to sell something that matches the value than you can directly flip the things without exchanging money . we also want to enhance continuesly the specifications of the object based on the conversation of the seller with the buyers, for example if he mentions something that is not present in the current list of the specifications then there should be alert to add that as new parameter of the specification.create a python backend and html frontend file for this . consider that we want to use PostgreSQL for storing the data for this application . consider here that we want to have user permission for location and camera sensor using appropriate prompt. once the user accepts the permissions then the page shown the video feed from the camera in the html below which a record button is available from which user can start stop recording the video on completion of the recording of the video it is sent back to the python backend which will save it with appropriate name and at appropriate location . we also want to save the location data of this from user location to our postgresql database. I want to show the submit button only when the video is recorded. also start and stop video recording button should display alternatively , for example if the user has not started recording the video yet then there should be a start video recording button, if the video recording is on then there should be a stop video recording button, and then once the stop video recording is pressed then there should be submit button. once the video is submitted then it should be saved on the backend and the backend should run object detection algorith using pretrained huggingface model faster_rcnn_R_50_FPN_3x and return the result to the html which later will show this results below the record button." --name "Flippers"
Error I got :
Traceback (most recent call last):
File "run.py", line 24, in <module>
from chatdev.chat_chain import ChatChain
File "/home/hemang/Documents/GitHub/ChatDev/chatdev/chat_chain.py", line 12, in <module>
from chatdev.chat_env import ChatEnv, ChatEnvConfig
File "/home/hemang/Documents/GitHub/ChatDev/chatdev/chat_env.py", line 35, in <module>
class ChatEnv:
File "/home/hemang/Documents/GitHub/ChatDev/chatdev/chat_env.py", line 82, in ChatEnv
def exist_bugs(self) -> tuple[bool, str]:
TypeError: 'type' object is not subscriptable
Make an Anroid app with colorful patterns
本地可以正常起服务,运行run.py也没问题,就是python3 run.py --task "XXX" --name "XXX"的时候,报Failed to send message.
可以点拨下可能出现的原因吗
I think it will be useful to add support for petals.dev.
I think it will run faster and work with bigger models like llama 2 70b.
And it's free 😁
Retrying (Retry(total=0, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<urllib3.connection.HTTPSConnection object at 0x7f6cf61d7a60>: Failed to establish a new connection: [Errno 101] Network is unreachable')': /v1/chat/completions
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.