From 34e8ab7628658d665fc08cf311725be71280a8c4 Mon Sep 17 00:00:00 2001 From: Justin Hayes <52832301+justinh-rahb@users.noreply.github.com> Date: Mon, 4 Sep 2023 12:09:34 -0400 Subject: [PATCH] Dev docs (#81) * Add Development to docs * Update docs --- README.md | 166 ++++++++++++++++++++++++++++++++++++- docs/community.md | 2 +- docs/development/index.md | 10 +++ docs/development/macos.md | 58 +++++++++++++ docs/development/termux.md | 58 +++++++++++++ docs/development/ubuntu.md | 58 +++++++++++++ docs/index.md | 4 + docs/license.md | 2 +- docs/privacy.md | 2 +- docs/setup.md | 2 +- docs/usage/index.md | 2 +- 11 files changed, 358 insertions(+), 6 deletions(-) create mode 100644 docs/development/index.md create mode 100644 docs/development/macos.md create mode 100644 docs/development/termux.md create mode 100644 docs/development/ubuntu.md diff --git a/README.md b/README.md index a6921ec..cde91a8 100644 --- a/README.md +++ b/README.md @@ -12,6 +12,10 @@ ## 📖 Table of Contents - [🛠️ Setup](#%EF%B8%8F-setup) +- [👷 Development](#-development) + - [Ubuntu 🤓](#ubuntu-) + - [macOS 🍎](#macos-) + - [Android 🤖](#android-) - [🧑‍💻 Usage](#-usage) - [Commands ⌨️](#%EF%B8%8F-commands) - [🛡️ Privacy](#%EF%B8%8F-privacy) @@ -77,7 +81,7 @@ In your GitHub repository: - `IMAGE_SIZE`: This sets the image size for the DALL-E API. Default: "512x512". - `API_URL`: This sets the API endpoint for the chat completions API. Default: "https://api.openai.com/v1/chat/completions". - `ELEVENLABS_API_KEY`: Your ElevenLabs API key. Can be disabled by omitting this secret. - - `ELEVENLABS_MODEL_NAME`: ElevenLabs model you're using. Default: "eleven_monolingual_v1". + - `ELEVENLABS_MODEL_NAME`: ElevenLabs model you're using. Default: "eleven_multilingual_v1". - `GCS_BUCKET_NAME`: Your chosen name for the GCS bucket meant for TTS audio file storage. **5. GitHub Actions 🚀** @@ -94,6 +98,166 @@ The bot's deployment to Google Cloud Functions and Storage gets automatically ha Now, your bot can be added to any room within your Google Workspace. +## 👷 Development + +The `test_server.py` script included in this repository serves as a lightweight, local development server for Chat²GPT. This enables you to test new features, debug issues, or get a firsthand experience of the chatbot's capabilities without deploying it to a production environment. Running the test server starts a web service that you can access at [http://127.0.0.1:5000](http://127.0.0.1:5000). + +### Ubuntu 🤓 + +To run Chat²GPT on Ubuntu, follow these steps: + +1. **Update Packages** + + Open Terminal and update your package list: + + ```bash + sudo apt update + ``` + +2. **Install Required Dependencies** + + Install Python and other necessary packages: + + ```bash + sudo apt install python3 python3-pip git + ``` + +3. **Clone the Repository** + + Clone the Chat²GPT repository: + + ```bash + git clone https://github.com/RAHB-REALTORS-Association/chat2gpt.git + ``` + + Navigate to the cloned directory: + + ```bash + cd chat2gpt + ``` + +4. **Install Python Packages** + + Install the required Python packages: + + ```bash + pip3 install -r requirements.txt + ``` + +5. **Run the Test Server** + + Start the Chat²GPT server: + + ```bash + python3 test_server.py + ``` + + The server should start successfully and can be accessed at [http://127.0.0.1:5000](http://127.0.0.1:5000). + +### macOS 🍎 + +To run Chat²GPT on macOS, you can use Homebrew to manage your packages. Follow these steps: + +1. **Install Homebrew** + + If you don't have Homebrew installed, open Terminal and run: + + ```bash + /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)" + ``` + +2. **Install Python** + + Install Python using Homebrew: + + ```bash + brew install python + ``` + +3. **Clone the Repository** + + Clone the Chat²GPT repository: + + ```bash + git clone https://github.com/RAHB-REALTORS-Association/chat2gpt.git + ``` + + Navigate to the cloned directory: + + ```bash + cd chat2gpt + ``` + +4. **Install Python Packages** + + Install the required Python packages: + + ```bash + pip3 install -r requirements.txt + ``` + +5. **Run the Test Server** + + Start the Chat²GPT server: + + ```bash + python3 test_server.py + ``` + + The server should start successfully and can be accessed at [http://127.0.0.1:5000](http://127.0.0.1:5000). + +### Android 🤖 + +To run Chat²GPT on an Android device using Termux, follow these steps: + +1. **Update and Upgrade Termux Packages** + + Open Termux and run the following command to update and upgrade existing packages: + + ```bash + pkg upgrade + ``` + +2. **Install Required Dependencies** + + Install the necessary packages like OpenSSL, Python, pip, Git, Rust, and Binutils by executing: + + ```bash + pkg install openssl python python-pip git rust binutils + ``` + +3. **Clone the Repository** + + Use the `git` command to clone the Chat²GPT repository to your device: + + ```bash + git clone https://github.com/RAHB-REALTORS-Association/chat2gpt.git + ``` + + Navigate to the cloned directory: + + ```bash + cd chat2gpt + ``` + +4. **Install Python Packages** + + Run the following command to install the Python packages required for Chat²GPT: + + ```bash + pip install -r requirements.txt + ``` + +5. **Run the Test Server** + + Finally, start the Chat²GPT server using the `python` command: + + ```bash + python test_server.py + ``` + + The server should start successfully and can be accessed at [http://127.0.0.1:5000](http://127.0.0.1:5000). + ## 🧑‍💻 Usage - **Dynamic Interactions:** Chat²GPT is attentive to its surroundings. You can invoke it in chat rooms by directly mentioning it using `@botname`. Alternatively, for more private interactions or queries, you can send a direct message to the bot. diff --git a/docs/community.md b/docs/community.md index 3c1f1c2..318c9fa 100644 --- a/docs/community.md +++ b/docs/community.md @@ -1,7 +1,7 @@ --- title: "🌐 Community" layout: page -nav_order: 4 +nav_order: 5 --- # 🌐 Community diff --git a/docs/development/index.md b/docs/development/index.md new file mode 100644 index 0000000..7166a8e --- /dev/null +++ b/docs/development/index.md @@ -0,0 +1,10 @@ +--- +title: "👷 Development" +layout: page +nav_order: 2 +has_children: true +--- + +# 👷 Development + +The `test_server.py` script included in this repository serves as a lightweight, local development server for Chat²GPT. This enables you to test new features, debug issues, or get a firsthand experience of the chatbot's capabilities without deploying it to a production environment. Running the test server starts a web service that you can access at [http://127.0.0.1:5000](http://127.0.0.1:5000). diff --git a/docs/development/macos.md b/docs/development/macos.md new file mode 100644 index 0000000..5beb4e3 --- /dev/null +++ b/docs/development/macos.md @@ -0,0 +1,58 @@ +--- +layout: default +title: macOS +parent: 👷 Development +nav_order: 2 +--- + +## macOS 🍎 + +To run Chat²GPT on macOS, you can use Homebrew to manage your packages. Follow these steps: + +1. **Install Homebrew** + + If you don't have Homebrew installed, open Terminal and run: + + ```bash + /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)" + ``` + +2. **Install Python** + + Install Python using Homebrew: + + ```bash + brew install python + ``` + +3. **Clone the Repository** + + Clone the Chat²GPT repository: + + ```bash + git clone https://github.com/RAHB-REALTORS-Association/chat2gpt.git + ``` + + Navigate to the cloned directory: + + ```bash + cd chat2gpt + ``` + +4. **Install Python Packages** + + Install the required Python packages: + + ```bash + pip3 install -r requirements.txt + ``` + +5. **Run the Test Server** + + Start the Chat²GPT server: + + ```bash + python3 test_server.py + ``` + + The server should start successfully and can be accessed at [http://127.0.0.1:5000](http://127.0.0.1:5000). diff --git a/docs/development/termux.md b/docs/development/termux.md new file mode 100644 index 0000000..f1991b8 --- /dev/null +++ b/docs/development/termux.md @@ -0,0 +1,58 @@ +--- +layout: default +title: Android +parent: 👷 Development +nav_order: 3 +--- + +## Android 🤖 + +To run Chat²GPT on an Android device using Termux, follow these steps: + +1. **Update and Upgrade Termux Packages** + + Open Termux and run the following command to update and upgrade existing packages: + + ```bash + pkg upgrade + ``` + +2. **Install Required Dependencies** + + Install the necessary packages like OpenSSL, Python, pip, Git, Rust, and Binutils by executing: + + ```bash + pkg install openssl python python-pip git rust binutils + ``` + +3. **Clone the Repository** + + Use the `git` command to clone the Chat²GPT repository to your device: + + ```bash + git clone https://github.com/RAHB-REALTORS-Association/chat2gpt.git + ``` + + Navigate to the cloned directory: + + ```bash + cd chat2gpt + ``` + +4. **Install Python Packages** + + Run the following command to install the Python packages required for Chat²GPT: + + ```bash + pip install -r requirements.txt + ``` + +5. **Run the Test Server** + + Finally, start the Chat²GPT server using the `python` command: + + ```bash + python test_server.py + ``` + + The server should start successfully and can be accessed at [http://127.0.0.1:5000](http://127.0.0.1:5000). diff --git a/docs/development/ubuntu.md b/docs/development/ubuntu.md new file mode 100644 index 0000000..a1a87c4 --- /dev/null +++ b/docs/development/ubuntu.md @@ -0,0 +1,58 @@ +--- +layout: default +title: Ubuntu +parent: 👷 Development +nav_order: 1 +--- + +## Ubuntu 🤓 + +To run Chat²GPT on Ubuntu, follow these steps: + +1. **Update Packages** + + Open Terminal and update your package list: + + ```bash + sudo apt update + ``` + +2. **Install Required Dependencies** + + Install Python and other necessary packages: + + ```bash + sudo apt install python3 python3-pip git + ``` + +3. **Clone the Repository** + + Clone the Chat²GPT repository: + + ```bash + git clone https://github.com/RAHB-REALTORS-Association/chat2gpt.git + ``` + + Navigate to the cloned directory: + + ```bash + cd chat2gpt + ``` + +4. **Install Python Packages** + + Install the required Python packages: + + ```bash + pip3 install -r requirements.txt + ``` + +5. **Run the Test Server** + + Start the Chat²GPT server: + + ```bash + python3 test_server.py + ``` + + The server should start successfully and can be accessed at [http://127.0.0.1:5000](http://127.0.0.1:5000). diff --git a/docs/index.md b/docs/index.md index fe6aca6..902bfdd 100644 --- a/docs/index.md +++ b/docs/index.md @@ -12,6 +12,10 @@ nav_order: 0 ## 📖 Table of Contents - [🛠️ Setup](setup.html) +- [👷 Development](development/) + - [Ubuntu 🤓](development/ubuntu.html) + - [macOS 🍎](development/macos.html) + - [Android 🤖](development/termux.html) - [🧑‍💻 Usage](usage/) - [Commands ⌨️](usage/help.html) - [🛡️ Privacy](privacy.html) diff --git a/docs/license.md b/docs/license.md index 7d68d8d..236e378 100644 --- a/docs/license.md +++ b/docs/license.md @@ -1,7 +1,7 @@ --- title: "📄 License" layout: page -nav_order: 5 +nav_order: 6 --- # 📄 License diff --git a/docs/privacy.md b/docs/privacy.md index 1c2ffad..4bc64bf 100644 --- a/docs/privacy.md +++ b/docs/privacy.md @@ -1,7 +1,7 @@ --- title: "🛡️ Privacy" layout: page -nav_order: 3 +nav_order: 4 --- diff --git a/docs/setup.md b/docs/setup.md index 6632d20..a885275 100644 --- a/docs/setup.md +++ b/docs/setup.md @@ -59,7 +59,7 @@ In your GitHub repository: - `IMAGE_SIZE`: This sets the image size for the DALL-E API. Default: "512x512". - `API_URL`: This sets the API endpoint for the chat completions API. Default: "https://api.openai.com/v1/chat/completions". - `ELEVENLABS_API_KEY`: Your ElevenLabs API key. Can be disabled by omitting this secret. - - `ELEVENLABS_MODEL_NAME`: ElevenLabs model you're using. Default: "eleven_monolingual_v1". + - `ELEVENLABS_MODEL_NAME`: ElevenLabs model you're using. Default: "eleven_multilingual_v1". - `GCS_BUCKET_NAME`: Your chosen name for the GCS bucket meant for TTS audio file storage. **5. GitHub Actions 🚀** diff --git a/docs/usage/index.md b/docs/usage/index.md index aee6642..ee181ef 100644 --- a/docs/usage/index.md +++ b/docs/usage/index.md @@ -1,7 +1,7 @@ --- title: "🧑‍💻 Usage" layout: page -nav_order: 2 +nav_order: 3 has_children: true ---