From 042a4164ee8bc6d3e58ecec6aebf51d9e54dbf99 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Florian=20Ho=CC=88nicke?= Date: Thu, 20 Apr 2023 13:45:42 +0200 Subject: [PATCH] =?UTF-8?q?=F0=9F=91=A8=E2=80=8D=F0=9F=92=BB=20fix:=20prom?= =?UTF-8?q?pt=20schema?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/options/generate/templates_user.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/options/generate/templates_user.py b/src/options/generate/templates_user.py index a54ebbc..073e383 100644 --- a/src/options/generate/templates_user.py +++ b/src/options/generate/templates_user.py @@ -288,7 +288,7 @@ print('hello world') template_generate_playground = PromptTemplate.from_template( - general_guidelines_string + ''' + general_guidelines_string + '''👨‍💻 {code_files_wrapped} @@ -299,14 +299,14 @@ The playground contains many emojis that fit the theme of the playground and has The playground encourages the user to deploy their own microservice by clicking on this link: https://github.com/jina-ai/gptdeploy The playground provides a javascript code snippet that can be used to send requests to the executor. It looks like this: ```javascript -(async () => { +(async () => {{ const deploymentId = ''; const url = `https://gptdeploy-${deploymentId}.wolf.jina.ai/`; - const docArray = [{ text: '...' }]; + const docArray = [{{ text: '...' }}]; - const res = await fetch(url, { method: 'POST', headers: { 'Content-Type': 'application/json' }, body: JSON.stringify(docArray) }); + const res = await fetch(url, {{ method: 'POST', headers: {{ 'Content-Type': 'application/json' }}, body: JSON.stringify(docArray) }}); console.log((await res.json())[0].text); -})(); +}})(); ``` Make sure you put the right example data into the text attribute of the document.