Turn your natural language descriptions into fully functional, deployed AI-powered microservices with a single command! Your imagination is the limit!
gptdeploy-tiny.mp4
- OpenAI key with access to GPT-3.5 or GPT-4
pip install gptdeploy
gptdeploy configure --key <your openai api key>
If you set the environment variable OPENAI_API_KEY
, the configuration step can be skipped.
Your api key must have access to gpt-4 to use this tool.
We are working on a way to use gpt-3.5-turbo as well.
gptdeploy generate \
--description "<description of the microservice>" \
--test "<specification of a test scenario>" \
--model <gpt-3.5 or gpt-4> \
--path </path/to/local/folder>
To generate your personal microservice two things are required:
- A
description
of the task you want to accomplish. - A
test
scenario that ensures the microservice works as expected. - The
model
you want to use - eithergpt-3.5
orgpt-4
.gpt-3.5
is ~10x cheaper, but will not be able to generate as complex microservices. - A
path
on the local drive where the microservice will be generated.
The creation process should take between 5 and 15 minutes. During this time, GPT iteratively builds your microservice until it finds a strategy that make your test scenario pass.
Be aware that the costs you have to pay for openai vary between $0.50 and $3.00 per microservice (using GPT-4).
Run the microservice locally in docker. In case docker is not running on your machine, it will try to run it withouth docker. With this command a playground opens in your browser where you can test the microservice.
gptdeploy run --path <path to microservice>
If you want to deploy your microservice to the cloud a Jina account is required. When creating a Jina account, you get some free credits, which you can use to deploy your microservice ($0.025/hour). If you run out of credits, you can purchase more.
gptdeploy deploy --microservice_path <path to microservice>
To save credits you can delete your microservice via the following commands:
jc list # get the microservice id
jc delete <microservice id>
In this section you can get a feeling for the kind of microservices that can be generated with GPT Deploy.
gptdeploy generate \
--description "Extract text from a news article URL using Newspaper3k library and generate a summary using gpt." \
--test "input: 'http://fox13now.com/2013/12/30/new-year-new-laws-obamacare-pot-guns-and-drones/' output: assert a summarized version of the article exists" \
--model gpt-4 \
--path microservice
gptdeploy generate \
--description "Convert a chemical formula into a 2D chemical structure diagram" \
--test "C=C, CN=C=O, CCC(=O)O" \
--model gpt-4 \
--path microservice
gptdeploy generate \
--description "create a 2d rendering of a whole 3d object and x,y,z object rotation using trimesh and pyrender.OffscreenRenderer with os.environ['PYOPENGL_PLATFORM'] = 'egl' and freeglut3-dev library" \
--test "input: https://graphics.stanford.edu/courses/cs148-10-summer/as3/code/as3/teapot.obj output: assert the image is not completely white or black" \
--model gpt-4 \
--path microservice
gptdeploy generate \
--description "Generate personalized product recommendations based on user product browsing history and the product categories fashion, electronics and sport" \
--test "Test that a user how visited p1(electronics),p2(fashion),p3(fashion) is more likely to buy p4(fashion) than p5(sports)" \
--model gpt-4 \
--path microservice
gptdeploy generate \
--description "Given a search query, find articles on hacker news using the hacker news api and return a list of (title, author, website_link, first_image_on_the_website)" \
--test "searching for GPT gives results" \
--model gpt-4 \
--path microservice
gptdeploy generate \
--description "Given an image, return the image with bounding boxes of all animals (https://pjreddie.com/media/files/yolov3.weights, https://raw.githubusercontent.com/pjreddie/darknet/master/cfg/yolov3.cfg)" \
--test "https://images.unsplash.com/photo-1444212477490-ca407925329e contains animals" \
--model gpt-4 \
--path microservice
gptdeploy generate \
--description "Generate a meme from an image and a caption" \
--test "Surprised Pikachu: https://media.wired.com/photos/5f87340d114b38fa1f8339f9/master/w_1600%2Cc_limit/Ideas_Surprised_Pikachu_HD.jpg, TOP:When you discovered GPTDeploy" \
--model gpt-4 \
--path microservice
gptdeploy generate \
--description "Given a word, return a list of rhyming words using the datamuse api" \
--test "hello" \
--model gpt-4 \
--path microservice
gptdeploy generate \
--description "Generate a word cloud from a given text" \
--test "Lorem ipsum dolor sit amet, consectetur adipiscing elit." \
--model gpt-4 \
--path microservice
gptdeploy generate \
--description "Given a 3d object, return vertex count and face count" \
--test "https://raw.githubusercontent.com/polygonjs/polygonjs-assets/master/models/wolf.obj" \
--model gpt-4 \
--path microservice
gptdeploy generate \
--description "Given a URL, extract all tables as csv" \
--test "http://www.ins.tn/statistiques/90" \
--model gpt-4 \
--path microservice
gptdeploy generate \
--description "Create mel spectrograms from audio file" \
--test "https://cdn.pixabay.com/download/audio/2023/02/28/audio_550d815fa5.mp3" \
--model gpt-4 \
--path microservice
gptdeploy generate \
--description "Convert text to speech" \
--test "Hello, welcome to GPT Deploy!" \
--model gpt-4 \
--path microservice