lesa
[lee - saa]
• Old Norse
(v.) to read, to study, to learn
lesa
is a CLI tool built in Python that allows you to converse with your documents from the terminal, completely offline and on-device using Ollama. Open the terminal in the directory of your choice and start a conversation with any document!
To start a conversation with a document (.pdf
and .docx
for now), simply run:
lesa read path/to/your/document --page <page_number> (optional)
Or start a conversation with an already-embedded directory, run:
lesa chat
To embed all files from your current working directory, run:
lesa embed
This creates a .lesa
config folder in your current working directory that stores the embeddings of all the documents in the directory.
lesa
uses Ollama under the hood to utilize the power of large language models.
To install and setup Ollama, run the setup script setup-ollama.sh
.
curl -fsSL https://raw.githubusercontent.com/shxntanu/lesa/master/scripts/setup-ollama.sh | bash
This script automatically installs the Ollama CLI and pulls the default model (llama3.1:latest) for you. Then install the package using pip.
Simply install the package using pip:
pip install lesa
To upgrade to the latest version, run:
pip install -U lesa
We welcome contributions! If you'd like to improve lesa
or have any feedback, feel free to open an issue or submit a pull request.
Apache-2.0