GithubHelp home page GithubHelp logo

cooking-puzzle's Introduction

cooking-puzzle

Add ingredients and generate a dish based on those ingredients. You can also take away ingredients and a new dish will be generated based off of the updated set of ingredients.

image

Setup

Get an openai api key

Set OPENAI_API_KEY env var to be your openai api key

Start the backend server

The backend server takes a request of a list of ingredients and a new ingredient and it returns a generated dish.

  1. There is an gaurdrails step that checks if the new input ingredient is a valid ingredient. It does this via an openai call
  2. If the new ingredient is a valid ingredient, then it will return a dish description and title
  3. In instances where there is no new ingredient, which happens in cases where generations are triggered by deleting an ingredient, pass in ingredient as '[NONE]'

To run the backend server: cd server

nodemon server

Start the front-end

To start the front-end cd into client directory and run npm start.

Add ingredients using the add ingredient form. This should trigger a new generation. Subtract ingredients by pressing the subtract button on the ingredient. This should also subtract a new generation.

If you delete all your ingredients, the dish returns to it's empty state.

cooking-puzzle's People

Contributors

lievan 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.