Skip to content

Basic flask_restful api to receive text, call GPT4 on it, and return the response to the response to simplify setting up the OpenAI API call/parse response for easier usage with iPhone shortcuts

Notifications You must be signed in to change notification settings

willspag/gpt4-api

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 

Repository files navigation

gpt4-api

This is a nasic flask_restful api to receive text, call GPT4 on it, and return the response to the response to simplify setting up the OpenAI API call/parse response for easier usage with iPhone shortcuts. Dockerfile is included for easy deployment to Google Cloud Run.

The goal is to create an iPhone shortcut that allows you to easily ask GPT4 questions through Siri. However, setting up the args/POST request and parsing the full response dict directly in iPhone shortcuts was causing errors since extracting the response text requires both dictionary and array indexing which the iPhone shortcut app wouldn't let me do. To solve this, I just built a simple Rest API that simplifies everything by just taking in a simple text input and returning the GPT4 response text as a single argument that can be easily retrieved through iPhone Shortcuts.

About

Basic flask_restful api to receive text, call GPT4 on it, and return the response to the response to simplify setting up the OpenAI API call/parse response for easier usage with iPhone shortcuts

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published