From fac8c9ee4e569ba667893db5e4a39df4cfe118b6 Mon Sep 17 00:00:00 2001 From: 0xrahul6 <113128186+0xrahul6@users.noreply.github.com> Date: Mon, 30 Oct 2023 14:53:08 +0000 Subject: [PATCH] Enhancement: Updated Train other docs --- .../How-to-train-on-other-documentation.md | 32 +++++++++++-------- 1 file changed, 18 insertions(+), 14 deletions(-) diff --git a/docs/pages/Guides/How-to-train-on-other-documentation.md b/docs/pages/Guides/How-to-train-on-other-documentation.md index aa1ff41d..8ddfa564 100644 --- a/docs/pages/Guides/How-to-train-on-other-documentation.md +++ b/docs/pages/Guides/How-to-train-on-other-documentation.md @@ -1,43 +1,47 @@ ## How to train on other documentation -This AI can use any documentation, but first it needs to be prepared for similarity search. +This AI can utilize any documentation, but it requires preparation for similarity search. Follow these steps to get your documentation ready: + +**Step 1: Prepare Your Documentation** ![video-example-of-how-to-do-it](https://d3dg1063dc54p9.cloudfront.net/videos/how-to-vectorise.gif) Start by going to `/scripts/` folder. If you open this file, you will see that it uses RST files from the folder to create a `index.faiss` and `index.pkl`. -It currently uses OPEN_AI to create the vector store, so make sure your documentation is not too big. Pandas cost me around $3-$4. +It currently uses OPENAI to create the vector store, so make sure your documentation is not too large. Using Pandas cost me around $3-$4. -You can usually find documentation on Github in `docs/` folder for most open-source projects. +You can typically find documentation on GitHub in the `docs/` folder for most open-source projects. -### 1. Find documentation in .rst/.md and create a folder with it in your scripts directory +### 1. Find documentation in .rst/.md format and create a folder with it in your scripts directory. - Name it `inputs/`. - Put all your .rst/.md files in there. - The search is recursive, so you don't need to flatten them. -If there are no .rst/.md files just convert whatever you find to .txt file and feed it. (don't forget to change the extension in script) +If there are no .rst/.md files, convert whatever you find to a .txt file and feed it. (Don't forget to change the extension in the script). -### 2. Create .env file in `scripts/` folder -And write your OpenAI API key inside -`OPENAI_API_KEY=`. +### Step 2: Configure Your OpenAI API Key +1. Create a .env file in the scripts/ folder. + - Add your OpenAI API key inside: OPENAI_API_KEY=. -### 3. Run scripts/ingest.py +### Step 3: Run the Ingestion Script `python ingest.py ingest` -It will tell you how much it will cost. +It will provide you with the estimated cost. -### 4. Move `index.faiss` and `index.pkl` generated in `scripts/output` to `application/` folder. +### Step 4: Move `index.faiss` and `index.pkl` generated in `scripts/output` to `application/` folder. -### 5. Run web app -Once you run it will use new context that is relevant to your documentation. -Make sure you select default in the dropdown in the UI. +### Step 5: Run the Web App +Once you run it, it will use new context relevant to your documentation.Make sure you select default in the dropdown in the UI. ## Customization You can learn more about options while running ingest.py by running: + - Make sure you select 'default' from the dropdown in the UI. +## Customization +You can learn more about options while running ingest.py by executing: `python ingest.py --help` | Options | | |:--------------------------------:|:------------------------------------------------------------------------------------------------------------------------------:|