File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 7474 name : Unused noqa
7575
7676 - repo : https://github.com/pycqa/isort
77- rev : 5.13.2
77+ rev : 6.0.1
7878 hooks :
7979 - id : isort
8080
@@ -100,7 +100,7 @@ repos:
100100 - prettier@3.2.5
101101
102102 - repo : https://github.com/psf/black.git
103- rev : 24.10 .0
103+ rev : 25.1 .0
104104 hooks :
105105 - id : black
106106 files : (.*\.py)$
@@ -114,15 +114,15 @@ repos:
114114 - black==24.10.0
115115
116116 - repo : https://github.com/codespell-project/codespell
117- rev : v2.3.0
117+ rev : v2.4.1
118118 hooks :
119119 - id : codespell
120120 args : [-w]
121121 additional_dependencies :
122122 - tomli
123123
124124 - repo : https://github.com/astral-sh/ruff-pre-commit
125- rev : v0.8.6
125+ rev : v0.11.4
126126 hooks :
127127 - id : ruff
128128 args : [--fix, --exit-non-zero-on-fix, --no-cache]
Original file line number Diff line number Diff line change @@ -25,7 +25,7 @@ class ChatTemplate:
2525 @staticmethod
2626 def generate_rag_prompt (question , documents ):
2727 context_str = "\n " .join (documents )
28- if context_str and len (re .findall ("[\u4E00 - \u9FFF ]" , context_str )) / len (context_str ) >= 0.3 :
28+ if context_str and len (re .findall ("[\u4e00 - \u9fff ]" , context_str )) / len (context_str ) >= 0.3 :
2929 # chinese context
3030 template = """
3131### 你将扮演一个乐于助人、尊重他人并诚实的助手,你的目标是帮助用户解答问题。有效地利用来自本地知识库的搜索结果。确保你的回答中只包含相关信息。如果你不确定问题的答案,请避免分享不准确的信息。
Original file line number Diff line number Diff line change @@ -26,7 +26,7 @@ class ChatTemplate:
2626 @staticmethod
2727 def generate_rag_prompt (question , documents ):
2828 context_str = "\n " .join (documents )
29- if context_str and len (re .findall ("[\u4E00 - \u9FFF ]" , context_str )) / len (context_str ) >= 0.3 :
29+ if context_str and len (re .findall ("[\u4e00 - \u9fff ]" , context_str )) / len (context_str ) >= 0.3 :
3030 # chinese context
3131 template = """
3232### 你将扮演一个乐于助人、尊重他人并诚实的助手,你的目标是帮助用户解答问题。有效地利用来自本地知识库的搜索结果。确保你的回答中只包含相关信息。如果你不确定问题的答案,请避免分享不准确的信息。
You can’t perform that action at this time.
0 commit comments