Skip to content

Latest commit

 

History

History
86 lines (54 loc) · 2.51 KB

README.md

File metadata and controls

86 lines (54 loc) · 2.51 KB

Banner

Python PyPI - Version PyPI Downloads

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!

Usage

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

Embed

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.

Setup

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.

Installation

Simply install the package using pip:

pip install lesa

To upgrade to the latest version, run:

pip install -U lesa

Contribute

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.

License

Apache-2.0