mirror of
https://github.com/microsoft/graphrag.git
synced 2026-02-08 12:12:59 +08:00
abstract class for drift context
This commit is contained in:
parent
f0d779f81a
commit
78d05856d2
@ -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"""
|
||||
|
||||
Loading…
Reference in New Issue
Block a user