Skip to content

Commit 8002e8b

Browse files
[pre-commit.ci] pre-commit autoupdate (opea-project#1531)
Signed-off-by: Sun, Xuehao <[email protected]>
1 parent 0c106d9 commit 8002e8b

File tree

7 files changed

+10
-10
lines changed

7 files changed

+10
-10
lines changed

.pre-commit-config.yaml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ repos:
7575
name: Unused noqa
7676

7777
- repo: https://github.com/pycqa/isort
78-
rev: 5.13.2
78+
rev: 6.0.1
7979
hooks:
8080
- id: isort
8181

@@ -106,7 +106,7 @@ repos:
106106
minimum_pre_commit_version: "0"
107107

108108
- repo: https://github.com/psf/black.git
109-
rev: 24.10.0
109+
rev: 25.1.0
110110
hooks:
111111
- id: black
112112
files: (.*\.py)$
@@ -120,15 +120,15 @@ repos:
120120
- black==24.10.0
121121

122122
- repo: https://github.com/codespell-project/codespell
123-
rev: v2.3.0
123+
rev: v2.4.1
124124
hooks:
125125
- id: codespell
126126
args: [-w]
127127
additional_dependencies:
128128
- tomli
129129

130130
- repo: https://github.com/astral-sh/ruff-pre-commit
131-
rev: v0.8.6
131+
rev: v0.11.4
132132
hooks:
133133
- id: ruff
134134
args: [--fix, --exit-non-zero-on-fix, --no-cache]

comps/guardrails/src/hallucination_detection/integrations/template.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ class ChatTemplate:
99
@staticmethod
1010
def generate_rag_prompt(question, documents):
1111
context_str = "\n".join(documents)
12-
if context_str and len(re.findall("[\u4E00-\u9FFF]", context_str)) / len(context_str) >= 0.3:
12+
if context_str and len(re.findall("[\u4e00-\u9fff]", context_str)) / len(context_str) >= 0.3:
1313
# chinese context
1414
template = """
1515
### 你将扮演一个乐于助人、尊重他人并诚实的助手,你的目标是帮助用户解答问题。有效地利用来自本地知识库的搜索结果。确保你的回答中只包含相关信息。如果你不确定问题的答案,请避免分享不准确的信息。

comps/llms/src/text-generation/integrations/template.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ def generate_rag_prompt(question, documents, model=None):
1515
Context: {context}
1616
Answer: <|eot_id|><|start_header_id|>assistant<|end_header_id|>"""
1717
else:
18-
if context_str and len(re.findall("[\u4E00-\u9FFF]", context_str)) / len(context_str) >= 0.3:
18+
if context_str and len(re.findall("[\u4e00-\u9fff]", context_str)) / len(context_str) >= 0.3:
1919
# chinese context
2020
template = """
2121
### 你将扮演一个乐于助人、尊重他人并诚实的助手,你的目标是帮助用户解答问题。有效地利用来自本地知识库的搜索结果。确保你的回答中只包含相关信息。如果你不确定问题的答案,请避免分享不准确的信息。

comps/lvms/src/opea_lvm_microservice.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@
4444
)
4545
@register_statistics(names=["opea_service@lvm"])
4646
async def lvm(
47-
request: Union[LVMDoc, LVMSearchedMultimodalDoc, LVMVideoDoc]
47+
request: Union[LVMDoc, LVMSearchedMultimodalDoc, LVMVideoDoc],
4848
) -> Union[TextDoc, MetadataTextDoc]: # can also return a StreamingResponse but omit it in annotation for FastAPI
4949
start = time.time()
5050

comps/rerankings/src/opea_reranking_microservice.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@
4040
@opea_telemetry
4141
@register_statistics(names=["opea_service@reranking"])
4242
async def reranking(
43-
input: Union[SearchedMultimodalDoc, SearchedDoc, RerankingRequest, ChatCompletionRequest]
43+
input: Union[SearchedMultimodalDoc, SearchedDoc, RerankingRequest, ChatCompletionRequest],
4444
) -> Union[RerankedDoc, LLMParamsDoc, RerankingResponse, ChatCompletionRequest, LVMVideoDoc]:
4545
start = time.time()
4646

comps/retrievers/src/opea_retrievers_microservice.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@
5959
)
6060
@register_statistics(names=["opea_service@retrievers"])
6161
async def retrieve_docs(
62-
input: Union[EmbedDoc, EmbedMultimodalDoc, RetrievalRequest, ChatCompletionRequest]
62+
input: Union[EmbedDoc, EmbedMultimodalDoc, RetrievalRequest, ChatCompletionRequest],
6363
) -> Union[SearchedDoc, SearchedMultimodalDoc, RetrievalResponse, ChatCompletionRequest]:
6464
start = time.time()
6565

comps/third_parties/clip/src/clip_server.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ def filtler_dates(prompt):
7777
)
7878
@register_statistics(names=["opea_service@embedding_multimodal_clip"])
7979
async def embedding(
80-
input: Union[TextDoc, EmbeddingRequest, ChatCompletionRequest]
80+
input: Union[TextDoc, EmbeddingRequest, ChatCompletionRequest],
8181
) -> Union[EmbedDoc, EmbeddingResponse, ChatCompletionRequest]:
8282
if logflag:
8383
logger.info(input)

0 commit comments

Comments
 (0)