mirror of
https://github.com/danny-avila/LibreChat.git
synced 2025-12-18 01:10:14 +01:00
feat: allow default gpt api model before frontend customization
This commit is contained in:
parent
39ff9c1bc2
commit
4a94ee7af8
2 changed files with 11 additions and 0 deletions
|
|
@ -1,5 +1,6 @@
|
|||
require('dotenv').config();
|
||||
const { KeyvFile } = require('keyv-file');
|
||||
const set = new Set(['gpt-4', 'text-davinci-003', 'gpt-3.5-turbo', 'gpt-3.5-turbo-0301']);
|
||||
|
||||
const clientOptions = {
|
||||
modelOptions: {
|
||||
|
|
@ -9,6 +10,10 @@ const clientOptions = {
|
|||
debug: false
|
||||
};
|
||||
|
||||
if (set.has(process.env.DEFAULT_API_GPT)) {
|
||||
clientOptions.modelOptions.model = process.env.DEFAULT_API_GPT;
|
||||
}
|
||||
|
||||
const askClient = async ({ text, onProgress, convo, abortController }) => {
|
||||
const ChatGPTClient = (await import('@waylaidwanderer/chatgpt-api')).default;
|
||||
const store = {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue