From a772f26300199479c762b6c4f7390a74f16106c0 Mon Sep 17 00:00:00 2001 From: ABDUL KHALIQ Date: Mon, 25 Sep 2023 21:56:17 +0500 Subject: [PATCH 1/3] Create getting_started_with_chatdev This file is a step by step guide about how to get started with ChatDev --- step22_generative_ai/getting_started_with_chatdev | 1 + 1 file changed, 1 insertion(+) create mode 100644 step22_generative_ai/getting_started_with_chatdev diff --git a/step22_generative_ai/getting_started_with_chatdev b/step22_generative_ai/getting_started_with_chatdev new file mode 100644 index 00000000..3f549151 --- /dev/null +++ b/step22_generative_ai/getting_started_with_chatdev @@ -0,0 +1 @@ +This file is a step by step guide about how to get started with ChatDev From 9cd1baecfb0c531048930e80802dbfe4c734cd1b Mon Sep 17 00:00:00 2001 From: ABDUL KHALIQ Date: Mon, 25 Sep 2023 21:58:19 +0500 Subject: [PATCH 2/3] Delete step22_generative_ai/getting_started_with_chatdev --- step22_generative_ai/getting_started_with_chatdev | 1 - 1 file changed, 1 deletion(-) delete mode 100644 step22_generative_ai/getting_started_with_chatdev diff --git a/step22_generative_ai/getting_started_with_chatdev b/step22_generative_ai/getting_started_with_chatdev deleted file mode 100644 index 3f549151..00000000 --- a/step22_generative_ai/getting_started_with_chatdev +++ /dev/null @@ -1 +0,0 @@ -This file is a step by step guide about how to get started with ChatDev From 82786cd5d0b25b0ca2fb1eadab2fcd06fff0cbe9 Mon Sep 17 00:00:00 2001 From: ABDUL KHALIQ Date: Mon, 25 Sep 2023 22:04:18 +0500 Subject: [PATCH 3/3] A step by step guide how started with chatdev A step by step guide how to started with chatdev using miniconda and anaconda --- .../anaconda/README.md | 109 ++++++++++++++++ .../miniconda/README.md | 117 ++++++++++++++++++ 2 files changed, 226 insertions(+) create mode 100644 step22_generative_ai/getting_started_with_chatdev/anaconda/README.md create mode 100644 step22_generative_ai/getting_started_with_chatdev/miniconda/README.md diff --git a/step22_generative_ai/getting_started_with_chatdev/anaconda/README.md b/step22_generative_ai/getting_started_with_chatdev/anaconda/README.md new file mode 100644 index 00000000..a31d9abc --- /dev/null +++ b/step22_generative_ai/getting_started_with_chatdev/anaconda/README.md @@ -0,0 +1,109 @@ +# Getting_Started_with_ChatDev_using_Anaconda +How to use ChatDev for windows users using anaconda + +## Install Anaconda +Install Anaconda from official website of [Anaconda](https://www.anaconda.com/download/). + + +## Make a folder AI in D:/ +Make a folder AI in D drive. Then open this folder in VS Code. And open terminal by clocking Ctrl + Shift + Backtick. Or you can open it from VS Code top menu bar Teminal > New Terminal + + +## Clone the GitHub Repository +Begin by cloning the repository using the command: + +``` +git clone https://github.com/OpenBMB/ChatDev.git +``` + +This repository is present at [ChatDev Github]([url](https://github.com/OpenBMB/ChatDev)) + +## 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_env with your preferred environment name or you can use as it is + +``` +python -m venv ChatDev_env +``` + +## Activate the Enviornment +Use the following command to activate the enviornment + +``` +ChatDev_env\scripts\activate +``` + +## Change Directory +Move into the ChatDev directory + +``` +cd ChatDev +``` + +## Install Dependencies +Install the necessary dependencies by running + +``` +pip3 install -r requirements.txt +``` + +If pip3 is not working in your case you can use pip + +## Set OpenAI API Key +Export your OpenAI API key as an environment variable from Open AI official website. [OpenAI](https://openai.com/) For this make a fresh account and generate API key using this link [OpenAI API Key](https://platform.openai.com/account/api-keys) +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. + +``` +set OPENAI_API_KEY="your_OpenAI_API_key" +``` + +It looks like +``` +set OPENAI_API_KEY=sk-kkklkinkkkkkkkkkk........... +``` + +## 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 + +``` +python run.py --task "[description_of_your_idea]" --name "[project_name]" +``` +### Example +``` +python run.py --task please make a flask app. app should have a web page asking for students information like name age education address city and phone number. then there should be a submit button. after submitting the record should be saved into a sqlite database --name my-first-ai-app +``` + +## Run Your Software +Once generated, you can find your software in the WareHouse directory under a specific project folder such as project_name_DefaultOrganization_timestamp. Run your software using the following command within that directory. Here timestamp is a number. You can manually go to folder find your project. It look like my-first-ai-app_DefaultOrganization_1234567890 and copy the path and then change directory using prompt or manually handle it + +``` +cd WareHouse/project_name_DefaultOrganization_timestamp +``` + +### In our case + +``` +cd WareHouse/my-first-ai-app_DefaultOrganization_timestamp +``` + +## Make a folder name templates here + +``` +mkd templates +``` + +You can also make it manually by moving in to folder and then Right Click > New > Folder + +## Move HTML files to templates +Now check your folder WareHouse/my-first-ai-app_DefaultOrganization_timestamp and move all .html extension files to templates folder manually + +## Run the main.py file + +``` +python main.py +``` +## Run your App +Run your App by clicking link which looks like this: Running on http://127.0.0.1:5000 + +## Find and Solve Errors +If there are any kind of errors. Then solve it and run your file again. diff --git a/step22_generative_ai/getting_started_with_chatdev/miniconda/README.md b/step22_generative_ai/getting_started_with_chatdev/miniconda/README.md new file mode 100644 index 00000000..ddc02f68 --- /dev/null +++ b/step22_generative_ai/getting_started_with_chatdev/miniconda/README.md @@ -0,0 +1,117 @@ +# Getting_Started_with_ChatDev +How to use ChatDev for windows users + +## Install Miniconda +First of all Install Miniconda from official website of Miniconda [Install Miniconda](https://docs.conda.io/projects/miniconda/en/latest/miniconda-install.html) + +## Open Miniconda prompt +If you have installed miniconda So, go to search of your system and type Anaconda Prompt. And if you installed anaconda then this step is not needed. + +## Make a folder AI in D:/ +Make a folder in D drive and move to this folder by typing this and then enter +``` +C:/ cd D:/AI +``` +This will not work untill you type D: and enter again +``` +D: +``` + +## Clone the GitHub Repository +Begin by cloning the repository using the command: + +``` +git clone https://github.com/OpenBMB/ChatDev.git +``` + +This github repository is present at https://github.com/OpenBMB/ChatDev + +## 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 or you can use as it is + +``` +conda create -n ChatDev_conda_env python=3.9 -y +``` + +## Activate the Enviornment +Use the following command to activate the enviornment + +**Conda** +``` +conda activate ChatDev_conda_env +``` + +## Change Directory +Move into the ChatDev directory + +``` +cd ChatDev +``` + +## Install Dependencies +Install the necessary dependencies by running + +``` +pip3 install -r requirements.txt +``` +If pip3 is not working in your case you can use pip + +## Set OpenAI API Key +Export your OpenAI API key as an environment variable from Open AI official website. [OpenAI](https://openai.com/) For this make a fresh account and generate API key using this link [OpenAI API Key](https://platform.openai.com/account/api-keys) +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. + +``` +set OPENAI_API_KEY="your_OpenAI_API_key" +``` + +It looks like +``` +set OPENAI_API_KEY=sk-kkklkinkkkkkkkkkk........... +``` + +## 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 + +``` +python run.py --task "[description_of_your_idea]" --name "[project_name]" +``` +### Example +``` +python run.py --task please make a flask app. app should have a web page asking for students information like name age education address city and phone number. then there should be a submit button. after submitting the record should be saved into a sqlite database --name my-first-ai-app +``` + +## Run Your Software +Once generated, you can find your software in the WareHouse directory under a specific project folder such as project_name_DefaultOrganization_timestamp. Run your software using the following command within that directory. Here timestamp is a number. You can manually go to folder find your project. It look like my-first-ai-app_DefaultOrganization_1234567890 and copy the path and then change directory using prompt or manually handle it + +``` +cd WareHouse/project_name_DefaultOrganization_timestamp +``` + +### In our case + +``` +cd WareHouse/my-first-ai-app_DefaultOrganization_timestamp +``` + +## Make a folder name templates here + +``` +mkd templates +``` + +You can also make it manually by moving in to folder and then Right Click > New > Folder + +## Move HTML files to templates +Now check your folder WareHouse/my-first-ai-app_DefaultOrganization_timestamp and move all .html extension files to templates folder manually + +## Run the main.py file + +``` +python main.py +``` +## Run your App +Run your App by clicking link which looks like this: Running on http://127.0.0.1:5000 + +## Find and Solve Errors +If there are any kind of errors. Then solve it and run your file again.