diff --git a/api/core/model_runtime/model_providers/openai_api_compatible/_common.py b/api/core/model_runtime/model_providers/openai_api_compatible/_common.py index 6ba3c6f084156f..7a88d918ad7d84 100644 --- a/api/core/model_runtime/model_providers/openai_api_compatible/_common.py +++ b/api/core/model_runtime/model_providers/openai_api_compatible/_common.py @@ -1,5 +1,11 @@ +from decimal import Decimal import requests +from core.model_runtime.entities.common_entities import I18nObject +from core.model_runtime.entities.llm_entities import LLMMode +from core.model_runtime.entities.model_entities import AIModelEntity, DefaultParameterName, \ + FetchFrom, ModelPropertyKey, ModelType, ParameterRule, ParameterType, PriceConfig + from core.model_runtime.errors.invoke import InvokeConnectionError, InvokeServerUnavailableError, \ InvokeRateLimitError, InvokeAuthorizationError, InvokeBadRequestError, InvokeError @@ -35,8 +41,6 @@ def _invoke_error_mapping(self) -> dict[type[InvokeError], list[type[Exception]] requests.exceptions.ReadTimeout # Timeout ] } -<<<<<<< Updated upstream -======= def get_customizable_model_schema(self, model: str, credentials: dict) -> AIModelEntity: """ @@ -120,4 +124,3 @@ def get_customizable_model_schema(self, model: str, credentials: dict) -> AIMode raise ValueError(f"Unknown completion type {credentials['completion_type']}") return entity ->>>>>>> Stashed changes