Source code for kusibot.chatbot.assesment_states.base_state

from __future__ import annotations
from abc import ABC, abstractmethod

[docs] class BaseState(ABC): """ Base class for all assessment states. """ @property def context(self): return self._context @context.setter def context(self, context): self._context = context
[docs] @abstractmethod def generate_response(self, user_input, conversation_id, assessment_id): """ Generate a response based on the user input and the current state of the assessment. Args: user_input: The input from the user. conversation_id: The ID of the current conversation. assessment_id: The ID of the current assessment. Returns: str: The response generated by the current state. """ pass