feat:初始化工程
This commit is contained in:
22
main.py
Normal file
22
main.py
Normal file
@@ -0,0 +1,22 @@
|
||||
from dotenv import load_dotenv
|
||||
from fastapi import FastAPI
|
||||
from fastapi.middleware.cors import CORSMiddleware
|
||||
from router import router
|
||||
|
||||
# 初始化FastAPI
|
||||
app = FastAPI(
|
||||
title="Sweet Hut Agent",
|
||||
description="智能体",
|
||||
version="0.1.0"
|
||||
)
|
||||
|
||||
app.add_middleware(
|
||||
CORSMiddleware,
|
||||
allow_origins=["*"],
|
||||
allow_methods=["*"],
|
||||
allow_headers=["*"],
|
||||
)
|
||||
|
||||
load_dotenv()
|
||||
|
||||
app.include_router(router)
|
||||
Reference in New Issue
Block a user