A simple cmd tool for chatting with ChatGPT. It supports proxy.
You can make some predefined instructs in default_instructs.yaml
or another .yaml
, and use them by setting instruct key in --instruct=<INSTRUCT_KEY>
.
There are three default instructions: latex_en2cn
, en2cn
, and cn2en
.
pip install -r requirements.txt
export OPENAI_PROXY=<YOUR_PROXY>
export OPENAI_KEY=<YOUR_OPENAI_KEY>
python start_chat.py [OPTIONS]
For example:
export OPENAI_PROXY=localhost:6006
export OPENAI_KEY=<YOUR_OPENAI_KEY>
python start_chat.py --instruct="You are a professional assistant"
or
python start_chat.py --instruct=en2cn
--instruct=<INSTRUCT_CONTENT_OR_KEY>
An instruct key of a predefined instruct or a sentence content of a new instruct.--instructs_path
User defined instructs path.--multi_line
Supports multi-lines input. You need to press twoENTER
keys to end the input and get a reply.
- You can input
clear
to clear the context and start a new conversation. - The history of the conversation will be saved into
./chat_history.log
in jsonline format and./chat_history.log.readable
in a human-readable format.