Skip to content

Commit

Permalink
fix python style
Browse files Browse the repository at this point in the history
  • Loading branch information
warren830 authored and crazywoola committed Dec 11, 2024
1 parent 368bd67 commit d8edd32
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions api/core/model_runtime/model_providers/bedrock/llm/llm.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@

# 3rd import
import boto3
from api.core.model_runtime.model_providers.bedrock.get_bedrock_client import get_bedrock_client
from botocore.config import Config
from botocore.exceptions import (
ClientError,
Expand All @@ -15,6 +16,7 @@
ServiceNotInRegionError,
UnknownServiceError,
)

# local import
from core.model_runtime.callbacks.base_callback import Callback
from core.model_runtime.entities.llm_entities import LLMResult, LLMResultChunk, LLMResultChunkDelta
Expand All @@ -40,8 +42,6 @@
from core.model_runtime.errors.validate import CredentialsValidateFailedError
from core.model_runtime.model_providers.__base.large_language_model import LargeLanguageModel

from api.core.model_runtime.model_providers.bedrock.get_bedrock_client import get_bedrock_client

logger = logging.getLogger(__name__)
ANTHROPIC_BLOCK_MODE_PROMPT = """You should always follow the instructions and output a valid {{block}} object.
The structure of the {{block}} object you can found in the instructions, use {"answer": "$your_answer"} as the default structure
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
from typing import Optional

from api.core.model_runtime.model_providers.bedrock.get_bedrock_client import get_bedrock_client

from core.model_runtime.entities.rerank_entities import RerankDocument, RerankResult
from core.model_runtime.errors.invoke import (
InvokeAuthorizationError,
Expand All @@ -12,8 +14,6 @@
from core.model_runtime.errors.validate import CredentialsValidateFailedError
from core.model_runtime.model_providers.__base.rerank_model import RerankModel

from api.core.model_runtime.model_providers.bedrock.get_bedrock_client import get_bedrock_client


class BedrockRerankModel(RerankModel):
"""
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,15 @@
import time
from typing import Optional

from api.core.model_runtime.model_providers.bedrock.get_bedrock_client import get_bedrock_client
from botocore.exceptions import (
ClientError,
EndpointConnectionError,
NoRegionError,
ServiceNotInRegionError,
UnknownServiceError,
)

from core.entities.embedding_type import EmbeddingInputType
from core.model_runtime.entities.model_entities import PriceType
from core.model_runtime.entities.text_embedding_entities import EmbeddingUsage, TextEmbeddingResult
Expand All @@ -23,8 +25,6 @@
)
from core.model_runtime.model_providers.__base.text_embedding_model import TextEmbeddingModel

from api.core.model_runtime.model_providers.bedrock.get_bedrock_client import get_bedrock_client

logger = logging.getLogger(__name__)


Expand Down

0 comments on commit d8edd32

Please sign in to comment.