From 66857dfdd848bb2c940cc3c32b9bc7f5309b469b Mon Sep 17 00:00:00 2001 From: Yulong Ruan Date: Tue, 21 May 2024 10:20:51 +0800 Subject: [PATCH] update prompt to fix field name includes dot(.) Signed-off-by: Yulong Ruan --- src/plugins/vis_type_vega/public/text_to_vega.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/src/plugins/vis_type_vega/public/text_to_vega.ts b/src/plugins/vis_type_vega/public/text_to_vega.ts index bb91d679f28..81063a06451 100644 --- a/src/plugins/vis_type_vega/public/text_to_vega.ts +++ b/src/plugins/vis_type_vega/public/text_to_vega.ts @@ -19,6 +19,7 @@ ${ppl} The user's instruction is: ${input} +when a field has a dot(.), you should escape the dot if the field is a single field. For example, if the field is "user.name", but the data is {"user.name": "John"}, the field should be escaped. But it should not be escaped if the data is {"user": {"name": "John"}} Just return the chart specification json based on Vega-Lite format. Just reply with the json based Vega-Lite object, do not include any other content in the reply. `;