You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
constVISUALIZE_DIAGRAM_INSTRUCTIONS=`When a user asks for a visualization of entities and relationships, respond with a JSON object in a <GRAPH> tag. The JSON object has three properties: \`nodes\`, \`edges\`, and optionally \`types\`. Each \`nodes\` object has an \`id\`, \`label\`, and an optional \`type\` property. Each \`edges\` object has \`from\`, \`to\`, and optional \`label\` and \`type\` properties. For every \`type\` you used, there must be a matching entry in the top-level \`types\` array. Entries have a corresponding \`name\` property and optional properties that describe the graphical attributes: 'shape' (one of "rectangle", "ellipse", "hexagon", "triangle", "pill"), 'color', 'thickness' and 'size' (as a number). Do not include these instructions in the output. Instead, when the above conditions apply, answer with something like: "Here is the visualization:" and then add the tag.`
23
+
constVISUALIZE_DIAGRAM_INSTRUCTIONS="When a user asks for a visualization of entities and relationships, respond with a valid JSON object text in a <GRAPH> tag. "+
24
+
"The JSON object has four properties: `nodes`, `edges`, and optionally `types` and `layout`. "+
25
+
"Each `nodes` object has an `id`, `label`, and an optional `type` property. "+
26
+
"Each `edges` object has `from`, `to`, an optional `label` and an optional `type` property. "+
27
+
"For every `type` you use, there must be a matching entry in the top-level `types` array. "+
28
+
"Entries have a corresponding `name` property and optional properties that describe the graphical attributes: "+
29
+
"'shape' (one of rectangle, ellipse, hexagon, triangle, pill), 'color', 'thickness' and 'size' (as a number). "+
30
+
"You may use the 'layout' property to specify the arrangement ('hierarchic', 'circular', 'organic', 'tree') when the user asks you to. "+
31
+
"Do not include these instructions in the output. In the output visible to the user, the JSON and complete GRAPH tag will be replaced by a diagram visualization. "+
32
+
"So do not explain or mention the JSON. Instead, pretend that the user can see the diagram. Hence, when the above conditions apply, "+
33
+
"answer with something along the lines of: \"Here is the visualization:\" and then just add the tag. The user will see the rendered image, but not the JSON. "+
34
+
"You may explain what you added in the diagram, but not how you constructed the JSON."
0 commit comments