Compare commits

...

3 Commits

Author SHA1 Message Date
Rafi
47951851c5 fix(gen_title) add openaiApiKey to request body 2023-04-18 14:25:21 +08:00
Rafi
f1b5f8cf3c Add env var DEBUG to docker-compose.yml 2023-04-18 11:08:29 +08:00
Rafi
e6a8868f6c docs: Frugal Mode Control 2023-04-18 10:44:35 +08:00
4 changed files with 15 additions and 4 deletions

View File

@@ -20,6 +20,7 @@ services:
platform: linux/x86_64 platform: linux/x86_64
image: wongsaang/chatgpt-ui-wsgi-server:latest image: wongsaang/chatgpt-ui-wsgi-server:latest
environment: environment:
- DEBUG=${DEBUG:-False} # Whether to enable debug mode, default False
- APP_DOMAIN=${APP_DOMAIN:-localhost:9000} - APP_DOMAIN=${APP_DOMAIN:-localhost:9000}
- SERVER_WORKERS=3 # The number of worker processes for handling requests. - SERVER_WORKERS=3 # The number of worker processes for handling requests.
- WORKER_TIMEOUT=180 # Workers silent for more than this many seconds are killed and restarted. default 180s - WORKER_TIMEOUT=180 # Workers silent for more than this many seconds are killed and restarted. default 180s

View File

@@ -77,4 +77,8 @@ After deployment, there is an `open_registration` setting under `Chat->Settings`
## Web Search Function Control ## Web Search Function Control
This feature is disabled by default. You can enable it in the admin panel under `Chat->Settings`. There is a setting called `open_web_search`, set its value to `True`. This feature is disabled by default. You can enable it in the admin panel under `Chat->Settings`. There is a setting called `open_web_search`, set its value to `True`.
## Frugal Mode Control
This feature is enabled by default. You can disable it in the `Chat->Settings` section of the management backend. There is a setting called `open_frugal_mode_control` in Settings. Set its value to `False`.

View File

@@ -78,4 +78,8 @@ backend-wsgi-server:
## 网页搜索功能控制 ## 网页搜索功能控制
该功能默认处于关闭状态,你可以在管理后台的 `Chat->Settings` 中开启它,在 Settings 中有一个 `open_web_search` 的设置项,把它的值设置为 `True` 该功能默认处于关闭状态,你可以在管理后台的 `Chat->Settings` 中开启它,在 Settings 中有一个 `open_web_search` 的设置项,把它的值设置为 `True`
## 节俭模式控制
该功能默认处于开启状态,你可以在管理后台的 `Chat->Settings` 中关闭它,在 Settings 中有一个 `open_frugal_mode_control` 的设置项,把它的值设置为 `False`

View File

@@ -24,12 +24,14 @@ export const addConversation = (conversation) => {
export const genTitle = async (conversationId) => { export const genTitle = async (conversationId) => {
const { $i18n } = useNuxtApp() const { $i18n, $settings } = useNuxtApp()
const openaiApiKey = useApiKey()
const { data, error } = await useAuthFetch('/api/gen_title/', { const { data, error } = await useAuthFetch('/api/gen_title/', {
method: 'POST', method: 'POST',
body: { body: {
conversationId: conversationId, conversationId: conversationId,
prompt: $i18n.t('genTitlePrompt') prompt: $i18n.t('genTitlePrompt'),
openaiApiKey: $settings.open_api_key_setting === 'True' ? openaiApiKey.value : null,
} }
}) })
if (!error.value) { if (!error.value) {