diff --git a/api/fly.toml b/api/fly.toml index 8c9f343..cf47e59 100644 --- a/api/fly.toml +++ b/api/fly.toml @@ -14,7 +14,7 @@ kill_timeout = "5s" [processes] api = "python -m uvicorn src.main:app --host 0.0.0.0 --port 8000" - deriver = "python -m src.harvester" + deriver = "python -m src.deriver" [[services]] auto_stop_machines = false diff --git a/api/src/harvester.py b/api/src/deriver.py similarity index 98% rename from api/src/harvester.py rename to api/src/deriver.py index 6785f29..6fbb760 100644 --- a/api/src/harvester.py +++ b/api/src/deriver.py @@ -104,7 +104,6 @@ async def process_user_message( collection_id: uuid.UUID, message_id: uuid.UUID, ): - # TODO get messages for the session async with SessionLocal() as db: messages_stmt = await crud.get_messages( db=db, app_id=app_id, user_id=user_id, session_id=session_id, reverse=True @@ -113,7 +112,7 @@ async def process_user_message( response = await db.execute(messages_stmt) messages = response.scalars().all() messages = messages[::-1] - contents = [m.content for m in messages] + # contents = [m.content for m in messages] # print(contents) facts = await derive_facts(messages, content) diff --git a/api/src/routers/sessions.py b/api/src/routers/sessions.py index 50a65f8..af17e72 100644 --- a/api/src/routers/sessions.py +++ b/api/src/routers/sessions.py @@ -1,6 +1,7 @@ import json -from typing import Optional import uuid +from typing import Optional + from fastapi import APIRouter, HTTPException, Request from fastapi_pagination import Page from fastapi_pagination.ext.sqlalchemy import paginate @@ -8,7 +9,6 @@ from src import agent, crud, schemas from src.dependencies import db - router = APIRouter( prefix="/apps/{app_id}/users/{user_id}/sessions", tags=["sessions"],