From a55763b4da9208a58016147edb1ed7aff2a86595 Mon Sep 17 00:00:00 2001 From: BobMaster Date: Thu, 1 Jun 2023 08:24:57 +0800 Subject: [PATCH] Created ChatGPT Web (markdown) --- ChatGPT-Web.md | 61 ++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 61 insertions(+) create mode 100644 ChatGPT-Web.md diff --git a/ChatGPT-Web.md b/ChatGPT-Web.md new file mode 100644 index 0000000..ae6b11a --- /dev/null +++ b/ChatGPT-Web.md @@ -0,0 +1,61 @@ +Get `accessToken` from https://chat.openai.com/api/auth/session + +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 + + pandora: + image: pengzhile/pandora + container_name: pandora + restart: unless-stopped + environment: + - PANDORA_ACCESS_TOKEN=your_access_token_here + - PANDORA_SERVER=0.0.0.0:8008 + 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, + "pandora_api_endpoint": "http://pandora:8008", + "pandora_api_model": "text-davinci-002-render-sha-mobile" +} +``` + +sample `.env` +```env +HOMESERVER="https://matrix.xxxxxx.xxxx" +USER_ID="@lullap:xxxxxxxxxxxxx.xxx" +PASSWORD="xxxxxxxxxxxxxxx" +DEVICE_ID="xxxxxxxxxxxxxx" +MARKDOWN_FORMATTED="true" +PANDORA_API_ENDPOINT="http://pandora:8008" +PANDORA_API_MODEL="text-davinci-002-render-sha-mobile" +``` \ No newline at end of file