From 30e9212db9d50f0228f2a36009509c1a037a091f Mon Sep 17 00:00:00 2001 From: Kevin Hu Date: Mon, 4 Aug 2025 13:34:34 +0800 Subject: [PATCH] Fix: enlarge the timeout limits. (#9201) ### What problem does this PR solve? #9189 ### Type of change - [x] Bug Fix (non-breaking change which fixes an issue) --- api/utils/api_utils.py | 2 +- graphrag/general/extractor.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/api/utils/api_utils.py b/api/utils/api_utils.py index 0bb0931cb..48be1ecae 100644 --- a/api/utils/api_utils.py +++ b/api/utils/api_utils.py @@ -687,7 +687,7 @@ def timeout(seconds: float | int = None, attempts: int = 2, *, exception: Option async def is_strong_enough(chat_model, embedding_model): - @timeout(30, 2) + @timeout(60, 2) async def _is_strong_enough(): nonlocal chat_model, embedding_model if embedding_model: diff --git a/graphrag/general/extractor.py b/graphrag/general/extractor.py index a6ceb1d1c..a49074c90 100644 --- a/graphrag/general/extractor.py +++ b/graphrag/general/extractor.py @@ -47,7 +47,7 @@ class Extractor: self._language = language self._entity_types = entity_types or DEFAULT_ENTITY_TYPES - @timeout(60*3) + @timeout(60*5) def _chat(self, system, history, gen_conf={}): hist = deepcopy(history) conf = deepcopy(gen_conf)