Skip to main content

A terminal chatbot, powered by Groq Cloud API (Windows / MacOS / Linux)

Project description

groqchat

A terminal chatbot, powered by Groq Cloud API (Windows / MacOS / Linux)

A simple chatbot that runs fast on Mac Linux and Windows.

Groq API Key

Get a Groq API key first:

from www.groq.com

Installation

With python installed, setup gropchat via pip:

pip install gchat

Get Started

Simply run 'gchat':

gchat

Enter your Groq cloud a single API key or a list of multiple API keys:
(Remarks: If a list of multiple API keys are entered, entered API keys are automatically rotated for running inference.)

groqapi

Select a model:

models

Special Entries

Enter a dot '.' to display available special entries:

ui

'.new' - start a new chart session

'.api' - change api key

'.model' - change model

'.systemmessage' - change system message

'.temperature' - change temperature

'.maxtokens' - change max tokens

'.togglewordwrap' - toggle word wrap

'.togglevoiceoutput' - toggle voice output

'.exit' - exit the application

Keyboard Shortcuts

By default:

Ctrl+Z - cancel

Ctrl+Q - exit / quit

Ctrl+I / TAB - insert new line

Ctrl+N - new chat session

Ctrl+W - toggle word wrap

Ctrl+Y - toggle voice output

Ctrl+S - trigger voice typing

Configurations

Advanced users may change configurations manually by editing the file "config.py" located in the package folder.

Remarks: Close the app before editing the file.

CLI Options

Run 'gchat --help' for cli options

gchat --help

cli_option

For example, to start with a greeting:

gchat "Hi!"

For example, to set temperature to 0.8 and maximum output tokens to 1024, run:

gchat -t 0.8 -o 1024 "Hi!"

Install Multiple Copies

You may want to install multiple copies to customise them with different system messages or other settings.

An easy way to achieve it is to use alias, e.g.:

mkdir apps

cd apps

python3 -m venv assist explain quote illustrate summarize

source assist/bin/activate

pip install gchat

source explain/bin/activate

pip install gchat

source quote/bin/activate

pip install gchat

source illustrate/bin/activate

pip install gchat

source summarize/bin/activate

pip install gchat

nano .bashrc

Add the following aliases:

alias explain=$HOME/apps/explain/bin/gchat
alias illustrate=$HOME/apps/illustrate/bin/gchat
alias quote=$HOME/apps/quote/bin/gchat
alias assist=$HOME/apps/assist/bin/gchat
alias summarize=$HOME/apps/summarize/bin/gchat

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

rgroq-0.3.0.tar.gz (16.2 kB view details)

Uploaded Source

Built Distribution

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

rgroq-0.3.0-py3-none-any.whl (17.2 kB view details)

Uploaded Python 3

File details

Details for the file rgroq-0.3.0.tar.gz.

File metadata

  • Download URL: rgroq-0.3.0.tar.gz
  • Upload date:
  • Size: 16.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.8

File hashes

Hashes for rgroq-0.3.0.tar.gz
Algorithm Hash digest
SHA256 ef6da005ba089d2e0210b59554cfd4abb34c6241128124fe8146f506324d8e5b
MD5 a189a43b9040028ffe63dcb8164a3f21
BLAKE2b-256 9ae2d764b29cbfee44115e8e585ed673b251813b71c77d57bb2f4c8873a3652e

See more details on using hashes here.

File details

Details for the file rgroq-0.3.0-py3-none-any.whl.

File metadata

  • Download URL: rgroq-0.3.0-py3-none-any.whl
  • Upload date:
  • Size: 17.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.8

File hashes

Hashes for rgroq-0.3.0-py3-none-any.whl
Algorithm Hash digest
SHA256 3153120b59b295672cd252bbaa05da0f06dd730894595fe35d3d60ade5333eee
MD5 486d3e20e2c18394376d5dee52317446
BLAKE2b-256 4dfa7c9f643246c1ebc295f1cebf03648dea64edff1c800ace02fcfd42ff16af

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