mirror of
https://github.com/arc53/DocsGPT.git
synced 2025-11-30 09:03:15 +00:00
Update application files and fix LLM models, create new retriever class
This commit is contained in:
15
application/retriever/retriever_creator.py
Normal file
15
application/retriever/retriever_creator.py
Normal file
@@ -0,0 +1,15 @@
|
||||
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)
|
||||
Reference in New Issue
Block a user