From c85eb03dd325d9fcebdfce51280372f94d2042ae Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Florian=20Ho=CC=88nicke?= Date: Thu, 20 Apr 2023 16:55:40 +0200 Subject: [PATCH] =?UTF-8?q?=F0=9F=91=A8=E2=80=8D=F0=9F=92=BB=20fix:=20host?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 4 ++-- src/options/generate/templates_user.py | 5 ++++- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index d48f36d..d2fad1c 100644 --- a/README.md +++ b/README.md @@ -6,7 +6,7 @@ GPT Deploy: One line to generate them all 🧙🚀 Jina NOW logo

-Turn your natural language descriptions into fully functional, deployed microservices with a single command! +Turn your natural language descriptions into fully functional, deployed AI-powered microservices with a single command! Your imagination is the limit!

@@ -37,7 +37,7 @@ Your imagination is the limit! [![Watch the video](res/thumbnail.png)](https://user-images.githubusercontent.com/11627845/231530421-272a66aa-4260-4e17-ab7a-ba66adca754c.mp4)

-This project streamlines the creation and deployment of microservices. +This project streamlines the creation and deployment of AI-powered microservices. Simply describe your task using natural language, and the system will automatically build and deploy your microservice. To ensure the microservice accurately aligns with your intended task a test scenario is required. diff --git a/src/options/generate/templates_user.py b/src/options/generate/templates_user.py index 6019433..06175d5 100644 --- a/src/options/generate/templates_user.py +++ b/src/options/generate/templates_user.py @@ -307,9 +307,12 @@ print(response[0].text) # can also be blob in case of image/audio..., this shoul Note that the response will always be in response[0].text The playground displays a code block containing the microservice specific curl code that can be used to send the request to the microservice. Example: + +deployment_id = os.environ.get("K8S_NAMESPACE_NAME", "") +host = 'https://gptdeploy-{{deployment_id.split('-')[1}}.wolf.jina.ai/post' if deployment_id else "http://localhost:8080/post" with st.expander("See curl command"): st.code( - 'curl -X POST -H "Content-Type: application/json" -d \'[{{"text": ""}}]\' ' + f'curl -X \\'POST\\' \\'host\\' -H \\'accept: application/json\\' -H \\'Content-Type: application/json\\' -d \\'{{{{"data": [{{{{"text": "hello, world!"}}}}]}}}}\\'' language='bash' )