Allow setting QA_TIMEOUT from env var (#258)

Co-authored-by: Yuhong Sun <yuhongsun96@gmail.com>
This commit is contained in:
James Choncholas 2023-08-13 13:37:32 -04:00 committed by GitHub
parent b1bd0b42e5
commit 758015baa5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 1 deletions

View File

@ -115,7 +115,7 @@ NUM_RERANKED_RESULTS = 15
NUM_GENERATIVE_AI_INPUT_DOCS = 5
# 1 edit per 2 characters, currently unused due to fuzzy match being too slow
QUOTE_ALLOWED_ERROR_PERCENT = 0.05
QA_TIMEOUT = 10 # 10 seconds
QA_TIMEOUT = int(os.environ.get("QA_TIMEOUT", "10")) # 10 seconds
# Include additional document/chunk metadata in prompt to GenerativeAI
INCLUDE_METADATA = False

View File

@ -28,6 +28,7 @@ services:
- TYPESENSE_API_KEY=${TYPESENSE_API_KEY:-typesense_api_key}
- LOG_LEVEL=${LOG_LEVEL:-info}
- DISABLE_AUTH=${DISABLE_AUTH:-True}
- QA_TIMEOUT=${QA_TIMEOUT:-}
- OAUTH_TYPE=${OAUTH_TYPE:-google}
- OPENID_CONFIG_URL=${OPENID_CONFIG_URL:-}
- GOOGLE_OAUTH_CLIENT_ID=${GOOGLE_OAUTH_CLIENT_ID:-}