Coverage for src/app/ports/add_chunks_port.py: 100%

5 statements  

« prev     ^ index     » next       coverage.py v7.7.0, created at 2025-04-02 22:46 +0200

1from abc import ABC, abstractmethod 

2from models.file_chunk_model import FileChunkModel 

3 

4class AddChunksPort(ABC): 

5 

6 @abstractmethod 

7 def load_chunks(self, chunks: list[FileChunkModel]): 

8 """ 

9 Load chunks into the FAISS repository. 

10 

11 Args: 

12 chunks (list[FileChunkModel]): A list of file chunk models to be loaded. 

13 

14 Raises: 

15 ValueError: If no chunks are provided. 

16 

17 Returns: 

18 str: Result of the loading process or an error message. 

19 """