From 5e618e1b95c6231f5d9f2b252de7f20c03d339c9 Mon Sep 17 00:00:00 2001 From: Fangyin Cheng Date: Fri, 12 Apr 2024 07:25:34 +0800 Subject: [PATCH] chore: Use new env key 'DBGPT_WEBSERVER_PORT' --- .env.template | 2 +- dbgpt/_private/config.py | 2 +- dbgpt/app/dbgpt_server.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.env.template b/.env.template index a8ba8d856..64b451265 100644 --- a/.env.template +++ b/.env.template @@ -10,7 +10,7 @@ #*******************************************************************# #** Webserver Port **# #*******************************************************************# -WEB_SERVER_PORT=5670 +# DBGPT_WEBSERVER_PORT=5670 #*******************************************************************# #*** LLM PROVIDER ***# diff --git a/dbgpt/_private/config.py b/dbgpt/_private/config.py index d4fa24f7c..07e1f0a89 100644 --- a/dbgpt/_private/config.py +++ b/dbgpt/_private/config.py @@ -26,7 +26,7 @@ def __init__(self) -> None: # Gradio language version: en, zh self.LANGUAGE = os.getenv("LANGUAGE", "en") - self.WEB_SERVER_PORT = int(os.getenv("WEB_SERVER_PORT", 5670)) + self.DBGPT_WEBSERVER_PORT = int(os.getenv("DBGPT_WEBSERVER_PORT", 5670)) self.debug_mode = False self.skip_reprompt = False diff --git a/dbgpt/app/dbgpt_server.py b/dbgpt/app/dbgpt_server.py index 7b63bc75b..da2cf8efc 100644 --- a/dbgpt/app/dbgpt_server.py +++ b/dbgpt/app/dbgpt_server.py @@ -140,7 +140,7 @@ def initialize_app(param: WebServerParameters = None, args: List[str] = None): model_name = param.model_name or CFG.LLM_MODEL param.model_name = model_name - param.port = param.port or CFG.WEB_SERVER_PORT + param.port = param.port or CFG.DBGPT_WEBSERVER_PORT if not param.port: param.port = 5670