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

8 statements  

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

1"""Qdrant configuration settings. 

2 

3This module defines the Qdrant-specific configuration settings. 

4""" 

5 

6from pydantic import Field 

7 

8from qdrant_loader.config.base import BaseConfig 

9 

10 

11class QdrantConfig(BaseConfig): 

12 """Configuration for Qdrant vector database.""" 

13 

14 url: str = Field(..., description="Qdrant server URL") 

15 api_key: str | None = Field(default=None, description="Qdrant API key") 

16 collection_name: str = Field(..., description="Qdrant collection name") 

17 

18 def to_dict(self) -> dict[str, str | None]: 

19 """Convert the configuration to a dictionary.""" 

20 return { 

21 "url": self.url, 

22 "api_key": self.api_key, 

23 "collection_name": self.collection_name, 

24 }