diff --git a/src/hellocomputer/main.py b/src/hellocomputer/main.py index f4ab99a..355d592 100644 --- a/src/hellocomputer/main.py +++ b/src/hellocomputer/main.py @@ -10,7 +10,7 @@ import hellocomputer from .auth import get_user from .config import settings -from .routers import analysis, auth, files, health, sessions +from .routers import auth, chat, files, health, sessions static_path = Path(hellocomputer.__file__).parent / "static" @@ -36,7 +36,7 @@ async def favicon(): app.include_router(health.router) app.include_router(sessions.router) app.include_router(files.router) -app.include_router(analysis.router) +app.include_router(chat.router) app.include_router(auth.router) app.mount( "/app", diff --git a/src/hellocomputer/routers/auth.py b/src/hellocomputer/routers/auth.py index 026e23d..c8cd533 100644 --- a/src/hellocomputer/routers/auth.py +++ b/src/hellocomputer/routers/auth.py @@ -6,7 +6,7 @@ from starlette.requests import Request from hellocomputer.config import StorageEngines, settings from hellocomputer.db.users import UserDB -router = APIRouter() +router = APIRouter(tags=["auth"]) oauth = OAuth() oauth.register( diff --git a/src/hellocomputer/routers/analysis.py b/src/hellocomputer/routers/chat.py similarity index 86% rename from src/hellocomputer/routers/analysis.py rename to src/hellocomputer/routers/chat.py index 3c3ce79..41bf4e2 100644 --- a/src/hellocomputer/routers/analysis.py +++ b/src/hellocomputer/routers/chat.py @@ -8,7 +8,7 @@ from hellocomputer.graph import app router = APIRouter() -@router.get("/query", response_class=PlainTextResponse, tags=["queries"]) +@router.get("/query", response_class=PlainTextResponse, tags=["chat"]) async def query(request: Request, sid: str = "", q: str = "") -> str: user = request.session.get("user") # noqa response = await app.ainvoke({"messages": [HumanMessage(content=q)]}) diff --git a/src/hellocomputer/routers/files.py b/src/hellocomputer/routers/files.py index 11da88d..2576d69 100644 --- a/src/hellocomputer/routers/files.py +++ b/src/hellocomputer/routers/files.py @@ -10,7 +10,7 @@ from ..db.sessions import SessionDB from ..db.users import OwnershipDB from ..auth import get_user_email -router = APIRouter() +router = APIRouter(tags=["files"]) # Configure the S3FS with your Google Cloud Storage credentials diff --git a/src/hellocomputer/routers/health.py b/src/hellocomputer/routers/health.py index 190669a..e923126 100644 --- a/src/hellocomputer/routers/health.py +++ b/src/hellocomputer/routers/health.py @@ -1,7 +1,7 @@ from fastapi import APIRouter, status from pydantic import BaseModel -router = APIRouter() +router = APIRouter(tags=["health"]) class HealthCheck(BaseModel): diff --git a/src/hellocomputer/routers/sessions.py b/src/hellocomputer/routers/sessions.py index 198bb97..5dbeae5 100644 --- a/src/hellocomputer/routers/sessions.py +++ b/src/hellocomputer/routers/sessions.py @@ -12,7 +12,7 @@ from ..config import settings # Scheme for the Authorization header -router = APIRouter() +router = APIRouter(tags=["sessions"]) @router.get("/new_session")