This is the code that we used in the June 28 Crafting Intelligent Python Apps with Retrieval-Augmented Generation Open Space. This is a command line interface (CLI) app but you can expand it to be a web service. This should run on a Windows PC but these instructions assume that you are using MacOS.
- Install Ollama on your computer
- Pull down this project from Github
- Navigate to the project folder in iterm2 (or Terminal)
- Pull down phi3
ollama pull phi3
- Pull down nomic-embed-text
ollama pull nomic-embed-text
- Set up your Python virtual environment
pip install virtualenv
(if needed)python3 -m venv ragdemo
source ragdemo/bin/activate
- Install LangChain, beautifulsoup4, tiktoken, and Chroma DB
pip install langchain_community
pip install beautifulsoup4
pip install tiktoken
pip install chromadb
- Run the app (making an actual query)
python3 app.py "What did apple announce?"
Feel free to contact me on Mastodon or Signal
Yeah, as of last month, you can. I wrote an article about how to do it.