From 82ca2e037889b358a431c1f89a95d415c42eb8be Mon Sep 17 00:00:00 2001 From: Stephen Hu <812791840@qq.com> Date: Mon, 10 Nov 2025 10:15:37 +0800 Subject: [PATCH] Refactor: QWenCV release temp path (#11122) ### What problem does this PR solve? QWenCV release temp path ### Type of change - [x] Refactoring --- rag/llm/cv_model.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/rag/llm/cv_model.py b/rag/llm/cv_model.py index 48d72ff40..cf57b720b 100644 --- a/rag/llm/cv_model.py +++ b/rag/llm/cv_model.py @@ -303,7 +303,9 @@ class QWenCV(GptV4): return call_api() except Exception as e2: raise RuntimeError(f"Both default and intl endpoint failed.\nFirst error: {e1}\nSecond error: {e2}") - + finally: + if tmp_path and tmp_path.exists(): + tmp_path.unlink() class HunyuanCV(GptV4):