mirror of
https://github.com/eigent-ai/eigent.git
synced 2026-05-28 01:25:54 +00:00
update
This commit is contained in:
parent
0ba7026e29
commit
9149d227e9
2 changed files with 11 additions and 1 deletions
|
|
@ -1,8 +1,14 @@
|
|||
from fastapi import FastAPI
|
||||
from fastapi.middleware.cors import CORSMiddleware
|
||||
|
||||
from traceroot.integrations.fastapi import connect_fastapi
|
||||
|
||||
|
||||
|
||||
api = FastAPI()
|
||||
|
||||
api.add_middleware(
|
||||
CORSMiddleware, allow_origins=["*"], allow_credentials=True, allow_methods=["*"], allow_headers=["*"]
|
||||
)
|
||||
|
||||
connect_fastapi(api)
|
||||
|
|
|
|||
|
|
@ -19,10 +19,14 @@ from app.service.task import (
|
|||
get_task_lock,
|
||||
)
|
||||
|
||||
import traceroot
|
||||
|
||||
logger = traceroot.get_logger()
|
||||
|
||||
|
||||
router = APIRouter(tags=["chat"])
|
||||
|
||||
|
||||
@traceroot.trace()
|
||||
@router.post("/chat", name="start chat")
|
||||
def post(data: Chat, request: Request):
|
||||
load_dotenv(dotenv_path=data.env_path)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue