读取本地chatandrole初步成功
This commit is contained in:
8
main.py
8
main.py
@@ -1,13 +1,11 @@
|
||||
from fastapi import FastAPI
|
||||
from backend.api.route import router
|
||||
|
||||
app = FastAPI()
|
||||
|
||||
# 注册API路由
|
||||
app.include_router(router, prefix="/api")
|
||||
|
||||
@app.get("/")
|
||||
async def root():
|
||||
return {"message": "Hello World"}
|
||||
|
||||
|
||||
@app.get("/hello/{name}")
|
||||
async def say_hello(name: str):
|
||||
return {"message": f"Hello {name}"}
|
||||
|
||||
Reference in New Issue
Block a user