Updated Bing AI (markdown)
parent
fb1a2a4af9
commit
1fc04232f6
1 changed files with 34 additions and 9 deletions
43
Bing-AI.md
43
Bing-AI.md
|
@ -1,4 +1,6 @@
|
|||
sample compose.yaml
|
||||
Please carefully read the comments in the sample. <br>
|
||||
|
||||
sample `compose.yaml`
|
||||
```yaml
|
||||
services:
|
||||
app:
|
||||
|
@ -8,11 +10,15 @@ services:
|
|||
# build:
|
||||
# context: .
|
||||
# dockerfile: ./Dockerfile
|
||||
env_file:
|
||||
- .env
|
||||
volumes:
|
||||
- ./config.json:/app/config.json
|
||||
- ./bot:/app/bot
|
||||
# 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
|
||||
networks:
|
||||
- matrix_bot
|
||||
- matrix_network
|
||||
api:
|
||||
# bing api
|
||||
image: hibobmaster/node-chatgpt-api:latest
|
||||
|
@ -21,24 +27,43 @@ services:
|
|||
volumes:
|
||||
- ./settings.js:/var/chatgpt-api/settings.js
|
||||
networks:
|
||||
- matrix_bot
|
||||
- matrix_network
|
||||
|
||||
networks:
|
||||
matrix_bot:
|
||||
matrix_network:
|
||||
```
|
||||
sample config.js
|
||||
|
||||
sample `.env`
|
||||
```yaml
|
||||
# Please remove the option that is blank
|
||||
HOMESERVER="https://matrix.xxxxxx.xxxx" # required
|
||||
USER_ID="@lullap:xxxxxxxxxxxxx.xxx" # required
|
||||
PASSWORD="xxxxxxxxxxxxxxx" # Optional
|
||||
DEVICE_ID="xxxxxxxxxxxxxx" # required
|
||||
ROOM_ID="!FYCmBSkCRUXXXXXXXXX:matrix.XXX.XXX" # Optional, if not set, bot will work on the room it is in
|
||||
OPENAI_API_KEY="xxxxxxxxxxxxxxxxx" # Optional, for !chat and !gpt command
|
||||
BING_API_ENDPOINT="xxxxxxxxxxxxxxx" # Optional, for !bing command
|
||||
ACCESS_TOKEN="xxxxxxxxxxxxxxxxxxxxx" # Optional, use user_id and password is recommended
|
||||
JAILBREAKENABLED="true" # Optional
|
||||
```
|
||||
|
||||
|
||||
sample `config.json`
|
||||
```json
|
||||
{
|
||||
"homeserver": "https://xxxx",
|
||||
"user_id": "@lullap:xxxx",
|
||||
"password": "xxxxx",
|
||||
"device_id": "xxxxxx",
|
||||
"room_id": "!FYCmBSkCRUxxxxxx:xxxxx.xxxx",
|
||||
"api_key": "xxxxxxxx",
|
||||
"bing_api_endpoint": "http://api:3000/conversation"
|
||||
"bing_api_endpoint": "http://api:3000/conversation",
|
||||
"jailbreakEnabled": true,
|
||||
"access_token": "xxxxxxx"
|
||||
}
|
||||
```
|
||||
|
||||
sample settings.js
|
||||
sample `settings.js` , replace `bingAiClient->userToken` with your credentials
|
||||
```js
|
||||
export default {
|
||||
// Options for the Keyv cache, see https://www.npmjs.com/package/keyv.
|
||||
|
|
Loading…
Reference in a new issue