From a546ffc3c2411e261f7bd2ee15a9b064b93dff9b Mon Sep 17 00:00:00 2001 From: CaptainB Date: Fri, 24 Jan 2025 15:50:28 +0800 Subject: [PATCH] fix: i18n azure llm mode --- .../models_provider/impl/azure_model_provider/credential/llm.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/setting/models_provider/impl/azure_model_provider/credential/llm.py b/apps/setting/models_provider/impl/azure_model_provider/credential/llm.py index f4ef928a9fc..77b3e703020 100644 --- a/apps/setting/models_provider/impl/azure_model_provider/credential/llm.py +++ b/apps/setting/models_provider/impl/azure_model_provider/credential/llm.py @@ -53,7 +53,7 @@ def is_valid(self, model_type: str, model_name, model_credential: Dict[str, obje return False try: model = provider.get_model(model_type, model_name, model_credential, **model_params) - model.invoke([HumanMessage(content=_('Hello'))]) + model.invoke([HumanMessage(content=gettext('Hello'))]) except Exception as e: if isinstance(e, AppApiException): raise e