Skip to content

Commit

Permalink
Update config
Browse files Browse the repository at this point in the history
  • Loading branch information
memochou1993 committed Nov 18, 2023
1 parent 61972bd commit 7adf077
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 10 deletions.
17 changes: 14 additions & 3 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,16 @@
# Changelog

## 4.7.6 (2023-11-18)

### Bug Fixes

- Change default max groups to 1000
- Change default max users to 1000
- Change default max prompt messages to 4
- Change default max prompt tokens to 160
- Change default completion temperature to 1
- Change default completion max tokens to 64

## 4.7.5 (2023-10-01)

### Bug Fixes
Expand Down Expand Up @@ -73,7 +84,7 @@

### Bug Fixes

- Add default max tokens for chat completion api
- Add default max prompt tokens for chat completion api

## 4.4.0 (2023-03-08)

Expand Down Expand Up @@ -490,8 +501,8 @@

### Bug Fixes

- Update default max tokens to 160
- Update default max lines to 16
- Change default max completion tokens to 160
- Change default max prompt messages to 16

## 1.4.6 (2022-12-20)

Expand Down
14 changes: 7 additions & 7 deletions config/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,18 +14,18 @@ const config = Object.freeze({
APP_LANG: env.APP_LANG || 'zh_TW',
APP_WEBHOOK_PATH: env.APP_WEBHOOK_PATH || '/webhook',
APP_API_TIMEOUT: env.APP_API_TIMEOUT || 9000,
APP_MAX_GROUPS: Number(env.APP_MAX_GROUPS) || 5,
APP_MAX_USERS: Number(env.APP_MAX_USERS) || 100,
APP_MAX_PROMPT_MESSAGES: Number(env.APP_MAX_PROMPT_MESSAGES) || 12,
APP_MAX_PROMPT_TOKENS: Number(env.APP_MAX_PROMPT_TOKENS) || 1024,
APP_MAX_GROUPS: Number(env.APP_MAX_GROUPS) || 1000,
APP_MAX_USERS: Number(env.APP_MAX_USERS) || 1000,
APP_MAX_PROMPT_MESSAGES: Number(env.APP_MAX_PROMPT_MESSAGES) || 4,
APP_MAX_PROMPT_TOKENS: Number(env.APP_MAX_PROMPT_TOKENS) || 256,
APP_INIT_PROMPT: env.APP_INIT_PROMPT || '',
HUMAN_NAME: env.HUMAN_NAME || '',
HUMAN_INIT_PROMPT: env.HUMAN_INIT_PROMPT || '',
BOT_NAME: env.BOT_NAME || 'AI',
BOT_INIT_PROMPT: env.BOT_INIT_PROMPT || '',
BOT_TONE: env.BOT_TONE || '',
BOT_DEACTIVATED: env.BOT_DEACTIVATED === 'true' || false,
ERROR_MESSAGE_DISABLED: env.ERROR_MESSAGE_DISABLED === 'true' || /** @deprecated */ env.ERROR_TIMEOUT_DISABLED === 'true' || false,
ERROR_MESSAGE_DISABLED: env.ERROR_MESSAGE_DISABLED === 'true' || false,
VERCEL_ENV: env.VERCEL_ENV || null,
VERCEL_TIMEOUT: env.VERCEL_TIMEOUT || env.APP_API_TIMEOUT,
VERCEL_PROJECT_NAME: env.VERCEL_PROJECT_NAME || env.VERCEL_GIT_REPO_SLUG || null,
Expand All @@ -36,8 +36,8 @@ const config = Object.freeze({
OPENAI_API_KEY: env.OPENAI_API_KEY || null,
OPENAI_BASE_URL: env.OPENAI_BASE_URL || 'https://api.openai.com',
OPENAI_COMPLETION_MODEL: env.OPENAI_COMPLETION_MODEL || 'gpt-3.5-turbo',
OPENAI_COMPLETION_TEMPERATURE: Number(env.OPENAI_COMPLETION_TEMPERATURE) || 0.9,
OPENAI_COMPLETION_MAX_TOKENS: Number(env.OPENAI_COMPLETION_MAX_TOKENS) || 160,
OPENAI_COMPLETION_TEMPERATURE: Number(env.OPENAI_COMPLETION_TEMPERATURE) || 1,
OPENAI_COMPLETION_MAX_TOKENS: Number(env.OPENAI_COMPLETION_MAX_TOKENS) || 64,
OPENAI_COMPLETION_FREQUENCY_PENALTY: Number(env.OPENAI_COMPLETION_FREQUENCY_PENALTY) || 0,
OPENAI_COMPLETION_PRESENCE_PENALTY: Number(env.OPENAI_COMPLETION_PRESENCE_PENALTY) || 0.6,
OPENAI_COMPLETION_STOP_SEQUENCES: env.OPENAI_COMPLETION_STOP_SEQUENCES ? String(env.OPENAI_COMPLETION_STOP_SEQUENCES).split(',') : [' assistant:', ' user:'],
Expand Down

0 comments on commit 7adf077

Please sign in to comment.