Support configuring model parameters in the front-end and storing them in localStorage.

This commit is contained in:
Rafi
2023-03-17 17:01:18 +08:00
parent 1f3a025918
commit 878fda0054
7 changed files with 234 additions and 20 deletions

View File

@@ -1,6 +1,15 @@
export const STORAGE_KEY = {
OPENAI_MODELS: 'openai_models',
CURRENT_OPENAI_MODEL: 'current_openai_model',
MODELS: 'models',
CURRENT_MODEL: 'current_model',
OPENAI_API_KEY: 'openai_api_key',
}
export const DEFAULT_MODEL = {
name: 'gpt-3.5-turbo',
frequency_penalty: 0.0,
presence_penalty: 0.0,
max_tokens: 1000,
temperature: 0.7,
top_p: 1.0
}