diff --git a/api/.env.example b/api/.env.example index e12c76a229f16a..95c64f48524a5a 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 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