• Stars
    star
    1,756
  • Rank 26,510 (Top 0.6 %)
  • Language
    Python
  • License
    Apache License 2.0
  • Created over 1 year ago
  • Updated over 1 year ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Your Virtual Development Team

Dev-GPT: Your Automated Development Team

⚠️ This is an experimental version. ⚠️

Product Manager
Product Manager
Developer
Developer
DevOps
DevOps

Tell your AI team what microservice you want to build, and they will do it for you. Your imagination is the limit!

Test Coverage Package version Supported Python versions Supported platforms Downloads

Welcome to Dev-GPT, where we bring your ideas to life with the power of advanced artificial intelligence! Our automated development team is designed to create microservices tailored to your specific needs, making your software development process seamless and efficient. Comprised of a virtual Product Manager, Developer, and DevOps, our AI team ensures that every aspect of your project is covered, from concept to deployment.

Quickstart

pip install dev-gpt
dev-gpt generate

Requirements

  • OpenAI key with access to gpt-3.5-turbo or gpt-4
  • if you want to enable your microservice to search for web content, you need to set the GOOGLE_API_KEY and GOOGLE_CSE_ID environment variables. More information can be found here.
dev-gpt configure --openai_api_key <your openai api key>
dev-gpt configure --google_api_key <google api key> (optional if you want to use google custom search)
dev-gpt configure --google_cse_id <google cse id> (optional if you want to use google custom search)

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.

Docs

Generate Microservice

dev-gpt generate \
--description "<description of the microservice>" \
--model <gpt-3.5-turbo 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. (optional)
  • The model you want to use - either gpt-3.5-turbo or gpt-4. gpt-3.5-turbo is ~10x cheaper, but will not be able to generate as complex microservices. (default: largest you have access to)
  • A path on the local drive where the microservice will be generated. (default: ./microservice)

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 or $0.05 to $0.30 for GPT-3.5-Trubo.

Run Microservice

Run the microservice locally in docker. In case docker is not running on your machine, it will try to run it without docker. With this command a playground opens in your browser where you can test the microservice.

dev-gpt run --path <path to microservice>

Deploy 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.

dev-gpt deploy --microservice_path <path to microservice>

Delete Microservice

To save credits you can delete your microservice via the following commands:

jc list # get the microservice id
jc delete <microservice id>

Examples

In this section you can get a feeling for the kind of microservices that can be generated with Dev-GPT.

Compliment Generator

dev-gpt generate \
--description "The user writes something and gets a related deep compliment." \
--model gpt-4

Compliment Generator

Extract and summarize news articles given a URL

dev-gpt generate \
--description "Extract text from a news article URL using Newspaper3k library and generate a summary using gpt. Example input: http://fox13now.com/2013/12/30/new-year-new-laws-obamacare-pot-guns-and-drones/" \
--model gpt-4

News Article Example

Chemical Formula Visualization

dev-gpt generate \
--description "Convert a chemical formula into a 2D chemical structure diagram. Example inputs: C=C, CN=C=O, CCC(=O)O" \
--model gpt-4

Chemical Formula Visualization

2d rendering of 3d model

dev-gpt 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 - example input: https://graphics.stanford.edu/courses/cs148-10-summer/as3/code/as3/teapot.obj" \
--model gpt-4

2D Rendering of 3D Model

Product Recommendation

dev-gpt generate \
--description "Generate personalized product recommendations based on user product browsing history and the product categories fashion, electronics and sport. Example: Input: browsing history: prod1(electronics),prod2(fashion),prod3(fashion), output: p4(fashion)" \
--model gpt-4

Product Recommendation

Hacker News Search

dev-gpt 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)" \
--model gpt-4

Hacker News Search

Animal Detector

dev-gpt 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), Example input: https://images.unsplash.com/photo-1444212477490-ca407925329e" \
--model gpt-4

Animal Detector

Meme Generator

dev-gpt generate \
--description "Generate a meme from an image and a caption. Example input: https://media.wired.com/photos/5f87340d114b38fa1f8339f9/master/w_1600%2Cc_limit/Ideas_Surprised_Pikachu_HD.jpg, TOP:When you discovered GPT Dev" \
--model gpt-4

Meme Generator

Rhyme Generator

dev-gpt generate \
--description "Given a word, return a list of rhyming words using the datamuse api" \
--model gpt-4

Rhyme Generator

Word Cloud Generator

dev-gpt generate \
--description "Generate a word cloud from a given text" \
--model gpt-4

Word Cloud Generator

3d model info

dev-gpt generate \
--description "Given a 3d object, return vertex count and face count. Example: https://raw.githubusercontent.com/polygonjs/polygonjs-assets/master/models/wolf.obj" \
--model gpt-4

