mirror of
https://github.com/open-webui/open-webui
synced 2025-06-04 03:37:35 +00:00
Update chats.py
Change to pass CI
This commit is contained in:
parent
bcc2d7233d
commit
af97737b0c
@ -33,6 +33,7 @@ class DatabaseType(Enum):
|
||||
Used by DatabaseAdapter to determine optimal query strategies and
|
||||
features available for each database backend.
|
||||
"""
|
||||
|
||||
SQLITE = "sqlite" # SQLite with JSON1 extension
|
||||
POSTGRESQL_JSON = "postgresql_json" # PostgreSQL with standard JSON
|
||||
POSTGRESQL_JSONB = "postgresql_jsonb" # PostgreSQL with binary JSONB
|
||||
@ -312,6 +313,7 @@ class ChatForm(BaseModel):
|
||||
Used for API endpoints that create new chat conversations.
|
||||
Validates that the required chat data structure is present.
|
||||
"""
|
||||
|
||||
chat: dict
|
||||
|
||||
|
||||
@ -325,6 +327,7 @@ class ChatImportForm(ChatForm):
|
||||
Extends ChatForm with optional metadata fields that are not
|
||||
required for basic chat creation but useful for import scenarios.
|
||||
"""
|
||||
|
||||
meta: Optional[dict] = {} # Tags and other metadata
|
||||
pinned: Optional[bool] = False # Pin status
|
||||
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
|
||||
independently, such as chat generation or title updates.
|
||||
"""
|
||||
|
||||
title: str
|
||||
messages: list[dict]
|
||||
|
||||
@ -348,6 +352,7 @@ class ChatTitleForm(BaseModel):
|
||||
Used by endpoints that only modify the chat title without
|
||||
affecting the conversation content or metadata.
|
||||
"""
|
||||
|
||||
title: str
|
||||
|
||||
|
||||
@ -362,6 +367,7 @@ class ChatResponse(BaseModel):
|
||||
Used by endpoints that return full chat information to ensure
|
||||
consistent response structure across the API.
|
||||
"""
|
||||
|
||||
# Core chat identification and data
|
||||
id: str
|
||||
user_id: str
|
||||
@ -390,6 +396,7 @@ class ChatTitleIdResponse(BaseModel):
|
||||
Used by endpoints that return chat lists, search results, or
|
||||
navigation menus where full chat content is not needed.
|
||||
"""
|
||||
|
||||
id: str
|
||||
title: str
|
||||
updated_at: int
|
||||
|
Loading…
Reference in New Issue
Block a user