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
WARNING! Although there is a key with this ID in the database it does not verify this commit! This commit is SUSPICIOUS.
GPG key ID: 4AEE18F83AFDEB23

View file

@ -8,7 +8,7 @@ from modules import shared
from modules.text_generation import encode, generate_reply
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