mirror of
https://github.com/MindWorkAI/AI-Studio.git
synced 2026-08-11 23:32:12 +00:00
adding the system prompt hints to documentation of assistant plugins to enable the charts here too
This commit is contained in:
parent
9d61be3f4e
commit
79c510284d
@ -87,6 +87,38 @@ Each assistant plugin lives in its own directory under the assistants plugin roo
|
||||
- `LaunchBehavior = "OPEN_WORKSPACE_CHAT_BY_NAME"`
|
||||
- `WorkspaceName = "<target workspace name>"`
|
||||
- `UI.Type` is always `"FORM"` and `UI.Children` is a list of component tables.
|
||||
|
||||
### Chart output
|
||||
|
||||
When an assistant is expected to return a chart, include the following instructions in `ASSISTANT.SystemPrompt`. AI Studio validates and renders the block locally; Lua does not generate or render the chart itself.
|
||||
|
||||
````text
|
||||
When a chart is useful or explicitly requested, you may include one or more complete chart blocks in your normal response. Use exactly this fenced JSON format:
|
||||
```aistudio-chart
|
||||
{
|
||||
"schema_version": 1,
|
||||
"type": "bar",
|
||||
"title": "Chart title",
|
||||
"caption": "Contextual interpretation of the diagram",
|
||||
"data": {
|
||||
"categories": ["A", "B"],
|
||||
"series": [
|
||||
{
|
||||
"name": "Series",
|
||||
"values": [1, 2]
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
- Supported types are `bar`, `stacked_bar`, `line`, `pie`, and `donut`.
|
||||
- Every series needs exactly one finite numeric value per category.
|
||||
- Pie and donut charts need exactly one series and non-negative values.
|
||||
- Add a concise caption that correctly contextualizes the diagram and may explain the chart's main finding.
|
||||
- Use only the fields shown above.
|
||||
- Keep other explanatory text outside the chart block.
|
||||
````
|
||||
- Each component table declares `Type`, an optional `Children` array, and a `Props` table that feeds the component’s parameters.
|
||||
|
||||
### Example: Minimal Requirements Assistant Table
|
||||
@ -96,7 +128,7 @@ DEPLOYED_USING_CONFIG_SERVER = false
|
||||
ASSISTANT = {
|
||||
["Title"] = "",
|
||||
["Description"] = "",
|
||||
["SystemPrompt"] = "",
|
||||
["SystemPrompt"] = "", -- request an aistudio-chart block here when the expected result is a chart
|
||||
["SubmitText"] = "",
|
||||
["AllowProfiles"] = true,
|
||||
["LaunchBehavior"] = "OPEN_WORKSPACE_CHAT_BY_NAME",
|
||||
|
||||
@ -63,11 +63,39 @@ ASSISTANT = {
|
||||
},
|
||||
}
|
||||
|
||||
--[[
|
||||
When a chart is useful or explicitly requested, you may include one or more complete chart blocks in your normal response. Use exactly this fenced JSON format:
|
||||
```aistudio-chart
|
||||
{
|
||||
"schema_version": 1,
|
||||
"type": "bar",
|
||||
"title": "Chart title",
|
||||
"caption": "Contextual interpretation of the diagram",
|
||||
"data": {
|
||||
"categories": ["A", "B"],
|
||||
"series": [
|
||||
{
|
||||
"name": "Series",
|
||||
"values": [1, 2]
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
- Supported types are `bar`, `stacked_bar`, `line`, `pie`, and `donut`.
|
||||
- Every series needs exactly one finite numeric value per category.
|
||||
- Pie and donut charts need exactly one series and non-negative values.
|
||||
- Add a concise caption that correctly contextualizes the diagram and may explain the chart's main finding.
|
||||
- Use only the fields shown above.
|
||||
- Keep other explanatory text outside the chart block.
|
||||
]]
|
||||
|
||||
-- usage example with the full feature set:
|
||||
ASSISTANT = {
|
||||
["Title"] = "<main title of assistant>", -- required
|
||||
["Description"] = "<assistant description>", -- required
|
||||
["SystemPrompt"] = "<prompt that fundamentally changes behaviour, personality and task focus of your assistant. Invisible to the user>", -- required
|
||||
["SystemPrompt"] = "<prompt that fundamentally changes behaviour, personality and task focus of your assistant. If the expected result is a chart, include the chart-output instructions above. Invisible to the user>", -- required
|
||||
["SubmitText"] = "<label for submit button>", -- required
|
||||
["AllowProfiles"] = true, -- if true, allows AiStudios profiles; required
|
||||
["LaunchBehavior"] = "<NONE|OPEN_WORKSPACE_CHAT_BY_NAME>", -- optional; when set to OPEN_WORKSPACE_CHAT_BY_NAME the tile opens a chat directly
|
||||
|
||||
Loading…
Reference in New Issue
Block a user