# Define signature in Class-based form class Emotion(dspy.Signature): # Describe the task """Classify emotions in a sentence.""" sentence = dspy.InputField() # Adding description to the output field sentiment = dspy.OutputField(desc="Possible choices: sadness, joy, love, anger, fear, surprise.") classify_class_based = dspy.Predict(Emotion) # Issue prediction classify_class_based(sentence=sentence).sentiment