Giter Site home page Giter Site logo

silviotorre / agileprompt Goto Github PK

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

Simplified ChatGPT Agile Prompt Builder

Home Page: https://silviotorre.github.io/AgilePrompt/

License: MIT License

HTML 37.20% JavaScript 56.29% CSS 6.51%
agile chatgpt prompt-toolkit

agileprompt's Introduction

Agile Prompt Builder

Overview

The Agile Prompt Builder is a simple and easy-to-use tool that helps you create customized prompts based on your specific needs. You can define the active user, action, expected result, conditions, and choose whether to include a code snippet in your prompt.

Features

  • User-friendly interface
  • Customizable input fields
  • Dynamic prompt generation
  • Option to include a code snippet
  • Responsive design for various screen sizes

Getting Started

Prerequisites

  • A modern web browser (e.g., Chrome, Firefox, Safari)

Running the project

  1. Clone the repository or download the source code as a ZIP file.

git clone https://github.com/silviotorre/Agile-Prompt-Builder.git

  1. Navigate to the project folder and open the index.html file in your preferred web browser.

cd Agile-Prompt-Builder

  1. Start using the Agile Prompt Builder by entering your desired values in the input fields and clicking the "Generate Prompt" button.

File Structure

  • index.html: The main HTML file that contains the structure of the web page.
  • styles.css: The external CSS file that contains the styling for the web page.
  • script.js: The external JavaScript file that handles the form submission and generates the prompt.

How Work

This code is creating a form in a web page and adding an event listener to the form submission. When the form is submitted, the event listener function is called.

The function first prevents the default form submission behavior by calling event.preventDefault(). It then retrieves the values of several form elements using the form.elements object and stores them in variables.

Next, the function constructs a prompt message by concatenating the values of the form elements together using string interpolation. If the "add code" checkbox is checked, the message will also include a code snippet.

Finally, the function creates a new paragraph element and sets its text content to the prompt message. The paragraph element is then appended to the end of the document body.

UML Diagram

Here's a UML diagram to illustrate the structure of this code:

     +--------------------------+
     |      EventTarget         |
     +--------------------------+
     | addEventListener()       |
     | removeEventListener()    |
     +--------------------------+
                    |
                    |
                    v
     +--------------------------+
     |          Element         |
     +--------------------------+
     | querySelector()          |
     | addEventListener()       |
     +--------------------------+
                    |
                    |
                    v
     +--------------------------+
     |     HTMLFormElement      |
     +--------------------------+
     | elements                 |
     +--------------------------+
                    |
                    |
                    v
     +--------------------------+
     |         Function         |
     +--------------------------+
     | event.preventDefault()   |
     | form.elements[]          |
     | string interpolation     |
     | createElement()          |
     | textContent              |
     | appendChild()            |
     +--------------------------+

Contributing

We welcome contributions to this project. If you find a bug or want to suggest a new feature, please create an issue on the GitHub repository.

License

This project is licensed under the MIT License.

Acknowledgments

  • You all

agileprompt's People

Contributors

silviotorre avatar

Stargazers

Dustin Smith avatar

Watchers

 avatar

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.