Command line interaction with ChatGPT with chat history saved locally
Project description
Installation
I recommend using pipx for installation. Follow pipx's documentation to install it, then run pipx install chat-cli.
Building
Chat uses the poetry build tool.
- Install poetry
- Clone the chat project repo
- Run
poetry buildin the project root - The wheel and sdist will be built in the
dist/directory
Usage
chat [-h] [--apikey APIKEY] [--prompt PROMPT] [--save] [-f CONFIG] [-m MODEL] [--resume] [-s SEARCH]
Options
-h, --help
show these options and exit
--apikey
Specify the API key to use when connection to OpenAI
--prompt
Change the prompt that is displayed for input. The sequences %t and %T can be used to display the current token and max token count for the model, respectively. Default prompt is '%t/%T > '
--save
If specified with --apikey and/or --prompt, save them to the config file
-f, --config
Specify an alternate file to load the configuration from (Default: $XDG_CONFIG_HOME/Chat/chat.json)
-m, --model
Specify the model to use, refer to https://platform.openai.com/docs/models for list
--resume
Resumes last conversation
-s, --search
Search your chat history for a given regex
Commands
When chating, the following commands perform special actions
.redo
Regenerates the previous response. Removes the old response from the history
.copy
Copies the first code block in the previous response to the system clipboard. Print's whats been copied
.exit
Exits the application and saves the chat history. Same as encountering EOF. Prints the chat log location.
.summarize
Asks the model to summarize the conversation and starts a new conversation with the summary as the first message. Saves the conversation prior to the summary. Should be called before reaching the token limit to continue a conversation.
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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file chat_cli-0.3.5.tar.gz.
File metadata
- Download URL: chat_cli-0.3.5.tar.gz
- Upload date:
- Size: 5.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/4.0.2 CPython/3.11.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0aa565bfaae50365c0bb54768930c8ca0024ed6df155d3ebb8e845839460c502
|
|
| MD5 |
460d7bcbd99f533bfeef26dc9be5b615
|
|
| BLAKE2b-256 |
28b059bab33a462e316365bc03ce951811bee30e23f63b874baef9f4c9681f45
|
File details
Details for the file chat_cli-0.3.5-py3-none-any.whl.
File metadata
- Download URL: chat_cli-0.3.5-py3-none-any.whl
- Upload date:
- Size: 7.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/4.0.2 CPython/3.11.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0dd4fc7f3d049df9e9a087a7d96eb06b0df5af8e1718b7fb6b2304d3e637bdf6
|
|
| MD5 |
c2a08ea1276ea1207385e18a67816963
|
|
| BLAKE2b-256 |
9904d19078896788879bb6eea7ad47d83d0d01b48c0fbfe5ed0a09aea4dc6c9f
|