ChatDev:机器人们协作,自己完成任务
今天 小智 来使用AI工具是 ChatDev
现在分享给大家,快来一起看看吧。
一、ChatDev是什么?
ChatDev这是一个Github上的高Star项目,截止本文时收获:21.4K star。
Github地址:https://github.com/OpenBMB/ChatDev
简介
- ChatDev 是一家虚拟软件公司,通过各种不同角色的智能体 运营,包括执行官,产品官,技术官,程序员 ,审查员,测试员,设计师 等。这些智能体形成了一个多智能体组织结构,其使命是“通过编程改变数字世界”。ChatDev内的智能体通过参加专业的功能研讨会来 协作,包括设计、编码、测试和文档编写等任务。
- ChatDev的主要目标是提供一个基于大型语言模型(LLM)的易于使用、高度可定制并且可扩展的框架,它是研究群体智能的理想场景。
Quickstart
Quickstart with Web
Access the web page for visualization and configuration use: https://chatdev.modelbest.cn/
Quickstart with terminal
To get started, follow these steps:
-
Clone the GitHub Repository: Begin by cloning the repository using the command:
git clone https://github.com/OpenBMB/ChatDev.git
-
Set Up Python Environment: Ensure you have a version 3.9 or higher Python environment. You can create and activate this environment using the following commands, replacing
ChatDev_conda_env
with your preferred environment name:conda create -n ChatDev_conda_env python=3.9 -y conda activate ChatDev_conda_env
-
Install Dependencies: Move into the
ChatDev
directory and install the necessary dependencies by running:cd ChatDev pip3 install -r requirements.txt
-
Set OpenAI API Key: Export your OpenAI API key as an environment variable. Replace
"your_OpenAI_API_key"
with your actual API key. Remember that this environment variable is session-specific, so you need to set it again if you open a new terminal session. On Unix/Linux:export OPENAI_API_KEY="your_OpenAI_API_key"
On Windows:
$env:OPENAI_API_KEY="your_OpenAI_API_key"
-
Build Your Software: Use the following command to initiate the building of your software, replacing
[description_of_your_idea]
with your idea’s description and[project_name]
with your desired project name: On Unix/Linux:python3 run.py --task "[description_of_your_idea]" --name "[project_name]"
On Windows:
python run.py --task "[description_of_your_idea]" --name "[project_name]"
-
Run Your Software: Once generated, you can find your software in the
WareHouse
directory under a specific project folder, such asproject_name_DefaultOrganization_timestamp
. Run your software using the following command within that directory: On Unix/Linux:cd WareHouse/project_name_DefaultOrganization_timestamp python3 main.py
On Windows:
cd WareHouse/project_name_DefaultOrganization_timestamp python main.py
二、如何使用ChatDev呢?
需要用到一个API工具:智增增,有了它就有了通向人工智能的钥匙!
那么如何来使用ChatDev+智增增?
- 第1步:需要先访问ChatDev。如上所述几种方式安装好软件。
- 第2步:复制智增增密钥。用手机号登录:http://gpt.zhizengzeng.com/#/login,如下图所示复制出密钥key和主机地址url
- 第3步:配置密钥。打开ChatDev,将上一步复制的密钥key和主机地址url填入,即可正常使用。注意配置的主机地址是:
https://flag.smarttrot.com/v1
如下图所示,核心是要将这部分的代码修改下:
client = OpenAI(api_key=API_SECRET_KEY, base_url=BASE_URL)
也就是要指定一个base_url,即可
可以参考我们更多的开发示例中的代码:http://doc.zhizengzeng.com/doc-3979939
配置完成!~
加入AI工具群
最后放上人工客服,有定制需求找他吧,用好AI工具