Skip to content

Commit

Permalink
Rename to deriver
Browse files Browse the repository at this point in the history
  • Loading branch information
VVoruganti committed Mar 20, 2024
1 parent 6b04662 commit 6c92681
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 5 deletions.
2 changes: 1 addition & 1 deletion api/fly.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
3 changes: 1 addition & 2 deletions api/src/harvester.py → api/src/deriver.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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)
Expand Down
4 changes: 2 additions & 2 deletions api/src/routers/sessions.py
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
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

from src import agent, crud, schemas
from src.dependencies import db


router = APIRouter(
prefix="/apps/{app_id}/users/{user_id}/sessions",
tags=["sessions"],
Expand Down

0 comments on commit 6c92681

Please sign in to comment.