3D Model Info

Table extraction

dev-gpt generate \
--description "Given a URL, extract all tables as csv. Example: http://www.ins.tn/statistiques/90" \
--model gpt-4

Table Extraction

Audio to mel spectrogram

dev-gpt generate \
--description "Create mel spectrogram from audio file. Example: https://cdn.pixabay.com/download/audio/2023/02/28/audio_550d815fa5.mp3" \
--model gpt-4

Audio to Mel Spectrogram

Text to speech

dev-gpt generate \
--description "Convert text to speech" \
--model gpt-4

Text to Speech

Your browser does not support the audio element.

Heatmap Generator

dev-gpt generate \
--description "Create a heatmap from an image and a list of relative coordinates. Example input: https://images.unsplash.com/photo-1574786198875-49f5d09fe2d2, [[0.1, 0.2], [0.3, 0.4], [0.5, 0.6], [0.2, 0.1], [0.7, 0.2], [0.4, 0.2]]" \
--model gpt-4

Heatmap Generator

QR Code Generator

dev-gpt generate \
--description "Generate QR code from URL. Example input: https://www.example.com" \
--model gpt-4 

QR Code Generator

Mandelbrot Set Visualizer

dev-gpt generate \
--description "Visualize the Mandelbrot set with custom parameters. Example input: center=-0+1i, zoom=1.0, size=800x800, iterations=1000" \
--model gpt-4

Mandelbrot Set Visualizer

Markdown to HTML Converter

dev-gpt generate --description "Convert markdown to HTML"

Markdown to HTML Converter

Technical Insights

The graphic below illustrates the process of creating a microservice and deploying it to the cloud elaboration two different implementation strategies.

