From 4883e20fa71fc44b46d86ab0590752f32abaa63c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thireus=20=E2=98=A0?= Date: Wed, 3 May 2023 13:51:49 +0100 Subject: [PATCH] Fix openai extension script.py - TypeError: '_Environ' object is not callable (#1753) --- extensions/openai/script.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/extensions/openai/script.py b/extensions/openai/script.py index 58247917..f9373385 100644 --- a/extensions/openai/script.py +++ b/extensions/openai/script.py @@ -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