pyrit.models.UnvalidatedScore#

class UnvalidatedScore(raw_score_value: str, score_value_description: str, score_type: Literal['true_false', 'float_scale'], score_category: str, score_rationale: str, score_metadata: str, scorer_class_identifier: Dict[str, str], prompt_request_response_id: UUID | str, task: str, id: UUID | str | None = None, timestamp: datetime | None = None)[source]#

Bases: object

Score is an object that validates all the fields. However, we need a common data class that can be used to store the raw score value before it is normalized and validated.

__init__(raw_score_value: str, score_value_description: str, score_type: Literal['true_false', 'float_scale'], score_category: str, score_rationale: str, score_metadata: str, scorer_class_identifier: Dict[str, str], prompt_request_response_id: UUID | str, task: str, id: UUID | str | None = None, timestamp: datetime | None = None) None#

Methods

__init__(raw_score_value, ...[, id, timestamp])

to_score(*, score_value)

Attributes

id: UUID | str | None = None#
prompt_request_response_id: UUID | str#
raw_score_value: str#
score_category: str#
score_metadata: str#
score_rationale: str#
score_type: Literal['true_false', 'float_scale']#
score_value_description: str#
scorer_class_identifier: Dict[str, str]#
task: str#
timestamp: datetime | None = None#
to_score(*, score_value: str)[source]#