
A project that simplifies the process of generating queries from plain text prompts.
It harnesses the power of AI to make querying your GraphQL APIs a breeze.
How It Works · Quickstart · Example · Tech Stack · Contributors. Read More
This project utilizes the ChatGPT API and the Vercel AI SDK with streaming capabilities. Here's a quick overview of the workflow:
-
User Input: You input a text prompt or query in a user-friendly form.
-
Prompt Construction: The system constructs a query prompt based on the input.
-
AI Magic: The prompt is sent to the ChatGPT API using a Vercel Edge Function.
-
Streamlined Response: The AI-generated response is streamed back to the application's user interface, allowing you to view and use the generated query effortlessly.
-
Clone this repository to your local machine.
-
Create an account on OpenAI.
-
Store your API key in a file named
.env
in the project directory. -
Run the application from the command line, and it will be available at
http://localhost:3000
.
- SWAPI GraphQL Endpoint: https://swapi-graphql.netlify.app/.netlify/functions/index
- Retrieve the titles of all films
- Next.js – Framework
- Tailwind – CSS
- ChatGPT API – API
- Vercel – Deployments
Generate GraphQL queries from simple text prompts
See the LICENSE file for licensing information