Skip to content

Commit

Permalink
fix: black
Browse files Browse the repository at this point in the history
  • Loading branch information
Anhui-tqhuang committed Mar 21, 2024
1 parent 3b6dda1 commit 8d0e0cb
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions private_gpt/components/reranker/reranker.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,9 @@ class RerankerComponent(BaseNodePostprocessor):
"""

nodePostPorcesser: BaseNodePostprocessor = Field(description="BaseNodePostprocessor class.")
nodePostPorcesser: BaseNodePostprocessor = Field(
description="BaseNodePostprocessor class."
)

@inject
def __init__(self, settings: Settings) -> None:
Expand All @@ -31,7 +33,9 @@ def __init__(self, settings: Settings) -> None:

match settings.reranker.mode:
case "flagembedding":
logger.info("Initializing the reranker model in mode=%s", settings.reranker.mode)
logger.info(
"Initializing the reranker model in mode=%s", settings.reranker.mode
)

try:
from private_gpt.components.reranker.flagembedding_reranker import (
Expand All @@ -45,7 +49,9 @@ def __init__(self, settings: Settings) -> None:
nodePostPorcesser = FlagEmbeddingRerankerComponent(settings)

case _:
raise ValueError("Reranker mode not supported, currently only support flagembedding.")
raise ValueError(
"Reranker mode not supported, currently only support flagembedding."
)

super().__init__(
nodePostPorcesser=nodePostPorcesser,
Expand Down

0 comments on commit 8d0e0cb

Please sign in to comment.