Refactor analysis module.
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful

This commit is contained in:
Guillem Borrell 2024-07-28 17:37:25 +02:00
parent 8481ecc87e
commit 9dea79b4a4
6 changed files with 7 additions and 7 deletions

View file

@ -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",

View file

@ -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(

View file

@ -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)]})

View file

@ -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

View file

@ -1,7 +1,7 @@
from fastapi import APIRouter, status
from pydantic import BaseModel
router = APIRouter()
router = APIRouter(tags=["health"])
class HealthCheck(BaseModel):

View file

@ -12,7 +12,7 @@ from ..config import settings
# Scheme for the Authorization header
router = APIRouter()
router = APIRouter(tags=["sessions"])
@router.get("/new_session")