Syntax
Arguments
input: A VARCHAR expression containing the text to classify.categories: A nonempty constantARRAY<VARCHAR>containing the candidate categories.
provider and model, see Common calling rules.
Return value
Returns a nullable JSON object. The database asks the model to choose one category fromcategories and put it in the labels array, for example, {"labels":["support"]}.
The database only checks that the result is a JSON object. It does not check the length of labels, whether the category appears in categories, or whether the classification is correct.