Update lightrag_api_oracle_demo..py
This commit is contained in:
@@ -149,13 +149,13 @@ class Response(BaseModel):
|
|||||||
|
|
||||||
# API routes
|
# API routes
|
||||||
|
|
||||||
rag = None # 定义为全局对象
|
rag = None
|
||||||
|
|
||||||
|
|
||||||
@asynccontextmanager
|
@asynccontextmanager
|
||||||
async def lifespan(app: FastAPI):
|
async def lifespan(app: FastAPI):
|
||||||
global rag
|
global rag
|
||||||
rag = await init() # 在应用启动时初始化 `rag`
|
rag = await init()
|
||||||
print("done!")
|
print("done!")
|
||||||
yield
|
yield
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user