A simple command-line tool to empower fast querying of local knowledge on your machine via CLI, built on top of the LlamaIndex.
LilPalantir is designed to facilitate quick and efficient access to a vast array of local knowledge. It leverages advanced AI models like GPT-3.5-Turbo and GPT-4-Turbo to interpret and respond to natural language queries, providing insights and information stored locally on your machine.
To get started, you can leverage the install.sh
script for MacOS and Linux, or install.bat
for Windows, to run a full install of all the requirements for the script to work out of the box. Remember to give the script execution rights by running chmod +x install.sh
on Linux and MacOS machines.
# For MacOS and Linux
chmod +x install.sh
./install.sh
# For Windows
install.bat
To feed information to LilPalantir, you need to provide a folder where your data resides. Use the loader.py
script to process this data.
loader.py /path/to/your/data/folder
The script will unpack and ingest all supported file types within the folder. The duration of this process depends on the volume of data. You will receive feedback when the ingestion is complete.
Once the data is ingested, you can query your local knowledge base using natural language with models like GPT-3.5-Turbo or GPT-4-Turbo. Use the query.py
script for this purpose.
query.py "your query here"
For example:
query.py "give a detailed explanation of what are the applications of LSTM?"
- Operating System: Ensure you are running MacOS or Linux.
- Python: Python 3.x is required. Check your Python version with
python3 --version
.
Refer to the error logs or console output if you encounter installation issues. Common errors might include permission denials or package conflicts.
- Remove any temporary files created during installation.
- Deactivate and remove the virtual environment if used.
deactivate
rm -rf venv
- You will be prompted to enter the OpenAI API key during setup.
- Confirm installations and updates when prompted.
Each installed package serves a specific role in the functionality of LilPalantir:
python-dotenv
: Manage environment variables.llama_index
: Core dependency for querying.- Other packages like
numpy
,pandas
,requests
, etc., provide various utilities for data handling and web interactions.