Package: dev-gpt
Dev-GPT: Your Automated Development Team⚠️ This is an experimental version. ⚠️Product ManagerDeveloperDevOpsTell your AI team what microservice you want to build, and they will do it for you.
Your imagination is the limit!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.Quickstartpipinstalldev-gpt
dev-gptgenerateRequirementsOpenAI key with access to gpt-3.5-turbo or gpt-4if 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 foundhere.dev-gptconfigure--openai_api_key<youropenaiapikey>
dev-gptconfigure--google_api_key<googleapikey>(optionalifyouwanttousegooglecustomsearch)dev-gptconfigure--google_cse_id<googlecseid>(optionalifyouwanttousegooglecustomsearch)If you set the environment variableOPENAI_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.DocsGenerate Microservicedev-gptgenerate\--description"<description of the microservice>"\--model<gpt-3.5-turboorgpt-4>\--path</path/to/local/folder>To generate your personal microservice two things are required:Adescriptionof the task you want to accomplish. (optional)Themodelyou want to use - eithergpt-3.5-turboorgpt-4.gpt-3.5-turbois ~10x cheaper,
but will not be able to generate as complex microservices. (default: largest you have access to)Apathon 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 MicroserviceRun 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-gptrun--path<pathtomicroservice>Deploy MicroserviceIf you want to deploy your microservice to the cloud aJina accountis 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-gptdeploy--microservice_path<pathtomicroservice>Delete MicroserviceTo save credits you can delete your microservice via the following commands:jclist# get the microservice idjcdelete<microserviceid>ExamplesIn this section you can get a feeling for the kind of microservices that can be generated with Dev-GPT.Compliment Generatordev-gptgenerate\--description"The user writes something and gets a related deep compliment."\--modelgpt-4Extract and summarize news articles given a URLdev-gptgenerate\--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/"\--modelgpt-4Chemical Formula Visualizationdev-gptgenerate\--description"Convert a chemical formula into a 2D chemical structure diagram. Example inputs: C=C, CN=C=O, CCC(=O)O"\--modelgpt-42d rendering of 3d modeldev-gptgenerate\--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"\--modelgpt-4Product Recommendationdev-gptgenerate\--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)"\--modelgpt-4Hacker News Searchdev-gptgenerate\--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)"\--modelgpt-4Animal Detectordev-gptgenerate\--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"\--modelgpt-4Meme Generatordev-gptgenerate\--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"\--modelgpt-4Rhyme Generatordev-gptgenerate\--description"Given a word, return a list of rhyming words using the datamuse api"\--modelgpt-4Word Cloud Generatordev-gptgenerate\--description"Generate a word cloud from a given text"\--modelgpt-43d model infodev-gptgenerate\--description"Given a 3d object, return vertex count and face count. Example: https://raw.githubusercontent.com/polygonjs/polygonjs-assets/master/models/wolf.obj"\--modelgpt-4Table extractiondev-gptgenerate\--description"Given a URL, extract all tables as csv. Example: http://www.ins.tn/statistiques/90"\--modelgpt-4Audio to mel spectrogramdev-gptgenerate\--description"Create mel spectrogram from audio file. Example: https://cdn.pixabay.com/download/audio/2023/02/28/audio_550d815fa5.mp3"\--modelgpt-4Text to speechdev-gptgenerate\--description"Convert text to speech"\--modelgpt-4Your browser does not support the audio element.Heatmap Generatordev-gptgenerate\--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]]"\--modelgpt-4QR Code Generatordev-gptgenerate\--description"Generate QR code from URL. Example input: https://www.example.com"\--modelgpt-4Mandelbrot Set Visualizerdev-gptgenerate\--description"Visualize the Mandelbrot set with custom parameters. Example input: center=-0+1i, zoom=1.0, size=800x800, iterations=1000"\--modelgpt-4Markdown to HTML Converterdev-gptgenerate--description"Convert markdown to HTML"Technical InsightsThe 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]Dev-GPT identifies several strategies to implement your task.It tests each strategy until it finds one that works.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.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.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.If it fails 10 times in a row, it moves on to the next approach.🔮 visionUse natural language interface to generate, deploy and update your microservice infrastructure.✨ ContributorsIf 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 worksadd video to README.mdbug: it can happen that the code generation is hanging forever - in this case aboard and redo the generationnew user has free credits but should be told to verify accountNice to have:smooth rendering animation of  the responsesif the user runs dev-gpt without any arguments, show the help messagedon'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 modetestsclean up duplicate codesupport popular cloud providers - lambda, cloud run, cloud functions, ...support local docker buildsautoscaling enabled for cost savingadd more examples to README.mdsupport multiple endpoints - example: todolist microservice with endpoints for adding, deleting, and listing todossupport stateful microservicesThe 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 feedbacksupport for other large language models like Open Assistentfor cost savings, it should be possible to insert less context during the code generation of the main functionality - no jina knowledge is requireduse dev-gpt list to show all deploymentsdev-gpt delete to delete a deploymentdev-gpt update to update a deploymenttest 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 datasection for microservices built by the communitytest feedback for playground generation (could be part of the debugging)should we send everything via json in the text attribute for simplicity?fix release workflowafter the user specified the task, ask them questions back if the task is not clear enough or something is missingProposal:just generate the non-jina related code and insert it into an executor templatethink about strategies after the first approach failed?