abstract class for drift context

This commit is contained in:
Julian Whiting 2024-10-08 11:55:06 -04:00
parent f0d779f81a
commit 78d05856d2

View File

@ -4,7 +4,7 @@
"""Base classes for global and local context builders."""
from abc import ABC, abstractmethod
from typing import Any
import pandas as pd
from graphrag.query.context_builder.conversation_history import (
@ -33,3 +33,15 @@ class LocalContextBuilder(ABC):
**kwargs,
) -> tuple[str | list[str], dict[str, pd.DataFrame]]:
"""Build the context for the local search mode."""
class DRIFTContextBuilder(ABC):
"""Base class for DRIFT-search context builders."""
@abstractmethod
def build_primer_context(
self,
query: str,
**kwargs,
) -> pd.DataFrame:
"""Build the context for the primer search actions"""