File size: 901 Bytes
a22e84b
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
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")