commit
3dba483074
|
|
@ -33,6 +33,10 @@ public class PlotChartFn : IFunctionCallback
|
||||||
Id = agent.Id,
|
Id = agent.Id,
|
||||||
Name = agent.Name,
|
Name = agent.Name,
|
||||||
Instruction = inst,
|
Instruction = inst,
|
||||||
|
LlmConfig = new AgentLlmConfig
|
||||||
|
{
|
||||||
|
MaxOutputTokens = 8192
|
||||||
|
},
|
||||||
TemplateDict = new Dictionary<string, object>
|
TemplateDict = new Dictionary<string, object>
|
||||||
{
|
{
|
||||||
{ "plotting_requirement", args?.PlottingRequirement ?? string.Empty },
|
{ "plotting_requirement", args?.PlottingRequirement ?? string.Empty },
|
||||||
|
|
|
||||||
|
|
@ -4,10 +4,10 @@ Please take a look at "Plotting Requirement" and generate a javascript code that
|
||||||
{{ plotting_requirement }}
|
{{ plotting_requirement }}
|
||||||
|
|
||||||
***** Hard Requirements *****
|
***** Hard Requirements *****
|
||||||
** Your output must be a single <script>...</script> block with everything needed inside.
|
** Your output javascript code must be wrapped in one or multiple <script>...</script> blocks with everything needed inside.
|
||||||
** You need to import Plotly.js to plot the charts. The script source should be "https://cdn.plot.ly/plotly-3.0.1.min.js".
|
** You need to import ECharts.js to plot the charts. The script source is "https://cdnjs.cloudflare.com/ajax/libs/echarts/6.0.0/echarts.min.js".
|
||||||
** You need to add the MODE bar for each chart you plot.
|
** You need to add the MODE bar for each chart you plot.
|
||||||
** You must render the charts on the div html element with id {{ chart_element_id }}.
|
** You must render the charts under the div html element with id {{ chart_element_id }}.
|
||||||
** Add a custom mode bar button named "Fullscreen" that toggles the chart container in and out of fullscreen using the Fullscreen API. Requirements for this button:
|
** Add a custom mode bar button named "Fullscreen" that toggles the chart container in and out of fullscreen using the Fullscreen API. Requirements for this button:
|
||||||
* Always call the Fullscreen API on the chart container div itself (document.getElementById("{{ chart_element_id }}")), not on the document or on Plotly’s SVG.
|
* Always call the Fullscreen API on the chart container div itself (document.getElementById("{{ chart_element_id }}")), not on the document or on Plotly’s SVG.
|
||||||
* Use el.requestFullscreen() with fallbacks to el.webkitRequestFullscreen || el.msRequestFullscreen.
|
* Use el.requestFullscreen() with fallbacks to el.webkitRequestFullscreen || el.msRequestFullscreen.
|
||||||
|
|
@ -20,7 +20,8 @@ Please take a look at "Plotting Requirement" and generate a javascript code that
|
||||||
** You must not create any new html element.
|
** You must not create any new html element.
|
||||||
** You must not apply any styles on any html element.
|
** You must not apply any styles on any html element.
|
||||||
** Keep code compact (few tokens), but fix all errors before returning.
|
** Keep code compact (few tokens), but fix all errors before returning.
|
||||||
** Please fix any code errors before returning the final response.
|
** Do not generate charts with zero height and zero width.
|
||||||
|
** Please ensure the code can be executed and the charts are rendered correctly.
|
||||||
|
|
||||||
*** Response Format ***
|
*** Response Format ***
|
||||||
You must output the response in the following JSON format:
|
You must output the response in the following JSON format:
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue