From a07a5e1cd44328cb5d09299f155518ddaf110788 Mon Sep 17 00:00:00 2001 From: ProseGuys <798770222@qq.com> Date: Wed, 27 Nov 2024 09:29:34 +0800 Subject: [PATCH] fix: adjust env's params --- api/.env.example | 2 +- api/configs/feature/__init__.py | 2 +- docker/docker-compose.yaml | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/api/.env.example b/api/.env.example index e12c76a229f16..95c64f48524a5 100644 --- a/api/.env.example +++ b/api/.env.example @@ -412,4 +412,4 @@ RESET_PASSWORD_TOKEN_EXPIRY_MINUTES=5 CREATE_TIDB_SERVICE_JOB_ENABLED=false -RETRIEVAL_TOP_N= +RETRIEVAL_TOP_N=0 \ No newline at end of file diff --git a/api/configs/feature/__init__.py b/api/configs/feature/__init__.py index ce9f8f2725dce..2fdf151e038e1 100644 --- a/api/configs/feature/__init__.py +++ b/api/configs/feature/__init__.py @@ -621,7 +621,7 @@ class DataSetConfig(BaseSettings): default=30, ) - RETRIEVAL_TOP_N: Optional[PositiveInt] = Field(description="number of retrieval top_n", default=None) + RETRIEVAL_TOP_N: int = Field(description="number of retrieval top_n", default=0) class WorkspaceConfig(BaseSettings): diff --git a/docker/docker-compose.yaml b/docker/docker-compose.yaml index a9564976fc67c..aa3c810d3faff 100644 --- a/docker/docker-compose.yaml +++ b/docker/docker-compose.yaml @@ -287,7 +287,7 @@ x-shared-env: &shared-api-worker-env OCEANBASE_CLUSTER_NAME: ${OCEANBASE_CLUSTER_NAME:-difyai} OCEANBASE_MEMORY_LIMIT: ${OCEANBASE_MEMORY_LIMIT:-6G} CREATE_TIDB_SERVICE_JOB_ENABLED: ${CREATE_TIDB_SERVICE_JOB_ENABLED:-false} - RETRIEVAL_TOP_N: ${RETRIEVAL_TOP_N:-} + RETRIEVAL_TOP_N: ${RETRIEVAL_TOP_N:-0} services: # API service