chatgpt docs updates

This commit is contained in:
Slavi Pantaleev 2023-01-10 17:26:59 +02:00
parent 9ecca2cbb9
commit a96a22c925
2 changed files with 8 additions and 11 deletions

View File

@ -31,19 +31,19 @@ Add the following configuration to your `inventory/host_vars/matrix.DOMAIN/vars.
```yaml ```yaml
matrix_bot_chatgpt_enabled: true matrix_bot_chatgpt_enabled: true
# See instructions on # See instructions on
# https://www.npmjs.com/package/chatgpt # https://www.npmjs.com/package/chatgpt
matrix_bot_chatgpt_openai_email: '' matrix_bot_chatgpt_openai_email: ''
matrix_bot_chatgpt_openai_password: '' matrix_bot_chatgpt_openai_password: ''
matrix_bot_chatgpt_openai_login_type: google matrix_bot_chatgpt_openai_login_type: google
# With the @ and :DOMAIN, ie @SOMETHING:DOMAIN
matrix_bot_chatgpt_matrix_bot_username: '@bot.chatgpt:{{ matrix_domain }}' # This is the default username
# matrix_bot_chatgpt_matrix_bot_username_localpart: 'bot.chatgpt'
# Matrix access token (from bot user above) # Matrix access token (from bot user above)
# see: https://webapps.stackexchange.com/questions/131056/how-to-get-an-access-token-for-element-riot-matrix # see: https://webapps.stackexchange.com/questions/131056/how-to-get-an-access-token-for-element-riot-matrix
matrix_bot_chatgpt_matrix_access_token: '' matrix_bot_chatgpt_matrix_access_token: ''
matrix_bot_chatgpt_matrix_default_prefix: '!chatgpt '
matrix_bot_chatgpt_matrix_default_prefix_reply: false
matrix_bot_chatgpt_matrix_whitelist: ':{{ matrix_domain }}'
``` ```
You will need to get tokens for ChatGPT. You will need to get tokens for ChatGPT.
@ -54,13 +54,9 @@ You will need to get tokens for ChatGPT.
After configuring the playbook, run the [installation](installing.md) command again: After configuring the playbook, run the [installation](installing.md) command again:
```sh ```sh
ansible-playbook -i inventory/hosts setup.yml --tags=setup-all,start ansible-playbook -i inventory/hosts setup.yml --tags=install-all,start
``` ```
**Notes**:
- if you change the bot password (`matrix_bot_chatgpt_matrix_password` in your `vars.yml` file) subsequently, the bot user's credentials on the homeserver won't be updated automatically. If you'd like to change the bot user's password, use a tool like [synapse-admin](configuring-playbook-synapse-admin.md) to change it, and then update `matrix_bot_chatgpt_matrix_password` to let the bot know its new password
## Usage ## Usage

View File

@ -36,7 +36,8 @@ matrix_bot_chatgpt_openai_login_type: 'google' # OPENAI_LOGIN_TYPE="google"
# Defaults to "https://matrix.org" # Defaults to "https://matrix.org"
matrix_bot_chatgpt_matrix_homeserver_url: "{{ matrix_homeserver_container_url }}" # MATRIX_HOMESERVER_URL= matrix_bot_chatgpt_matrix_homeserver_url: "{{ matrix_homeserver_container_url }}" # MATRIX_HOMESERVER_URL=
# With the @ and :DOMAIN, ie @SOMETHING:DOMAIN, needs to be set, created manually beforehand. # With the @ and :DOMAIN, ie @SOMETHING:DOMAIN, needs to be set, created manually beforehand.
matrix_bot_chatgpt_matrix_bot_username: '@bot.chatgpt:{{ matrix_domain }}' # MATRIX_BOT_USERNAME= matrix_bot_chatgpt_matrix_bot_username_localpart: 'bot.chatgpt'
matrix_bot_chatgpt_matrix_bot_username: "@{{ matrix_bot_chatgpt_matrix_bot_username_localpart }}:{{ matrix_domain }}" # MATRIX_BOT_USERNAME=
# Set `MATRIX_BOT_PASSWORD` the bot will print an `MATRIX_ACCESS_TOKEN` to the terminal # Set `MATRIX_BOT_PASSWORD` the bot will print an `MATRIX_ACCESS_TOKEN` to the terminal
# or https://webapps.stackexchange.com/questions/131056/how-to-get-an-access-token-for-element-riot-matrix # or https://webapps.stackexchange.com/questions/131056/how-to-get-an-access-token-for-element-riot-matrix
matrix_bot_chatgpt_matrix_access_token: '' # MATRIX_ACCESS_TOKEN= matrix_bot_chatgpt_matrix_access_token: '' # MATRIX_ACCESS_TOKEN=