21 lines
494 B
Python
21 lines
494 B
Python
from fastapi import FastAPI
|
|
import sys
|
|
from .api.endpoints import router as api_router
|
|
from .core.fastgpt_client import lifespan
|
|
from .core.logging_config import setup_logging
|
|
|
|
# Setup logging first
|
|
setup_logging()
|
|
|
|
app = FastAPI(
|
|
title="AI Accident Information Collection API",
|
|
description="AI Accident Information Collection API",
|
|
version="1.0.0",
|
|
lifespan=lifespan
|
|
)
|
|
|
|
@app.get("/")
|
|
def read_root():
|
|
return {"message": "Server is running."}
|
|
|
|
app.include_router(api_router) |