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
Type /help or a question followed by the /ask command (or by pressing `C-k` key).
>>> /model "~/.local/share/nomic.ai/GPT4All/Meta-Llama-3-8B-Instruct.Q4_0.gguf"
>>> 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.1.tar.gz (5.8 kB view details)

Uploaded Source

Built Distribution

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

Uploaded Python 3

File details

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

File metadata

  • Download URL: gpt4all_cli-1.0.1.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.1.tar.gz
Algorithm Hash digest
SHA256 e26da10f2558484b1ee24c6578945946ca3bcd9aa8d7f1281dba1d10d722b6e5
MD5 2e72df0295783e31d52fc047a47cb745
BLAKE2b-256 0c3834603d5f1237d9d596b401841657b7c1fbe5c0edb5be57657503123119cf

See more details on using hashes here.

File details

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

File metadata

  • Download URL: gpt4all_cli-1.0.1-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.1-py3-none-any.whl
Algorithm Hash digest
SHA256 edcdf1becefd1d6fc320782c0e5419ff18b3be07bf8e8bbe04b39f0b9afcbf64
MD5 8078269cc9c1c2904d5662957d9da993
BLAKE2b-256 ff4a4df4dd4fb7e9b60bcec72bca9a5781e6eec497bbd50dfbefbf955ae8119c

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