graph TB

    description[description: generate QR code from URL] --> make_strat{think a}

    test[test: https://www.example.com] --> make_strat[generate strategies]

    make_strat --> implement1[implement strategy 1]

    implement1 --> build1{build image}

    build1 -->|error message| implement1

    build1 -->|failed 10 times| implement2[implement strategy 2]

    build1 -->|success| registry[push docker image to registry]

    implement2 --> build2{build image}

    build2 -->|error message| implement2

    build2 -->|failed 10 times| all_failed[all strategies failed]

    build2 -->|success| registry[push docker image to registry]

    registry --> deploy[deploy microservice]

    deploy --> streamlit[generate streamlit playground]

    streamlit --> user_run[user tests microservice]

  1. Dev-GPT identifies several strategies to implement your task.
  2. It tests each strategy until it finds one that works.
  3. For each strategy, it generates the following files:
  • microservice.py: This is the main implementation of the microservice.
  • test_microservice.py: These are test cases to ensure the microservice works as expected.
  • requirements.txt: This file lists the packages needed by the microservice and its tests.
  • Dockerfile: This file is used to run the microservice in a container and also runs the tests when building the image.
  1. Dev-GPT attempts to build the image. If the build fails, it uses the error message to apply a fix and tries again to build the image.
  2. Once it finds a successful strategy, it:
  • Pushes the Docker image to the registry.
  • Deploys the microservice.
  • Generates a Streamlit playground where you can test the microservice.
  1. If it fails 10 times in a row, it moves on to the next approach.

🔮 vision

Use natural language interface to generate, deploy and update your microservice infrastructure.

Contributors

If you want to contribute to this project, feel free to open a PR or an issue. In the following, you can find a list of things that need to be done.

next steps:

  • check if windows and linux support works
  • add video to README.md
  • bug: it can happen that the code generation is hanging forever - in this case aboard and redo the generation
  • new user has free credits but should be told to verify account

Nice to have:

  • smooth rendering animation of the responses
  • if the user runs dev-gpt without any arguments, show the help message
  • don't show this message: 🔐 You are logged in to Jina AI as florian.hoenicke (username:auth0-unified-448f11965ce142b6). To log out, use jina auth logout.
  • put the playground into the custom gateway (without rebuilding the custom gateway)
  • hide prompts in normal mode and show them in verbose mode
  • tests
  • clean up duplicate code
  • support popular cloud providers - lambda, cloud run, cloud functions, ...
  • support local docker builds
  • autoscaling enabled for cost saving
  • add more examples to README.md
  • support multiple endpoints - example: todolist microservice with endpoints for adding, deleting, and listing todos
  • support stateful microservices
  • The playground is currently printed twice even if it did not change. Make sure it is only printed twice in case it changed.
  • allow to update your microservice by providing feedback
  • support for other large language models like Open Assistent
  • for cost savings, it should be possible to insert less context during the code generation of the main functionality - no jina knowledge is required
  • use dev-gpt list to show all deployments
  • dev-gpt delete to delete a deployment
  • dev-gpt update to update a deployment
  • test param optional - in case the test param is not there first ask gpt if more information is required to write a test - like access to pdf data
  • section for microservices built by the community
  • test feedback for playground generation (could be part of the debugging)
  • should we send everything via json in the text attribute for simplicity?
  • fix release workflow
  • after the user specified the task, ask them questions back if the task is not clear enough or something is missing

Proposal:

  • just generate the non-jina related code and insert it into an executor template
  • think about strategies after the first approach failed?

More Repositories

1

jina

☁️ Build multimodal AI applications with cloud-native stack
Python
20,716
star
2

clip-as-service

🏄 Scalable embedding, reasoning, ranking for images and sentences with CLIP
Python
12,150
star
3

reader

Convert any URL to an LLM-friendly input with a simple prefix https://r.jina.ai/
TypeScript
6,640
star
4

dalle-flow

🌊 A Human-in-the-Loop workflow for creating HD images from text
Python
2,831
star
5

langchain-serve

⚡ Langchain apps in production using Jina & FastAPI
Python
1,601
star
6

finetuner

🎯 Task-oriented embedding tuning for BERT, CLIP, etc.
Python
1,455
star
7

thinkgpt

Agent techniques to augment your LLM and push it beyong its limits
Python
1,402
star
8

auto-gpt-web

Set Your Goals, AI Achieves Them.
TypeScript
749
star
9

agentchain

Chain together LLMs for reasoning & orchestrate multiple large models for accomplishing complex tasks
Python
583
star
10

docarray

The data structure for unstructured data
Python
522
star
11

vectordb

A Python vector database you just need - no more, no less.
Python
519
star
12

jcloud

Simplify deploying and managing Jina projects on Jina Cloud
Python
294
star
13

jina-video-chat

Python
266
star
14

jinabox.js

A lightweight, customizable omnibox in Javascript, for use with a Jina backend.
JavaScript
219
star
15

annlite

⚡ A fast embedded library for approximate nearest neighbor search
Python
216
star
16

rungpt

An open-source cloud-native of large multi-modal models (LMMs) serving framework.
Python
147
star
17

fastapi-serve

FastAPI to the Cloud, Batteries Included! ☁️🔋🚀
Python
139
star
18

jina-hub

An open-registry for hosting Jina executors via container images
Python
103
star
19

dashboard

Interactive UI for analyzing Jina logs, designing Flows and viewing Hub images
TypeScript
100
star
20

GoldRetriever

Create and host retrieval plugins for ChatGPT in one click
Python
63
star
21

jinaai-py

Python
48
star
22

example-multimodal-fashion-search

Input text or image, get back matching image fashion results, using Jina, DocArray, and CLIP
Python
45
star
23

streamlit-jina

Streamlit component for Jina neural search
Python
37
star
24

docs

Jina V1 Official Documentation. For the latest one, please check out https://docs.jina.ai
HTML
35
star
25

jinaai-js

TypeScript
28
star
26

executors

internal-only
Python
28
star
27

jerboa

LLM finetuning
Python
27
star
28

jina-ai.github.io

Homepage of Jina AI Limited
HTML
27
star
29

example-meme-search

Meme search engine built with Jina neural search framework. Search with captions or image files to find matching memes.
Python
23
star
30

example-app-store

App store search example, using Jina as backend and Streamlit as frontend
Python
21
star
31

docsQA-ui

Web UI for docsQA. Main branch: https://jina-docqa-ui.netlify.app/
TypeScript
20
star
32

example-speech-to-image

An example of building a speech to image generation pipeline with Jina, Whisper and StableDiffusion
Python
20
star
33

workshops

Jupyter Notebook
19
star
34

jina-hubble-sdk

Python API for authentication, resource management with Hubble
Python
19
star
35

product-recommendation-redis-docarray

Python
18
star
36

career

Find out job opportunities at Jina AI
17
star
37

executor-3d-encoder

An executor that wraps 3D mesh models and encodes 3D content documents to d-dimension vector.
Python
16
star
38

client-go

Golang Client for Jina (https://github.com/jina-ai/jina)
Go
16
star
39

benchmark

Benchmark environment and results of different versions of Jina.
Python
14
star
40

action-hub-builder

Simple interface for building & validating Jina Hub executors.
Python
12
star
41

inference-client

Python
12
star
42

executor-hnsw-postgres

A production-ready, scalable Indexer for the Jina neural search framework, based on HNSW and PSQL
Python
12
star
43

now

Python
11
star
44

cookiecutter-jina

Cookiecutter template for a Jina project
Python
10
star
45

simple-jina-examples

Python
9
star
46

executor-simpleindexer

Simple Indexer
Python
9
star
47

executor-clip-encoder

Encoder that embeds documents using either the CLIP vision encoder or the CLIP text encoder, depending on the content type of the document.
Python
9
star
48

cloud-ops

Python
8
star
49

good-first-issues

Issues that don't fit under Jina's other repos!
8
star
50

api

API schema of Jina command line interface exposed as JSON and YAML files.
HTML
8
star
51

inference-client-js

TypeScript
7
star
52

executor-text-transformers-dprreader-ranker

DPRReaderRanker
Python
7
star
53

executor-video-loader

Python
7
star
54

executor-image-clip-encoder

CLIPImageEncoder is an image encoder that wraps the image embedding functionality using the CLIP
Python
7
star
55

.github

This repository stores github actions templates as described https://docs.github.com/en/actions/learn-github-actions/sharing-workflows-with-your-organization
7
star
56

GSoC

Google Summer of Code
7
star
57

example-wikipedia-recommendation

An example of graph embeddings for wikipedia page recommendations
Jupyter Notebook
6
star
58

executor-U100KIndexer

An Indexer that works out-of-the-box when you have less than 100K stored Documents
Python
6
star
59

devrel-heartmaker

Heart mosaics of your GitHub contributors
Python
6
star
60

executor-text-transformers-torch-encoder

**TransformerTorchEncoder** wraps the torch-version of transformers from huggingface. It encodes text data into dense vectors.
Python
6
star
61

executor-cases

Summarize all Executor patterns for Hubble
Python
5
star
62

executor-normalizer

Jina executor package normalizer
Python
5
star
63

auth

deprecated, use `jina-hubble-sdk`
Python
5
star
64

jina-commons

A collection of shared function for Jina Executor
Python
5
star
65

tutorial-notebooks

Jupyter Notebook
5
star
66

jina-paddle-hackathon

极纳 x 百度飞桨 黑客马拉松
Python
5
star
67

executor-image-preprocessor

An executor that performs standard pre-processing and normalization on images.
Python
5
star
68

jina-hackathon

Support repo for Jina X Hackathon - Sep 2020
5
star
69

executor-featurehasher

FeatureHasher
Python
4
star
70

jina-sagemaker

Jina Embedding Models on AWS SageMaker
Jupyter Notebook
4
star
71

stress-test

A collection of stress tests of Jina infrastructure
Python
4
star
72

executor-image-clip-classifier

Python
4
star
73

executor-text-transformerqa

**TransformerQAExecutor* wraps a question-answering model from huggingface and return relevant answers given questions and contexts/paragraphs.
Python
4
star
74

executor-faissindexer

A similarity search indexer based on Faiss. https://hub.jina.ai/executor/8gsd0tts
Python
4
star
75

hub-integration

Integration test for hub
Python
4
star
76

example-audio-search

Python
3
star
77

example-video-qa

This is an example of building a video QA with jina
TypeScript
3
star
78

jinad

Management of Jina on remote
Python
3
star
79

executor-indexers

Indexer Executors for Jina
Python
3
star
80

executor-text-dpr-encoder

Encode text into embeddings using the DPR model.
Python
3
star
81

legacy-examples

Unmaintained examples for Jina
Python
3
star
82

executor-clip-image

Executor for the pre-trained clip model. https://openai.com/blog/clip/
Python
3
star
83

executor-weaviate-indexer

Python
3
star
84

executor-doc2query

Python
3
star
85

executor-image-paddle-encoder

Python
3
star
86

jupyter-notebooks

Jupyter Notebook
3
star
87

executor-evaluator-ranking

Python
3
star
88

executor-yolov5

Python
3
star
89

executor-lightgbm-ranker

Python
3
star
90

terraform-jina-jinad-aws

Module for deploying JinaD on AWS
HCL
3
star
91

encoder-image-torch

The ImageTorchEncoder encodes Document content from a ndarray to an d-dimensional vector.
Python
3
star
92

example-odqa

Roff
2
star
93

executor-text-clip-encoder

Encode text into embeddings using the CLIP model.
Python
2
star
94

jina-ui

Monorepo for JinaJS and frontend projects
TypeScript
2
star
95

executor-audio-clip-encoder

Wraps the AudioCLIP model for generating embeddings for audio data for the Jina framework
Python
2
star
96

executor-matchmerger

**MatchMerger** Merges the results of shards by appending all matches.
Python
2
star
97

executor-image-niireader

Python
2
star
98

executor-image-normalizer

Executor that reads, resizes, crops and normalizes images.
Python
2
star
99

executor-vgg-audio-encoder

Python
2
star
100

executor-image-hasher

An executor to encode images using comparable hashing techniques. Useful for duplicate detection
Python
2
star