👮feat: moderation text (#1388)

* fixed some bugs and handling errors better

* feat: plugins support

* fix: prettier error message

* moved circular-json-es6 in /api

* docs: added openai moderation text

* fix(gptPlugins): incorrect merge

* discarding changes

* removed circular-json-es6
This commit is contained in:
Marco Beretta 2024-01-01 21:08:02 +01:00 committed by GitHub
parent 1cd5fdf4f0
commit c7306395e9
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
9 changed files with 81 additions and 3 deletions

View file

@ -69,4 +69,29 @@ MESSAGE_IP_WINDOW=1 # in minutes, determines the window of time for MESSAGE_IP_M
LIMIT_MESSAGE_USER=false # Whether to limit the amount of messages an IP can send per MESSAGE_USER_WINDOW
MESSAGE_USER_MAX=40 # The max amount of messages an IP can send per MESSAGE_USER_WINDOW
MESSAGE_USER_WINDOW=1 # in minutes, determines the window of time for MESSAGE_USER_MAX messages
```
```
## OpenAI moderation text
### OPENAI_MODERATION
enable or disable OpenAI moderation
Values:
`true`: OpenAI moderation is enabled
`false`: OpenAI moderation is disabled
### OPENAI_MODERATION_API_KEY
Specify your OpenAI moderation API key here
### OPENAI_MODERATION_REVERSE_PROXY
enable or disable reverse proxy compatibility for OpenAI moderation. Note that it may not work with some reverse proxies
Values:
`true`: Enable reverse proxy compatibility
`false`: Disable reverse proxy compatibility
```bash
OPENAI_MODERATION=true
OPENAI_MODERATION_API_KEY=sk-1234
# OPENAI_MODERATION_REVERSE_PROXY=false
```