Skip to content

Commit 094ca7a

Browse files
pre-commit-ci[bot]XuehaoSunashahba
authored
[pre-commit.ci] pre-commit autoupdate (#1771)
Signed-off-by: Sun, Xuehao <xuehao.sun@intel.com> Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> Co-authored-by: Sun, Xuehao <xuehao.sun@intel.com> Co-authored-by: Abolfazl Shahbazi <12436063+ashahba@users.noreply.github.com>
1 parent 398441a commit 094ca7a

File tree

3 files changed

+6
-6
lines changed

3 files changed

+6
-6
lines changed

.pre-commit-config.yaml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ repos:
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]

ChatQnA/chatqna.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff 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
### 你将扮演一个乐于助人、尊重他人并诚实的助手,你的目标是帮助用户解答问题。有效地利用来自本地知识库的搜索结果。确保你的回答中只包含相关信息。如果你不确定问题的答案,请避免分享不准确的信息。

GraphRAG/graphrag.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff 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
### 你将扮演一个乐于助人、尊重他人并诚实的助手,你的目标是帮助用户解答问题。有效地利用来自本地知识库的搜索结果。确保你的回答中只包含相关信息。如果你不确定问题的答案,请避免分享不准确的信息。

0 commit comments

Comments
 (0)