Coder Social home page Coder Social logo

ra3d / gpt-chat Goto Github PK

View Code? Open in Web Editor NEW
0.0 1.0 1.0 10 KB

ChatGPT is a simple Flask web application that allows users to interact with the OpenAI GPT model. It features a modern chat interface using Bootstrap and includes request limits to prevent abuse.

Python 50.42% JavaScript 19.20% HTML 30.38%

gpt-chat's Introduction

GPT Chat

GPT Chat is a simple Flask web application that allows users to interact with the OpenAI GPT model. It features a modern chat interface using Bootstrap and includes request limits to prevent abuse.

Table of Contents

Installation

  1. Clone this repository to your local machine:

git clone https://github.com/RA3D/GPT-Chat.git

  1. Install the required dependencies:

pip install -r requirements.txt

  1. Make sure you have the necessary files in place:
  • Flask application script (e.g., app.py)
  • ChatGPT script (e.g., chatgpt.js)
  • HTML template (e.g., index.html)
  • Custom CSS stylesheet (optional)

Usage

  1. Run the Flask application:

python app.py

  1. Open your web browser and navigate to the address where the Flask application is running (default: http://127.0.0.1:5000/).

  2. Start chatting with ChatGPT by typing a message in the input field and clicking the "Send" button or pressing the "Enter" key.

Configuration

Before you can use the GPT Chat application, you need to set your OpenAI API key in the chat_gpt.py file.

  1. Generate an API key at https://platform.openai.com/account/api-keys.
  2. Open the chat_gpt.py file in your favorite text editor.
  3. Locate the line where the API key is set (e.g., openai.api_key = "your_api_key").
  4. Replace "your_api_key" with your actual OpenAI API key, which should be a string like "sk-abcdefgh1234567890".
  5. Save the changes to the chat_gpt.py file.

Now your GPT Chat application is ready to use with your OpenAI API key.

Customization

You can customize the chat interface by modifying the HTML, CSS, and JavaScript files. The chat UI is built using Bootstrap. To further customize the appearance or behavior, you can:

  • Modify the index.html file to add, remove, or change elements in the chat interface.
  • Adjust the chatgpt.js file to alter the behavior of the chat interface or interact with the ChatGPT API differently.

gpt-chat's People

Contributors

ra3d avatar

Watchers

 avatar

Forkers

wal0x

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.