Skip to content

Backend

Backend

Base class for agent backends.

Source code in mbodied/agents/backends/backend.py
18
19
20
21
22
23
24
25
26
27
class Backend:
    """Base class for agent backends."""

    @abstractmethod
    def predict(self, *args, **kwargs) -> str:
        raise NotImplementedError

    @abstractmethod
    def stream(self, *args, **kwargs) -> Generator[str, None, None]:
        raise NotImplementedError