This is a Command-Line Interface (CLI) application for a chatbot that utilizes the OpenAI GPT model. The chatbot is designed to generate human-like responses based on user input.
-
Clone the repository to your local machine:
git clone https://github.com/hheydaroff/dostgpt.git
-
Navigate to the project directory:
cd dostgpt
-
Obtain an OpenAI API key and add it to the
config.ini
file. Ifconfig.ini
does not exist, create one in the same directory. You can create an OpenAI account and generate an API key from their website. Also mention which models you want to use.
[OpenAICredentials]
API_KEY = xxxxxxxxxxxxx
[PerplexityCredentials]
API_KEY = xxxxxxxxxxxxx
[PerplexityModels]
llama = llama-2-70b-chat
codellama = codellama-34b-instruct
mistral = mistral-7b-instruct
[OpenAIModels]
gpt35turbo = gpt-3.5-turbo-1106
gpt35turbo16k = gpt-3.5-turbo-16k
-
Ensure you have Python 3 installed on your machine.
-
Install the required Python dependencies using pip:
pip install -r requirements.txt
To start the chatbot CLI, run the following command:
./run_dostgpt.sh
The chatbot will ask for user input and generate a response based on the provided prompt. It will continue to interact with the user until the user chooses to exit.
So that user can enter multiline text, every time to submit the input, user should press Enter
at the new empty line.
- forget: Clears the conversation history and starts a new conversation.
- exit: Shuts down the application gracefully, saving the conversation history to a text file in the 'history/' folder.
- change engine: Asks again which engine and models you want to use.
The config.ini
file contains the configuration settings for the chatbot CLI app. You can modify the following options:
[OpenAICredentials]
API_KEY = xxxxxxxxxxxxx
[PerplexityCredentials]
API_KEY = xxxxxxxxxxxxx
[PerplexityModels]
llama = llama-2-70b-chat
codellama = codellama-34b-instruct
mistral = mistral-7b-instruct
[OpenAIModels]
gpt35turbo = gpt-3.5-turbo
gpt35turbo16k = gpt-3.5-turbo-16k
The history of the chatbot's conversation is automatically saved to a text file in the 'history/' folder. You can review past conversations there.
This project is licensed under the MIT License.