/mealmetrics-copilot

From the tutorial, "How to build a GPT-3 App with Nextjs, React, and GitHub Copilot"

Primary LanguageJavaScript

How to Build a GPT-3 App with Nextjs, React, and GitHub Copilot

This is a sample project based on GPT-3, Nextjs, React, and GitHub Copilot.

Development

# Install the necessary dependencies:
npm install

# In one tab, run the backend API:
npm run devserver

# In another tab, run the frontend:
npm run dev

# View the frontend:
open http://localhost:3000

Sample usage

Try the following recipe:

1 cup of all purpose flour, sifted 1 1/2 teaspoon baking powder 1/4 teaspoon salt 2 Tablespoon granulated sugar 1/2 Tablespoon unsalted butter, room temperature Approximately 1/3 cup water

You can also hit the backend directly using curl:

curl \
    -d '{"recipe": "1 cup of all purpose flour, sifted 1 1/2 teaspoon baking powder 1/4 teaspoon salt 2 Tablespoon granulated sugar 1/2 Tablespoon unsalted butter, room temperature Approximately 1/3 cup water"}' \
    -H "Content-Type: application/json" \
    -X \
    POST http://localhost:8080/openai/generateinfo