mirror of
https://github.com/xtekky/gpt4free.git
synced 2025-12-06 02:30:41 -08:00
Update BrowserConfig port retrieval to handle non-integer values from environment variable
This commit is contained in:
parent
bca45481ea
commit
a4d0a10a4f
1 changed files with 1 additions and 1 deletions
|
|
@ -103,7 +103,7 @@ async def lifespan(app: FastAPI):
|
|||
AppConfig.g4f_api_key = os.environ.get("G4F_API_KEY", AppConfig.g4f_api_key)
|
||||
AppConfig.timeout = os.environ.get("G4F_TIMEOUT", AppConfig.timeout)
|
||||
AppConfig.stream_timeout = os.environ.get("G4F_STREAM_TIMEOUT", AppConfig.stream_timeout)
|
||||
BrowserConfig.port = int(os.environ.get("G4F_BROWSER_PORT", BrowserConfig.port))
|
||||
BrowserConfig.port = os.environ.get("G4F_BROWSER_PORT", BrowserConfig.port)
|
||||
BrowserConfig.host = os.environ.get("G4F_BROWSER_HOST", BrowserConfig.host)
|
||||
if BrowserConfig.port:
|
||||
print(f"Using browser: {BrowserConfig.host}:{BrowserConfig.port}")
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue