fix(bioflow): main.py 加 load_dotenv 把 .env 注入 os.environ,修复规划 LLM 配置断层
This commit is contained in:
@@ -10,6 +10,13 @@
|
||||
from __future__ import annotations
|
||||
|
||||
import logging
|
||||
from pathlib import Path
|
||||
|
||||
from dotenv import load_dotenv
|
||||
|
||||
# 把 bioflow_service/.env 注入 os.environ(llm.py 等模块直读 DOCGEN_LLM_*,
|
||||
# 不走 pydantic-settings 的 env_file,避免「.env 配了但 os.environ 读不到」的配置断层)。
|
||||
load_dotenv(Path(__file__).resolve().parent.parent / ".env")
|
||||
from contextlib import asynccontextmanager
|
||||
|
||||
from fastapi import FastAPI
|
||||
|
||||
Reference in New Issue
Block a user