Feature | Benefits | Status |
---|---|---|
File Input for Analysis of Reports | Enables analysis of a wide range of text data including financial reports, news reports, source code, etc. | ✅ |
Multiline Input for Quick Paste | Allows quick and easy pasting of large amounts of data or complex text data. | ✅ |
Summarization for Large File Input | Summarizes large text files using natural language processing techniques to identify important trends and insights. | ✅ (Using textract module - working on macOS & Linux, Windows not supported) |
Token Usage for Cost Calculation | Calculates the number of tokens used and their associated cost in the application. | ✅ |
Adjustable Completion Tokens for Customization | Adjusts how large of an output from model you want at most. | ✅ |
Chat History for Context-Aware Communication | Keeps track of previous interactions with users, allowing the chatbot to provide more natural and intuitive responses. | ✅ |
Transcripts to View Communication History | Provides historic questions and outputs, allowing for easier tracking of communication history and referencing of previous interactions with the chatbot. | ✅ |
Logs for Debugging | Detailed records of all interactions with the application, including input and output data and any errors that occur during processing. Useful for debugging purposes in case of errors. | ✅ |
Toggleable logging | Choose if you want logging at all | ✅ |
Summarization on any input over x length | Summarize any input that are exceeding a given length to optimize token usage. | ✅ |
Load assistant personas from file | Load assistant personas defined in assistants.yml file. This should enable the usage of e.g. jailbreak personas. | ✅ |
- Clone this repository
- Install the required Python packages:
pip install -r requirements.txt python3 -m spacy download en_core_web_sm
- Create an API key for OpenAI at https://beta.openai.com/signup/
- Run the script in the command line:
Replace YOUR_API_KEY with your OpenAI API key and MODEL_NAME with the name of the OpenAI model you would like to use.
python chatgpt-turbocli.py --api_key YOUR_API_KEY --log ERROR --temperature 1
Commands supported while in CLI:
QUIT_COMMAND = "quit()"
TOKEN_USAGE_COMMAND = "tokenusage"
FEW_SHOT_COMMAND = "fewshot"
NEW_CHAT_COMMAND = "newchat"
NEW_AI_COMMAND = "newai"
MULTI_LINE_COMMAND = "mlin"
- To input multiple lines at once, type
mlin
and then enter your message. Pressctrl + D
to end the message.
usage: chatgpt-turbocli.py [-h] [--model MODEL] [--temperature TEMPERATURE] [--max_tokens MAX_TOKENS] [--summary_tokens SUMMARY_TOKENS]
[--completition_limit COMPLETITION_LIMIT] [--api_key API_KEY] [--log {DEBUG,INFO,WARNING,ERROR,CRITICAL}] [--transcript TRANSCRIPT]
[--logenabled LOGENABLED]
Chatbot CLI tool
options:
-h, --help show this help message and exit
--model MODEL The name of the model to be used
--temperature TEMPERATURE
The temperature for the model
--max_tokens MAX_TOKENS
The maximum amount of tokens
--summary_tokens SUMMARY_TOKENS
The number of input tokens to start summarizing
--completition_limit COMPLETITION_LIMIT
The max amount of tokens to be used for completition
--api_key API_KEY The OpenAI API key
--log {DEBUG,INFO,WARNING,ERROR,CRITICAL}
Set the logging level
--transcript TRANSCRIPT
Write a transcript on exit?
--logenabled LOGENABLED
Logging enabled
This project is licensed under the Mozilla Public License 2.0.
Inspired by https://www.haihai.ai/chatgpt-api/