Spaces:
Runtime error
Runtime error
from typing import List, Optional | |
from pydantic import Field | |
from llm_engineering.domain.embedded_chunks import EmbeddedChunk | |
class EmbeddedVideoChunk(EmbeddedChunk): | |
# Video-specific required fields | |
video_id: str | |
start_time: float | |
end_time: float | |
frame_paths: List[str] | |
# Inherited fields with video defaults | |
platform: str = Field(default="video") | |
document_type: str = Field(default="video_segment") | |
# Optional inherited fields | |
document_id: Optional[str] = None | |
author_id: Optional[str] = None | |
author_full_name: Optional[str] = None | |
# Frame embeddings (initialize empty) | |
frame_embeddings: List[List[float]] = Field(default_factory=list) | |
# Main content embedding | |
embedding: List[float] | |
# Add explicit content field override | |
content: str = Field(..., description="Text content from subtitles") | |