forgot to test all config possibilities

This commit is contained in:
Cyberes 2023-09-25 17:23:43 -06:00
parent 30282479a0
commit 289b40181c
1 changed files with 3 additions and 4 deletions

View File

@ -95,15 +95,14 @@ openai.api_key = opts.openai_api_key
opts.admin_token = config['admin_token']
opts.openai_expose_our_model = config['openai_epose_our_model']
config["http_host"] = re.sub(r'http(?:s)?://', '', config["http_host"])
if opts.openai_expose_our_model and not opts.openai_api_key:
print('If you set openai_epose_our_model to false, you must set your OpenAI key in openai_api_key.')
sys.exit(1)
if config['http_host']:
redis.set('http_host', config['http_host'])
redis.set('base_client_api', f'{config["http_host"]}/{opts.frontend_api_client.strip("/")}')
http_host = re.sub(r'http(?:s)?://', '', config["http_host"])
redis.set('http_host', http_host)
redis.set('base_client_api', f'{http_host}/{opts.frontend_api_client.strip("/")}')
print('Set host to', redis.get('http_host', str))
opts.verify_ssl = config['verify_ssl']