KinskiGPT is an application utilizing OpenAI's GPT model to simulate a chat with the legendary, passionate, and often controversial figure of German cinema and theater, Klaus Kinski. The chatbot embraces Kinski's famous tantrums and insults, creating a dynamic and authentic conversation experience.
This Python script is a web application that makes use of the Streamlit library for user interface and the OpenAI API for conversation generation. The OpenAI API key is securely loaded from an environment file.
The main libraries and packages used in this project are:
openai
for interaction with OpenAI's GPT-3 modelos
for environment variable managementdotenv
for .env file handlingstreamlit
for web application frameworkPlease ensure that these packages are installed in your environment before running the application.
clone repo:
git clone https://github.com/DevRico003/KinskiGPT.git
go into the cloned directory:
cd KinskiGPT
install requirements:
pip install -r requirements.txt
Create a .env
file in the root directory of the project (inside KinskiGPT folder). Inside this file, set the following variable:
OPENAI_API_KEY=<Your_OpenAI_API_Key>
To start the application, run the Python script with Streamlit. From the project's root directory (inside KinskiGPT folder), enter the following command:
streamlit run main.py
This command will start a local server, and you can interact with the KinskiGPT in your web browser.
The main interface of KinskiGPT comprises a chat window and a text input field. After typing a message into the input field and pressing enter, the message is sent to the GPT model, which generates a response in the persona of Klaus Kinski.
The model has a pre-loaded system prompt that introduces the persona of Kinski and encourages the user to engage with the bot in a manner that stimulates the 'Klaus Kinski' responses.
As of the current build, the chat history is not saved when the session ends or when the server is stopped. Any ongoing chat history will be lost when the page is refreshed.
This is an open-source project. Feel free to fork and make your own changes or propose improvements by making a pull request.
This codebase is intended for educational and demonstration purposes. It is not intended to fully or accurately represent or simulate Klaus Kinski, who was a real person with a nuanced personality and life history. The simulated conversations generated by this program are based on training data used to train the GPT model and may not reflect actual statements or views held by Klaus Kinski.