Coverage for src/qdrant_loader/config/source_config.py: 100%

8 statements  

« prev     ^ index     » next       coverage.py v7.8.2, created at 2025-06-04 05:50 +0000

1"""Base configuration for all source types.""" 

2 

3from pydantic import AnyUrl, BaseModel, ConfigDict, Field 

4 

5 

6class SourceConfig(BaseModel): 

7 """Base configuration for all source types.""" 

8 

9 source_type: str = Field(..., description="Type of the source") 

10 source: str = Field(..., description="Name of the source") 

11 base_url: AnyUrl = Field(..., description="Base URL of the source") 

12 

13 # File conversion settings 

14 enable_file_conversion: bool = Field( 

15 default=False, description="Enable file conversion for this connector" 

16 ) 

17 download_attachments: bool | None = Field( 

18 default=None, description="Download and process attachments (if applicable)" 

19 ) 

20 

21 model_config = ConfigDict(arbitrary_types_allowed=True, extra="allow")