iobroker.ai-assistant
Version:
AI Assistant adapter allows you to control your ioBroker trought artifical intelligence based on LLMs
898 lines (897 loc) • 35.9 kB
JSON
{
"i18n": true,
"type": "tabs",
"items": {
"tab_2": {
"type": "panel",
"label": "Assistant",
"items": {
"assistant_header": {
"type": "header",
"size": 3,
"text": "Assistant Settings"
},
"assistant_description": {
"type": "staticText",
"text": "Give your personal assistant a name and describe its personality. Choose a model that should be used for your assistant.",
"xs": 12,
"sm": 12,
"md": 12,
"lg": 12,
"xl": 12
},
"assistant_name": {
"type": "text",
"xs": 12,
"sm": 6,
"md": 6,
"lg": 6,
"xl": 6,
"label": "Name",
"tooltip": "Name for the Assistant",
"default": "Ion",
"maxLength": 15
},
"assistant_model": {
"xs": 12,
"sm": 6,
"md": 6,
"lg": 6,
"xl": 6,
"type": "selectSendTo",
"data": { "function": "getAvailableModels" },
"command": "getAvailableModels",
"label": "Model",
"tooltip": "Which Model should be used"
},
"assistant_personality": {
"type": "text",
"xs": 12,
"sm": 9,
"md": 9,
"lg": 9,
"xl": 9,
"label": "Personality",
"tooltip": "Describe the personality of your assistant",
"default": "Friendly and helpful"
},
"assistant_language": {
"type": "select",
"xs": 12,
"sm": 3,
"md": 3,
"lg": 3,
"xl": 3,
"label": "Language",
"tooltip": "Select the language that should be used by the assistant",
"default": "en",
"options": [
{
"label": "English",
"value": "en"
},
{
"label": "German",
"value": "de"
}
]
},
"assistant_debug_output": {
"type": "checkbox",
"xs": 12,
"sm": 12,
"md": 12,
"lg": 12,
"xl": 12,
"label": "Debug / Chain-of-Thought Output",
"tooltip": "When activated the internal thought process of the assistant will be written to the response datapoint",
"default": false
},
"assistant_parameters_header": {
"type": "header",
"size": 3,
"text": "Model Settings"
},
"assistant_parameters_description": {
"type": "staticText",
"text": "Select how many messages should be included for context retention. Temperature defines creativity/randomness of output from 0-1 where 0 is the most predictable output. Set how many tokens should be generated max for assistant responses.",
"xs": 12,
"sm": 12,
"md": 12,
"lg": 12,
"xl": 12
},
"chat_history": {
"type": "number",
"xs": 12,
"sm": 4,
"md": 4,
"lg": 4,
"xl": 4,
"label": "Message History (Chat Mode)",
"tooltip": "If greater 0 previous messages will be included in the request so the tool will stay in context",
"min": 0,
"max": 60,
"step": 1,
"default": 0
},
"temperature": {
"type": "number",
"xs": 12,
"sm": 4,
"md": 4,
"lg": 4,
"xl": 4,
"label": "Temperature",
"tooltip": "Setting for creativity/consistency of the models response. (Leave at default if you are not sure!=",
"min": 0,
"max": 1,
"step": 0.1,
"default": 0.6
},
"max_tokens": {
"type": "number",
"xs": 12,
"sm": 4,
"md": 4,
"lg": 4,
"xl": 4,
"label": "Max. Tokens",
"tooltip": "Limit the response of the tool to your desired amount of tokens.",
"min": 0,
"max": 10000,
"step": 1,
"default": 2000
},
"assistant_request_header": {
"type": "header",
"size": 3,
"text": "Request Settings"
},
"assistant_request_description": {
"type": "staticText",
"text": "Select if failed requests to the assistant should be retried and how long to wait between tries and how long to wait for a response. If the assistant is not responding you can try to increase the timeout.",
"xs": 12,
"sm": 12,
"md": 12,
"lg": 12,
"xl": 12
},
"request_timeout": {
"type": "number",
"xs": 12,
"sm": 4,
"md": 4,
"lg": 4,
"xl": 4,
"label": "Timeout (in seconds)",
"tooltip": "How long to wait for a response from the model till it is considered a failed request",
"min": 1,
"max": 300,
"step": 1,
"default": 30
},
"max_retries": {
"type": "number",
"xs": 12,
"sm": 4,
"md": 4,
"lg": 4,
"xl": 4,
"label": "Max. Retries",
"tooltip": "How many times should we retry if request to model fails",
"min": 0,
"max": 15,
"step": 1,
"default": 3
},
"retry_delay": {
"type": "number",
"xs": 12,
"sm": 4,
"md": 4,
"lg": 4,
"xl": 4,
"label": "Retry Delay (in seconds)",
"tooltip": "How long to wait between retries",
"min": 0,
"max": 300,
"step": 1,
"default": 15
}
}
},
"states": {
"type": "panel",
"label": "Objects",
"items": {
"assistant_header": {
"type": "header",
"size": 3,
"text": "Object access for assistant"
},
"deviderTxt1": {
"type": "staticText",
"text": "Please add the objects you want to use with the assistant. The assistant will be able to read and control these objects. You can use the button to import all states from your configured room sorting. Make sure to only include needed states to save tokens.",
"newLine": true,
"xs": 12,
"sm": 12,
"md": 12,
"lg": 12,
"xl": 12
},
"import_from_enums": {
"xs": 12,
"sm": 12,
"md": 12,
"lg": 12,
"xl": 12,
"type": "sendTo",
"data": { "function": "importFromEnums" },
"command": "importFromEnums",
"label": "Import objects from enum.rooms",
"tooltip": "Import objects from enum.rooms",
"confirm": {
"text": "Do you really want to import objects from enum.rooms? Existing objects will be reset!",
"title": "Import objects from enum.rooms"
},
"useNative": true,
"variant": "outlined"
},
"available_endpoints": {
"type": "table",
"newLine": true,
"xs": 12,
"sm": 12,
"md": 12,
"lg": 12,
"xl": 12,
"label": "Objects",
"showSecondAddAt": 5,
"items": [
{
"type": "checkbox",
"attr": "active",
"width": "5% ",
"title": "Active",
"tooltip": "Assistant can use Object",
"filter": true,
"sort": true,
"default": true
},
{
"type": "text",
"attr": "sort",
"width": "10% ",
"title": "Sort",
"tooltip": "Room or sorting for Object",
"filter": true,
"sort": true,
"default": ""
},
{
"type": "text",
"attr": "name",
"width": "20% ",
"title": "Name",
"tooltip": "Name of the State for the Assistant",
"filter": true,
"sort": true,
"default": ""
},
{
"type": "objectId",
"attr": "objId",
"width": "55% ",
"title": "Object",
"label": "Object",
"default": ""
}
]
}
}
},
"functions": {
"type": "panel",
"label": "Functions",
"items": {
"assistant_header": {
"type": "header",
"size": 3,
"text": "Custom functions for assistant"
},
"deviderTxt1": {
"type": "staticText",
"text": "Define custom functions for the assistant. Make sure to add a good description for your functions so the assistant knows when to call your function. Each function needs a datapoint that starts the process and another datapoint that contains the result of your function.",
"newLine": true,
"xs": 12,
"sm": 12,
"md": 12,
"lg": 12,
"xl": 12
},
"available_functions": {
"type": "table",
"newLine": true,
"xs": 12,
"sm": 12,
"md": 12,
"lg": 12,
"xl": 12,
"label": "Functions",
"showSecondAddAt": 5,
"items": [
{
"type": "checkbox",
"attr": "active",
"width": "5% ",
"title": "Active",
"tooltip": "Assistant can use this function",
"filter": true,
"sort": true,
"default": true
},
{
"type": "text",
"attr": "name",
"width": "10% ",
"title": "Name",
"tooltip": "A descriptive name for your function",
"filter": true,
"sort": true,
"default": ""
},
{
"type": "text",
"attr": "description",
"width": "40% ",
"title": "Description",
"tooltip": "Describe what your function does and how the data for the request should look. This is important for the assistant to understand your function.",
"filter": true,
"sort": true,
"default": ""
},
{
"type": "objectId",
"attr": "objId_request",
"width": "20% ",
"title": "Datapoint (Request)",
"label": "The datapoint that starts the request for the function",
"default": ""
},
{
"type": "objectId",
"attr": "objId_result",
"width": "20% ",
"title": "Datapoint (Result)",
"label": "The datapoint that contains the result of your function call (Has to be fulfilled in 60 Seconds!)",
"default": ""
}
]
}
}
},
"tab_3": {
"type": "panel",
"label": "Anthropic",
"items": {
"deviderTxt1": {
"type": "staticText",
"text": "Please enter your Anthropic API Token to start using models like Opus, Haiku and Sonnet. If there are new models released you can simply add them in the table to start using them with ai assistants.",
"newLine": true,
"xs": 12,
"sm": 12,
"md": 12,
"lg": 12,
"xl": 12
},
"dividerHdr": {
"newLine": true,
"type": "header",
"text": "Settings",
"size": 2
},
"anth_api_token": {
"type": "password",
"label": "API Token",
"xs": 12,
"sm": 12,
"md": 6,
"lg": 4,
"xl": 4
},
"anth_api_version": {
"type": "text",
"label": "Anthropic API Version",
"default": "2023-06-01",
"xs": 12,
"sm": 12,
"md": 6,
"lg": 4,
"xl": 4
},
"model_name_unique_error": {
"type": "staticText",
"text": "ERROR: column 'Model' must contain unique text",
"newLine": true,
"hidden": "const x={}; for(let ii=0; data.anth_models && ii<data.anth_models.length; ii++){const t=data.anth_models[ii].model_name; if (x[t]==='x') return false; x[t]='x';}; return true;",
"validator": "const x={}; for(let ii=0; data.anth_models && ii<data.anth_models.length; ii++){const t=data.anth_models[ii].model_name; if (x[t]==='x') return false; x[t]='x';}; return true;",
"validatorNoSaveOnError": true,
"style": {
"color": "red"
},
"xs": 12,
"sm": 12,
"md": 12,
"lg": 6,
"xl": 6
},
"anth_models": {
"type": "table",
"newLine": true,
"xs": 12,
"sm": 12,
"md": 12,
"lg": 12,
"xl": 12,
"label": "Models",
"showSecondAddAt": 5,
"items": [
{
"type": "checkbox",
"attr": "model_active",
"width": "10% ",
"title": "Active",
"tooltip": "Model is active",
"filter": true,
"sort": true,
"default": true
},
{
"type": "text",
"attr": "model_name",
"width": "90% ",
"title": "Model",
"tooltip": "Name of the Model",
"filter": true,
"sort": true,
"default": ""
}
]
}
}
},
"tab_4": {
"type": "panel",
"label": "OpenAI",
"items": {
"deviderTxt1": {
"type": "staticText",
"text": "Please enter your OpenAI API Token to start using models like Gpt4, Gpt4-o1, Gpt3-5. If there are new models released you can simply add them in the table to start using them with ai assistants.",
"newLine": true,
"xs": 12,
"sm": 12,
"md": 12,
"lg": 12,
"xl": 12
},
"dividerHdr": {
"newLine": true,
"type": "header",
"text": "Settings",
"size": 2
},
"opai_api_token": {
"type": "password",
"label": "API Token",
"xs": 12,
"sm": 12,
"md": 6,
"lg": 4,
"xl": 4
},
"model_name_unique_error": {
"type": "staticText",
"text": "ERROR: column 'Model' must contain unique text",
"newLine": true,
"hidden": "const x={}; for(let ii=0; data.opai_models && ii<data.opai_models.length; ii++){const t=data.opai_models[ii].model_name; if (x[t]==='x') return false; x[t]='x';}; return true;",
"validator": "const x={}; for(let ii=0; data.opai_models && ii<data.opai_models.length; ii++){const t=data.opai_models[ii].model_name; if (x[t]==='x') return false; x[t]='x';}; return true;",
"validatorNoSaveOnError": true,
"style": {
"color": "red"
},
"xs": 12,
"sm": 12,
"md": 12,
"lg": 6,
"xl": 6
},
"opai_models": {
"type": "table",
"newLine": true,
"xs": 12,
"sm": 12,
"md": 12,
"lg": 12,
"xl": 12,
"label": "Models",
"showSecondAddAt": 5,
"items": [
{
"type": "checkbox",
"attr": "model_active",
"width": "10% ",
"title": "Active",
"tooltip": "Model is active",
"filter": true,
"sort": true,
"default": true
},
{
"type": "text",
"attr": "model_name",
"width": "90% ",
"title": "Model",
"tooltip": "Name of the Model",
"filter": true,
"sort": true,
"default": ""
}
]
}
}
},
"tab_5": {
"type": "panel",
"label": "Perplexity",
"items": {
"deviderTxt1": {
"type": "staticText",
"text": "Please enter your Perplexity API Token to start using the models. If there are new models released you can simply add them in the table to start using them with ai assistants.",
"newLine": true,
"xs": 12,
"sm": 12,
"md": 12,
"lg": 12,
"xl": 12
},
"dividerHdr": {
"newLine": true,
"type": "header",
"text": "Settings",
"size": 2
},
"pplx_api_token": {
"type": "password",
"label": "API Token",
"xs": 12,
"sm": 12,
"md": 6,
"lg": 4,
"xl": 4
},
"model_name_unique_error": {
"type": "staticText",
"text": "ERROR: column 'Model' must contain unique text",
"newLine": true,
"hidden": "const x={}; for(let ii=0; data.pplx_models && ii<data.pplx_models.length; ii++){const t=data.pplx_models[ii].model_name; if (x[t]==='x') return false; x[t]='x';}; return true;",
"validator": "const x={}; for(let ii=0; data.pplx_models && ii<data.pplx_models.length; ii++){const t=data.pplx_models[ii].model_name; if (x[t]==='x') return false; x[t]='x';}; return true;",
"validatorNoSaveOnError": true,
"style": {
"color": "red"
},
"xs": 12,
"sm": 12,
"md": 12,
"lg": 6,
"xl": 6
},
"pplx_models": {
"type": "table",
"newLine": true,
"xs": 12,
"sm": 12,
"md": 12,
"lg": 12,
"xl": 12,
"label": "Models",
"showSecondAddAt": 5,
"items": [
{
"type": "checkbox",
"attr": "model_active",
"width": "10% ",
"title": "Active",
"tooltip": "Model is active",
"filter": true,
"sort": true,
"default": true
},
{
"type": "text",
"attr": "model_name",
"width": "90% ",
"title": "Model",
"tooltip": "Name of the Model",
"filter": true,
"sort": true,
"default": ""
}
]
}
}
},
"tab_6": {
"type": "panel",
"label": "Openrouter",
"items": {
"deviderTxt1": {
"type": "staticText",
"text": "Please enter your Openrouter API Token to start using the models. If there are new models released you can simply add them in the table to start using them with ai assistants.",
"newLine": true,
"xs": 12,
"sm": 12,
"md": 12,
"lg": 12,
"xl": 12
},
"dividerHdr": {
"newLine": true,
"type": "header",
"text": "Settings",
"size": 2
},
"oprt_api_token": {
"type": "password",
"label": "API Token",
"xs": 12,
"sm": 12,
"md": 6,
"lg": 4,
"xl": 4
},
"model_name_unique_error": {
"type": "staticText",
"text": "ERROR: column 'Model' must contain unique text",
"newLine": true,
"hidden": "const x={}; for(let ii=0; data.pplx_models && ii<data.pplx_models.length; ii++){const t=data.pplx_models[ii].model_name; if (x[t]==='x') return false; x[t]='x';}; return true;",
"validator": "const x={}; for(let ii=0; data.pplx_models && ii<data.pplx_models.length; ii++){const t=data.pplx_models[ii].model_name; if (x[t]==='x') return false; x[t]='x';}; return true;",
"validatorNoSaveOnError": true,
"style": {
"color": "red"
},
"xs": 12,
"sm": 12,
"md": 12,
"lg": 6,
"xl": 6
},
"oprt_models": {
"type": "table",
"newLine": true,
"xs": 12,
"sm": 12,
"md": 12,
"lg": 12,
"xl": 12,
"label": "Models",
"showSecondAddAt": 5,
"items": [
{
"type": "checkbox",
"attr": "model_active",
"width": "10% ",
"title": "Active",
"tooltip": "Model is active",
"filter": true,
"sort": true,
"default": true
},
{
"type": "text",
"attr": "model_name",
"width": "90% ",
"title": "Model",
"tooltip": "Name of the Model",
"filter": true,
"sort": true,
"default": ""
}
]
}
}
},
"tab_7": {
"type": "panel",
"label": "Deepseek",
"items": {
"deviderTxt1": {
"type": "staticText",
"text": "Please enter your Deepseek API Token to start using the models. If there are new models released you can simply add them in the table to start using them with ai assistants.",
"newLine": true,
"xs": 12,
"sm": 12,
"md": 12,
"lg": 12,
"xl": 12
},
"dividerHdr": {
"newLine": true,
"type": "header",
"text": "Settings",
"size": 2
},
"deep_api_token": {
"type": "password",
"label": "API Token",
"xs": 12,
"sm": 12,
"md": 6,
"lg": 4,
"xl": 4
},
"model_name_unique_error": {
"type": "staticText",
"text": "ERROR: column 'Model' must contain unique text",
"newLine": true,
"hidden": "const x={}; for(let ii=0; data.pplx_models && ii<data.pplx_models.length; ii++){const t=data.pplx_models[ii].model_name; if (x[t]==='x') return false; x[t]='x';}; return true;",
"validator": "const x={}; for(let ii=0; data.pplx_models && ii<data.pplx_models.length; ii++){const t=data.pplx_models[ii].model_name; if (x[t]==='x') return false; x[t]='x';}; return true;",
"validatorNoSaveOnError": true,
"style": {
"color": "red"
},
"xs": 12,
"sm": 12,
"md": 12,
"lg": 6,
"xl": 6
},
"deep_models": {
"type": "table",
"newLine": true,
"xs": 12,
"sm": 12,
"md": 12,
"lg": 12,
"xl": 12,
"label": "Models",
"showSecondAddAt": 5,
"items": [
{
"type": "checkbox",
"attr": "model_active",
"width": "10% ",
"title": "Active",
"tooltip": "Model is active",
"filter": true,
"sort": true,
"default": true
},
{
"type": "text",
"attr": "model_name",
"width": "90% ",
"title": "Model",
"tooltip": "Name of the Model",
"filter": true,
"sort": true,
"default": ""
}
]
}
}
},
"tab_8": {
"type": "panel",
"label": "Custom",
"items": {
"deviderTxt1": {
"type": "staticText",
"text": "You can use your custom or self hosted inference server to run open source models. The server needs to follow the rest api standards used by many providers, see examples below. Please make sure to add your used models by name to the table below.",
"newLine": true,
"xs": 12,
"sm": 12,
"md": 12,
"lg": 12,
"xl": 12
},
"link_lmstudio": {
"type": "staticLink",
"text": "Link to LM Studio",
"href": "https://lmstudio.ai/",
"icon": "info",
"xs": 12,
"sm": 12,
"md": 12,
"lg": 12,
"xl": 12
},
"link_localai": {
"type": "staticLink",
"text": "Link to LocalAI",
"href": "https://localai.io/",
"icon": "info",
"xs": 12,
"sm": 12,
"md": 12,
"lg": 12,
"xl": 12
},
"dividerHdr": {
"newLine": true,
"type": "header",
"text": "Settings",
"size": 2
},
"custom_api_url": {
"type": "text",
"label": "URL for Inference Server",
"xs": 12,
"sm": 12,
"md": 12,
"lg": 12,
"xl": 12,
"default": "http://192.168.178.123:1234/v1/chat/completions"
},
"custom_api_token": {
"type": "password",
"label": "API Token for Inference Server",
"xs": 12,
"sm": 12,
"md": 12,
"lg": 12,
"xl": 12
},
"model_name_unique_error": {
"type": "staticText",
"text": "ERROR: column 'Model' must contain unique text",
"newLine": true,
"hidden": "const x={}; for(let ii=0; data.custom_models && ii<data.custom_models.length; ii++){const t=data.custom_models[ii].model_name; if (x[t]==='x') return false; x[t]='x';}; return true;",
"validator": "const x={}; for(let ii=0; data.custom_models && ii<data.custom_models.length; ii++){const t=data.custom_models[ii].model_name; if (x[t]==='x') return false; x[t]='x';}; return true;",
"validatorNoSaveOnError": true,
"style": {
"color": "red"
},
"xs": 12,
"sm": 12,
"md": 12,
"lg": 6,
"xl": 6
},
"custom_models": {
"type": "table",
"newLine": true,
"xs": 12,
"sm": 12,
"md": 12,
"lg": 12,
"xl": 12,
"label": "Models",
"showSecondAddAt": 5,
"items": [
{
"type": "checkbox",
"attr": "model_active",
"width": "10% ",
"title": "Active",
"tooltip": "Model is active",
"filter": true,
"sort": true,
"default": true
},
{
"type": "text",
"attr": "model_name",
"width": "90% ",
"title": "Model",
"tooltip": "Name of the Model",
"filter": true,
"sort": true,
"default": ""
}
]
}
}
}
}
}