Update doc formatting and fix some spelling.

This commit is contained in:
Roman Zhukov
2023-10-05 20:27:48 +03:00
parent d13e5e7e3f
commit d37885ea88
8 changed files with 68 additions and 69 deletions

View File

@@ -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=<docsgpt_api_url>
@@ -12,18 +11,19 @@ docsgpt_key=<openai_api_key or other llm key>
chatwoot_token=<from part 2>
```
4. start with `flask run` command
5. Start with `flask run` command.
If you want for bot to stop responding to questions for a specific user or session just add label `human-requested` in your conversation
If you want for bot to stop responding to questions for a specific user or session just add label `human-requested` in your conversation.
### Optional (extra validation)
In app.py uncomment lines 12-13 and 71-75
In `app.py` uncomment lines 12-13 and 71-75
in your .env file add:
in your `.env` file add:
`account_id=(optional) 1 `
```
account_id=(optional) 1
assignee_id=(optional) 1
```
`assignee_id=(optional) 1`
Those are chatwoot values and will allow you to check if you are responding to correct widget and responding to questions assigned to specific user
Those are chatwoot values and will allow you to check if you are responding to correct widget and responding to questions assigned to specific user.

View File

@@ -1,7 +1,7 @@
### How to set up react docsGPT widget on your website:
### Installation
Got to your project and install a new dependency: `npm install docsgpt`
Got to your project and install a new dependency: `npm install docsgpt`.
### Usage
Go to your project and in the file where you want to use the widget import it:
@@ -14,9 +14,9 @@ import "docsgpt/dist/style.css";
Then you can use it like this: `<DocsGPTWidget />`
DocsGPTWidget takes 3 props:
- `apiHost` - url of your DocsGPT API
- `selectDocs` - documentation that you want to use for your widget (eg. `default` or `local/docs1.zip`)
- `apiKey` - usually its empty
- `apiHost` url of your DocsGPT API.
- `selectDocs` documentation that you want to use for your widget (eg. `default` or `local/docs1.zip`).
- `apiKey` usually its empty.
### How to use DocsGPTWidget with [Nextra](https://nextra.site/) (Next.js + MDX)
Install you widget as described above and then go to your `pages/` folder and create a new file `_app.js` with the following content: