Praison AI
Bot
Use Cases
University
Docs
Get Started
A note is not a preference
Run
from praisonai import KeywordIndex, FileMemory lines = [ "Apples grow on trees in the orchard.", "The secret colour of the boat is blue.", ] index = KeywordIndex() index.add_documents(lines) memory = FileMemory(user_id="learner") memory.add_long_term("The learner name is Nila.") print("Note") print(index.query("What colour is the boat?", top_k=1)[0]["text"]) print("Memory") print(memory.search("name")[0]["item"]["content"])
Press Run. The result appears here.