mirror of
https://github.com/arc53/DocsGPT.git
synced 2025-11-29 08:33:20 +00:00
Enhancement: Updated Train other docs
This commit is contained in:
@@ -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**
|
||||

|
||||
|
||||
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=<your-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=<your-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 | |
|
||||
|:--------------------------------:|:------------------------------------------------------------------------------------------------------------------------------:|
|
||||
|
||||
Reference in New Issue
Block a user