()
| 87 | |
| 88 | |
| 89 | def create_app() -> FastAPI: |
| 90 | app = FastAPI( |
| 91 | title="Gemini API Server", |
| 92 | description="OpenAI-compatible API for Gemini Web", |
| 93 | version="1.0.0", |
| 94 | lifespan=lifespan, |
| 95 | ) |
| 96 | |
| 97 | add_cors_middleware(app) |
| 98 | add_exception_handler(app) |
| 99 | |
| 100 | app.include_router(health_router, tags=["Health"]) |
| 101 | app.include_router(chat_router, tags=["Chat"]) |
| 102 | app.include_router(images_router, tags=["Images"]) |
| 103 | |
| 104 | return app |
no test coverage detected