This is a RAG chatbot built with llamaindex, with an OpenAI compative API written in Flask. There is nothing special about it but the API was written to make it easy to use with Obsidian's Text Generator plugin.
Note: No encryption has been implemented in the API. The chat_server.py
server script is meant to serve the API on localhost on a private network, it is not meant to serve the API on the web (use at your own risk).
How to use:
- Open
create_db.py
andchat_server.py
and adjust the configuration (notably: API keys) - Create your vector storage with
create_db.py
- Optional: test the vector storage with
test_db.ipynb
- Optional: test the vector storage with
- Start your chatbot API server locally with
chat_server.py
- Optional: test the API server with
test_db.ipynb
- Optional: test the API server with
- If using Obsidian Text Generator, set your LLM provider as OpenAI and enter the chatbot API information there
See here for more detailed instructions.