From 8f9125b08a7541280e1cf066d8c4ff6c4e69161f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=91=86=E8=90=8C=E9=97=B7=E6=B2=B9=E7=93=B6?= <253605712@qq.com> Date: Wed, 13 Mar 2024 13:00:46 +0800 Subject: [PATCH] fix:typo (#2808) --- api/core/model_runtime/entities/model_entities.py | 2 +- api/core/model_runtime/model_providers/__base/tts_model.py | 4 ++-- .../model_runtime/model_providers/azure_openai/_constant.py | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/api/core/model_runtime/entities/model_entities.py b/api/core/model_runtime/entities/model_entities.py index 60cb655c9899c8..7dfd811b4f6416 100644 --- a/api/core/model_runtime/entities/model_entities.py +++ b/api/core/model_runtime/entities/model_entities.py @@ -133,7 +133,7 @@ class ModelPropertyKey(Enum): DEFAULT_VOICE = "default_voice" VOICES = "voices" WORD_LIMIT = "word_limit" - AUDOI_TYPE = "audio_type" + AUDIO_TYPE = "audio_type" MAX_WORKERS = "max_workers" diff --git a/api/core/model_runtime/model_providers/__base/tts_model.py b/api/core/model_runtime/model_providers/__base/tts_model.py index 722d80c91e8236..22e546aad702a2 100644 --- a/api/core/model_runtime/model_providers/__base/tts_model.py +++ b/api/core/model_runtime/model_providers/__base/tts_model.py @@ -94,8 +94,8 @@ def _get_model_audio_type(self, model: str, credentials: dict) -> str: """ model_schema = self.get_model_schema(model, credentials) - if model_schema and ModelPropertyKey.AUDOI_TYPE in model_schema.model_properties: - return model_schema.model_properties[ModelPropertyKey.AUDOI_TYPE] + if model_schema and ModelPropertyKey.AUDIO_TYPE in model_schema.model_properties: + return model_schema.model_properties[ModelPropertyKey.AUDIO_TYPE] def _get_model_word_limit(self, model: str, credentials: dict) -> int: """ diff --git a/api/core/model_runtime/model_providers/azure_openai/_constant.py b/api/core/model_runtime/model_providers/azure_openai/_constant.py index 559442274e7860..dda02588126b56 100644 --- a/api/core/model_runtime/model_providers/azure_openai/_constant.py +++ b/api/core/model_runtime/model_providers/azure_openai/_constant.py @@ -628,7 +628,7 @@ class AzureBaseModel(BaseModel): }, ], ModelPropertyKey.WORD_LIMIT: 120, - ModelPropertyKey.AUDOI_TYPE: 'mp3', + ModelPropertyKey.AUDIO_TYPE: 'mp3', ModelPropertyKey.MAX_WORKERS: 5 }, pricing=PriceConfig( @@ -682,7 +682,7 @@ class AzureBaseModel(BaseModel): }, ], ModelPropertyKey.WORD_LIMIT: 120, - ModelPropertyKey.AUDOI_TYPE: 'mp3', + ModelPropertyKey.AUDIO_TYPE: 'mp3', ModelPropertyKey.MAX_WORKERS: 5 }, pricing=PriceConfig(