{
    "meta": {
        "label": "Traces Explorer",
        "description": "Traces Explorer provides a user interface to explore Dataiku LLM Mesh and Agent traces",
        "icon": "dku-icon-trace"
    },
    "paramsPythonSetup": "params_helper.py",
    "baseType": "STANDARD",
    "enableJavascriptModules": "true",
    "backendAPIAccessEnabled": true,
    "hasBackend": "true",
    "noJSSecurity": "true",
    "standardWebAppLibraries": [
        "jquery",
        "dataiku",
        "font_awesome"
    ],
    "params": [
        {
            "name": "sepconvo",
            "label": "Configuration",
            "type": "SEPARATOR"
        },
        {
            "name": "llm_responses_dataset",
            "type": "DATASET",
            "label": "LLM Raw Responses Dataset",
            "description": "Select the dataset containing the raw llm responses",
            "mandatory": false,
            "acceptsDataset": true,
            "canSelectForeign": false,
            "canCreateDataset": false
        },
        {
            "name": "llm_responses_column",
            "type": "SELECT",
            "label": "LLM Raw Responses Column",
            "description": "Select the column containing the raw llm responses",
            "mandatory": false,
            "visibilityCondition": "model.llm_responses_dataset != null && model.llm_responses_dataset !== ''",
            "getChoicesFromPython": true
        },
        {
            "name": "data_storage",
            "type": "SELECT",
            "label": "Data Storage",
            "description": "Choose where Trace Explorer stores pasted traces. 'Built-in' uses the workload folder of the webapp. 'Managed Folder' uses a managed folder in the project. 'No Storage' does not persist traces, only the last pasted trace will be available in the UI.",
            "defaultValue": "workload_folder",
            "mandatory": true,
            "getChoicesFromPython": true
        },
        {
            "name": "managed_folder_id",
            "type": "MANAGED_FOLDER",
            "label": "Managed Folder",
            "description": "Select the managed folder for persisting traces",
            "mandatory": true,
            "visibilityCondition": "model.data_storage != null && model.data_storage == 'managed_folder'"
        },
        {
            "name": "sepweb",
            "label": "WebApplication Configuration",
            "type": "SEPARATOR"
        },
        {
            "type": "SELECT",
            "name": "log_level",
            "label": "Logs level *",
            "selectChoices": [
              {
                "value": "DEBUG",
                "label": "DEBUG"
              },
              {
                "value": "INFO",
                "label": "INFO"
              },
              {
                "value": "WARN",
                "label": "WARN"
              },
              {
                "value": "ERROR",
                "label": "ERROR"
              },
              {
                "value": "CRITICAL",
                "label": "CRITICAL"
              }
            ],
            "defaultValue": "INFO",
            "mandatory": true
        }
    ]
}
