CoolFace
Apppublic

rk22012000/Agentic_QA_System

sourceHugging Facemitupdated 7mo agoView on Hugging Face
0likes
memory.py12 linesDownload Raw Back to root
1# memory/memory.py
2
3
4chat_history = []
5
6def add_to_memory(user_q: str, answer: str):
7    chat_history.append({"question": user_q, "answer": answer})
8
9def get_memory():
10    return chat_history[-5:]
11
12