Skip to content

Encode Club AI Bootcamp 24Q2 weekend project 02 Repository

Notifications You must be signed in to change notification settings

90barricade93/WP_02_EC_AI_24Q2

Repository files navigation

Latest Release Static Badge Static Badge

WP_02_EC_AI_24Q2-AI_Joke_Generator

Weekend Project 02 - Encode Club AI BootCamp 24Q2 Repository

Project Overview

This project is part of the Encode Club AI BootCamp and involves creating a new application from scratch using Next.js, focusing on generating jokes using AI. The application will allow users to customize various joke parameters and generate jokes based on their preferences. Additionally, the AI will evaluate the generated jokes for humor, appropriateness, and potential offensiveness. The project leverages the Text Generation WebUI to serve text generation tasks.

Features

  • Joke Generation: Generate jokes using AI with customizable parameters.
  • Customizable Parameters:
    • Topic (e.g., work, people, animals, food, television)
    • Tone (e.g., witty, sarcastic, silly, dark, goofy)
    • Type of joke (e.g., pun, knock-knock, story)
    • Temperature (randomness/fun level)
  • Joke Evaluation: AI evaluates jokes for humor, appropriateness, and offensiveness.
  • Integration with Text Generation WebUI: Serve text generation tasks using the WebUI.

Project Members Group 9

Installation

Prerequisites

Before you begin, ensure you have the following installed:

Installing

  1. Clone the Repository

    git clone https://github.com/90barricade93/ai-joke-generator
    cd ai-joke-generator
  2. Install Dependencies

    Using npm:

    npm install ai openai
  3. Set Up Environment Variables

    Create a .env.local file in the root directory and add a placeholder for your OpenAI API environment variables to prevent ⨯ Error: The OPENAI_API_KEY environment variable is missing or empty; either provide it, or instantiate the OpenAI client with an apiKey option, like new OpenAI({ apiKey: 'My API Key' }).

    OPENAI_API_KEY="placeholder"
  4. Run the Development Server

    Using npm:

    npm run dev
  5. Run the Text Generation WebUI

    Follow the instructions in the Text Generation WebUI documentation to set up and run the WebUI on your local environment.

    cd /path/to/text-generation-webui
    ./start_linux.sh -api

Conclusion

This project demonstrates the integration of Next.js with AI capabilities, providing users with a fun and interactive way to generate jokes. By customizing parameters and evaluating the generated content, users can explore the capabilities of AI in creative content generation. The Text Generation WebUI serves as a powerful backend for handling text generation tasks, showcasing the potential of local AI model deployment.

Feel free to contribute, suggest improvements, or ask questions. Happy coding!

Acknowledgements

We would like to thank the Encode Club AI BootCamp for this opportunity and @mpagani for his guidance.

GitHub forks   © GROUP 9 - AI 24Q2   GitHub stars


About

Encode Club AI Bootcamp 24Q2 weekend project 02 Repository

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages