A web application that allows users to explore Rosicrucian teachings through a conversational interface. This application uses LlamaIndex to search through a collection of Rosicrucian documents and provide relevant answers to user questions.
- Conversational Interface: Ask questions about Rosicrucian philosophy, history, practices, or any related topic.
- Source Attribution: See the source documents that were used to generate each answer.
- Vector Search: Uses semantic search to find the most relevant content for each query.
- Beautiful UI: Clean, intuitive interface with a chat-like experience.
- Python 3.9 or higher
- OpenAI API key (for embeddings and completions)
- LlamaIndex index stored in a
./storagedirectory
-
Clone this repository:
git clone <repository-url> cd <repository-directory>
-
Install the required dependencies:
pip install -r requirements.txt
-
Set up your OpenAI API key:
export OPENAI_API_KEY=your-api-keyOr create a
.envfile in the root directory:OPENAI_API_KEY=your-api-key
-
Start the FastAPI backend:
python llama_index_api.py
This will start the API server on http://localhost:8000
-
In a new terminal, start the Streamlit frontend:
streamlit run rosicrucian_chat_app.py
This will start the web application on http://localhost:8501
-
Open your browser and navigate to http://localhost:8501 to use the application.
- Wait for the backend to initialize (this may take a few minutes as it loads the document index).
- Type your question in the input box and press Enter.
- View the response and the source documents that were used to generate it.
- Continue the conversation by asking follow-up questions.
- What are the key principles of Rosicrucian teachings?
- Who was Harvey Spencer Lewis?
- What is the significance of the Rose Cross symbol?
- How does Rosicrucian philosophy view reincarnation?
- What are the stages of initiation in Rosicrucianism?
The application consists of two main components:
- FastAPI Backend: Handles the loading of the LlamaIndex index and processes queries.
- Streamlit Frontend: Provides a user-friendly interface for interacting with the backend.
- To modify the appearance of the web application, edit the CSS in
rosicrucian_chat_app.py. - To change the sample questions, edit the
sample_questionslist inrosicrucian_chat_app.py. - To adjust the query parameters (e.g., number of sources), modify the
similarity_top_kparameter inllama_index_api.py.