Fix openai extension script.py - TypeError: '_Environ' object is not callable (#1753)

This commit is contained in:
Thireus ☠ 2023-05-03 13:51:49 +01:00 committed by GitHub
parent f54256e348
commit 4883e20fa7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -8,7 +8,7 @@ from modules import shared
from modules.text_generation import encode, generate_reply from modules.text_generation import encode, generate_reply
params = { params = {
'port': int(os.environ('OPENEDAI_PORT')) if 'OPENEDAI_PORT' in os.environ else 5001, 'port': int(os.environ.get('OPENEDAI_PORT')) if 'OPENEDAI_PORT' in os.environ else 5001,
} }
debug = True if 'OPENEDAI_DEBUG' in os.environ else False debug = True if 'OPENEDAI_DEBUG' in os.environ else False