Getting error - Expression evaluation error [evaluation ID = 8JNF8YYV] in rule 'tcml_queryinterface': “Invalid index: Cannot index property ’’modelId’’ of type String into type List of Variant

Below is the code from TCML_QueryInterface, any thoughts why I am getting this error?

load(
local!query,
local!result,
local!summary,
local!desc,
local!prediction,
local!modelId: cons!TCML_modelId,
local!listOfModelIds: rule!TCML_getTrainedModels().modelId,
{
a!columnsLayout(
columns: {
a!columnLayout(
contents: {
a!paragraphField(
label: "What is Text Classification?",
value: "
Text Classification using Machine Learning is the ability to classify a sentence, paragraph or document of text to a certain category.

For example, if we have a set of articles, we can classify them as 'Medical Articles', 'Business Articles', and 'Technology Articles'.",
readOnly: true
),
a!imageField(
label: "",
labelPosition: "ABOVE",
images: {
a!documentImage(
document: cons!TCML_Text_Classification
)
},
size: "LARGE",
isThumbnail: false,
style: "STANDARD"
)
}
),
a!columnLayout(
contents: {
if(
length(
/*
For some reason, the Google API sometimes doesn't return the list of trained model ids
If so, let's just use the last saved trained model id.
*/
local!listOfModelIds
) > 0,
a!dropdownField(
label: "Selected a Trained Model",
labelPosition: "ABOVE",
placeholderLabel: "--- Select a Value ---",
choiceLabels: rule!TCML_getTrainedModels().displayName,
choiceValues: rule!TCML_getTrainedModels().modelId,
value: local!modelId,
saveInto: local!modelId
),
{}
),
a!paragraphField(
label: "Text to classify",
labelPosition: "ABOVE",
instructions: "",
helptooltip: "",
placeholder: "Enter text like ""The stock market closed at a record high.""",
value: local!query,
saveInto: local!query,
refreshAfter: "UNFOCUS",
validations: {}
),
a!buttonArrayLayout(
buttons: {
a!buttonWidget(
label: "Classify",
saveInto: {
a!save(
local!prediction,
rule!TCML_predictTextCategoryAutoML_CS(
local!modelId,
local!query
).result
)
},
style: "NORMAL"
)
},
align: "START"
),
a!gridField(
label: "Predictions",
labelPosition: "ABOVE",
data: local!prediction.predictions,
columns: {
a!gridColumn(
label: "Category",
value: fv!row.label
),
a!gridColumn(
label: "Score",
sortField: "score",
value: fv!row.score
)
},
initialsorts: {
a!sortInfo(
field: "sort"
)
},
validations: {}
)
}
)
}
)
}
)

  Discussion posts and replies are publicly visible