.CatHierarchySentiment

gd.validators.CatHierarchySentiment

class glyphdeck.validators.CatHierarchySentiment(
*,
primary_category: str,
sub_categories: list,
sentiment_score: float,
)

Bases: BaseValidatorModel

Validation model for representing a category hierarchy with an associated overall sentiment score.

_field_count

The number of fields in the model.

Type:

int

primary_category

The primary category identified.

Type:

str

sub_categories

All sub-categories identified inside the input in order of relevance.

Type:

list

sentiment_score

The overall sentiment score.

Type:

float

model_fields: ClassVar[Dict[str, FieldInfo]] = {'primary_category': FieldInfo(annotation=str, required=True, description='The primary category identified inside the input. Each category name should be concise.'), 'sentiment_score': FieldInfo(annotation=float, required=True, description='A 2 decimal value that represents the overall sentiment of the input. Ranges from -1.00 (max negative sentiment) to 1.00 (max positive sentiment), with 0.00 indicating neutral sentiment. It must be between -1.00 and 1.00'), 'sub_categories': FieldInfo(annotation=list, required=True, description='All sub-categories identified inside the input in order of relevance, making sure to capture all the topics, with least 1 and no more than 30 categories. Each category name should be concise.')}

Metadata about the fields defined on the model, mapping of field names to [FieldInfo][pydantic.fields.FieldInfo] objects.

This replaces Model.__fields__ from Pydantic V1.

primary_category: str
sentiment_score: float
sub_categories: list