Skip to main content

Command-line interface using GPT4ALL bindings

Project description

A simple GNU Readline-based application for interaction with chat-oriented AI models using GPT4All Python bindings.

Contents

Install

The following installation options are available:

Pip

$ pip install git+https://github.com/sergei-mironov/gpt4all-cli.git

Note: pip install gpt4all-cli might also work, but the git+https method would bring the most recent version.

Nix

$ git clone --depth=1 https://github.com/sergei-mironov/gpt4all-cli && cd gpt4all-cli
# Optionally, change the 'nixpkgs' input of the flake.nix to a more suitable
$ nix profile install ".#python-gpt4all-cli"

Usage

usage: gpt4all-cli [-h] [--model MODEL] [--num-threads NUM_THREADS]
                   [--device DEVICE] [--readline-key-send READLINE_KEY_SEND]
                   [--readline-prompt READLINE_PROMPT] [--revision]

Command-line arguments

options:
  -h, --help            show this help message and exit
  --model MODEL, -m MODEL
                        Model to use for chatbot
  --num-threads NUM_THREADS, -t NUM_THREADS
                        Number of threads to use for chatbot
  --device DEVICE, -d DEVICE
                        Device to use for chatbot, e.g. gpu, amd, nvidia,
                        intel. Defaults to CPU.
  --readline-key-send READLINE_KEY_SEND
                        Terminal code to treat as Ctrl+Enter (default: \C-k)
  --readline-prompt READLINE_PROMPT
                        Input prompt (default: >>>)
  --revision            Print the revision

Example session

[ gpt4all-cli ]$ gpt4all-cli --model=~/.local/share/nomic.ai/GPT4All/Meta-Llama-3-8B-Instruct.Q4_0.gguf
Type /help or a question followed by the /ask command (or by pressing `C-k` key).
>>> Hi!
>>> /ask
Hello! I'm happy to help you. What's on your mind?^C
>>> What's your name?
>>> /ask
I don't really have a personal name, but you can call me "Assistant"

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

gpt4all_cli-1.0.0.tar.gz (5.8 kB view details)

Uploaded Source

Built Distribution

gpt4all_cli-1.0.0-py3-none-any.whl (5.7 kB view details)

Uploaded Python 3

File details

Details for the file gpt4all_cli-1.0.0.tar.gz.

File metadata

  • Download URL: gpt4all_cli-1.0.0.tar.gz
  • Upload date:
  • Size: 5.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.0.0 CPython/3.11.9

File hashes

Hashes for gpt4all_cli-1.0.0.tar.gz
Algorithm Hash digest
SHA256 c3d599a9c260da731728a61a52a22b81c4fe2517346b1251d4f69a0970b36294
MD5 296b6ff19a7e9902a372c347d814ff27
BLAKE2b-256 133d5b57cf319dce019d98c9087462aca7ef17534fe06d7c0877aabb6d203935

See more details on using hashes here.

File details

Details for the file gpt4all_cli-1.0.0-py3-none-any.whl.

File metadata

  • Download URL: gpt4all_cli-1.0.0-py3-none-any.whl
  • Upload date:
  • Size: 5.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.0.0 CPython/3.11.9

File hashes

Hashes for gpt4all_cli-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 907c5dffc1f1a86d0c80d6cc5940f3f742302838502b1e88f5b956a1de720677
MD5 3160a7a9b15958cc66f0a576706b5075
BLAKE2b-256 e00eeac8c147dd3d6889e4d007ae9aada96a990f0b35ad62eac1d9f4d03df72d

See more details on using hashes here.

Supported by

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