No description
Find a file
2023-03-13 17:07:29 -05:00
.github/workflows tweak release workflow 2023-03-12 10:23:47 -05:00
LICENSES bring up to snuff (-ish) with pylint & black 2023-03-11 18:53:11 -06:00
src/chap improve textgen querying 2023-03-13 17:07:29 -05:00
.gitignore ignore dist directory 2023-03-12 10:36:50 -05:00
.pre-commit-config.yaml Add a textgen backend 2023-03-13 16:11:26 -05:00
.pylintrc Move chap commands to a subfolder 2023-03-13 14:46:15 -05:00
chap.gif add a (slightly wonky) screencast 2023-03-12 10:06:59 -05:00
chap.gif.license add a (slightly wonky) screencast 2023-03-12 10:06:59 -05:00
pyproject.toml Add a lorem backend 2023-03-13 15:32:18 -05:00
README.md Document the backend selection 2023-03-13 16:14:43 -05:00
requirements-dev.txt twine is needed for releasing 2023-03-12 10:25:19 -05:00
setup.cfg Add a lorem backend 2023-03-13 15:32:18 -05:00

chap - A Python interface to chatgpt, including a terminal user interface (tui)

Chap screencast

installation

Install with e.g., pipx install .

configuration

Put your OpenAI API key in the platform configuration directory for chap, e.g., on linux/unix systems at ~/.config/chap/openai_api_key

commandline usage

  • chap ask "What advice would you give a 20th century human visiting the 21st century for the first time?"

  • chap render --last

interactive terminal usage

  • chap tui

Sessions & Commandline Parameters

Details of session handling & commandline arguments are in flux. For now, the deprecated chap-ask, chap-render and chap-tui are still supported but they will be removed in the future.

By default, a new session is created. It is saved to the user's state directory (e.g., ~/.local/state/chap on linux/unix systems).

You can specify the session filename for a new session with -n or to re-open an existing session with -s. Or, you can continue the last session with --last.

You can set the "system message" with the -S flag.

You can select the text generating backend with the -b flag:

  • openai_chatgpt: the default, paid API, best quality results
  • textgen: Works with https://github.com/oobabooga/text-generation-webui and can run locally with various models, basic and low quality. Needs the server URL in $configuration_directory/textgen_url.
  • lorem: local non-AI lorem generator for testing