Add LLM configuration and pipeline execution
This commit is contained in:
+3
-2
@@ -12,8 +12,9 @@ from src.llm.processor import LLMProcessor
|
||||
|
||||
|
||||
class RAGManager:
|
||||
def __init__(self, persist_dir: str = "data/rag_index"):
|
||||
def __init__(self, persist_dir: str = "data/rag_index", llm_config: Optional[dict] = None):
|
||||
self.persist_dir = persist_dir
|
||||
self.llm_config = llm_config or {}
|
||||
self.db = chromadb.PersistentClient(path=self.persist_dir)
|
||||
self.collection_name = "phb_collection"
|
||||
|
||||
@@ -110,7 +111,7 @@ class RAGManager:
|
||||
if not nodes:
|
||||
return []
|
||||
|
||||
processor = LLMProcessor()
|
||||
processor = LLMProcessor(**self.llm_config)
|
||||
|
||||
# Construct the context from retrieved nodes
|
||||
context_text = "\n\n".join(
|
||||
|
||||
Reference in New Issue
Block a user