From 8037fe9aa271b6d411667aaa74bdaeab04c623b9 Mon Sep 17 00:00:00 2001 From: modelearth Date: Fri, 31 Jan 2025 00:09:43 -0500 Subject: [PATCH 1/5] Add .env config file, virtual env Indent code, and -Demo to cd command. --- .env | 11 +++++++++++ README.md | 33 ++++++++++++++++++++++----------- lang.py | 2 +- 3 files changed, 34 insertions(+), 12 deletions(-) create mode 100644 .env diff --git a/.env b/.env new file mode 100644 index 0000000..2c9dbf0 --- /dev/null +++ b/.env @@ -0,0 +1,11 @@ +# Add API key, URL and model + +API_KEY=sk- + +# Uncomment one set for your API_KEY + +# API_URL=https://api.openai.com/v1 +# API_MODEL=gpt-3.5-turbo + +# API_URL=https://api.deepseek.com/beta +# API_MODEL=deepseek-reasoner \ No newline at end of file diff --git a/README.md b/README.md index 172d7e1..aee5142 100644 --- a/README.md +++ b/README.md @@ -63,26 +63,37 @@ Due to degraded performance of official DeepSeek API - We recommend seeking alte **Prerequisites**: Python 3.11+ | Valid [Deepseek API Key](https://platform.deepseek.com/) or OpenAI SDK compatible API. -```bash # Clone repository -git clone https://github.com/Intelligent-Internet/CoT-Lab-Demo -cd CoT-Lab + + git clone https://github.com/Intelligent-Internet/CoT-Lab-Demo + cd CoT-Lab-Demo + +# Add to your .env file + +API_KEY, API_URL, API_MODEL + +# Start virtual environment + + python3 -m venv env + source env/bin/activate + +For Windows + + python3 -m venv env + .\env\Scripts\activate # Install dependencies -pip install -r requirements.txt -# Configure environment -API_KEY=sk-**** -API_URL=https://api.deepseek.com/beta -API_MODEL=deepseek-reasoner + pip install -r requirements.txt # Launch application -python app.py -``` + + python app.py + ## 📄 License MIT License © 2024 [ii.inc] ## Contact -yizhou@ii.inc (Dango233) \ No newline at end of file +yizhou@ii.inc (Dango233) diff --git a/lang.py b/lang.py index 8e8e9ac..50c4ee4 100644 --- a/lang.py +++ b/lang.py @@ -1,7 +1,7 @@ # lang.py LANGUAGE_CONFIG = { "en": { - "title": "CoT-Lab: Human-AI Co-Thinking Laboratory \nFollow, learn, and iterate the thought within one turn. Consider clone the repo and run with your own API key for better experience.", + "title": "CoT-Lab: Human-AI Co-Thinking Laboratory \nFollow, learn, and iterate the thought within one turn. Consider cloning the repo and run with your own API key for a better experience.", "prompt_label": "Task Description - Prompt", "prompt_placeholder": "Enter your prompt here...", "editor_label": "Thought Editor", From c62ff45321076503818f0145b81e2d68aa123b35 Mon Sep 17 00:00:00 2001 From: modelearth Date: Fri, 31 Jan 2025 00:10:21 -0500 Subject: [PATCH 2/5] Ignore virtual directory folder --- .gitignore | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitignore b/.gitignore index afe6adf..b169cf9 100644 --- a/.gitignore +++ b/.gitignore @@ -1,5 +1,6 @@ # Environment files .env +env/ .apikey # 同时忽略旧密钥文件 # Python From 43cc79d78adb1045f20928f710e404ffbab6593e Mon Sep 17 00:00:00 2001 From: modelearth Date: Fri, 31 Jan 2025 00:15:06 -0500 Subject: [PATCH 3/5] Indent commands --- README.md | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/README.md b/README.md index aee5142..f4e8771 100644 --- a/README.md +++ b/README.md @@ -63,32 +63,32 @@ Due to degraded performance of official DeepSeek API - We recommend seeking alte **Prerequisites**: Python 3.11+ | Valid [Deepseek API Key](https://platform.deepseek.com/) or OpenAI SDK compatible API. -# Clone repository +### Clone repository - git clone https://github.com/Intelligent-Internet/CoT-Lab-Demo - cd CoT-Lab-Demo + git clone https://github.com/Intelligent-Internet/CoT-Lab-Demo + cd CoT-Lab-Demo -# Add to your .env file +### Add to your .env file API_KEY, API_URL, API_MODEL -# Start virtual environment +### Start virtual environment - python3 -m venv env - source env/bin/activate + python3 -m venv env + source env/bin/activate For Windows - python3 -m venv env - .\env\Scripts\activate + python3 -m venv env + .\env\Scripts\activate -# Install dependencies +### Install dependencies - pip install -r requirements.txt + pip install -r requirements.txt -# Launch application +### Launch application - python app.py + python app.py From 1268c61154599349cf09790a2b154cf13158fe16 Mon Sep 17 00:00:00 2001 From: modelearth Date: Sun, 2 Feb 2025 09:38:00 -0500 Subject: [PATCH 4/5] Remove gpt model/url --- .env | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/.env b/.env index 2c9dbf0..bc78c0c 100644 --- a/.env +++ b/.env @@ -1,11 +1,8 @@ -# Add API key, URL and model +# API Connection Settings -API_KEY=sk- - -# Uncomment one set for your API_KEY +# Add your API Key -# API_URL=https://api.openai.com/v1 -# API_MODEL=gpt-3.5-turbo +API_KEY=sk- -# API_URL=https://api.deepseek.com/beta -# API_MODEL=deepseek-reasoner \ No newline at end of file +API_URL=https://api.deepseek.com/beta +API_MODEL=deepseek-reasoner \ No newline at end of file From 74a18d4d957aee485a9041fd4f00129fd9598175 Mon Sep 17 00:00:00 2001 From: modelearth Date: Sun, 2 Feb 2025 09:53:26 -0500 Subject: [PATCH 5/5] Change to cloning --- lang.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lang.py b/lang.py index 55b57ff..85c0f54 100644 --- a/lang.py +++ b/lang.py @@ -1,7 +1,7 @@ # lang.py LANGUAGE_CONFIG = { "en": { - "title": "## CoT-Lab: Human-AI Co-Thinking Laboratory \nFollow, learn, and iterate the thought within one turn. Consider clone the repo and run with your own API key for a better experience. \n GitHub: https://github.com/Intelligent-Internet/CoT-Lab-Demo", + "title": "## CoT-Lab: Human-AI Co-Thinking Laboratory \nFollow, learn, and iterate the thought within one turn. Consider cloning the repo and run with your own API key for a better experience. \n GitHub: https://github.com/Intelligent-Internet/CoT-Lab-Demo", "prompt_label": "Task Description - Prompt", "prompt_placeholder": "Enter your prompt here...", "editor_label": "Thought Editor",