diff --git a/README.md b/README.md index da06e81..9ac1810 100644 --- a/README.md +++ b/README.md @@ -67,59 +67,11 @@ jc list # get the microservice id jc delete ``` -## Overview -The graphic below illustrates the process of creating a microservice and deploying it to the cloud elaboration two different implementation strategies. - -```mermaid - -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[create streamlit playground] - - streamlit --> user_run[user tests microservice] - -``` - -1. GPT Deploy identifies several strategies to implement your task. -2. It tests each strategy until it finds one that works. -3. For each strategy, it creates the following files: -- executor.py: This is the main implementation of the microservice. -- test_executor.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. -4. GPT Deploy 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. -5. Once it finds a successful strategy, it: -- Pushes the Docker image to the registry. -- Deploys the microservice. -- Creates a Streamlit playground where you can test the microservice. -6. If it fails 10 times in a row, it moves on to the next approach. ## Examples +QR Code Generator + ### Animal Detector ```bash @@ -398,6 +350,58 @@ gptdeploy create --description "Visualize the Mandelbrot set with custom paramet [//]: # (```) +## Technical Insights +The graphic below illustrates the process of creating a microservice and deploying it to the cloud elaboration two different implementation strategies. + +```mermaid + +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[create streamlit playground] + + streamlit --> user_run[user tests microservice] + +``` + +1. GPT Deploy identifies several strategies to implement your task. +2. It tests each strategy until it finds one that works. +3. For each strategy, it creates the following files: +- executor.py: This is the main implementation of the microservice. +- test_executor.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. +4. GPT Deploy 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. +5. Once it finds a successful strategy, it: +- Pushes the Docker image to the registry. +- Deploys the microservice. +- Creates a Streamlit playground where you can test the microservice. +6. If it fails 10 times in a row, it moves on to the next approach. + + ## 🔮 vision Use natural language interface to create, deploy and update your microservice infrastructure. diff --git a/res/teaser.png b/res/teaser.png new file mode 100644 index 0000000..c1ce946 Binary files /dev/null and b/res/teaser.png differ diff --git a/src/gpt.py b/src/gpt.py index 1e53a81..a8811b6 100644 --- a/src/gpt.py +++ b/src/gpt.py @@ -19,6 +19,7 @@ class GPTSession: self.pricing_prompt = PRICING_GPT4_PROMPT self.pricing_generation = PRICING_GPT4_GENERATION else: + raise Exception('The OPENAI_API_KEY does not have access to GPT-4. We are working on 3.5-turbo - support') self.supported_model = 'gpt-3.5-turbo' self.pricing_prompt = PRICING_GPT3_5_TURBO_PROMPT self.pricing_generation = PRICING_GPT3_5_TURBO_GENERATION