Update chats.py

Change to pass CI
This commit is contained in:
PVBLIC Foundation 2025-05-30 20:21:21 -07:00 committed by GitHub
parent bcc2d7233d
commit af97737b0c
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -33,6 +33,7 @@ class DatabaseType(Enum):
Used by DatabaseAdapter to determine optimal query strategies and Used by DatabaseAdapter to determine optimal query strategies and
features available for each database backend. features available for each database backend.
""" """
SQLITE = "sqlite" # SQLite with JSON1 extension SQLITE = "sqlite" # SQLite with JSON1 extension
POSTGRESQL_JSON = "postgresql_json" # PostgreSQL with standard JSON POSTGRESQL_JSON = "postgresql_json" # PostgreSQL with standard JSON
POSTGRESQL_JSONB = "postgresql_jsonb" # PostgreSQL with binary JSONB POSTGRESQL_JSONB = "postgresql_jsonb" # PostgreSQL with binary JSONB
@ -312,6 +313,7 @@ class ChatForm(BaseModel):
Used for API endpoints that create new chat conversations. Used for API endpoints that create new chat conversations.
Validates that the required chat data structure is present. Validates that the required chat data structure is present.
""" """
chat: dict chat: dict
@ -325,6 +327,7 @@ class ChatImportForm(ChatForm):
Extends ChatForm with optional metadata fields that are not Extends ChatForm with optional metadata fields that are not
required for basic chat creation but useful for import scenarios. required for basic chat creation but useful for import scenarios.
""" """
meta: Optional[dict] = {} # Tags and other metadata meta: Optional[dict] = {} # Tags and other metadata
pinned: Optional[bool] = False # Pin status pinned: Optional[bool] = False # Pin status
folder_id: Optional[str] = None # Folder assignment folder_id: Optional[str] = None # Folder assignment
@ -337,6 +340,7 @@ class ChatTitleMessagesForm(BaseModel):
Used by endpoints that work with chat titles and message lists Used by endpoints that work with chat titles and message lists
independently, such as chat generation or title updates. independently, such as chat generation or title updates.
""" """
title: str title: str
messages: list[dict] messages: list[dict]
@ -348,6 +352,7 @@ class ChatTitleForm(BaseModel):
Used by endpoints that only modify the chat title without Used by endpoints that only modify the chat title without
affecting the conversation content or metadata. affecting the conversation content or metadata.
""" """
title: str title: str
@ -362,6 +367,7 @@ class ChatResponse(BaseModel):
Used by endpoints that return full chat information to ensure Used by endpoints that return full chat information to ensure
consistent response structure across the API. consistent response structure across the API.
""" """
# Core chat identification and data # Core chat identification and data
id: str id: str
user_id: str user_id: str
@ -390,6 +396,7 @@ class ChatTitleIdResponse(BaseModel):
Used by endpoints that return chat lists, search results, or Used by endpoints that return chat lists, search results, or
navigation menus where full chat content is not needed. navigation menus where full chat content is not needed.
""" """
id: str id: str
title: str title: str
updated_at: int updated_at: int