MCPcopy Create free account
hub / github.com/Nativu5/Gemini-FastAPI / create_app

Function create_app

app/main.py:89–104  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

87
88
89def 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

Callers 1

run.pyFile · 0.90

Calls 2

add_cors_middlewareFunction · 0.85
add_exception_handlerFunction · 0.85

Tested by

no test coverage detected