diff --git a/docs/pages/Deploying/Hosting-the-app.md b/docs/pages/Deploying/Hosting-the-app.md index fe9f16f4..7505f60d 100644 --- a/docs/pages/Deploying/Hosting-the-app.md +++ b/docs/pages/Deploying/Hosting-the-app.md @@ -4,7 +4,7 @@ Here's a step-by-step guide on how to setup an Amazon Lightsail instance to host ## Configuring your instance -(If you know how to create a Lightsail instance, you can skip to the recommended configuration part by clicking here) +(If you know how to create a Lightsail instance, you can skip to the recommended configuration part by clicking here). ### 1. Create an account or login to https://lightsail.aws.amazon.com @@ -36,7 +36,7 @@ Your instance will be ready for use a few minutes after being created. To access #### Clone the repository -A terminal window will pop up, and the first step will be to clone the DocsGPT git repository. +A terminal window will pop up, and the first step will be to clone the DocsGPT git repository: `git clone https://github.com/arc53/DocsGPT.git` @@ -64,11 +64,11 @@ Enter the following command to access the folder in which DocsGPT docker-compose #### Prepare the environment -Inside the DocsGPT folder create a .env file and copy the contents of .env_sample into it. +Inside the DocsGPT folder create a `.env` file and copy the contents of `.env_sample` into it. `nano .env` -Make sure your .env file looks like this: +Make sure your `.env` file looks like this: ``` OPENAI_API_KEY=(Your OpenAI API key) @@ -103,10 +103,10 @@ Before you are able to access your live instance, you must first enable the port Open your Lightsail instance and head to "Networking". -Then click on "Add rule" under "IPv4 Firewall", enter 5173 as your port, and hit "Create". -Repeat the process for port 7091. +Then click on "Add rule" under "IPv4 Firewall", enter `5173` as your port, and hit "Create". +Repeat the process for port `7091`. #### Access your instance -Your instance will now be available under your Public IP Address and port 5173. Enjoy! +Your instance will now be available under your Public IP Address and port `5173`. Enjoy! diff --git a/docs/pages/Deploying/Quickstart.md b/docs/pages/Deploying/Quickstart.md index 6c0b974a..7ffc9674 100644 --- a/docs/pages/Deploying/Quickstart.md +++ b/docs/pages/Deploying/Quickstart.md @@ -9,23 +9,23 @@ It will install all the dependencies and give you an option to download the loca Otherwise, refer to this Guide: -1. Open and download this repository with `git clone https://github.com/arc53/DocsGPT.git` -2. Create a .env file in your root directory and set your `API_KEY` with your openai api key -3. Run `docker-compose build && docker-compose up` -4. Navigate to `http://localhost:5173/` +1. Open and download this repository with `git clone https://github.com/arc53/DocsGPT.git`. +2. Create a `.env` file in your root directory and set your `API_KEY` with your openai api key. +3. Run `docker-compose build && docker-compose up`. +4. Navigate to `http://localhost:5173/`. -To stop just run Ctrl + C +To stop just run `Ctrl + C`. ### Chrome Extension To install the Chrome extension: -1. In the DocsGPT GitHub repository, click on the "Code" button and select Download ZIP -2. Unzip the downloaded file to a location you can easily access -3. Open the Google Chrome browser and click on the three dots menu (upper right corner) -4. Select "More Tools" and then "Extensions" -5. Turn on the "Developer mode" switch in the top right corner of the Extensions page -6. Click on the "Load unpacked" button -7. Select the "Chrome" folder where the DocsGPT files have been unzipped (docsgpt-main > extensions > chrome) -8. The extension should now be added to Google Chrome and can be managed on the Extensions page +1. In the DocsGPT GitHub repository, click on the "Code" button and select "Download ZIP". +2. Unzip the downloaded file to a location you can easily access. +3. Open the Google Chrome browser and click on the three dots menu (upper right corner). +4. Select "More Tools" and then "Extensions". +5. Turn on the "Developer mode" switch in the top right corner of the Extensions page. +6. Click on the "Load unpacked" button. +7. Select the "Chrome" folder where the DocsGPT files have been unzipped (docsgpt-main > extensions > chrome). +8. The extension should now be added to Google Chrome and can be managed on the Extensions page. 9. To disable or remove the extension, simply turn off the toggle switch on the extension card or click the "Remove" button. diff --git a/docs/pages/Developing/API-docs.md b/docs/pages/Developing/API-docs.md index 4109eb10..1324f7a9 100644 --- a/docs/pages/Developing/API-docs.md +++ b/docs/pages/Developing/API-docs.md @@ -1,8 +1,8 @@ -App currently has two main api endpoints: +Currently, the application provides the following main API endpoints: ### /api/answer -Its a POST request that sends a JSON in body with 4 values. Here is a JavaScript fetch example -It will receive an answer for a user provided question +It's a POST request that sends a JSON in body with 4 values. It will receive an answer for a user provided question. +Here is a JavaScript fetch example: ```js // answer (POST http://127.0.0.1:5000/api/answer) @@ -29,8 +29,8 @@ In response you will get a json document like this one: ``` ### /api/docs_check -It will make sure documentation is loaded on a server (just run it every time user is switching between libraries (documentations) -Its a POST request that sends a JSON in body with 1 value. Here is a JavaScript fetch example +It will make sure documentation is loaded on a server (just run it every time user is switching between libraries (documentations)). +It's a POST request that sends a JSON in body with 1 value. Here is a JavaScript fetch example: ```js // answer (POST http://127.0.0.1:5000/api/docs_check) @@ -54,10 +54,10 @@ In response you will get a json document like this one: ### /api/combine -Provides json that tells UI which vectors are available and where they are located with a simple get request +Provides json that tells UI which vectors are available and where they are located with a simple get request. -Respsonse will include: -date, description, docLink, fullName, language, location (local or docshub), model, name, version +Response will include: +`date`, `description`, `docLink`, `fullName`, `language`, `location` (local or docshub), `model`, `name`, `version`. Example of json in Docshub and local: @@ -69,15 +69,14 @@ HTML example: ```html
+ + + + + + ``` Response: @@ -90,7 +89,7 @@ Response: ``` ### /api/task_status -Gets task status (task_id) from /api/upload +Gets task status (`task_id`) from `/api/upload`: ```js // Task status (Get http://127.0.0.1:5000/api/task_status) fetch("http://localhost:5001/api/task_status?task_id=b2d2a0f4-387c-44fd-a443-e4fe2e7454d1", { @@ -105,7 +104,7 @@ fetch("http://localhost:5001/api/task_status?task_id=b2d2a0f4-387c-44fd-a443-e4f Responses: There are two types of responses: -1. while task it still running, where "current" will show progress from 0 - 100 +1. while task it still running, where "current" will show progress from 0 to 100 ```json { "result": { @@ -134,7 +133,7 @@ There are two types of responses: ``` ### /api/delete_old -deletes old vecotstores +Deletes old vecotstores: ```js // Task status (GET http://127.0.0.1:5000/api/docs_check) fetch("http://localhost:5001/api/task_status?task_id=b2d2a0f4-387c-44fd-a443-e4fe2e7454d1", { @@ -146,7 +145,8 @@ fetch("http://localhost:5001/api/task_status?task_id=b2d2a0f4-387c-44fd-a443-e4f .then((res) => res.text()) .then(console.log.bind(console)) ``` -response: + +Response: ```json { "status": "ok" } diff --git a/docs/pages/Extensions/Chatwoot-extension.md b/docs/pages/Extensions/Chatwoot-extension.md index 09420f45..4dd57820 100644 --- a/docs/pages/Extensions/Chatwoot-extension.md +++ b/docs/pages/Extensions/Chatwoot-extension.md @@ -1,9 +1,8 @@ ### To start chatwoot extension: -1. Prepare and start the DocsGPT itself (load your documentation too) -Follow our [wiki](https://github.com/arc53/DocsGPT/wiki) to start it and to [ingest](https://github.com/arc53/DocsGPT/wiki/How-to-train-on-other-documentation) data -2. Go to chatwoot, Navigate to your profile (bottom left), click on profile settings, scroll to the bottom and copy Access Token -2. Navigate to `/extensions/chatwoot`. Copy .env_sample and create .env file -3. Fill in the values +1. Prepare and start the DocsGPT itself (load your documentation too). Follow our [wiki](https://github.com/arc53/DocsGPT/wiki) to start it and to [ingest](https://github.com/arc53/DocsGPT/wiki/How-to-train-on-other-documentation) data. +2. Go to chatwoot, **Navigate** to your profile (bottom left), click on profile settings, scroll to the bottom and copy **Access Token**. +3. Navigate to `/extensions/chatwoot`. Copy `.env_sample` and create `.env` file. +4. Fill in the values. ``` docsgpt_url=