Skip to content

datarobot_genai.core.memory.base

base

BaseMemoryClient

Bases: ABC

Source code in datarobot_genai/core/memory/base.py
class BaseMemoryClient(ABC):
    @abstractmethod
    async def retrieve(
        self,
        prompt: str,
        run_id: str | None = None,
        agent_id: str | None = None,
        app_id: str | None = None,
        attributes: dict[str, Any] | None = None,
    ) -> str:
        """Return relevant memory context as plain text."""
        raise NotImplementedError

    @abstractmethod
    async def store(
        self,
        user_message: str,
        run_id: str | None = None,
        agent_id: str | None = None,
        app_id: str | None = None,
        attributes: dict[str, Any] | None = None,
    ) -> None:
        """Persist conversation interaction."""
        raise NotImplementedError

retrieve abstractmethod async

retrieve(prompt: str, run_id: str | None = None, agent_id: str | None = None, app_id: str | None = None, attributes: dict[str, Any] | None = None) -> str

Return relevant memory context as plain text.

Source code in datarobot_genai/core/memory/base.py
@abstractmethod
async def retrieve(
    self,
    prompt: str,
    run_id: str | None = None,
    agent_id: str | None = None,
    app_id: str | None = None,
    attributes: dict[str, Any] | None = None,
) -> str:
    """Return relevant memory context as plain text."""
    raise NotImplementedError

store abstractmethod async

store(user_message: str, run_id: str | None = None, agent_id: str | None = None, app_id: str | None = None, attributes: dict[str, Any] | None = None) -> None

Persist conversation interaction.

Source code in datarobot_genai/core/memory/base.py
@abstractmethod
async def store(
    self,
    user_message: str,
    run_id: str | None = None,
    agent_id: str | None = None,
    app_id: str | None = None,
    attributes: dict[str, Any] | None = None,
) -> None:
    """Persist conversation interaction."""
    raise NotImplementedError