mirror of
https://github.com/MindWorkAI/AI-Studio.git
synced 2026-02-12 17:01:36 +00:00
updated example plugin.lua for dynamic assistants
This commit is contained in:
parent
0775b03529
commit
9374b56789
@ -53,49 +53,59 @@ ASSISTANT = {
|
|||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
-- An example of a assistant that resembles AI Studios translation assistant:
|
-- usage example with the full feature set:
|
||||||
ASSISTANT = {
|
ASSISTANT = {
|
||||||
["Title"] = "Grammatik- und Rechtschreibprüfung",
|
["Title"] = "<main title of assistant>", -- required
|
||||||
["Description"] = "Grammatik und Rechtschreibung eines Textes überprüfen.",
|
["Description"] = "<assitant description>", -- required
|
||||||
|
["SystemPrompt"] = "<prompt that fudamentally changes behaviour, personality and task focus of your assistant. Invisible to the user>", -- required
|
||||||
|
["SubmitText"] = "<label for submit button>", -- required
|
||||||
|
["AllowProfiles"] = true, -- if true, allows AiStudios profiles; required
|
||||||
["UI"] = {
|
["UI"] = {
|
||||||
["Type"] = "FORM",
|
["Type"] = "FORM",
|
||||||
["Children"] = {
|
["Children"] = {
|
||||||
{
|
{
|
||||||
["Type"] = "TEXT_AREA",
|
["Type"] = "TEXT_AREA", -- required
|
||||||
["Props"] = {
|
["Props"] = {
|
||||||
["Name"] = "input",
|
["Name"] = "<unique identifier of this component>", -- required
|
||||||
["Label"] = "Ihre Eingabe zur Überprüfung"
|
["Label"] = "<heading of your component>", -- required
|
||||||
|
["UserPrompt"] = "<direct input of instructions, questions, or tasks by a user>",
|
||||||
|
["PrefillText"] = "<text to show in the field initially>",
|
||||||
|
["IsSingleLine"] = false, -- if true, shows a text field instead of an area
|
||||||
|
["ReadOnly"] = false -- if true, deactivates user input (make sure to provide a PrefillText)
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
["Type"] = "DROPDOWN",
|
["Type"] = "DROPDOWN", -- required
|
||||||
["ValueType"] = "string",
|
|
||||||
["Default"] = { ["Value"] = "", ["Display"] = "Sprache nicht angeben." },
|
|
||||||
["Items"] = {
|
|
||||||
{ ["Value"] = "de-DE", ["Display"] = "Deutsch" },
|
|
||||||
{ ["Value"] = "en-UK", ["Display"] = "Englisch (UK)" },
|
|
||||||
{ ["Value"] = "en-US", ["Display"] = "Englisch (US)" },
|
|
||||||
},
|
|
||||||
["Props"] = {
|
["Props"] = {
|
||||||
["Name"] = "language",
|
["Name"] = "<unique identifier of this component>", -- required
|
||||||
["Label"] = "Sprache",
|
["Label"] = "<heading of your component>", -- required
|
||||||
|
["UserPrompt"] = "<direct input of instructions, questions, or tasks by a user>",
|
||||||
|
["ValueType"] = "<data type of item values>", -- required
|
||||||
|
["Default"] = { ["Value"] = "<internal data>", ["Display"] = "<user readable representation>" }, -- required
|
||||||
|
["Items"] = {
|
||||||
|
{ ["Value"] = "<internal data>", ["Display"] = "<user readable representation>" },
|
||||||
|
{ ["Value"] = "<internal data>", ["Display"] = "<user readable representation>" },
|
||||||
|
} -- required
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
["Type"] = "PROVIDER_SELECTION",
|
["Type"] = "SWITCH",
|
||||||
|
["Props"] = {
|
||||||
|
["Name"] = "<unique identifier of this component>", -- required
|
||||||
|
["Label"] = "<heading of your component>", -- required
|
||||||
|
["Value"] = true, -- intial switch state
|
||||||
|
["UserPrompt"] = "<direct input of instructions, questions, or tasks by a user>",
|
||||||
|
["LabelOn"] = "<text if state is true>", -- required
|
||||||
|
["LabelOff"] = "<text if state is false>" -- required
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
["Type"] = "PROVIDER_SELECTION", -- required
|
||||||
["Props"] = {
|
["Props"] = {
|
||||||
["Name"] = "Anbieter",
|
["Name"] = "Anbieter",
|
||||||
["Label"] = "LLM auswählen"
|
["Label"] = "LLM auswählen"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
|
||||||
["Type"] = "BUTTON",
|
|
||||||
["Props"] = {
|
|
||||||
["Name"] = "submit",
|
|
||||||
["Text"] = "Korrekturlesen",
|
|
||||||
["Action"] = "OnSubmit"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
Loading…
Reference in New Issue
Block a user