mirror of https://github.com/arc53/DocsGPT
You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
15 lines
419 B
Python
15 lines
419 B
Python
5 months ago
|
from application.retriever.classic_rag import ClassicRAG
|
||
|
|
||
|
|
||
|
|
||
|
class RetrieverCreator:
|
||
|
retievers = {
|
||
|
'classic': ClassicRAG,
|
||
|
}
|
||
|
|
||
|
@classmethod
|
||
|
def create_retriever(cls, type, *args, **kwargs):
|
||
|
retiever_class = cls.retievers.get(type.lower())
|
||
|
if not retiever_class:
|
||
|
raise ValueError(f"No retievers class found for type {type}")
|
||
|
return retiever_class(*args, **kwargs)
|