forgot to test all config possibilities
This commit is contained in:
parent
30282479a0
commit
289b40181c
|
@ -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']
|
||||
|
|
Reference in New Issue