#language-model #provider #chat #tui #artificial-intelligence #openai #chat-bot

bin+lib ait

AIT is a terminal based chat interface for interacting with large language models from various providers

4 releases

0.2.0 Oct 11, 2024
0.1.4 Aug 29, 2024
0.1.3 Aug 8, 2024
0.1.2 Aug 2, 2024

#760 in Machine learning

Download history 96/week @ 2024-08-01 126/week @ 2024-08-08 5/week @ 2024-08-15 137/week @ 2024-08-29 1/week @ 2024-09-05 3/week @ 2024-09-12 18/week @ 2024-09-19 22/week @ 2024-09-26 3/week @ 2024-10-03 171/week @ 2024-10-10 12/week @ 2024-10-17 1/week @ 2024-10-31

184 downloads per month

MIT license

64KB
1.5K SLoC

AI in the Terminal

ait is a terminal user interface for interacting with several generative large language models from multiple providers. It uses the genai crate to communicate with the model providers. The TUI is built using the ratatui crate.

Installation

Installation requires cargo to be installed.

cargo install ait

Manual installation

Clone this repository and cd to the ait directory and run the application using:

cargo run

Install the application by running:

cargo install --force --path .

The binary name is ait.

Binaries are also available for download under Releases.

Usage

The chat interface is modal and starts in the 'normal' mode. By pressing the i key text can be input into the text area. More information can be found by pressing the ? key. To submit queries to the model providers, you either need to obtain an API key and set the appropriate environment variable OR you need a running Ollama instance on http://localhost:11434.

Chat history

Chat history is stored as a sqlite database (facilitated by the rusqlite crate) in the users cache directory in the home directory (~/.cache/ait/chats.db). In addition, ait will store a log of the latest chat in the user's home directory, ~/.cache/ait/latest-chat.log on macOS and Linux.

Dependencies

~38–54MB
~1M SLoC