Source code for chatbot_eval.bots.base

from __future__ import annotations

"""Abstract chatbot interface used by the evaluator and the app."""

from abc import ABC, abstractmethod

from chatbot_eval.types import BotResult


[docs] class BaseBot(ABC): """Minimal text-in/text-out bot contract.""" name: str
[docs] @abstractmethod def answer(self, question: str) -> BotResult: """Return the bot response for ``question``.""" raise NotImplementedError