From 6f4e2d5fb02dcbbed05b9e3e77b2d4e68fba03d5 Mon Sep 17 00:00:00 2001 From: ProseGuys <798770222@qq.com> Date: Wed, 27 Nov 2024 09:27:33 +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 e12c76a229f16a..b8899fc0bbd490 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=1 diff --git a/api/configs/feature/__init__.py b/api/configs/feature/__init__.py index ce9f8f2725dce9..2fdf151e038e1e 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 a9564976fc67ce..aa3c810d3faff0 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