Coverage for src/app/usecases/chat_useCase.py: 100%
6 statements
« prev ^ index » next coverage.py v7.7.0, created at 2025-04-02 22:46 +0200
« prev ^ index » next coverage.py v7.7.0, created at 2025-04-02 22:46 +0200
1from abc import ABC, abstractmethod
2from models.question_model import QuestionModel
3from models.answer_model import AnswerModel
5class ChatUseCase(ABC):
7 @abstractmethod
8 def get_answer(self, question_model : QuestionModel) -> AnswerModel:
9 """
10 Retrieves an answer based on the user's question.
12 Args:
13 question_model (QuestionModel): The user's input question.
15 Returns:
16 AnswerModel: The generated answer based on the retrieved context.
18 Raises:
19 Exception: If an error occurs during the similarity search or answer generation.
20 """