mirror of
https://github.com/basicmachines-co/basic-memory
synced 2026-06-21 13:47:35 +00:00
a4a3b1b689
Signed-off-by: Joe P <joe@basicmemory.com> Co-authored-by: Claude <noreply@anthropic.com> Co-authored-by: jope-bm <jope-bm@users.noreply.github.com>
36 lines
693 B
Python
36 lines
693 B
Python
"""Schemas for import services."""
|
|
|
|
from typing import Dict, Optional
|
|
|
|
from pydantic import BaseModel
|
|
|
|
|
|
class ImportResult(BaseModel):
|
|
"""Common import result schema."""
|
|
|
|
import_count: Dict[str, int]
|
|
success: bool
|
|
error_message: Optional[str] = None
|
|
|
|
|
|
class ChatImportResult(ImportResult):
|
|
"""Result schema for chat imports."""
|
|
|
|
conversations: int = 0
|
|
messages: int = 0
|
|
|
|
|
|
class ProjectImportResult(ImportResult):
|
|
"""Result schema for project imports."""
|
|
|
|
documents: int = 0
|
|
prompts: int = 0
|
|
|
|
|
|
class EntityImportResult(ImportResult):
|
|
"""Result schema for entity imports."""
|
|
|
|
entities: int = 0
|
|
relations: int = 0
|
|
skipped_entities: int = 0
|