Giter Club home page Giter Club logo

fun-with-ai's Introduction

Fun with AI πŸ€–

Whether you’re looking for a friendly chat, studying for an exam, or learning a new language, Fun with AI is a simple-to-use application that will help you unlock intellectual potential and may even strengthen your cognitive abilities.

There are a few friends to collaborate with, each a little unique:

  1. Davinci - The most capable AI. He will help you reach your highest potential.
  2. Curie - Faster than Davinci, but not quite as capable. She's still learning!
  3. Babbage - Very straightforward and very fast.
  4. Ada - A simple gal, but very speedy!

*If you're having trouble deciding, give Curie a try.

After choosing your friend, put their knowledge to the test by typing a phrase of your choice in the text area (suggested prompts will be loaded for you after you choose your AI, but feel free to create your own as well). Have fun!

gif

Documentation

  • GitHub Project Board can be found here
  • Figma Wireframe can be found here

Table of Contents

Technologies

  • React.js
  • CSS
  • HTML
  • Cypress
  • OpenAI API
  • Figma

Code Architecture

Installation

  • Deployed site here
  • To view the code locally:
    1. Run git clone [email protected]:gjax78/fun-with-ai.git in your command line
    2. Run cd fun-with-ai to navigate into the repository
    3. Run npm install
    4. Sign up for an API key from OpenAI
    5. Open the root directory of your cloned repo
    6. Create a .env.local file and store your API key as REACT_APP_API_KEY
    7. Run npm start
    8. The webpage will open in separate browser

Features

  • Form to submit a prompt and receive a response from an AI engine
  • Ability to select the AI engine from a dropdown menu
  • Randomized prompt presets that populate as placeholders after the user selects an AI engine
  • 100% Lighthouse Accessibility score
  • Loading symbol shows as site is POSTing data
  • Responsive Design
  • Error handling
  • A hidden Easter egg in the Cypress testing file - see if you can find it!

Future Additions

  • Incorporate TypeScript
  • Save responses if the user leaves or reloads the page
  • Delete functionality for option to delete a response

Author

fun-with-ai's People

Contributors

gjax78 avatar

Watchers

 avatar

fun-with-ai's Issues

Scaling

  • Save responses if the user leaves or reloads the page
  • Let the user choose the AI engine from a select box
  • Add some presets for the user to quickly send a good prompt
  • Make the app more specific to a single purpose. See the OpenAI Examples and prompt design docs for inspiration.

Last Refactor

  • Run through all code with linter
  • Refactor all propTypes
  • Double check Cypress tests

Create component structure

  • Create feature/file_structure branch
  • Delete unnecessary files & folders
  • Create component and util folders (component structure listed below)
  • Change file paths for imports
  • Create .env file and add it to .gitignore

Component architecture

  • src
    • components
      • App
        • App.js
        • App.css
      • Form
        • Form.js
        • Form.css
      • Responses
        • Responses.js
        • Responses.css
      • ResponseCard
        • ResponseCard.js
        • ResponseCard.css
    • util
      • apiCalls.js

Accessibility

  • The HTML that ends up being served client-side should be accessible and semantic

POST prompt

  • POST prompt to OpenAI API
  • As a user, when I visit the app, I should be able to type in an input text form and the data should POST to the server

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.