From 9ec8d4e9232bb5a7f91a5ce3e6d18cc4fa969bb0 Mon Sep 17 00:00:00 2001 From: -LAN- Date: Sat, 21 Dec 2024 15:28:31 +0800 Subject: [PATCH] fix(retrieval_service): avoid to use exception Signed-off-by: -LAN- --- api/core/rag/datasource/retrieval_service.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/api/core/rag/datasource/retrieval_service.py b/api/core/rag/datasource/retrieval_service.py index b2141396d6dcc4..18f8d4e8392302 100644 --- a/api/core/rag/datasource/retrieval_service.py +++ b/api/core/rag/datasource/retrieval_service.py @@ -103,7 +103,7 @@ def retrieve( if exceptions: exception_message = ";\n".join(exceptions) - raise Exception(exception_message) + raise ValueError(exception_message) if retrieval_method == RetrievalMethod.HYBRID_SEARCH.value: data_post_processor = DataPostProcessor(