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

8 statements  

« prev     ^ index     » next       coverage.py v7.13.5, created at 2026-03-18 04:48 +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(default="http://localhost:6333", description="Qdrant server URL") 

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

16 collection_name: str = Field( 

17 default="documents", description="Qdrant collection name" 

18 ) 

19 

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

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

22 return { 

23 "url": self.url, 

24 "api_key": self.api_key, 

25 "collection_name": self.collection_name, 

26 }