fix: increase Quart RESPONSE_TIMEOUT and BODY_TIMEOUT for slow LLM responses
This commit is contained in:
parent
fa9b7b259c
commit
7cba57d34d
1 changed files with 5 additions and 0 deletions
|
|
@ -82,6 +82,11 @@ app.url_map.strict_slashes = False
|
|||
app.json_encoder = CustomJSONEncoder
|
||||
app.errorhandler(Exception)(server_error_response)
|
||||
|
||||
# Configure Quart timeouts for slow LLM responses (e.g., local Ollama on CPU)
|
||||
# Default Quart timeouts are 60 seconds which is too short for many LLM backends
|
||||
app.config["RESPONSE_TIMEOUT"] = int(os.environ.get("QUART_RESPONSE_TIMEOUT", 600))
|
||||
app.config["BODY_TIMEOUT"] = int(os.environ.get("QUART_BODY_TIMEOUT", 600))
|
||||
|
||||
## convince for dev and debug
|
||||
# app.config["LOGIN_DISABLED"] = True
|
||||
app.config["SESSION_PERMANENT"] = False
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue