From fe59b8b99c779be2d1c767a3b5019d1e63c48407 Mon Sep 17 00:00:00 2001 From: "raoha.rh" Date: Mon, 15 Apr 2024 21:19:39 +0800 Subject: [PATCH] feat: add custom layer --- server/main.py | 4 ---- server/routers/health_checker.py | 8 +------- 2 files changed, 1 insertion(+), 11 deletions(-) diff --git a/server/main.py b/server/main.py index cc2cb646..f68220d9 100644 --- a/server/main.py +++ b/server/main.py @@ -15,10 +15,6 @@ open_api_key = get_env_variable("OPENAI_API_KEY") is_dev = bool(get_env_variable("IS_DEV")) -task_root = get_env_variable("LAMBDA_TASK_ROOT") - -if task_root: - os.environ["NLTK_DATA"] = os.path.join(task_root, "nltk_data") app = FastAPI( title="Bo-meta Server", diff --git a/server/routers/health_checker.py b/server/routers/health_checker.py index b262075b..243b8b26 100644 --- a/server/routers/health_checker.py +++ b/server/routers/health_checker.py @@ -1,7 +1,4 @@ from fastapi import APIRouter, Depends, HTTPException -from uilts.env import get_env_variable - -task_root = get_env_variable("LAMBDA_TASK_ROOT") router = APIRouter( prefix="/api", @@ -11,7 +8,4 @@ @router.get("/health_checker") def health_checker(): - return { - "Hello": "World", - "task_root": task_root, - } \ No newline at end of file + return { "Hello": "World" } \ No newline at end of file