Skip to content

A simple API endpoint that anwsers your prompt using OpenAI's GPT-3

Notifications You must be signed in to change notification settings

tatthien/serverless-gpt

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

serverless-gpt

A simple API endpoint that anwsers your prompt using OpenAI's GPT-3

Prerequisites

  • The serverless CLI installed.
  • You need to create an API key from OpenAI and set it as the value of OPENAI_API_TOKEN environment variable.
  • You need to set up credentials for AWS. Follow this tutorial to know how to configure it.

Deployment

make deploy

Using

curl -X POST <your-http-api-url>/ask \
  -H "Content-Type: application/json" \
  -d '{"prompt": "say this is a test"}'

# Response
{"answer": "This is a test."}

About

A simple API endpoint that anwsers your prompt using OpenAI's GPT-3

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published