From 190eea70971f2b905826f0b58dcc3ef9677b9896 Mon Sep 17 00:00:00 2001 From: Kevin Hu Date: Fri, 11 Oct 2024 15:33:38 +0800 Subject: [PATCH] trival (#2808) ### What problem does this PR solve? ### Type of change - [x] Bug Fix (non-breaking change which fixes an issue) --- api/apps/llm_app.py | 2 +- rag/nlp/__init__.py | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/api/apps/llm_app.py b/api/apps/llm_app.py index cb4944963..432c21ff6 100644 --- a/api/apps/llm_app.py +++ b/api/apps/llm_app.py @@ -332,7 +332,7 @@ def my_llms(): @login_required def list_app(): self_deploied = ["Youdao","FastEmbed", "BAAI", "Ollama", "Xinference", "LocalAI", "LM-Studio"] - weighted = ["Youdao","FastEmbed", "BAAI"] if not LIGHTEN else [] + weighted = ["Youdao","FastEmbed", "BAAI"] if LIGHTEN != 0 else [] model_type = request.args.get("model_type") try: objs = TenantLLMService.query(tenant_id=current_user.id) diff --git a/rag/nlp/__init__.py b/rag/nlp/__init__.py index 0928ce442..4a8c9a73b 100644 --- a/rag/nlp/__init__.py +++ b/rag/nlp/__init__.py @@ -151,6 +151,7 @@ def qbullets_category(sections): maxium = h return res, QUESTION_PATTERN[res] + BULLET_PATTERN = [[ r"第[零一二三四五六七八九十百0-9]+(分?编|部分)", r"第[零一二三四五六七八九十百0-9]+章",