From 9f0845d5d549b8c58bacd376e1c0d94b4ffe31c7 Mon Sep 17 00:00:00 2001 From: takatost Date: Sun, 22 Oct 2023 03:02:17 +0800 Subject: [PATCH 1/2] fix: return wrong when init 0 quota in trial provider --- api/core/model_providers/model_provider_factory.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/api/core/model_providers/model_provider_factory.py b/api/core/model_providers/model_provider_factory.py index 77f77573475a1c..985dc274b37762 100644 --- a/api/core/model_providers/model_provider_factory.py +++ b/api/core/model_providers/model_provider_factory.py @@ -211,6 +211,9 @@ def _get_preferred_provider(cls, tenant_id: str, model_provider_name: str): Provider.quota_type == ProviderQuotaType.TRIAL.value ).first() + if provider.quota_limit == 0: + return None + return provider no_system_provider = True From 324c7ae1dcfc76c95d15f6003467634689f84a9b Mon Sep 17 00:00:00 2001 From: takatost Date: Sun, 22 Oct 2023 17:14:52 +0800 Subject: [PATCH 2/2] fix: hex problem in docker-compose.yaml --- docker/docker-compose.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docker/docker-compose.yaml b/docker/docker-compose.yaml index ab5c91fa730515..cd2c3966321a50 100644 --- a/docker/docker-compose.yaml +++ b/docker/docker-compose.yaml @@ -19,7 +19,7 @@ services: # different from api or web app domain. # example: http://cloud.dify.ai CONSOLE_API_URL: '' - # The URL for Service API endpoints,refers to the base URL of the current API service if api domain is + # The URL for Service API endpoints, refers to the base URL of the current API service if api domain is # different from console domain. # example: http://api.dify.ai SERVICE_API_URL: ''