PTE_Smart-AI / chatbot.py
JohnsonMLEngineer's picture
Upload 6 files
479a9a1 verified
raw
history blame contribute delete
186 Bytes
def chatbot_response(query, rag_chain):
try:
return rag_chain.invoke({"input": query})["answer"]
except Exception as e:
return f"Error processing query: {str(e)}"