Praison AI
Enterprise
Agents
Bot
Use Cases
University
Docs
Where the fact is kept
Run
import sqlite3 from praisonaiagents.memory import FileMemory from praisonaiagents.memory.adapters import SqliteMemoryAdapter files = FileMemory(user_id="learner") files.add_long_term("The learner name is Nila.") database = SqliteMemoryAdapter(short_db="/tmp/uni-short.db", long_db="/tmp/uni-long.db") database.store_long_term("The learner name is Nila.") connection = sqlite3.connect("/tmp/uni-long.db") print("File") print(files.search("name")[0]["item"]["content"]) print("Table") print(connection.execute("SELECT name FROM sqlite_master WHERE type='table' AND name='long_term_memory'").fetchone()[0]) print("Row") print(connection.execute("SELECT content FROM long_term_memory").fetchone()[0])
Press Run. The result appears here.
Esc
Search in
All
Docs
University