feat(solaris): add session models to db

This commit is contained in:
h
2025-07-06 00:08:43 +03:00
parent 41927a1e07
commit 1b52c7fdca

View File

@@ -0,0 +1,21 @@
from typing import Annotated, List
from beanie import Document, Indexed
from google.genai.types import Content
from pydantic import BaseModel, Field
class SessionBase(BaseModel):
chat_id: Annotated[int, Indexed(unique=True)]
system_prompt: str
history: List[Content] = Field(default_factory=list)
class ReviewSession(SessionBase, Document):
class Settings:
name = "review_sessions"
class RespondSession(SessionBase, Document):
class Settings:
name = "respond_sessions"