graphai.api.retrieval.schemas module

class graphai.api.retrieval.schemas.RetrievalRequest(*, text: str, index: str, filters: Dict[str, str] | None = None, limit: int = 10, return_scores: bool = False)

Bases: BaseModel

text: str
index: str
filters: Dict[str, str] | None
limit: int
return_scores: bool
model_config: ClassVar[ConfigDict] = {}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

class graphai.api.retrieval.schemas.RetrievalResponse(*, n_results: int, result: List[dict] | None, successful: bool)

Bases: BaseModel

n_results: int
result: List[dict] | None
successful: bool
model_config: ClassVar[ConfigDict] = {}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

class graphai.api.retrieval.schemas.RetrievalIndexType(*, index: str, filters: Dict[str, List[str | None]])

Bases: BaseModel

index: str
filters: Dict[str, List[str | None]]
model_config: ClassVar[ConfigDict] = {}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

class graphai.api.retrieval.schemas.RetrievalInfoResponse(*, indexes: List[RetrievalIndexType])

Bases: BaseModel

indexes: List[RetrievalIndexType]
model_config: ClassVar[ConfigDict] = {}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

class graphai.api.retrieval.schemas.ChunkRequest(*, text: str | Dict[int, str], chunk_size: int = 400, chunk_overlap: int = 100, one_chunk_per_page: bool = False)

Bases: BaseModel

text: str | Dict[int, str]
chunk_size: int
chunk_overlap: int
one_chunk_per_page: bool
model_config: ClassVar[ConfigDict] = {}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

class graphai.api.retrieval.schemas.ChunkResponse(*, split: List[str], full: str)

Bases: BaseModel

split: List[str]
full: str
model_config: ClassVar[ConfigDict] = {}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

class graphai.api.retrieval.schemas.AnonymizeRequest(*, text: str, lang: Literal['en', 'fr'] = 'en')

Bases: BaseModel

text: str
lang: Literal['en', 'fr']
model_config: ClassVar[ConfigDict] = {}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

class graphai.api.retrieval.schemas.AnonymizeResponse(*, result: str, successful: bool)

Bases: BaseModel

result: str
successful: bool
model_config: ClassVar[ConfigDict] = {}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].