Skip to content

armgit / letta

Public Imported from GitHub
0

Platform for stateful agents: AI with advanced memory that can learn and self-improve over time.

Read from SQL - minimal changes

Shishir Patil8ac2d8010e11
diff --git a/README.md b/README.md
index d45190702..aa76123cd 100644
--- a/README.md
+++ b/README.md
@@ -122,6 +122,35 @@ While using MemGPT via the CLI you can run various commands:
send a memory warning system message to the agent
```
+## Use MemGPT to talk to your Database!
+
+MemGPT's archival memory let's you load your database and talk to it! To motivate this use-case, we have included a toy example.
+
+Consider the `test.db` already included in the repository.
+
+id | name | age
+--- | --- | ---
+1 | Alice | 30
+2 | Bob | 25
+3 | Charlie | 35
+
+To talk to this database, run:
+
+```sh
+python main_db.py
+```
+
+And then you can input the path to your database, and your query.
+
+```python
+Please enter the path to the database. test.db
+...
+Enter your message: How old is Bob?
+...
+🤖 Bob is 25 years old.
+```
+
+
### Support
* By default MemGPT will use `gpt-4`, so your API key will require `gpt-4` API access.
diff --git a/requirements.txt b/requirements.txt
index 051123506..a66f30436 100644
--- a/requirements.txt
+++ b/requirements.txt
@@ -11,3 +11,4 @@ numpy
absl-py
pybars3
faiss-cpu
+sqlite3
diff --git a/test.db b/test.db
new file mode 100644
index 000000000..d238b8edf
Binary files /dev/null and b/test.db differ