Skip to main content

Chat with Wikipedia

Project description

RAG-demo

Chat with (a small portion of) Wikipedia

⚠️ RAG functionality is still under development. ⚠️

app screenshot

Requirements

  1. uv
  2. At least one of the following:
    • A suitable terminal emulator. In particular, on macOS consider using iTerm2 instead of the default Terminal.app (explanation). On Linux, you might want to try kitty, wezterm, alacritty, or ghostty instead of the terminal that came with your DE (reason). Windows Terminal should be fine as far as I know.
    • Any common web browser

Optional stuff that could make your experience better

  1. Hugging Face login
  2. API key for your favorite LLM provider (support coming soon)
  3. Ollama installed on your system if you have a GPU
  4. Run RAG-demo on a more capable (bigger GPU) machine over SSH if you can. It is a terminal app after all.

Run from the repository

First, clone this repository. Then, run one of the options below.

Run in a terminal:

uv run chat

Or run in a web browser:

uv run textual serve chat

Run from the latest version on PyPI

TODO: test uv automatic torch backend selection: https://docs.astral.sh/uv/guides/integration/pytorch/#automatic-backend-selection

Run in a terminal:

uvx --from=jehoctor-rag-demo chat

Or run in a web browser:

uvx --from=jehoctor-rag-demo textual serve chat

CUDA acceleration via Llama.cpp

If you have an NVIDIA GPU with CUDA and build tools installed, you might be able to get CUDA acceleration without installing Ollama.

CMAKE_ARGS="-DGGML_CUDA=on" uv run chat

Metal acceleration via Llama.cpp (on Apple Silicon)

On an Apple Silicon machine, make sure uv runs an ARM interpreter as this should cause it to install Llama.cpp with Metal support.

Ollama on Linux

Remember that you have to keep Ollama up-to-date manually on Linux. A recent version of Ollama (v0.11.10 or later) is required to run the embedding model we use. See this FAQ: https://docs.ollama.com/faq#how-can-i-upgrade-ollama.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

jehoctor_rag_demo-0.2.0.tar.gz (15.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

jehoctor_rag_demo-0.2.0-py3-none-any.whl (20.1 kB view details)

Uploaded Python 3

File details

Details for the file jehoctor_rag_demo-0.2.0.tar.gz.

File metadata

  • Download URL: jehoctor_rag_demo-0.2.0.tar.gz
  • Upload date:
  • Size: 15.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.9.26 {"installer":{"name":"uv","version":"0.9.26","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for jehoctor_rag_demo-0.2.0.tar.gz
Algorithm Hash digest
SHA256 fd8c4c9ace48478709eea38429de016fdea37400332b05b9c9d9b7fffa7efbe1
MD5 a451fd5d67c4413a111bdf79bf994f0b
BLAKE2b-256 d67a7e4d74ed3ba8bd4505517d10c60dd193b6cea07abf693c66bbb695879917

See more details on using hashes here.

File details

Details for the file jehoctor_rag_demo-0.2.0-py3-none-any.whl.

File metadata

  • Download URL: jehoctor_rag_demo-0.2.0-py3-none-any.whl
  • Upload date:
  • Size: 20.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.9.26 {"installer":{"name":"uv","version":"0.9.26","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for jehoctor_rag_demo-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 d089d9ecf18faf0329f995530d1b4bae569f10b76da5b5a6598dbe049e06da66
MD5 08201c8731db907450c9c7e388e67de9
BLAKE2b-256 ad89d5384393e74b63f56bc3c3ab2bb3c60e309772abbdb32a976f2343d61410

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page