Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Fix the issue of invalid port settings #1351

Merged
merged 1 commit into from
Mar 29, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion dbgpt/_private/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,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", 7860))
self.WEB_SERVER_PORT = int(os.getenv("WEB_SERVER_PORT", 5000))

self.debug_mode = False
self.skip_reprompt = False
Expand Down
2 changes: 1 addition & 1 deletion dbgpt/app/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -218,7 +218,7 @@ class WebServerParameters(BaseParameters):
default="0.0.0.0", metadata={"help": "Webserver deploy host"}
)
port: Optional[int] = field(
default=5000, metadata={"help": "Webserver deploy port"}
default=None, metadata={"help": "Webserver deploy port"}
)
daemon: Optional[bool] = field(
default=False, metadata={"help": "Run Webserver in background"}
Expand Down
4 changes: 4 additions & 0 deletions dbgpt/app/dbgpt_server.py
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,10 @@ 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
if not param.port:
param.port = 5000

print(param)

embedding_model_name = CFG.EMBEDDING_MODEL
Expand Down
Loading