From 7777c34b425519e872483f316f6f70ba9eb9d815 Mon Sep 17 00:00:00 2001 From: chenhe Date: Tue, 2 Jan 2024 12:26:25 +0800 Subject: [PATCH] fix --- .../model_providers/openai_api_compatible/_common.py | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) 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