Skip to content

Base query engine

BaseQueryEngine

Bases: ABC

Source code in griptape/griptape/engines/query/base_query_engine.py
@define
class BaseQueryEngine(ABC):
    @abstractmethod
    def query(self, query: str, namespace: str | None = None, rulesets: list[Ruleset] | None = None) -> TextArtifact:
        ...

    @abstractmethod
    def load_artifacts(self, namespace: str) -> ListArtifact:
        ...

    @abstractmethod
    def upsert_text_artifact(self, artifact: TextArtifact, namespace: str | None = None) -> str:
        ...

    @abstractmethod
    def upsert_text_artifacts(self, artifacts: list[TextArtifact], namespace: str) -> None:
        ...

load_artifacts(namespace) abstractmethod

Source code in griptape/griptape/engines/query/base_query_engine.py
@abstractmethod
def load_artifacts(self, namespace: str) -> ListArtifact:
    ...

query(query, namespace=None, rulesets=None) abstractmethod

Source code in griptape/griptape/engines/query/base_query_engine.py
@abstractmethod
def query(self, query: str, namespace: str | None = None, rulesets: list[Ruleset] | None = None) -> TextArtifact:
    ...

upsert_text_artifact(artifact, namespace=None) abstractmethod

Source code in griptape/griptape/engines/query/base_query_engine.py
@abstractmethod
def upsert_text_artifact(self, artifact: TextArtifact, namespace: str | None = None) -> str:
    ...

upsert_text_artifacts(artifacts, namespace) abstractmethod

Source code in griptape/griptape/engines/query/base_query_engine.py
@abstractmethod
def upsert_text_artifacts(self, artifacts: list[TextArtifact], namespace: str) -> None:
    ...