update: install script (#858)

This commit is contained in:
Fuegovic 2023-09-01 14:20:51 -04:00 committed by GitHub
parent 1cd0fd9d5a
commit 2b54e3f9fe
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -70,19 +70,11 @@ let env = {};
const key = await askQuestion('Enter your OPENAI_API_KEY (default: "user_provided"): '); const key = await askQuestion('Enter your OPENAI_API_KEY (default: "user_provided"): ');
env['OPENAI_API_KEY'] = key || 'user_provided'; env['OPENAI_API_KEY'] = key || 'user_provided';
// GPT4???
const gpt4 = await askQuestion('Do you have access to the GPT4 api (y/n)? Default: n');
if (gpt4 == 'y' || gpt4 == 'yes') {
env['OPENAI_MODELS'] = 'gpt-3.5-turbo,gpt-3.5-turbo-0301,text-davinci-003,gpt-4,gpt-4-0314';
} else {
env['OPENAI_MODELS'] = 'gpt-3.5-turbo,gpt-3.5-turbo-0301,text-davinci-003';
}
// Ask about mongodb // Ask about mongodb
const mongodb = await askQuestion( const mongodb = await askQuestion(
'What is your mongodb url? (default: mongodb://127.0.0.1:27017/LibreChat)', 'What is your mongodb url? (default: mongodb://127.0.0.1:27018/LibreChat)',
); );
env['MONGO_URI'] = mongodb || 'mongodb://127.0.0.1:27017/LibreChat'; env['MONGO_URI'] = mongodb || 'mongodb://127.0.0.1:27018/LibreChat';
// Very basic check to make sure they entered a url // Very basic check to make sure they entered a url
if (!env['MONGO_URI'].includes('://')) { if (!env['MONGO_URI'].includes('://')) {
console.orange( console.orange(