/ src / config / loader.py
loader.py
 1  """Document loader configuration."""
 2  
 3  from typing import Any
 4  
 5  from pydantic import Field
 6  from pydantic_settings import BaseSettings
 7  
 8  
 9  class LoaderConfig(BaseSettings):
10      """Document loader configuration."""
11  
12      file_type_mapping: list[dict[str, Any]] = Field(
13          description=(
14              "Mapping of file extensions to loader configuration. "
15              "List where each entry has 'extensions' (list of extensions), "
16              "'loader_name', and optional 'loader_config'. "
17              "Format: [{'extensions': ['.pdf', '.docx'], 'loader_name': '...', 'loader_config': {...}}, ...]"
18          ),
19      )
20