From ef8847eda76ee451ec76399c4c06185d9b7e096c Mon Sep 17 00:00:00 2001 From: Kevin Hu Date: Fri, 21 Feb 2025 19:09:49 +0800 Subject: [PATCH] Double check error of adding llm. (#5237) ### What problem does this PR solve? #5227 ### Type of change - [x] Bug Fix (non-breaking change which fixes an issue) --- api/apps/llm_app.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/api/apps/llm_app.py b/api/apps/llm_app.py index ff78c65a0..c982f4b36 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(