Skip to content

A ChatGPT-like application built with Streamlit for interactive conversation with OpenAI's GPT-3.5 model.

License

Notifications You must be signed in to change notification settings

krisograbek/streamlit_chatbot_base

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

19 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Template for creating your own ChatGPT with Streamlit and OpenAI API

This repository contains the code for a simple web application built with Streamlit, which uses OpenAI's GPT-3 model for generating AI responses in a chat-like interface.

Prerequisites

  1. Python 3.6 or above
  2. An OpenAI API Key

App Demo

StreamlitChatbot

Steps to run the application

1. Clone the repository to your local machine:

git clone https://github.com/krisograbek/streamlit_chatbot_base.git

2. Navigate to the project directory:

cd streamlit_chatbot_base
  1. Create a virtual environment and activate it:

On macOS and Linux:

python3 -m venv myenv
source myenv/bin/activate

On Windows:

python -m venv myenv
.\myenv\Scripts\activate

3a. Upgrade pip (optional but recommended)

pip install --upgrade pip
  1. Install the necessary Python packages:
pip install -r requirements.txt
  1. Create a .env file in the root directory of the project and add your OpenAI API key:
echo OPENAI_API_KEY=your-api-key > .env

OR

cp .env.example .env

Please replace your-api-key with your actual OpenAI API key.

  1. Run the Streamlit application:
streamlit run chatbot.py

Open a web browser and navigate to http://localhost:8501 to interact with the application.

License This project is open source, under the terms of the MIT license.

Note: This app makes requests to OpenAI's servers whenever the chat is used. Please be aware of this, especially if you're on a paid plan with OpenAI.

About

A ChatGPT-like application built with Streamlit for interactive conversation with OpenAI's GPT-3.5 model.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages