enums
and classes.
!!! tips “Motivation”
Text classification is a common problem in many NLP applications, such as spam detection or support ticket categorization. The goal is to provide a systematic way to handle these cases using language models in combination with PHP data structures.
enum
for possible labels and a PHP class for the output.
classify
will perform the single-label classification.
multi_classify
executes multi-label classification using LLM.