Skip to content

Commit

Permalink
Remove redundant docstrings
Browse files Browse the repository at this point in the history
Signed-off-by: Chihurumnaya Ibiam <[email protected]>
  • Loading branch information
chimosky committed Oct 22, 2024
1 parent 496feb2 commit 9a28f68
Showing 1 changed file with 0 additions and 7 deletions.
7 changes: 0 additions & 7 deletions rag_agent.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,19 +36,14 @@

class RAG_Agent:
def __init__(self, model="llama3.1"):
"""
Initialize the RAG agent with a default model like Llama3.1.
"""
self.model = OllamaLLM(model=model)
self.retriever = None
self.prompt = ChatPromptTemplate.from_template(PROMPT_TEMPLATE)

def set_model(self, model):
"""To Set a new model if needed."""
self.model = OllamaLLM(model=model)

def get_model(self):
"""Return the LLM model."""
return self.model

# Loading the docs for retrieval in Vector Database
Expand Down Expand Up @@ -105,8 +100,6 @@ def get_relevant_document(self, query, threshold=0.5):


def run(self):
"""Run the main logic of the RAG agent."""

# Format documents for context
def format_docs(docs):
return "\n\n".join(doc.page_content for doc in docs)
Expand Down

0 comments on commit 9a28f68

Please sign in to comment.