AI-Powered Joke Generator is a web application that leverages OpenAI's GPT-4 model to create personalized jokes based on user-defined parameters. Built with Next.js, TypeScript, and Tailwind CSS, this application showcases how to develop an interactive, AI-driven platform.
- Generate jokes on specific topics: Office (Crypto Company), School (For Kids), and Gym (Thai Boxing)
- Customize the joke tone: Absurd, Playful, or Edgy
- Choose from multiple joke types: Knock-knock, Quick-witted, or Short Story
- Adjust the creativity level using a temperature slider
- Real-time joke streaming for an interactive experience
Before getting started, ensure you have the following installed:
- Node.js
- npm
You will also need an OpenAI API key to utilize the GPT-4 model.
-
Clone the repository:
git clone https://github.com/yourusername/joke-gpt.git cd ai-joke-generator -
Install dependencies:
npm install -
Create a
.env.localfile in the root directory and add your OpenAI API key:OPENAI_API_KEY=your_openai_api_key_here
-
Start the development server:
npm run dev -
Open your browser and navigate to
http://localhost:3000 -
Use the form to customize your joke:
- Enter a topic
- Choose a tone
- Select a joke type
- Adjust the creativity level
- Click "Generate Joke"
-
The generated joke will appear in the display area below the form.
- Introduction: Provides a brief overview of the project and its purpose.
- Features: Lists the key functionalities of the application.
- Prerequisites: Details the necessary tools and an OpenAI API key.
- Installation: Step-by-step guide to setting up the project.
- Usage: Instructions on how to use the application.
- Technologies Used: Lists the tech stack.
- License: States the licensing terms.
This README should help users and contributors understand and set up your project with ease.