Bloodraven / src /utils.py
Yadukrishnan's picture
Rename utils.py to src/utils.py
862f09c verified
raw
history blame
303 Bytes
def generate_response(question, retriever, llm_chain):
"""Generates a response using the RAG (retrieval-augmented generation) chain."""
rag_chain = {"context": retriever, "question": question}
response = llm_chain.invoke(rag_chain)
return response.split('cutresponsefromhereplease')[-1]