feat(solaris): add session models to db

This commit is contained in:
hh committed 2025-07-06 00:08:43 +03:00
1 parent 41927a1e07
commit 1b52c7fdca
1 file changed
+21
+21
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"