Hi π, these are some setup instructions for the app that lets store some notes for subjects π in S3 as vectordb and query it with Strands. You may checkout the code here.
First goto S3 >> Vector buckets, and create a vector bucket there and give it some name such as studynotes.
Create an index there with dimension 1024, this is going to be the size of the embedding vector.
Let's now clone the app and switch the directory.
git clone https://github.com/networkandcode/studynotes.git
cd studynotes
So we now have the following for our .env
file, add it here.
AWS_ACCESS_KEY_ID=
AWS_SECRET_ACCESS_KEY=
AWS_DEFAULT_REGION="us-west-2"
AWS_S3_VECTOR_BUCKET_NAME=studynotes
AWS_S3_VECTOR_INDEX_NAME=books
β‘ Run the app with uv/reflex.
uv run reflex run
Creating virtual environment at: .venv
App running at: http://localhost:3000/
Backend running at: http://0.0.0.0:8000
You can now access the app at http://localhost:3000/.
A few screenshots below.
Home page
Subjects
Upload notes
Chat
Ok, so that's it for the post. This was done mainly to see how we can use S3 vector with python for RAG. The code related to S3 vector operations is in this file. The app may not be perfect yet, needs some improvement.
Top comments (0)