From 66e4113e0b4d674620d86c3431c79a2739944c13 Mon Sep 17 00:00:00 2001 From: Wang Date: Tue, 6 Aug 2024 16:04:51 +0800 Subject: [PATCH] fix: align limitation with env (#1819) ### What problem does this PR solve? try to process the large file will throw a File size exceeds error ### Type of change - [x] Refactoring Co-authored-by: Theta Wang (ncu) --- rag/settings.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rag/settings.py b/rag/settings.py index 08c19a815..3b4ce1b4e 100644 --- a/rag/settings.py +++ b/rag/settings.py @@ -30,7 +30,7 @@ try: except Exception as e: REDIS = {} pass -DOC_MAXIMUM_SIZE = 128 * 1024 * 1024 +DOC_MAXIMUM_SIZE = int(os.environ.get("MAX_CONTENT_LENGTH", 128 * 1024 * 1024)) # Logger LoggerFactory.set_directory(