Skip to content

RAGFlow is an agent-native database: a Retrieval-Augmented Generation (RAG) engine that grew into context infrastructure.

Double check error of adding llm. (#5237)

Kevin Huef8847eda76e
diff --git a/api/apps/llm_app.py b/api/apps/llm_app.py
index ff78c65a0a..c982f4b364 100644
--- a/api/apps/llm_app.py
+++ b/api/apps/llm_app.py
@@ -230,7 +230,7 @@ def add_llm():
try:
m, tc = mdl.chat(None, [{"role": "user", "content": "Hello! How are you doing!"}], {
"temperature": 0.9})
- if not tc:
+ if not tc and m.find("**ERROR**:") >= 0:
raise Exception(m)
except Exception as e:
msg += f"\nFail to access model({mdl_nm})." + str(