fix:启动端口改由环境变量控制

This commit is contained in:
zcr
2026-01-27 10:33:35 +08:00
parent 3ca6b16eaf
commit 1bbb9c945e
3 changed files with 3 additions and 3 deletions

View File

@@ -17,7 +17,7 @@ class Settings(BaseSettings):
extra='ignore' # 忽略环境变量中多余的键
)
# 启动端口
SERVE_PROD: int = Field(default=8000, description='')
SERVE_PORT: int = Field(default=8000, description='')
# 调试配饰
LOCAL: int = Field(default=0, description="是否在本地运行1表示本地运行0表示生产环境运行")

View File

@@ -27,4 +27,4 @@ if __name__ == "__main__":
agent_api = LCAgent(enable_async=True, api_path='/api/v1/agent')
reface_api = ReFace(api_path='/api/v1/reface')
server = ls.LitServer([chat_boot_api, agent_api, reface_api])
server.run(port=settings.SERVE_PROD)
server.run(port=8000)