retrieval
RAG Retrieval package.
Modules:
-
base
–Base classes for retrieval.
-
file
–Base classes for retrieval.
-
text_splitter
–Package for classes about text splitter.
-
tools
–Tools for support retrieval classes.
Classes:
-
PDFPathRet
–PDFPathRet Retrieval class.
-
RetrievalBase
–Base Retrieval class.
-
StringRet
–String Retrieval class.
PDFPathRet
PDFPathRet(
source: Any,
splitter: TextSplitterBase = LangChainTextSplitter(
'RecursiveCharacterTextSplitter'
),
api_key: str = '',
cache: Optional[Cache] = None,
logs: dict[str, Any] = DEFAULT_LOGS,
)
Bases: FilePathRet
PDFPathRet Retrieval class.
Methods:
-
get
–Get the data from the source.
Source code in src/rago/retrieval/base.py
28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 |
|
get
Get the data from the source.
Source code in src/rago/retrieval/file.py
38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 |
|
RetrievalBase
RetrievalBase(
source: Any,
splitter: TextSplitterBase = LangChainTextSplitter(
'RecursiveCharacterTextSplitter'
),
api_key: str = '',
cache: Optional[Cache] = None,
logs: dict[str, Any] = DEFAULT_LOGS,
)
Bases: RagoBase
Base Retrieval class.
Methods:
-
get
–Get the data from the source.
Source code in src/rago/retrieval/base.py
28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 |
|
StringRet
StringRet(
source: Any,
splitter: TextSplitterBase = LangChainTextSplitter(
'RecursiveCharacterTextSplitter'
),
api_key: str = '',
cache: Optional[Cache] = None,
logs: dict[str, Any] = DEFAULT_LOGS,
)
Bases: RetrievalBase
String Retrieval class.
This is a very generic class that assumes that the input (source) is already a list of strings.
Methods:
-
get
–Get the data from the sources.
Source code in src/rago/retrieval/base.py
28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 |
|