From 746b53c5e12f595af157c6f96132661fd61cf00e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Florian=20Ho=CC=88nicke?= Date: Thu, 20 Apr 2023 19:32:38 +0200 Subject: [PATCH 1/2] =?UTF-8?q?=F0=9F=8C=8F=20fix:=20http=20remote?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/options/generate/templates_user.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/options/generate/templates_user.py b/src/options/generate/templates_user.py index b206ad5..edc56f2 100644 --- a/src/options/generate/templates_user.py +++ b/src/options/generate/templates_user.py @@ -309,7 +309,7 @@ The playground displays a code block containing the microservice specific curl c 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" +host = f'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( f'curl -X \\'POST\\' \\'host\\' -H \\'accept: application/json\\' -H \\'Content-Type: application/json\\' -d \\'{{{{"data": [{{{{"text": "hello, world!"}}}}]}}}}\\'' From f4f40f7f9aeeda0f602a50a27695e6aaf0106c1d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Florian=20Ho=CC=88nicke?= Date: Thu, 20 Apr 2023 19:37:29 +0200 Subject: [PATCH 2/2] =?UTF-8?q?=F0=9F=8C=8F=20fix:=20http=20remote?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/options/generate/templates_user.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/options/generate/templates_user.py b/src/options/generate/templates_user.py index edc56f2..1e54e6f 100644 --- a/src/options/generate/templates_user.py +++ b/src/options/generate/templates_user.py @@ -309,10 +309,10 @@ The playground displays a code block containing the microservice specific curl c Example: deployment_id = os.environ.get("K8S_NAMESPACE_NAME", "") -host = f'https://gptdeploy-{{deployment_id.split('-')[1]}}.wolf.jina.ai/post' if deployment_id else "http://localhost:8080/post" +host = f'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( - f'curl -X \\'POST\\' \\'host\\' -H \\'accept: application/json\\' -H \\'Content-Type: application/json\\' -d \\'{{{{"data": [{{{{"text": "hello, world!"}}}}]}}}}\\'' + f'curl -X \\'POST\\' \\'host\\' -H \\'accept: application/json\\' -H \\'Content-Type: application/json\\' -d \\'{{{{"data": [{{{{"text": "hello, world!"}}}}]}}}}\\'', language='bash' )