mirror of
https://github.com/onyx-dot-app/onyx.git
synced 2026-10-23 11:53:08 -05:00
* ran bump-pydantic * replace root_validator with model_validator * mostly working. some alternate assistant error. changed root_validator and typing_extensions * working generation chat. changed type * replacing .dict with .model_dump * argument needed to bring model_dump up to parity with dict() * fix a fewremaining issues -- working with llama and gpt * updating requirements file * more requirement updates * more requirement updates * fix to make search work * return type fix: * half way tpyes change * fixes for mypy and pydantic: * endpoint fix * fix pydantic protected namespaces * it works! * removed unecessary None initializations * better logging * changed default values to empty lists * mypy fixes * fixed array defaulting --------- Co-authored-by: hagen-danswer <hagen@danswer.ai>
31 lines
625 B
Python
31 lines
625 B
Python
from pydantic import BaseModel
|
|
|
|
from danswer.server.query_and_chat.models import ChatSessionDetails
|
|
|
|
|
|
class FolderResponse(BaseModel):
|
|
folder_id: int
|
|
folder_name: str | None
|
|
display_priority: int
|
|
chat_sessions: list[ChatSessionDetails]
|
|
|
|
|
|
class GetUserFoldersResponse(BaseModel):
|
|
folders: list[FolderResponse]
|
|
|
|
|
|
class FolderCreationRequest(BaseModel):
|
|
folder_name: str | None = None
|
|
|
|
|
|
class FolderUpdateRequest(BaseModel):
|
|
folder_name: str | None = None
|
|
|
|
|
|
class FolderChatSessionRequest(BaseModel):
|
|
chat_session_id: int
|
|
|
|
|
|
class DeleteFolderOptions(BaseModel):
|
|
including_chats: bool = False
|