Created ChatGPT (markdown)
parent
80ea6218ef
commit
cf34b06aa8
1 changed files with 58 additions and 0 deletions
58
ChatGPT.md
Normal file
58
ChatGPT.md
Normal file
|
@ -0,0 +1,58 @@
|
|||
sample `compose.yaml`
|
||||
```yaml
|
||||
services:
|
||||
app:
|
||||
image: hibobmaster/matrixchatgptbot:latest
|
||||
container_name: matrix_chatgpt_bot
|
||||
restart: unless-stopped
|
||||
# build:
|
||||
# context: .
|
||||
# dockerfile: ./Dockerfile
|
||||
env_file:
|
||||
- .env
|
||||
volumes:
|
||||
# use env file or config.json
|
||||
# - ./config.json:/app/config.json
|
||||
# use touch to create an empty file db, for persist database only
|
||||
- ./db:/app/db
|
||||
# import_keys path
|
||||
# - ./element-keys.txt:/app/element-keys.txt
|
||||
networks:
|
||||
- matrix_network
|
||||
api:
|
||||
# ChatGPT and Bing API
|
||||
image: hibobmaster/node-chatgpt-api:latest
|
||||
container_name: node-chatgpt-api
|
||||
restart: unless-stopped
|
||||
volumes:
|
||||
- ./settings.js:/app/settings.js
|
||||
networks:
|
||||
- matrix_network
|
||||
|
||||
networks:
|
||||
matrix_network:
|
||||
```
|
||||
|
||||
sample `config.json`
|
||||
```json
|
||||
{
|
||||
"homeserver": "https://matrix.qqs.tw",
|
||||
"user_id": "@lullap:xxxxx.org",
|
||||
"password": "xxxxxxxxxxxxxxxxxx",
|
||||
"device_id": "ECYEOKVPLG",
|
||||
"markdown_formatted": true,
|
||||
"openai_api_key": "xxxxxxxxxxxxxxxxxxxxxxxx",
|
||||
"api_endpoint": "http://api:3000/conversation"
|
||||
}
|
||||
```
|
||||
sample `.env`
|
||||
```env
|
||||
HOMESERVER="https://matrix.xxxxxx.xxxx"
|
||||
USER_ID="@lullap:xxxxxxxxxxxxx.xxx"
|
||||
PASSWORD="xxxxxxxxxxxxxxx"
|
||||
DEVICE_ID="xxxxxxxxxxxxxx"
|
||||
MARKDOWN_FORMATTED="true"
|
||||
OPENAI_API_KEY="xxxxxxxxxxxxxxxxx"
|
||||
API_ENDPOINT="http://api:3000/conversation"
|
||||
```
|
||||
sample `settings.js`, just copy from `settings.js.example`. (no need to edit but should exist)
|
Loading…
Reference in a new issue