fix(solaris): proper SessionBase model to fix problems with parsing overrides when they are null

This commit is contained in:
h
2025-08-25 00:49:45 +03:00
parent 1d22cfd3db
commit d4b9282a74

View File

@@ -1,4 +1,4 @@
from typing import Annotated, List
from typing import Annotated, List, Optional
from beanie import Document, Indexed
from pydantic import BaseModel, Field
@@ -7,9 +7,9 @@ from pydantic_ai.messages import ModelMessage
class SessionBase(BaseModel):
chat_id: Annotated[int, Indexed(unique=True)]
system_prompt_override: str = None
system_prompt_override: Optional[str] = None
history: List[ModelMessage] = Field(default_factory=list)
api_key_override: str = None
api_key_override: Optional[str] = None
class __CommonSessionRepository(SessionBase, Document):