Skip to main content

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.

Credits

  1. Typer and Rich: CLI library and terminal formatting.
  2. Ollama: On-device language model inference.
  3. Langchain: Pipeline for language model inference.
  4. FAISS: Similarity Search and Vector Store library from Meta AI.

License

Apache-2.0

Metadata

Release files for lesa 0.1.0.7

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for lesa 0.1.0.7
File Size Uploaded
lesa-0.1.0.7.tar.gz 554.5 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for lesa 0.1.0.7
File Interpreter ABI Platform
lesa-0.1.0.7-py3-none-any.whl Python 3 none any Details

Total release size: 1.1 MB

Release files / lesa-0.1.0.7.tar.gz

Download URL lesa-0.1.0.7.tar.gz
Size 554.5 kB
Tags Source
SHA-256 checksum
How to use checksums
9b6d2a5c06f593603e5c67cfb45e907866980a4dd575a045c7c994d9cb03fe34
BLAKE2b-256 checksum
How to use checksums
275fa67eb2f43d0f39cbe647567630dc09dfc29721b9166851e7005c0337a3b4
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.0.1 CPython/3.12.8

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Jan 3, 2025.

Transparency log

Release files / lesa-0.1.0.7-py3-none-any.whl

Download URL lesa-0.1.0.7-py3-none-any.whl
Size 557.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
3856193113f3426681c82455d29ee00f32b91003dba3c6b1ebdd7e18d57de8a9
BLAKE2b-256 checksum
How to use checksums
f26768f1b4ef8883847c99ea70fe7cfedd3ff5019835918f6fc2b58c48dc6515
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.0.1 CPython/3.12.8

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Jan 3, 2025.

Transparency log

Release history Release notifications | RSS feed

This release

0.1.0.7 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page