whylogs_container.whylabs.container.policy.policy_0_0_1¶
Functions
|
Classes
- class whylogs_container.whylabs.container.policy.policy_0_0_1.ActionOptions(*, block_message: str | None = None, flag_message: str | None = None)¶
Bases:
BaseModel
- block_message: str | None¶
- flag_message: str | None¶
- model_computed_fields: ClassVar[Dict[str, ComputedFieldInfo]] = {}¶
A dictionary of computed field names and their corresponding ComputedFieldInfo objects.
- model_config: ClassVar[ConfigDict] = {'extra': 'forbid', 'frozen': True}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- model_fields: ClassVar[Dict[str, FieldInfo]] = {'block_message': FieldInfo(annotation=Union[str, NoneType], required=False, default=None), 'flag_message': FieldInfo(annotation=Union[str, NoneType], required=False, default=None)}¶
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.
- class whylogs_container.whylabs.container.policy.policy_0_0_1.BadActorsRuleSet(*, ruleset: Literal['score.bad_actors'], options: BadActorsRuleSetOptions)¶
Bases:
MetaRulesetBaseModel
- model_computed_fields: ClassVar[Dict[str, ComputedFieldInfo]] = {}¶
A dictionary of computed field names and their corresponding ComputedFieldInfo objects.
- model_config: ClassVar[ConfigDict] = {'extra': 'forbid', 'frozen': True}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- model_fields: ClassVar[Dict[str, FieldInfo]] = {'options': FieldInfo(annotation=BadActorsRuleSetOptions, required=True), 'ruleset': FieldInfo(annotation=Literal['score.bad_actors'], required=True)}¶
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.
- options: BadActorsRuleSetOptions¶
- ruleset: Literal['score.bad_actors']¶
- to_rulesets() Sequence[PromptMisuseRuleSet | PromptBadActorsRuleSet | PromptCustomerExperienceRuleSet | PromptTruthfulnessRuleSet | PromptCostRuleSet | PromptUtilRuleSet | ResponseMisuseRuleSet | ResponseBadActorsRuleSet | ResponseCustomerExperienceRuleSet | ResponseTruthfulnessRuleSet | ResponseCostRuleSet | ResponseUtilRuleSet] ¶
- class whylogs_container.whylabs.container.policy.policy_0_0_1.BadActorsRuleSetOptions(*, behavior: Literal['observe', 'flag', 'block'], sensitivity: Literal['low', 'medium', 'high'])¶
Bases:
BaseModel
- behavior: Literal['observe', 'flag', 'block']¶
- model_computed_fields: ClassVar[Dict[str, ComputedFieldInfo]] = {}¶
A dictionary of computed field names and their corresponding ComputedFieldInfo objects.
- model_config: ClassVar[ConfigDict] = {'extra': 'forbid', 'frozen': True}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- model_fields: ClassVar[Dict[str, FieldInfo]] = {'behavior': FieldInfo(annotation=Literal['observe', 'flag', 'block'], required=True), 'sensitivity': FieldInfo(annotation=Literal['low', 'medium', 'high'], required=True)}¶
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.
- sensitivity: Literal['low', 'medium', 'high']¶
- class whylogs_container.whylabs.container.policy.policy_0_0_1.BaseCallback¶
Bases:
BaseModel
- classmethod hashable_dicts(it: Any)¶
- model_computed_fields: ClassVar[Dict[str, ComputedFieldInfo]] = {}¶
A dictionary of computed field names and their corresponding ComputedFieldInfo objects.
- model_config: ClassVar[ConfigDict] = {'extra': 'forbid', 'frozen': True}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- model_fields: ClassVar[Dict[str, FieldInfo]] = {}¶
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.
- class whylogs_container.whylabs.container.policy.policy_0_0_1.BaseMetric¶
Bases:
BaseModel
- classmethod hashable_dicts(it: Any)¶
- model_computed_fields: ClassVar[Dict[str, ComputedFieldInfo]] = {}¶
A dictionary of computed field names and their corresponding ComputedFieldInfo objects.
- model_config: ClassVar[ConfigDict] = {'arbitrary_types_allowed': True, 'extra': 'forbid', 'frozen': True}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- model_fields: ClassVar[Dict[str, FieldInfo]] = {}¶
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.
- class whylogs_container.whylabs.container.policy.policy_0_0_1.BaseValidator¶
Bases:
BaseModel
- classmethod hashable_dicts(it: Any)¶
- model_computed_fields: ClassVar[Dict[str, ComputedFieldInfo]] = {}¶
A dictionary of computed field names and their corresponding ComputedFieldInfo objects.
- model_config: ClassVar[ConfigDict] = {'extra': 'forbid', 'frozen': True}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- model_fields: ClassVar[Dict[str, FieldInfo]] = {}¶
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.
- class whylogs_container.whylabs.container.policy.policy_0_0_1.BasicValidationFailureCallback(*, callback: Literal['webhook.basic_validation_failure'], options: BasicValidationFailureOptions)¶
Bases:
BaseCallback
- callback: Literal['webhook.basic_validation_failure']¶
- model_computed_fields: ClassVar[Dict[str, ComputedFieldInfo]] = {}¶
A dictionary of computed field names and their corresponding ComputedFieldInfo objects.
- model_config: ClassVar[ConfigDict] = {'extra': 'forbid', 'frozen': True}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- model_fields: ClassVar[Dict[str, FieldInfo]] = {'callback': FieldInfo(annotation=Literal['webhook.basic_validation_failure'], required=True), 'options': FieldInfo(annotation=BasicValidationFailureOptions, required=True, json_schema_extra={'additionalProperties': False})}¶
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.
- options: BasicValidationFailureOptions¶
- class whylogs_container.whylabs.container.policy.policy_0_0_1.CallbackConverter¶
Bases:
object
- static to_langkit_options(callback: BasicValidationFailureCallback | StaticBearerAuthValidationFailureCallback | SlackValidationFailureCallback) StrictLangkitOptions ¶
- class whylogs_container.whylabs.container.policy.policy_0_0_1.CostRuleSet(*, ruleset: Literal['score.cost'], options: CostRuleSetOptions)¶
Bases:
MetaRulesetBaseModel
- model_computed_fields: ClassVar[Dict[str, ComputedFieldInfo]] = {}¶
A dictionary of computed field names and their corresponding ComputedFieldInfo objects.
- model_config: ClassVar[ConfigDict] = {'extra': 'forbid', 'frozen': True}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- model_fields: ClassVar[Dict[str, FieldInfo]] = {'options': FieldInfo(annotation=CostRuleSetOptions, required=True), 'ruleset': FieldInfo(annotation=Literal['score.cost'], required=True)}¶
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.
- options: CostRuleSetOptions¶
- ruleset: Literal['score.cost']¶
- to_rulesets() Sequence[PromptMisuseRuleSet | PromptBadActorsRuleSet | PromptCustomerExperienceRuleSet | PromptTruthfulnessRuleSet | PromptCostRuleSet | PromptUtilRuleSet | ResponseMisuseRuleSet | ResponseBadActorsRuleSet | ResponseCustomerExperienceRuleSet | ResponseTruthfulnessRuleSet | ResponseCostRuleSet | ResponseUtilRuleSet] ¶
- class whylogs_container.whylabs.container.policy.policy_0_0_1.CostRuleSetOptions(*, behavior: Literal['observe', 'flag', 'block'], sensitivity: Literal['low', 'medium', 'high'])¶
Bases:
BaseModel
- behavior: Literal['observe', 'flag', 'block']¶
- model_computed_fields: ClassVar[Dict[str, ComputedFieldInfo]] = {}¶
A dictionary of computed field names and their corresponding ComputedFieldInfo objects.
- model_config: ClassVar[ConfigDict] = {'extra': 'forbid', 'frozen': True}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- model_fields: ClassVar[Dict[str, FieldInfo]] = {'behavior': FieldInfo(annotation=Literal['observe', 'flag', 'block'], required=True), 'sensitivity': FieldInfo(annotation=Literal['low', 'medium', 'high'], required=True)}¶
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.
- sensitivity: Literal['low', 'medium', 'high']¶
- class whylogs_container.whylabs.container.policy.policy_0_0_1.CustomColumnSimilarityMetric(*, metric: Literal['CUSTOM_COLUMN.similarity.CUSTOM_COLUMN_2'], options: CustomColumnSimilarityOptions, profile: bool | None = True)¶
Bases:
BaseMetric
- metric: Literal['CUSTOM_COLUMN.similarity.CUSTOM_COLUMN_2']¶
- model_computed_fields: ClassVar[Dict[str, ComputedFieldInfo]] = {}¶
A dictionary of computed field names and their corresponding ComputedFieldInfo objects.
- model_config: ClassVar[ConfigDict] = {'arbitrary_types_allowed': True, 'extra': 'forbid', 'frozen': True}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- model_fields: ClassVar[Dict[str, FieldInfo]] = {'metric': FieldInfo(annotation=Literal['CUSTOM_COLUMN.similarity.CUSTOM_COLUMN_2'], required=True), 'options': FieldInfo(annotation=CustomColumnSimilarityOptions, required=True, description='This is a typeddict', json_schema_extra={'additionalProperties': False}), 'profile': FieldInfo(annotation=Union[bool, NoneType], required=False, default=True)}¶
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.
- options: CustomColumnSimilarityOptions¶
- profile: bool | None¶
- class whylogs_container.whylabs.container.policy.policy_0_0_1.CustomerExperienceRuleSet(*, ruleset: Literal['score.customer_experience'], options: CustomerExperienceRuleSetOptions)¶
Bases:
MetaRulesetBaseModel
- model_computed_fields: ClassVar[Dict[str, ComputedFieldInfo]] = {}¶
A dictionary of computed field names and their corresponding ComputedFieldInfo objects.
- model_config: ClassVar[ConfigDict] = {'extra': 'forbid', 'frozen': True}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- model_fields: ClassVar[Dict[str, FieldInfo]] = {'options': FieldInfo(annotation=CustomerExperienceRuleSetOptions, required=True), 'ruleset': FieldInfo(annotation=Literal['score.customer_experience'], required=True)}¶
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.
- options: CustomerExperienceRuleSetOptions¶
- ruleset: Literal['score.customer_experience']¶
- to_rulesets() Sequence[PromptMisuseRuleSet | PromptBadActorsRuleSet | PromptCustomerExperienceRuleSet | PromptTruthfulnessRuleSet | PromptCostRuleSet | PromptUtilRuleSet | ResponseMisuseRuleSet | ResponseBadActorsRuleSet | ResponseCustomerExperienceRuleSet | ResponseTruthfulnessRuleSet | ResponseCostRuleSet | ResponseUtilRuleSet] ¶
- class whylogs_container.whylabs.container.policy.policy_0_0_1.CustomerExperienceRuleSetOptions(*, behavior: Literal['observe', 'flag', 'block'], sensitivity: Literal['low', 'medium', 'high'])¶
Bases:
BaseModel
- behavior: Literal['observe', 'flag', 'block']¶
- model_computed_fields: ClassVar[Dict[str, ComputedFieldInfo]] = {}¶
A dictionary of computed field names and their corresponding ComputedFieldInfo objects.
- model_config: ClassVar[ConfigDict] = {'extra': 'forbid', 'frozen': True}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- model_fields: ClassVar[Dict[str, FieldInfo]] = {'behavior': FieldInfo(annotation=Literal['observe', 'flag', 'block'], required=True), 'sensitivity': FieldInfo(annotation=Literal['low', 'medium', 'high'], required=True)}¶
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.
- sensitivity: Literal['low', 'medium', 'high']¶
- class whylogs_container.whylabs.container.policy.policy_0_0_1.InjectionMetric(*, metric: Literal['prompt.similarity.injection'], options: InjectionOptions = {}, profile: bool | None = True, validation: InlineConstraintOptions | None = None)¶
Bases:
BaseMetric
- metric: Literal['prompt.similarity.injection']¶
- model_computed_fields: ClassVar[Dict[str, ComputedFieldInfo]] = {}¶
A dictionary of computed field names and their corresponding ComputedFieldInfo objects.
- model_config: ClassVar[ConfigDict] = {'arbitrary_types_allowed': True, 'extra': 'forbid', 'frozen': True}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- model_fields: ClassVar[Dict[str, FieldInfo]] = {'metric': FieldInfo(annotation=Literal['prompt.similarity.injection'], required=True), 'options': FieldInfo(annotation=InjectionOptions, required=False, default={}, json_schema_extra={'additionalProperties': False}), 'profile': FieldInfo(annotation=Union[bool, NoneType], required=False, default=True), 'validation': FieldInfo(annotation=Union[InlineConstraintOptions, NoneType], required=False, default=None, json_schema_extra={'additionalProperties': False})}¶
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.
- options: InjectionOptions¶
- profile: bool | None¶
- validation: InlineConstraintOptions | None¶
- class whylogs_container.whylabs.container.policy.policy_0_0_1.InlineConstraintOptions¶
Bases:
TypedDict
- failure_level: NotRequired[Literal['flag', 'block'] | None]¶
- lower_threshold: NotRequired[float | None]¶
- lower_threshold_inclusive: NotRequired[float | None]¶
- must_be_non_none: NotRequired[bool | None]¶
- must_be_none: NotRequired[bool | None]¶
- none_of: NotRequired[Sequence[str | float | int] | None]¶
- one_of: NotRequired[Sequence[str | float | int] | None]¶
- upper_threshold: NotRequired[float | None]¶
- upper_threshold_inclusive: NotRequired[float | None]¶
- class whylogs_container.whylabs.container.policy.policy_0_0_1.MetaRulesetBaseModel¶
Bases:
BaseModel
- model_computed_fields: ClassVar[Dict[str, ComputedFieldInfo]] = {}¶
A dictionary of computed field names and their corresponding ComputedFieldInfo objects.
- model_config: ClassVar[ConfigDict] = {}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- model_fields: ClassVar[Dict[str, FieldInfo]] = {}¶
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.
- to_rulesets() Sequence[PromptMisuseRuleSet | PromptBadActorsRuleSet | PromptCustomerExperienceRuleSet | PromptTruthfulnessRuleSet | PromptCostRuleSet | PromptUtilRuleSet | ResponseMisuseRuleSet | ResponseBadActorsRuleSet | ResponseCustomerExperienceRuleSet | ResponseTruthfulnessRuleSet | ResponseCostRuleSet | ResponseUtilRuleSet] ¶
- class whylogs_container.whylabs.container.policy.policy_0_0_1.MetricConverter¶
Bases:
object
- static to_langkit_options(metric: MetricProtocolFull[Any, Any] | MetricProtocolOptionless[Any] | MetricProtocolInlineValidation[Any, Any]) StrictLangkitOptions ¶
- class whylogs_container.whylabs.container.policy.policy_0_0_1.MetricProtocolFull(*args, **kwargs)¶
Bases:
Protocol
,Generic
[MetricName
,MetricOptions
]- metric: MetricName¶
- options: MetricOptions¶
- profile: bool | None¶
- class whylogs_container.whylabs.container.policy.policy_0_0_1.MetricProtocolInlineValidation(*args, **kwargs)¶
Bases:
Protocol
,Generic
[MetricName
,MetricOptions
]- metric: MetricName¶
- options: MetricOptions¶
- profile: bool | None¶
- validation: InlineConstraintOptions | None¶
- class whylogs_container.whylabs.container.policy.policy_0_0_1.MetricProtocolOptionless(*args, **kwargs)¶
Bases:
Protocol
,Generic
[MetricName
]- metric: MetricName¶
- profile: bool | None¶
- class whylogs_container.whylabs.container.policy.policy_0_0_1.MisuseRuleSet(*, ruleset: Literal['score.misuse'], options: MisuseRuleSetOptions)¶
Bases:
MetaRulesetBaseModel
- model_computed_fields: ClassVar[Dict[str, ComputedFieldInfo]] = {}¶
A dictionary of computed field names and their corresponding ComputedFieldInfo objects.
- model_config: ClassVar[ConfigDict] = {'extra': 'forbid', 'frozen': True}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- model_fields: ClassVar[Dict[str, FieldInfo]] = {'options': FieldInfo(annotation=MisuseRuleSetOptions, required=True), 'ruleset': FieldInfo(annotation=Literal['score.misuse'], required=True)}¶
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.
- options: MisuseRuleSetOptions¶
- ruleset: Literal['score.misuse']¶
- to_rulesets() Sequence[PromptMisuseRuleSet | PromptBadActorsRuleSet | PromptCustomerExperienceRuleSet | PromptTruthfulnessRuleSet | PromptCostRuleSet | PromptUtilRuleSet | ResponseMisuseRuleSet | ResponseBadActorsRuleSet | ResponseCustomerExperienceRuleSet | ResponseTruthfulnessRuleSet | ResponseCostRuleSet | ResponseUtilRuleSet] ¶
- class whylogs_container.whylabs.container.policy.policy_0_0_1.MisuseRuleSetOptions(*, behavior: Literal['observe', 'flag', 'block'], sensitivity: Literal['low', 'medium', 'high'], topics: Tuple[str, ...])¶
Bases:
BaseModel
- behavior: Literal['observe', 'flag', 'block']¶
- model_computed_fields: ClassVar[Dict[str, ComputedFieldInfo]] = {}¶
A dictionary of computed field names and their corresponding ComputedFieldInfo objects.
- model_config: ClassVar[ConfigDict] = {'extra': 'forbid', 'frozen': True}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- model_fields: ClassVar[Dict[str, FieldInfo]] = {'behavior': FieldInfo(annotation=Literal['observe', 'flag', 'block'], required=True), 'sensitivity': FieldInfo(annotation=Literal['low', 'medium', 'high'], required=True), 'topics': FieldInfo(annotation=Tuple[str, ...], required=True)}¶
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.
- sensitivity: Literal['low', 'medium', 'high']¶
- topics: Tuple[str, ...]¶
- class whylogs_container.whylabs.container.policy.policy_0_0_1.Policy(*, whylabs_dataset_id: str, id: str, policy_version: int, schema_version: Literal['0.0.1'] = '0.0.1', metrics: Tuple[PresetsAllMetric | PresetsRecommendedMetric | CustomColumnSimilarityMetric | PromptTokenCountMetric | PromptCharCountMetric | PromptFleschReadingEaseMetric | PromptSentenceCountMetric | PromptGradeMetric | PromptLexiconCountMetric | PromptLetterCountMetric | PromptDifficultWordsMetric | PromptRegexMetric | PromptRegexSSNMetric | PromptRegexPhoneNumberMetric | PromptRegexEmailAddressMetric | PromptRegexMailingAddressMetric | PromptRegexCreditCardNumberMetric | PromptRegexURLMetric | PromptPiiMetric | PromptSimilarityMetric | PromptSimilarityContextMetric | PromptSimilarityCustomColumnMetric | InjectionMetric | PromptSentimentMetric | PromptSentimentScoreMetric | PromptToxicityMetric | PromptToxicityScoreMetric | PromptUtilEmbeddingsMetric | PromptPcaCoordinatesMetric | PromptTopicsMetric | PromptTopicsMedicalMetric | PromptTopicsFinancialMetric | PromptTopicsCodeMetric | PromptTopicsMaliciousMetric | ResponseTokenCountMetric | ResponseCharCountMetric | ResponseFleschReadingEaseMetric | ResponseSentenceCountMetric | ResponseGradeMetric | ResponseLexiconCountMetric | ResponseLetterCountMetric | ResponseDifficultWordsMetric | ResponseRegexMetric | ResponseRegexRefusalMetric | ResponseRegexSSNMetric | ResponseRegexPhoneNumberMetric | ResponseRegexEmailAddressMetric | ResponseRegexMailingAddressMetric | ResponseRegexCreditCardNumberMetric | ResponseRegexURLMetric | ResponsePiiMetric | ResponseSimilarityMetric | ResponseSimilarityRefusalMetric | ResponseSimilarityPromptMetric | ResponseSimilarityCustomColumnMetric | ResponseSimilarityContextMetric | ResponseSentimentMetric | ResponseSentimentScoreMetric | ResponseToxicityMetric | ResponseToxicityScoreMetric | ResponseUtilEmbeddingsMetric | ResponsePcaCoordinatesMetric | ResponseHallucinationScoreMetric | ResponseTopicsMetric | ResponseTopicsMedicalMetric | ResponseTopicsFinancialMetric | ResponseTopicsCodeMetric | ResponseTopicsMaliciousMetric, ...] | None = None, callbacks: Tuple[BasicValidationFailureCallback | StaticBearerAuthValidationFailureCallback | SlackValidationFailureCallback, ...] | None = None, validators: Tuple[PolicyConstraintValidator | PolicyMultiColumnConstraintValidator, ...] | None = None, rulesets: Tuple[MisuseRuleSet | BadActorsRuleSet | CustomerExperienceRuleSet | TruthfulnessRuleSet | CostRuleSet | PromptMisuseRuleSet | PromptBadActorsRuleSet | PromptCustomerExperienceRuleSet | PromptTruthfulnessRuleSet | PromptCostRuleSet | PromptUtilRuleSet | ResponseMisuseRuleSet | ResponseBadActorsRuleSet | ResponseCustomerExperienceRuleSet | ResponseTruthfulnessRuleSet | ResponseCostRuleSet | ResponseUtilRuleSet, ...] | None = None, actions: ActionOptions | None = None)¶
Bases:
BaseModel
- actions: ActionOptions | None¶
- callbacks: Tuple[BasicValidationFailureCallback | StaticBearerAuthValidationFailureCallback | SlackValidationFailureCallback, ...] | None¶
- classmethod ensure_str(it: Any)¶
Ensure that these fields are parsed as strings. The python yaml parser sometimes pickes ints or floats if these are defined as something like 1.
- get_rulesets() Sequence[PromptMisuseRuleSet | PromptBadActorsRuleSet | PromptCustomerExperienceRuleSet | PromptTruthfulnessRuleSet | PromptCostRuleSet | PromptUtilRuleSet | ResponseMisuseRuleSet | ResponseBadActorsRuleSet | ResponseCustomerExperienceRuleSet | ResponseTruthfulnessRuleSet | ResponseCostRuleSet | ResponseUtilRuleSet] ¶
- id: str¶
- metrics: Tuple[PresetsAllMetric | PresetsRecommendedMetric | CustomColumnSimilarityMetric | PromptTokenCountMetric | PromptCharCountMetric | PromptFleschReadingEaseMetric | PromptSentenceCountMetric | PromptGradeMetric | PromptLexiconCountMetric | PromptLetterCountMetric | PromptDifficultWordsMetric | PromptRegexMetric | PromptRegexSSNMetric | PromptRegexPhoneNumberMetric | PromptRegexEmailAddressMetric | PromptRegexMailingAddressMetric | PromptRegexCreditCardNumberMetric | PromptRegexURLMetric | PromptPiiMetric | PromptSimilarityMetric | PromptSimilarityContextMetric | PromptSimilarityCustomColumnMetric | InjectionMetric | PromptSentimentMetric | PromptSentimentScoreMetric | PromptToxicityMetric | PromptToxicityScoreMetric | PromptUtilEmbeddingsMetric | PromptPcaCoordinatesMetric | PromptTopicsMetric | PromptTopicsMedicalMetric | PromptTopicsFinancialMetric | PromptTopicsCodeMetric | PromptTopicsMaliciousMetric | ResponseTokenCountMetric | ResponseCharCountMetric | ResponseFleschReadingEaseMetric | ResponseSentenceCountMetric | ResponseGradeMetric | ResponseLexiconCountMetric | ResponseLetterCountMetric | ResponseDifficultWordsMetric | ResponseRegexMetric | ResponseRegexRefusalMetric | ResponseRegexSSNMetric | ResponseRegexPhoneNumberMetric | ResponseRegexEmailAddressMetric | ResponseRegexMailingAddressMetric | ResponseRegexCreditCardNumberMetric | ResponseRegexURLMetric | ResponsePiiMetric | ResponseSimilarityMetric | ResponseSimilarityRefusalMetric | ResponseSimilarityPromptMetric | ResponseSimilarityCustomColumnMetric | ResponseSimilarityContextMetric | ResponseSentimentMetric | ResponseSentimentScoreMetric | ResponseToxicityMetric | ResponseToxicityScoreMetric | ResponseUtilEmbeddingsMetric | ResponsePcaCoordinatesMetric | ResponseHallucinationScoreMetric | ResponseTopicsMetric | ResponseTopicsMedicalMetric | ResponseTopicsFinancialMetric | ResponseTopicsCodeMetric | ResponseTopicsMaliciousMetric, ...] | None¶
- model_computed_fields: ClassVar[Dict[str, ComputedFieldInfo]] = {}¶
A dictionary of computed field names and their corresponding ComputedFieldInfo objects.
- model_config: ClassVar[ConfigDict] = {'extra': 'forbid', 'frozen': True}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- model_fields: ClassVar[Dict[str, FieldInfo]] = {'actions': FieldInfo(annotation=Union[ActionOptions, NoneType], required=False, default=None), 'callbacks': FieldInfo(annotation=Union[Tuple[Union[BasicValidationFailureCallback, StaticBearerAuthValidationFailureCallback, SlackValidationFailureCallback], ...], NoneType], required=False, default_factory=tuple), 'id': FieldInfo(annotation=str, required=True), 'metrics': FieldInfo(annotation=Union[Tuple[Union[PresetsAllMetric, PresetsRecommendedMetric, CustomColumnSimilarityMetric, PromptTokenCountMetric, PromptCharCountMetric, PromptFleschReadingEaseMetric, PromptSentenceCountMetric, PromptGradeMetric, PromptLexiconCountMetric, PromptLetterCountMetric, PromptDifficultWordsMetric, PromptRegexMetric, PromptRegexSSNMetric, PromptRegexPhoneNumberMetric, PromptRegexEmailAddressMetric, PromptRegexMailingAddressMetric, PromptRegexCreditCardNumberMetric, PromptRegexURLMetric, PromptPiiMetric, PromptSimilarityMetric, PromptSimilarityContextMetric, PromptSimilarityCustomColumnMetric, InjectionMetric, PromptSentimentMetric, PromptSentimentScoreMetric, PromptToxicityMetric, PromptToxicityScoreMetric, PromptUtilEmbeddingsMetric, PromptPcaCoordinatesMetric, PromptTopicsMetric, PromptTopicsMedicalMetric, PromptTopicsFinancialMetric, PromptTopicsCodeMetric, PromptTopicsMaliciousMetric, ResponseTokenCountMetric, ResponseCharCountMetric, ResponseFleschReadingEaseMetric, ResponseSentenceCountMetric, ResponseGradeMetric, ResponseLexiconCountMetric, ResponseLetterCountMetric, ResponseDifficultWordsMetric, ResponseRegexMetric, ResponseRegexRefusalMetric, ResponseRegexSSNMetric, ResponseRegexPhoneNumberMetric, ResponseRegexEmailAddressMetric, ResponseRegexMailingAddressMetric, ResponseRegexCreditCardNumberMetric, ResponseRegexURLMetric, ResponsePiiMetric, ResponseSimilarityMetric, ResponseSimilarityRefusalMetric, ResponseSimilarityPromptMetric, ResponseSimilarityCustomColumnMetric, ResponseSimilarityContextMetric, ResponseSentimentMetric, ResponseSentimentScoreMetric, ResponseToxicityMetric, ResponseToxicityScoreMetric, ResponseUtilEmbeddingsMetric, ResponsePcaCoordinatesMetric, ResponseHallucinationScoreMetric, ResponseTopicsMetric, ResponseTopicsMedicalMetric, ResponseTopicsFinancialMetric, ResponseTopicsCodeMetric, ResponseTopicsMaliciousMetric], ...], NoneType], required=False, default_factory=tuple), 'policy_version': FieldInfo(annotation=int, required=True), 'rulesets': FieldInfo(annotation=Union[Tuple[Union[MisuseRuleSet, BadActorsRuleSet, CustomerExperienceRuleSet, TruthfulnessRuleSet, CostRuleSet, PromptMisuseRuleSet, PromptBadActorsRuleSet, PromptCustomerExperienceRuleSet, PromptTruthfulnessRuleSet, PromptCostRuleSet, PromptUtilRuleSet, ResponseMisuseRuleSet, ResponseBadActorsRuleSet, ResponseCustomerExperienceRuleSet, ResponseTruthfulnessRuleSet, ResponseCostRuleSet, ResponseUtilRuleSet], ...], NoneType], required=False, default_factory=tuple), 'schema_version': FieldInfo(annotation=Literal['0.0.1'], required=False, default='0.0.1'), 'validators': FieldInfo(annotation=Union[Tuple[Union[PolicyConstraintValidator, PolicyMultiColumnConstraintValidator], ...], NoneType], required=False, default_factory=tuple), 'whylabs_dataset_id': FieldInfo(annotation=str, required=True)}¶
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.
- policy_version: int¶
- rulesets: Tuple[MisuseRuleSet | BadActorsRuleSet | CustomerExperienceRuleSet | TruthfulnessRuleSet | CostRuleSet | PromptMisuseRuleSet | PromptBadActorsRuleSet | PromptCustomerExperienceRuleSet | PromptTruthfulnessRuleSet | PromptCostRuleSet | PromptUtilRuleSet | ResponseMisuseRuleSet | ResponseBadActorsRuleSet | ResponseCustomerExperienceRuleSet | ResponseTruthfulnessRuleSet | ResponseCostRuleSet | ResponseUtilRuleSet, ...] | None¶
- schema_version: Literal['0.0.1']¶
- to_langkit_options() StrictLangkitOptions ¶
- validators: Tuple[PolicyConstraintValidator | PolicyMultiColumnConstraintValidator, ...] | None¶
- whylabs_dataset_id: str¶
- class whylogs_container.whylabs.container.policy.policy_0_0_1.PolicyConstraintValidator(*, validator: Literal['constraint'], options: ConstraintOptions)¶
Bases:
BaseValidator
- model_computed_fields: ClassVar[Dict[str, ComputedFieldInfo]] = {}¶
A dictionary of computed field names and their corresponding ComputedFieldInfo objects.
- model_config: ClassVar[ConfigDict] = {'extra': 'forbid', 'frozen': True}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- model_fields: ClassVar[Dict[str, FieldInfo]] = {'options': FieldInfo(annotation=ConstraintOptions, required=True, json_schema_extra={'additionalProperties': False}), 'validator': FieldInfo(annotation=Literal['constraint'], required=True)}¶
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.
- options: ConstraintOptions¶
- validator: Literal['constraint']¶
- class whylogs_container.whylabs.container.policy.policy_0_0_1.PolicyMultiColumnConstraintValidator(*, validator: Literal['multi_column_constraint'], options: MultiColumnConstraintOptions)¶
Bases:
BaseValidator
- model_computed_fields: ClassVar[Dict[str, ComputedFieldInfo]] = {}¶
A dictionary of computed field names and their corresponding ComputedFieldInfo objects.
- model_config: ClassVar[ConfigDict] = {'extra': 'forbid', 'frozen': True}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- model_fields: ClassVar[Dict[str, FieldInfo]] = {'options': FieldInfo(annotation=MultiColumnConstraintOptions, required=True, json_schema_extra={'additionalProperties': False}), 'validator': FieldInfo(annotation=Literal['multi_column_constraint'], required=True)}¶
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.
- options: MultiColumnConstraintOptions¶
- validator: Literal['multi_column_constraint']¶
- class whylogs_container.whylabs.container.policy.policy_0_0_1.PresetsAllMetric(*, metric: Literal['presets.all'], options: PresetOptions = {}, profile: bool | None = True)¶
Bases:
BaseMetric
- metric: Literal['presets.all']¶
- model_computed_fields: ClassVar[Dict[str, ComputedFieldInfo]] = {}¶
A dictionary of computed field names and their corresponding ComputedFieldInfo objects.
- model_config: ClassVar[ConfigDict] = {'arbitrary_types_allowed': True, 'extra': 'forbid', 'frozen': True}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- model_fields: ClassVar[Dict[str, FieldInfo]] = {'metric': FieldInfo(annotation=Literal['presets.all'], required=True), 'options': FieldInfo(annotation=PresetOptions, required=False, default={}, json_schema_extra={'additionalProperties': False}), 'profile': FieldInfo(annotation=Union[bool, NoneType], required=False, default=True)}¶
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.
- options: PresetOptions¶
- profile: bool | None¶
- class whylogs_container.whylabs.container.policy.policy_0_0_1.PresetsRecommendedMetric(*, metric: Literal['presets.recommended'], options: PresetOptions = {}, profile: bool | None = True)¶
Bases:
BaseMetric
- metric: Literal['presets.recommended']¶
- model_computed_fields: ClassVar[Dict[str, ComputedFieldInfo]] = {}¶
A dictionary of computed field names and their corresponding ComputedFieldInfo objects.
- model_config: ClassVar[ConfigDict] = {'arbitrary_types_allowed': True, 'extra': 'forbid', 'frozen': True}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- model_fields: ClassVar[Dict[str, FieldInfo]] = {'metric': FieldInfo(annotation=Literal['presets.recommended'], required=True), 'options': FieldInfo(annotation=PresetOptions, required=False, default={}, json_schema_extra={'additionalProperties': False}), 'profile': FieldInfo(annotation=Union[bool, NoneType], required=False, default=True)}¶
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.
- options: PresetOptions¶
- profile: bool | None¶
- class whylogs_container.whylabs.container.policy.policy_0_0_1.PromptBadActorsRuleSet(*, ruleset: Literal['prompt.score.bad_actors'], options: BadActorsRuleSetOptions)¶
Bases:
BaseModel
- model_computed_fields: ClassVar[Dict[str, ComputedFieldInfo]] = {}¶
A dictionary of computed field names and their corresponding ComputedFieldInfo objects.
- model_config: ClassVar[ConfigDict] = {'extra': 'forbid', 'frozen': True}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- model_fields: ClassVar[Dict[str, FieldInfo]] = {'options': FieldInfo(annotation=BadActorsRuleSetOptions, required=True), 'ruleset': FieldInfo(annotation=Literal['prompt.score.bad_actors'], required=True)}¶
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.
- options: BadActorsRuleSetOptions¶
- ruleset: Literal['prompt.score.bad_actors']¶
- to_langkit_options() StrictLangkitOptions ¶
- class whylogs_container.whylabs.container.policy.policy_0_0_1.PromptCharCountMetric(*, metric: Literal['prompt.stats.char_count'], profile: bool | None = True, validation: InlineConstraintOptions | None = None)¶
Bases:
BaseMetric
- metric: Literal['prompt.stats.char_count']¶
- model_computed_fields: ClassVar[Dict[str, ComputedFieldInfo]] = {}¶
A dictionary of computed field names and their corresponding ComputedFieldInfo objects.
- model_config: ClassVar[ConfigDict] = {'arbitrary_types_allowed': True, 'extra': 'forbid', 'frozen': True}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- model_fields: ClassVar[Dict[str, FieldInfo]] = {'metric': FieldInfo(annotation=Literal['prompt.stats.char_count'], required=True), 'profile': FieldInfo(annotation=Union[bool, NoneType], required=False, default=True), 'validation': FieldInfo(annotation=Union[InlineConstraintOptions, NoneType], required=False, default=None, json_schema_extra={'additionalProperties': False})}¶
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.
- profile: bool | None¶
- validation: InlineConstraintOptions | None¶
- class whylogs_container.whylabs.container.policy.policy_0_0_1.PromptCostRuleSet(*, ruleset: Literal['prompt.score.cost'], options: CostRuleSetOptions)¶
Bases:
BaseModel
- model_computed_fields: ClassVar[Dict[str, ComputedFieldInfo]] = {}¶
A dictionary of computed field names and their corresponding ComputedFieldInfo objects.
- model_config: ClassVar[ConfigDict] = {'extra': 'forbid', 'frozen': True}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- model_fields: ClassVar[Dict[str, FieldInfo]] = {'options': FieldInfo(annotation=CostRuleSetOptions, required=True), 'ruleset': FieldInfo(annotation=Literal['prompt.score.cost'], required=True)}¶
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.
- options: CostRuleSetOptions¶
- ruleset: Literal['prompt.score.cost']¶
- to_langkit_options() StrictLangkitOptions ¶
- class whylogs_container.whylabs.container.policy.policy_0_0_1.PromptCustomerExperienceRuleSet(*, ruleset: Literal['prompt.score.customer_experience'], options: CustomerExperienceRuleSetOptions)¶
Bases:
BaseModel
- model_computed_fields: ClassVar[Dict[str, ComputedFieldInfo]] = {}¶
A dictionary of computed field names and their corresponding ComputedFieldInfo objects.
- model_config: ClassVar[ConfigDict] = {'extra': 'forbid', 'frozen': True}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- model_fields: ClassVar[Dict[str, FieldInfo]] = {'options': FieldInfo(annotation=CustomerExperienceRuleSetOptions, required=True), 'ruleset': FieldInfo(annotation=Literal['prompt.score.customer_experience'], required=True)}¶
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.
- options: CustomerExperienceRuleSetOptions¶
- ruleset: Literal['prompt.score.customer_experience']¶
- to_langkit_options() StrictLangkitOptions ¶
- class whylogs_container.whylabs.container.policy.policy_0_0_1.PromptDifficultWordsMetric(*, metric: Literal['prompt.stats.difficult_words'], profile: bool | None = True, validation: InlineConstraintOptions | None = None)¶
Bases:
BaseMetric
- metric: Literal['prompt.stats.difficult_words']¶
- model_computed_fields: ClassVar[Dict[str, ComputedFieldInfo]] = {}¶
A dictionary of computed field names and their corresponding ComputedFieldInfo objects.
- model_config: ClassVar[ConfigDict] = {'arbitrary_types_allowed': True, 'extra': 'forbid', 'frozen': True}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- model_fields: ClassVar[Dict[str, FieldInfo]] = {'metric': FieldInfo(annotation=Literal['prompt.stats.difficult_words'], required=True), 'profile': FieldInfo(annotation=Union[bool, NoneType], required=False, default=True), 'validation': FieldInfo(annotation=Union[InlineConstraintOptions, NoneType], required=False, default=None, json_schema_extra={'additionalProperties': False})}¶
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.
- profile: bool | None¶
- validation: InlineConstraintOptions | None¶
- class whylogs_container.whylabs.container.policy.policy_0_0_1.PromptFleschReadingEaseMetric(*, metric: Literal['prompt.stats.flesch_reading_ease'], profile: bool | None = True, validation: InlineConstraintOptions | None = None)¶
Bases:
BaseMetric
- metric: Literal['prompt.stats.flesch_reading_ease']¶
- model_computed_fields: ClassVar[Dict[str, ComputedFieldInfo]] = {}¶
A dictionary of computed field names and their corresponding ComputedFieldInfo objects.
- model_config: ClassVar[ConfigDict] = {'arbitrary_types_allowed': True, 'extra': 'forbid', 'frozen': True}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- model_fields: ClassVar[Dict[str, FieldInfo]] = {'metric': FieldInfo(annotation=Literal['prompt.stats.flesch_reading_ease'], required=True), 'profile': FieldInfo(annotation=Union[bool, NoneType], required=False, default=True), 'validation': FieldInfo(annotation=Union[InlineConstraintOptions, NoneType], required=False, default=None, json_schema_extra={'additionalProperties': False})}¶
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.
- profile: bool | None¶
- validation: InlineConstraintOptions | None¶
- class whylogs_container.whylabs.container.policy.policy_0_0_1.PromptGradeMetric(*, metric: Literal['prompt.stats.grade'], profile: bool | None = True, validation: InlineConstraintOptions | None = None)¶
Bases:
BaseMetric
- metric: Literal['prompt.stats.grade']¶
- model_computed_fields: ClassVar[Dict[str, ComputedFieldInfo]] = {}¶
A dictionary of computed field names and their corresponding ComputedFieldInfo objects.
- model_config: ClassVar[ConfigDict] = {'arbitrary_types_allowed': True, 'extra': 'forbid', 'frozen': True}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- model_fields: ClassVar[Dict[str, FieldInfo]] = {'metric': FieldInfo(annotation=Literal['prompt.stats.grade'], required=True), 'profile': FieldInfo(annotation=Union[bool, NoneType], required=False, default=True), 'validation': FieldInfo(annotation=Union[InlineConstraintOptions, NoneType], required=False, default=None, json_schema_extra={'additionalProperties': False})}¶
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.
- profile: bool | None¶
- validation: InlineConstraintOptions | None¶
- class whylogs_container.whylabs.container.policy.policy_0_0_1.PromptLetterCountMetric(*, metric: Literal['prompt.stats.letter_count'], profile: bool | None = True, validation: InlineConstraintOptions | None = None)¶
Bases:
BaseMetric
- metric: Literal['prompt.stats.letter_count']¶
- model_computed_fields: ClassVar[Dict[str, ComputedFieldInfo]] = {}¶
A dictionary of computed field names and their corresponding ComputedFieldInfo objects.
- model_config: ClassVar[ConfigDict] = {'arbitrary_types_allowed': True, 'extra': 'forbid', 'frozen': True}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- model_fields: ClassVar[Dict[str, FieldInfo]] = {'metric': FieldInfo(annotation=Literal['prompt.stats.letter_count'], required=True), 'profile': FieldInfo(annotation=Union[bool, NoneType], required=False, default=True), 'validation': FieldInfo(annotation=Union[InlineConstraintOptions, NoneType], required=False, default=None, json_schema_extra={'additionalProperties': False})}¶
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.
- profile: bool | None¶
- validation: InlineConstraintOptions | None¶
- class whylogs_container.whylabs.container.policy.policy_0_0_1.PromptLexiconCountMetric(*, metric: Literal['prompt.stats.lexicon_count'], profile: bool | None = True, validation: InlineConstraintOptions | None = None)¶
Bases:
BaseMetric
- metric: Literal['prompt.stats.lexicon_count']¶
- model_computed_fields: ClassVar[Dict[str, ComputedFieldInfo]] = {}¶
A dictionary of computed field names and their corresponding ComputedFieldInfo objects.
- model_config: ClassVar[ConfigDict] = {'arbitrary_types_allowed': True, 'extra': 'forbid', 'frozen': True}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- model_fields: ClassVar[Dict[str, FieldInfo]] = {'metric': FieldInfo(annotation=Literal['prompt.stats.lexicon_count'], required=True), 'profile': FieldInfo(annotation=Union[bool, NoneType], required=False, default=True), 'validation': FieldInfo(annotation=Union[InlineConstraintOptions, NoneType], required=False, default=None, json_schema_extra={'additionalProperties': False})}¶
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.
- profile: bool | None¶
- validation: InlineConstraintOptions | None¶
- class whylogs_container.whylabs.container.policy.policy_0_0_1.PromptMisuseRuleSet(*, ruleset: Literal['prompt.score.misuse'], options: MisuseRuleSetOptions)¶
Bases:
BaseModel
- model_computed_fields: ClassVar[Dict[str, ComputedFieldInfo]] = {}¶
A dictionary of computed field names and their corresponding ComputedFieldInfo objects.
- model_config: ClassVar[ConfigDict] = {'extra': 'forbid', 'frozen': True}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- model_fields: ClassVar[Dict[str, FieldInfo]] = {'options': FieldInfo(annotation=MisuseRuleSetOptions, required=True), 'ruleset': FieldInfo(annotation=Literal['prompt.score.misuse'], required=True)}¶
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.
- options: MisuseRuleSetOptions¶
- ruleset: Literal['prompt.score.misuse']¶
- to_langkit_options() StrictLangkitOptions ¶
- class whylogs_container.whylabs.container.policy.policy_0_0_1.PromptPcaCoordinatesMetric(*, metric: Literal['prompt.pca.coordinates'], options: CoordinatesOptions = {}, profile: bool | None = True)¶
Bases:
BaseMetric
- metric: Literal['prompt.pca.coordinates']¶
- model_computed_fields: ClassVar[Dict[str, ComputedFieldInfo]] = {}¶
A dictionary of computed field names and their corresponding ComputedFieldInfo objects.
- model_config: ClassVar[ConfigDict] = {'arbitrary_types_allowed': True, 'extra': 'forbid', 'frozen': True}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- model_fields: ClassVar[Dict[str, FieldInfo]] = {'metric': FieldInfo(annotation=Literal['prompt.pca.coordinates'], required=True), 'options': FieldInfo(annotation=CoordinatesOptions, required=False, default={}, json_schema_extra={'additionalProperties': False}), 'profile': FieldInfo(annotation=Union[bool, NoneType], required=False, default=True)}¶
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.
- options: CoordinatesOptions¶
- profile: bool | None¶
- class whylogs_container.whylabs.container.policy.policy_0_0_1.PromptPiiMetric(*, metric: Literal['prompt.pii'], options: PiiOptions = {}, profile: bool | None = True)¶
Bases:
BaseMetric
- metric: Literal['prompt.pii']¶
- model_computed_fields: ClassVar[Dict[str, ComputedFieldInfo]] = {}¶
A dictionary of computed field names and their corresponding ComputedFieldInfo objects.
- model_config: ClassVar[ConfigDict] = {'arbitrary_types_allowed': True, 'extra': 'forbid', 'frozen': True}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- model_fields: ClassVar[Dict[str, FieldInfo]] = {'metric': FieldInfo(annotation=Literal['prompt.pii'], required=True), 'options': FieldInfo(annotation=PiiOptions, required=False, default={}, json_schema_extra={'additionalProperties': False}), 'profile': FieldInfo(annotation=Union[bool, NoneType], required=False, default=True)}¶
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.
- options: PiiOptions¶
- profile: bool | None¶
- class whylogs_container.whylabs.container.policy.policy_0_0_1.PromptRegexCreditCardNumberMetric(*, metric: Literal['prompt.regex.credit_card_number'], profile: bool | None = True, validation: InlineConstraintOptions | None = None)¶
Bases:
BaseMetric
- metric: Literal['prompt.regex.credit_card_number']¶
- model_computed_fields: ClassVar[Dict[str, ComputedFieldInfo]] = {}¶
A dictionary of computed field names and their corresponding ComputedFieldInfo objects.
- model_config: ClassVar[ConfigDict] = {'arbitrary_types_allowed': True, 'extra': 'forbid', 'frozen': True}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- model_fields: ClassVar[Dict[str, FieldInfo]] = {'metric': FieldInfo(annotation=Literal['prompt.regex.credit_card_number'], required=True), 'profile': FieldInfo(annotation=Union[bool, NoneType], required=False, default=True), 'validation': FieldInfo(annotation=Union[InlineConstraintOptions, NoneType], required=False, default=None, json_schema_extra={'additionalProperties': False})}¶
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.
- profile: bool | None¶
- validation: InlineConstraintOptions | None¶
- class whylogs_container.whylabs.container.policy.policy_0_0_1.PromptRegexEmailAddressMetric(*, metric: Literal['prompt.regex.email_address'], profile: bool | None = True, validation: InlineConstraintOptions | None = None)¶
Bases:
BaseMetric
- metric: Literal['prompt.regex.email_address']¶
- model_computed_fields: ClassVar[Dict[str, ComputedFieldInfo]] = {}¶
A dictionary of computed field names and their corresponding ComputedFieldInfo objects.
- model_config: ClassVar[ConfigDict] = {'arbitrary_types_allowed': True, 'extra': 'forbid', 'frozen': True}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- model_fields: ClassVar[Dict[str, FieldInfo]] = {'metric': FieldInfo(annotation=Literal['prompt.regex.email_address'], required=True), 'profile': FieldInfo(annotation=Union[bool, NoneType], required=False, default=True), 'validation': FieldInfo(annotation=Union[InlineConstraintOptions, NoneType], required=False, default=None, json_schema_extra={'additionalProperties': False})}¶
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.
- profile: bool | None¶
- validation: InlineConstraintOptions | None¶
- class whylogs_container.whylabs.container.policy.policy_0_0_1.PromptRegexMailingAddressMetric(*, metric: Literal['prompt.regex.mailing_address'], profile: bool | None = True, validation: InlineConstraintOptions | None = None)¶
Bases:
BaseMetric
- metric: Literal['prompt.regex.mailing_address']¶
- model_computed_fields: ClassVar[Dict[str, ComputedFieldInfo]] = {}¶
A dictionary of computed field names and their corresponding ComputedFieldInfo objects.
- model_config: ClassVar[ConfigDict] = {'arbitrary_types_allowed': True, 'extra': 'forbid', 'frozen': True}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- model_fields: ClassVar[Dict[str, FieldInfo]] = {'metric': FieldInfo(annotation=Literal['prompt.regex.mailing_address'], required=True), 'profile': FieldInfo(annotation=Union[bool, NoneType], required=False, default=True), 'validation': FieldInfo(annotation=Union[InlineConstraintOptions, NoneType], required=False, default=None, json_schema_extra={'additionalProperties': False})}¶
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.
- profile: bool | None¶
- validation: InlineConstraintOptions | None¶
- class whylogs_container.whylabs.container.policy.policy_0_0_1.PromptRegexMetric(*, metric: Literal['prompt.regex'], profile: bool | None = True)¶
Bases:
BaseMetric
- metric: Literal['prompt.regex']¶
- model_computed_fields: ClassVar[Dict[str, ComputedFieldInfo]] = {}¶
A dictionary of computed field names and their corresponding ComputedFieldInfo objects.
- model_config: ClassVar[ConfigDict] = {'arbitrary_types_allowed': True, 'extra': 'forbid', 'frozen': True}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- model_fields: ClassVar[Dict[str, FieldInfo]] = {'metric': FieldInfo(annotation=Literal['prompt.regex'], required=True), 'profile': FieldInfo(annotation=Union[bool, NoneType], required=False, default=True)}¶
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.
- profile: bool | None¶
- class whylogs_container.whylabs.container.policy.policy_0_0_1.PromptRegexPhoneNumberMetric(*, metric: Literal['prompt.regex.phone_number'], profile: bool | None = True, validation: InlineConstraintOptions | None = None)¶
Bases:
BaseMetric
- metric: Literal['prompt.regex.phone_number']¶
- model_computed_fields: ClassVar[Dict[str, ComputedFieldInfo]] = {}¶
A dictionary of computed field names and their corresponding ComputedFieldInfo objects.
- model_config: ClassVar[ConfigDict] = {'arbitrary_types_allowed': True, 'extra': 'forbid', 'frozen': True}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- model_fields: ClassVar[Dict[str, FieldInfo]] = {'metric': FieldInfo(annotation=Literal['prompt.regex.phone_number'], required=True), 'profile': FieldInfo(annotation=Union[bool, NoneType], required=False, default=True), 'validation': FieldInfo(annotation=Union[InlineConstraintOptions, NoneType], required=False, default=None, json_schema_extra={'additionalProperties': False})}¶
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.
- profile: bool | None¶
- validation: InlineConstraintOptions | None¶
- class whylogs_container.whylabs.container.policy.policy_0_0_1.PromptRegexSSNMetric(*, metric: Literal['prompt.regex.ssn'], profile: bool | None = True, validation: InlineConstraintOptions | None = None)¶
Bases:
BaseMetric
- metric: Literal['prompt.regex.ssn']¶
- model_computed_fields: ClassVar[Dict[str, ComputedFieldInfo]] = {}¶
A dictionary of computed field names and their corresponding ComputedFieldInfo objects.
- model_config: ClassVar[ConfigDict] = {'arbitrary_types_allowed': True, 'extra': 'forbid', 'frozen': True}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- model_fields: ClassVar[Dict[str, FieldInfo]] = {'metric': FieldInfo(annotation=Literal['prompt.regex.ssn'], required=True), 'profile': FieldInfo(annotation=Union[bool, NoneType], required=False, default=True), 'validation': FieldInfo(annotation=Union[InlineConstraintOptions, NoneType], required=False, default=None, json_schema_extra={'additionalProperties': False})}¶
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.
- profile: bool | None¶
- validation: InlineConstraintOptions | None¶
- class whylogs_container.whylabs.container.policy.policy_0_0_1.PromptRegexURLMetric(*, metric: Literal['prompt.regex.url'], profile: bool | None = True, validation: InlineConstraintOptions | None = None)¶
Bases:
BaseMetric
- metric: Literal['prompt.regex.url']¶
- model_computed_fields: ClassVar[Dict[str, ComputedFieldInfo]] = {}¶
A dictionary of computed field names and their corresponding ComputedFieldInfo objects.
- model_config: ClassVar[ConfigDict] = {'arbitrary_types_allowed': True, 'extra': 'forbid', 'frozen': True}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- model_fields: ClassVar[Dict[str, FieldInfo]] = {'metric': FieldInfo(annotation=Literal['prompt.regex.url'], required=True), 'profile': FieldInfo(annotation=Union[bool, NoneType], required=False, default=True), 'validation': FieldInfo(annotation=Union[InlineConstraintOptions, NoneType], required=False, default=None, json_schema_extra={'additionalProperties': False})}¶
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.
- profile: bool | None¶
- validation: InlineConstraintOptions | None¶
- class whylogs_container.whylabs.container.policy.policy_0_0_1.PromptSentenceCountMetric(*, metric: Literal['prompt.stats.sentence_count'], profile: bool | None = True, validation: InlineConstraintOptions | None = None)¶
Bases:
BaseMetric
- metric: Literal['prompt.stats.sentence_count']¶
- model_computed_fields: ClassVar[Dict[str, ComputedFieldInfo]] = {}¶
A dictionary of computed field names and their corresponding ComputedFieldInfo objects.
- model_config: ClassVar[ConfigDict] = {'arbitrary_types_allowed': True, 'extra': 'forbid', 'frozen': True}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- model_fields: ClassVar[Dict[str, FieldInfo]] = {'metric': FieldInfo(annotation=Literal['prompt.stats.sentence_count'], required=True), 'profile': FieldInfo(annotation=Union[bool, NoneType], required=False, default=True), 'validation': FieldInfo(annotation=Union[InlineConstraintOptions, NoneType], required=False, default=None, json_schema_extra={'additionalProperties': False})}¶
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.
- profile: bool | None¶
- validation: InlineConstraintOptions | None¶
- class whylogs_container.whylabs.container.policy.policy_0_0_1.PromptSentimentMetric(*, metric: Literal['prompt.sentiment'], profile: bool | None = True)¶
Bases:
BaseMetric
- metric: Literal['prompt.sentiment']¶
- model_computed_fields: ClassVar[Dict[str, ComputedFieldInfo]] = {}¶
A dictionary of computed field names and their corresponding ComputedFieldInfo objects.
- model_config: ClassVar[ConfigDict] = {'arbitrary_types_allowed': True, 'extra': 'forbid', 'frozen': True}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- model_fields: ClassVar[Dict[str, FieldInfo]] = {'metric': FieldInfo(annotation=Literal['prompt.sentiment'], required=True), 'profile': FieldInfo(annotation=Union[bool, NoneType], required=False, default=True)}¶
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.
- profile: bool | None¶
- class whylogs_container.whylabs.container.policy.policy_0_0_1.PromptSentimentScoreMetric(*, metric: Literal['prompt.sentiment.sentiment_score'], profile: bool | None = True, validation: InlineConstraintOptions | None = None)¶
Bases:
BaseMetric
- metric: Literal['prompt.sentiment.sentiment_score']¶
- model_computed_fields: ClassVar[Dict[str, ComputedFieldInfo]] = {}¶
A dictionary of computed field names and their corresponding ComputedFieldInfo objects.
- model_config: ClassVar[ConfigDict] = {'arbitrary_types_allowed': True, 'extra': 'forbid', 'frozen': True}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- model_fields: ClassVar[Dict[str, FieldInfo]] = {'metric': FieldInfo(annotation=Literal['prompt.sentiment.sentiment_score'], required=True), 'profile': FieldInfo(annotation=Union[bool, NoneType], required=False, default=True), 'validation': FieldInfo(annotation=Union[InlineConstraintOptions, NoneType], required=False, default=None, json_schema_extra={'additionalProperties': False})}¶
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.
- profile: bool | None¶
- validation: InlineConstraintOptions | None¶
- class whylogs_container.whylabs.container.policy.policy_0_0_1.PromptSimilarityContextMetric(*, metric: Literal['prompt.similarity.context'], options: EmbeddingOptions = {}, profile: bool | None = True, validation: InlineConstraintOptions | None = None)¶
Bases:
BaseMetric
- metric: Literal['prompt.similarity.context']¶
- model_computed_fields: ClassVar[Dict[str, ComputedFieldInfo]] = {}¶
A dictionary of computed field names and their corresponding ComputedFieldInfo objects.
- model_config: ClassVar[ConfigDict] = {'arbitrary_types_allowed': True, 'extra': 'forbid', 'frozen': True}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- model_fields: ClassVar[Dict[str, FieldInfo]] = {'metric': FieldInfo(annotation=Literal['prompt.similarity.context'], required=True), 'options': FieldInfo(annotation=EmbeddingOptions, required=False, default={}, json_schema_extra={'additionalProperties': False}), 'profile': FieldInfo(annotation=Union[bool, NoneType], required=False, default=True), 'validation': FieldInfo(annotation=Union[InlineConstraintOptions, NoneType], required=False, default=None, json_schema_extra={'additionalProperties': False})}¶
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.
- options: EmbeddingOptions¶
- profile: bool | None¶
- validation: InlineConstraintOptions | None¶
- class whylogs_container.whylabs.container.policy.policy_0_0_1.PromptSimilarityCustomColumnMetric(*, metric: Literal['prompt.similarity.CUSTOM_COLUMN'], options: PromptSimilarityCustomColumnOptions, profile: bool | None = True)¶
Bases:
BaseMetric
- metric: Literal['prompt.similarity.CUSTOM_COLUMN']¶
- model_computed_fields: ClassVar[Dict[str, ComputedFieldInfo]] = {}¶
A dictionary of computed field names and their corresponding ComputedFieldInfo objects.
- model_config: ClassVar[ConfigDict] = {'arbitrary_types_allowed': True, 'extra': 'forbid', 'frozen': True}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- model_fields: ClassVar[Dict[str, FieldInfo]] = {'metric': FieldInfo(annotation=Literal['prompt.similarity.CUSTOM_COLUMN'], required=True), 'options': FieldInfo(annotation=PromptSimilarityCustomColumnOptions, required=True, json_schema_extra={'additionalProperties': False}), 'profile': FieldInfo(annotation=Union[bool, NoneType], required=False, default=True)}¶
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.
- options: PromptSimilarityCustomColumnOptions¶
- profile: bool | None¶
- class whylogs_container.whylabs.container.policy.policy_0_0_1.PromptSimilarityMetric(*, metric: Literal['prompt.similarity'], profile: bool | None = True)¶
Bases:
BaseMetric
- metric: Literal['prompt.similarity']¶
- model_computed_fields: ClassVar[Dict[str, ComputedFieldInfo]] = {}¶
A dictionary of computed field names and their corresponding ComputedFieldInfo objects.
- model_config: ClassVar[ConfigDict] = {'arbitrary_types_allowed': True, 'extra': 'forbid', 'frozen': True}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- model_fields: ClassVar[Dict[str, FieldInfo]] = {'metric': FieldInfo(annotation=Literal['prompt.similarity'], required=True), 'profile': FieldInfo(annotation=Union[bool, NoneType], required=False, default=True)}¶
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.
- profile: bool | None¶
- class whylogs_container.whylabs.container.policy.policy_0_0_1.PromptTokenCountMetric(*, metric: Literal['prompt.stats.token_count'], options: TokenCountOptions = {}, profile: bool | None = True, validation: InlineConstraintOptions | None = None)¶
Bases:
BaseMetric
- metric: Literal['prompt.stats.token_count']¶
- model_computed_fields: ClassVar[Dict[str, ComputedFieldInfo]] = {}¶
A dictionary of computed field names and their corresponding ComputedFieldInfo objects.
- model_config: ClassVar[ConfigDict] = {'arbitrary_types_allowed': True, 'extra': 'forbid', 'frozen': True}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- model_fields: ClassVar[Dict[str, FieldInfo]] = {'metric': FieldInfo(annotation=Literal['prompt.stats.token_count'], required=True), 'options': FieldInfo(annotation=TokenCountOptions, required=False, default={}, json_schema_extra={'additionalProperties': False}), 'profile': FieldInfo(annotation=Union[bool, NoneType], required=False, default=True), 'validation': FieldInfo(annotation=Union[InlineConstraintOptions, NoneType], required=False, default=None, json_schema_extra={'additionalProperties': False})}¶
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.
- options: TokenCountOptions¶
- profile: bool | None¶
- validation: InlineConstraintOptions | None¶
- class whylogs_container.whylabs.container.policy.policy_0_0_1.PromptTopicsCodeMetric(*, metric: Literal['prompt.topics.code'], profile: bool | None = True, validation: InlineConstraintOptions | None = None)¶
Bases:
BaseMetric
- metric: Literal['prompt.topics.code']¶
- model_computed_fields: ClassVar[Dict[str, ComputedFieldInfo]] = {}¶
A dictionary of computed field names and their corresponding ComputedFieldInfo objects.
- model_config: ClassVar[ConfigDict] = {'arbitrary_types_allowed': True, 'extra': 'forbid', 'frozen': True}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- model_fields: ClassVar[Dict[str, FieldInfo]] = {'metric': FieldInfo(annotation=Literal['prompt.topics.code'], required=True), 'profile': FieldInfo(annotation=Union[bool, NoneType], required=False, default=True), 'validation': FieldInfo(annotation=Union[InlineConstraintOptions, NoneType], required=False, default=None, json_schema_extra={'additionalProperties': False})}¶
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.
- profile: bool | None¶
- validation: InlineConstraintOptions | None¶
- class whylogs_container.whylabs.container.policy.policy_0_0_1.PromptTopicsFinancialMetric(*, metric: Literal['prompt.topics.financial'], profile: bool | None = True, validation: InlineConstraintOptions | None = None)¶
Bases:
BaseMetric
- metric: Literal['prompt.topics.financial']¶
- model_computed_fields: ClassVar[Dict[str, ComputedFieldInfo]] = {}¶
A dictionary of computed field names and their corresponding ComputedFieldInfo objects.
- model_config: ClassVar[ConfigDict] = {'arbitrary_types_allowed': True, 'extra': 'forbid', 'frozen': True}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- model_fields: ClassVar[Dict[str, FieldInfo]] = {'metric': FieldInfo(annotation=Literal['prompt.topics.financial'], required=True), 'profile': FieldInfo(annotation=Union[bool, NoneType], required=False, default=True), 'validation': FieldInfo(annotation=Union[InlineConstraintOptions, NoneType], required=False, default=None, json_schema_extra={'additionalProperties': False})}¶
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.
- profile: bool | None¶
- validation: InlineConstraintOptions | None¶
- class whylogs_container.whylabs.container.policy.policy_0_0_1.PromptTopicsMaliciousMetric(*, metric: Literal['prompt.topics.malicious'], profile: bool | None = True, validation: InlineConstraintOptions | None = None)¶
Bases:
BaseMetric
- metric: Literal['prompt.topics.malicious']¶
- model_computed_fields: ClassVar[Dict[str, ComputedFieldInfo]] = {}¶
A dictionary of computed field names and their corresponding ComputedFieldInfo objects.
- model_config: ClassVar[ConfigDict] = {'arbitrary_types_allowed': True, 'extra': 'forbid', 'frozen': True}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- model_fields: ClassVar[Dict[str, FieldInfo]] = {'metric': FieldInfo(annotation=Literal['prompt.topics.malicious'], required=True), 'profile': FieldInfo(annotation=Union[bool, NoneType], required=False, default=True), 'validation': FieldInfo(annotation=Union[InlineConstraintOptions, NoneType], required=False, default=None, json_schema_extra={'additionalProperties': False})}¶
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.
- profile: bool | None¶
- validation: InlineConstraintOptions | None¶
- class whylogs_container.whylabs.container.policy.policy_0_0_1.PromptTopicsMedicalMetric(*, metric: Literal['prompt.topics.medical'], profile: bool | None = True, validation: InlineConstraintOptions | None = None)¶
Bases:
BaseMetric
- metric: Literal['prompt.topics.medical']¶
- model_computed_fields: ClassVar[Dict[str, ComputedFieldInfo]] = {}¶
A dictionary of computed field names and their corresponding ComputedFieldInfo objects.
- model_config: ClassVar[ConfigDict] = {'arbitrary_types_allowed': True, 'extra': 'forbid', 'frozen': True}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- model_fields: ClassVar[Dict[str, FieldInfo]] = {'metric': FieldInfo(annotation=Literal['prompt.topics.medical'], required=True), 'profile': FieldInfo(annotation=Union[bool, NoneType], required=False, default=True), 'validation': FieldInfo(annotation=Union[InlineConstraintOptions, NoneType], required=False, default=None, json_schema_extra={'additionalProperties': False})}¶
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.
- profile: bool | None¶
- validation: InlineConstraintOptions | None¶
- class whylogs_container.whylabs.container.policy.policy_0_0_1.PromptTopicsMetric(*, metric: Literal['prompt.topics'], options: TopicsOptions, profile: bool | None = True)¶
Bases:
BaseMetric
- metric: Literal['prompt.topics']¶
- model_computed_fields: ClassVar[Dict[str, ComputedFieldInfo]] = {}¶
A dictionary of computed field names and their corresponding ComputedFieldInfo objects.
- model_config: ClassVar[ConfigDict] = {'arbitrary_types_allowed': True, 'extra': 'forbid', 'frozen': True}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- model_fields: ClassVar[Dict[str, FieldInfo]] = {'metric': FieldInfo(annotation=Literal['prompt.topics'], required=True), 'options': FieldInfo(annotation=TopicsOptions, required=True, json_schema_extra={'additionalProperties': False}), 'profile': FieldInfo(annotation=Union[bool, NoneType], required=False, default=True)}¶
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.
- options: TopicsOptions¶
- profile: bool | None¶
- class whylogs_container.whylabs.container.policy.policy_0_0_1.PromptToxicityMetric(*, metric: Literal['prompt.toxicity'], profile: bool | None = True)¶
Bases:
BaseMetric
- metric: Literal['prompt.toxicity']¶
- model_computed_fields: ClassVar[Dict[str, ComputedFieldInfo]] = {}¶
A dictionary of computed field names and their corresponding ComputedFieldInfo objects.
- model_config: ClassVar[ConfigDict] = {'arbitrary_types_allowed': True, 'extra': 'forbid', 'frozen': True}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- model_fields: ClassVar[Dict[str, FieldInfo]] = {'metric': FieldInfo(annotation=Literal['prompt.toxicity'], required=True), 'profile': FieldInfo(annotation=Union[bool, NoneType], required=False, default=True)}¶
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.
- profile: bool | None¶
- class whylogs_container.whylabs.container.policy.policy_0_0_1.PromptToxicityScoreMetric(*, metric: Literal['prompt.toxicity.toxicity_score'], options: ToxicityScoreOptions = {}, profile: bool | None = True, validation: InlineConstraintOptions | None = None)¶
Bases:
BaseMetric
- metric: Literal['prompt.toxicity.toxicity_score']¶
- model_computed_fields: ClassVar[Dict[str, ComputedFieldInfo]] = {}¶
A dictionary of computed field names and their corresponding ComputedFieldInfo objects.
- model_config: ClassVar[ConfigDict] = {'arbitrary_types_allowed': True, 'extra': 'forbid', 'frozen': True}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- model_fields: ClassVar[Dict[str, FieldInfo]] = {'metric': FieldInfo(annotation=Literal['prompt.toxicity.toxicity_score'], required=True), 'options': FieldInfo(annotation=ToxicityScoreOptions, required=False, default={}, json_schema_extra={'additionalProperties': False}), 'profile': FieldInfo(annotation=Union[bool, NoneType], required=False, default=True), 'validation': FieldInfo(annotation=Union[InlineConstraintOptions, NoneType], required=False, default=None, json_schema_extra={'additionalProperties': False})}¶
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.
- options: ToxicityScoreOptions¶
- profile: bool | None¶
- validation: InlineConstraintOptions | None¶
- class whylogs_container.whylabs.container.policy.policy_0_0_1.PromptTruthfulnessRuleSet(*, ruleset: Literal['prompt.score.truthfulness'], options: TruthfulnessRuleSetOptions)¶
Bases:
BaseModel
- model_computed_fields: ClassVar[Dict[str, ComputedFieldInfo]] = {}¶
A dictionary of computed field names and their corresponding ComputedFieldInfo objects.
- model_config: ClassVar[ConfigDict] = {'extra': 'forbid', 'frozen': True}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- model_fields: ClassVar[Dict[str, FieldInfo]] = {'options': FieldInfo(annotation=TruthfulnessRuleSetOptions, required=True), 'ruleset': FieldInfo(annotation=Literal['prompt.score.truthfulness'], required=True)}¶
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.
- options: TruthfulnessRuleSetOptions¶
- ruleset: Literal['prompt.score.truthfulness']¶
- to_langkit_options() StrictLangkitOptions ¶
- class whylogs_container.whylabs.container.policy.policy_0_0_1.PromptUtilEmbeddingsMetric(*, metric: Literal['prompt.util.embeddings'], options: EmbeddingOptions = {}, profile: bool | None = True)¶
Bases:
BaseMetric
- metric: Literal['prompt.util.embeddings']¶
- model_computed_fields: ClassVar[Dict[str, ComputedFieldInfo]] = {}¶
A dictionary of computed field names and their corresponding ComputedFieldInfo objects.
- model_config: ClassVar[ConfigDict] = {'arbitrary_types_allowed': True, 'extra': 'forbid', 'frozen': True}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- model_fields: ClassVar[Dict[str, FieldInfo]] = {'metric': FieldInfo(annotation=Literal['prompt.util.embeddings'], required=True), 'options': FieldInfo(annotation=EmbeddingOptions, required=False, default={}, json_schema_extra={'additionalProperties': False}), 'profile': FieldInfo(annotation=Union[bool, NoneType], required=False, default=True)}¶
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.
- options: EmbeddingOptions¶
- profile: bool | None¶
- class whylogs_container.whylabs.container.policy.policy_0_0_1.PromptUtilRuleSet(*, ruleset: Literal['prompt.score.util'], options: UtilRuleSetOptions)¶
Bases:
BaseModel
- model_computed_fields: ClassVar[Dict[str, ComputedFieldInfo]] = {}¶
A dictionary of computed field names and their corresponding ComputedFieldInfo objects.
- model_config: ClassVar[ConfigDict] = {'extra': 'forbid', 'frozen': True}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- model_fields: ClassVar[Dict[str, FieldInfo]] = {'options': FieldInfo(annotation=UtilRuleSetOptions, required=True), 'ruleset': FieldInfo(annotation=Literal['prompt.score.util'], required=True)}¶
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.
- options: UtilRuleSetOptions¶
- ruleset: Literal['prompt.score.util']¶
- to_langkit_options() StrictLangkitOptions ¶
- class whylogs_container.whylabs.container.policy.policy_0_0_1.ResponseBadActorsRuleSet(*, ruleset: Literal['response.score.bad_actors'], options: BadActorsRuleSetOptions)¶
Bases:
BaseModel
- model_computed_fields: ClassVar[Dict[str, ComputedFieldInfo]] = {}¶
A dictionary of computed field names and their corresponding ComputedFieldInfo objects.
- model_config: ClassVar[ConfigDict] = {'extra': 'forbid', 'frozen': True}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- model_fields: ClassVar[Dict[str, FieldInfo]] = {'options': FieldInfo(annotation=BadActorsRuleSetOptions, required=True), 'ruleset': FieldInfo(annotation=Literal['response.score.bad_actors'], required=True)}¶
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.
- options: BadActorsRuleSetOptions¶
- ruleset: Literal['response.score.bad_actors']¶
- to_langkit_options() StrictLangkitOptions ¶
- class whylogs_container.whylabs.container.policy.policy_0_0_1.ResponseCharCountMetric(*, metric: Literal['response.stats.char_count'], profile: bool | None = True, validation: InlineConstraintOptions | None = None)¶
Bases:
BaseMetric
- metric: Literal['response.stats.char_count']¶
- model_computed_fields: ClassVar[Dict[str, ComputedFieldInfo]] = {}¶
A dictionary of computed field names and their corresponding ComputedFieldInfo objects.
- model_config: ClassVar[ConfigDict] = {'arbitrary_types_allowed': True, 'extra': 'forbid', 'frozen': True}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- model_fields: ClassVar[Dict[str, FieldInfo]] = {'metric': FieldInfo(annotation=Literal['response.stats.char_count'], required=True), 'profile': FieldInfo(annotation=Union[bool, NoneType], required=False, default=True), 'validation': FieldInfo(annotation=Union[InlineConstraintOptions, NoneType], required=False, default=None, json_schema_extra={'additionalProperties': False})}¶
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.
- profile: bool | None¶
- validation: InlineConstraintOptions | None¶
- class whylogs_container.whylabs.container.policy.policy_0_0_1.ResponseCostRuleSet(*, ruleset: Literal['response.score.cost'], options: CostRuleSetOptions)¶
Bases:
BaseModel
- model_computed_fields: ClassVar[Dict[str, ComputedFieldInfo]] = {}¶
A dictionary of computed field names and their corresponding ComputedFieldInfo objects.
- model_config: ClassVar[ConfigDict] = {'extra': 'forbid', 'frozen': True}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- model_fields: ClassVar[Dict[str, FieldInfo]] = {'options': FieldInfo(annotation=CostRuleSetOptions, required=True), 'ruleset': FieldInfo(annotation=Literal['response.score.cost'], required=True)}¶
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.
- options: CostRuleSetOptions¶
- ruleset: Literal['response.score.cost']¶
- to_langkit_options() StrictLangkitOptions ¶
- class whylogs_container.whylabs.container.policy.policy_0_0_1.ResponseCustomerExperienceRuleSet(*, ruleset: Literal['response.score.customer_experience'], options: CustomerExperienceRuleSetOptions)¶
Bases:
BaseModel
- model_computed_fields: ClassVar[Dict[str, ComputedFieldInfo]] = {}¶
A dictionary of computed field names and their corresponding ComputedFieldInfo objects.
- model_config: ClassVar[ConfigDict] = {'extra': 'forbid', 'frozen': True}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- model_fields: ClassVar[Dict[str, FieldInfo]] = {'options': FieldInfo(annotation=CustomerExperienceRuleSetOptions, required=True), 'ruleset': FieldInfo(annotation=Literal['response.score.customer_experience'], required=True)}¶
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.
- options: CustomerExperienceRuleSetOptions¶
- ruleset: Literal['response.score.customer_experience']¶
- to_langkit_options() StrictLangkitOptions ¶
- class whylogs_container.whylabs.container.policy.policy_0_0_1.ResponseDifficultWordsMetric(*, metric: Literal['response.stats.difficult_words'], profile: bool | None = True, validation: InlineConstraintOptions | None = None)¶
Bases:
BaseMetric
- metric: Literal['response.stats.difficult_words']¶
- model_computed_fields: ClassVar[Dict[str, ComputedFieldInfo]] = {}¶
A dictionary of computed field names and their corresponding ComputedFieldInfo objects.
- model_config: ClassVar[ConfigDict] = {'arbitrary_types_allowed': True, 'extra': 'forbid', 'frozen': True}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- model_fields: ClassVar[Dict[str, FieldInfo]] = {'metric': FieldInfo(annotation=Literal['response.stats.difficult_words'], required=True), 'profile': FieldInfo(annotation=Union[bool, NoneType], required=False, default=True), 'validation': FieldInfo(annotation=Union[InlineConstraintOptions, NoneType], required=False, default=None, json_schema_extra={'additionalProperties': False})}¶
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.
- profile: bool | None¶
- validation: InlineConstraintOptions | None¶
- class whylogs_container.whylabs.container.policy.policy_0_0_1.ResponseFleschReadingEaseMetric(*, metric: Literal['response.stats.flesch_reading_ease'], profile: bool | None = True, validation: InlineConstraintOptions | None = None)¶
Bases:
BaseMetric
- metric: Literal['response.stats.flesch_reading_ease']¶
- model_computed_fields: ClassVar[Dict[str, ComputedFieldInfo]] = {}¶
A dictionary of computed field names and their corresponding ComputedFieldInfo objects.
- model_config: ClassVar[ConfigDict] = {'arbitrary_types_allowed': True, 'extra': 'forbid', 'frozen': True}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- model_fields: ClassVar[Dict[str, FieldInfo]] = {'metric': FieldInfo(annotation=Literal['response.stats.flesch_reading_ease'], required=True), 'profile': FieldInfo(annotation=Union[bool, NoneType], required=False, default=True), 'validation': FieldInfo(annotation=Union[InlineConstraintOptions, NoneType], required=False, default=None, json_schema_extra={'additionalProperties': False})}¶
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.
- profile: bool | None¶
- validation: InlineConstraintOptions | None¶
- class whylogs_container.whylabs.container.policy.policy_0_0_1.ResponseGradeMetric(*, metric: Literal['response.stats.grade'], profile: bool | None = True, validation: InlineConstraintOptions | None = None)¶
Bases:
BaseMetric
- metric: Literal['response.stats.grade']¶
- model_computed_fields: ClassVar[Dict[str, ComputedFieldInfo]] = {}¶
A dictionary of computed field names and their corresponding ComputedFieldInfo objects.
- model_config: ClassVar[ConfigDict] = {'arbitrary_types_allowed': True, 'extra': 'forbid', 'frozen': True}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- model_fields: ClassVar[Dict[str, FieldInfo]] = {'metric': FieldInfo(annotation=Literal['response.stats.grade'], required=True), 'profile': FieldInfo(annotation=Union[bool, NoneType], required=False, default=True), 'validation': FieldInfo(annotation=Union[InlineConstraintOptions, NoneType], required=False, default=None, json_schema_extra={'additionalProperties': False})}¶
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.
- profile: bool | None¶
- validation: InlineConstraintOptions | None¶
- class whylogs_container.whylabs.container.policy.policy_0_0_1.ResponseHallucinationScoreMetric(*, metric: Literal['response.hallucination.hallucination_score'], options: HallucinationScoreOptions = {}, profile: bool | None = True, validation: InlineConstraintOptions | None = None)¶
Bases:
BaseMetric
- metric: Literal['response.hallucination.hallucination_score']¶
- model_computed_fields: ClassVar[Dict[str, ComputedFieldInfo]] = {}¶
A dictionary of computed field names and their corresponding ComputedFieldInfo objects.
- model_config: ClassVar[ConfigDict] = {'arbitrary_types_allowed': True, 'extra': 'forbid', 'frozen': True}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- model_fields: ClassVar[Dict[str, FieldInfo]] = {'metric': FieldInfo(annotation=Literal['response.hallucination.hallucination_score'], required=True), 'options': FieldInfo(annotation=HallucinationScoreOptions, required=False, default={}, json_schema_extra={'additionalProperties': False}), 'profile': FieldInfo(annotation=Union[bool, NoneType], required=False, default=True), 'validation': FieldInfo(annotation=Union[InlineConstraintOptions, NoneType], required=False, default=None, json_schema_extra={'additionalProperties': False})}¶
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.
- options: HallucinationScoreOptions¶
- profile: bool | None¶
- validation: InlineConstraintOptions | None¶
- class whylogs_container.whylabs.container.policy.policy_0_0_1.ResponseLetterCountMetric(*, metric: Literal['response.stats.letter_count'], profile: bool | None = True, validation: InlineConstraintOptions | None = None)¶
Bases:
BaseMetric
- metric: Literal['response.stats.letter_count']¶
- model_computed_fields: ClassVar[Dict[str, ComputedFieldInfo]] = {}¶
A dictionary of computed field names and their corresponding ComputedFieldInfo objects.
- model_config: ClassVar[ConfigDict] = {'arbitrary_types_allowed': True, 'extra': 'forbid', 'frozen': True}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- model_fields: ClassVar[Dict[str, FieldInfo]] = {'metric': FieldInfo(annotation=Literal['response.stats.letter_count'], required=True), 'profile': FieldInfo(annotation=Union[bool, NoneType], required=False, default=True), 'validation': FieldInfo(annotation=Union[InlineConstraintOptions, NoneType], required=False, default=None, json_schema_extra={'additionalProperties': False})}¶
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.
- profile: bool | None¶
- validation: InlineConstraintOptions | None¶
- class whylogs_container.whylabs.container.policy.policy_0_0_1.ResponseLexiconCountMetric(*, metric: Literal['response.stats.lexicon_count'], profile: bool | None = True, validation: InlineConstraintOptions | None = None)¶
Bases:
BaseMetric
- metric: Literal['response.stats.lexicon_count']¶
- model_computed_fields: ClassVar[Dict[str, ComputedFieldInfo]] = {}¶
A dictionary of computed field names and their corresponding ComputedFieldInfo objects.
- model_config: ClassVar[ConfigDict] = {'arbitrary_types_allowed': True, 'extra': 'forbid', 'frozen': True}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- model_fields: ClassVar[Dict[str, FieldInfo]] = {'metric': FieldInfo(annotation=Literal['response.stats.lexicon_count'], required=True), 'profile': FieldInfo(annotation=Union[bool, NoneType], required=False, default=True), 'validation': FieldInfo(annotation=Union[InlineConstraintOptions, NoneType], required=False, default=None, json_schema_extra={'additionalProperties': False})}¶
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.
- profile: bool | None¶
- validation: InlineConstraintOptions | None¶
- class whylogs_container.whylabs.container.policy.policy_0_0_1.ResponseMisuseRuleSet(*, ruleset: Literal['response.score.misuse'], options: MisuseRuleSetOptions)¶
Bases:
BaseModel
- model_computed_fields: ClassVar[Dict[str, ComputedFieldInfo]] = {}¶
A dictionary of computed field names and their corresponding ComputedFieldInfo objects.
- model_config: ClassVar[ConfigDict] = {'extra': 'forbid', 'frozen': True}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- model_fields: ClassVar[Dict[str, FieldInfo]] = {'options': FieldInfo(annotation=MisuseRuleSetOptions, required=True), 'ruleset': FieldInfo(annotation=Literal['response.score.misuse'], required=True)}¶
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.
- options: MisuseRuleSetOptions¶
- ruleset: Literal['response.score.misuse']¶
- to_langkit_options() StrictLangkitOptions ¶
- class whylogs_container.whylabs.container.policy.policy_0_0_1.ResponsePcaCoordinatesMetric(*, metric: Literal['response.pca.coordinates'], options: CoordinatesOptions = {}, profile: bool | None = True, validation: InlineConstraintOptions | None = None)¶
Bases:
BaseMetric
- metric: Literal['response.pca.coordinates']¶
- model_computed_fields: ClassVar[Dict[str, ComputedFieldInfo]] = {}¶
A dictionary of computed field names and their corresponding ComputedFieldInfo objects.
- model_config: ClassVar[ConfigDict] = {'arbitrary_types_allowed': True, 'extra': 'forbid', 'frozen': True}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- model_fields: ClassVar[Dict[str, FieldInfo]] = {'metric': FieldInfo(annotation=Literal['response.pca.coordinates'], required=True), 'options': FieldInfo(annotation=CoordinatesOptions, required=False, default={}, json_schema_extra={'additionalProperties': False}), 'profile': FieldInfo(annotation=Union[bool, NoneType], required=False, default=True), 'validation': FieldInfo(annotation=Union[InlineConstraintOptions, NoneType], required=False, default=None, json_schema_extra={'additionalProperties': False})}¶
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.
- options: CoordinatesOptions¶
- profile: bool | None¶
- validation: InlineConstraintOptions | None¶
- class whylogs_container.whylabs.container.policy.policy_0_0_1.ResponsePiiMetric(*, metric: Literal['response.pii'], options: PiiOptions = {}, profile: bool | None = True)¶
Bases:
BaseMetric
- metric: Literal['response.pii']¶
- model_computed_fields: ClassVar[Dict[str, ComputedFieldInfo]] = {}¶
A dictionary of computed field names and their corresponding ComputedFieldInfo objects.
- model_config: ClassVar[ConfigDict] = {'arbitrary_types_allowed': True, 'extra': 'forbid', 'frozen': True}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- model_fields: ClassVar[Dict[str, FieldInfo]] = {'metric': FieldInfo(annotation=Literal['response.pii'], required=True), 'options': FieldInfo(annotation=PiiOptions, required=False, default={}, json_schema_extra={'additionalProperties': False}), 'profile': FieldInfo(annotation=Union[bool, NoneType], required=False, default=True)}¶
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.
- options: PiiOptions¶
- profile: bool | None¶
- class whylogs_container.whylabs.container.policy.policy_0_0_1.ResponseRegexCreditCardNumberMetric(*, metric: Literal['response.regex.credit_card_number'], profile: bool | None = True, validation: InlineConstraintOptions | None = None)¶
Bases:
BaseMetric
- metric: Literal['response.regex.credit_card_number']¶
- model_computed_fields: ClassVar[Dict[str, ComputedFieldInfo]] = {}¶
A dictionary of computed field names and their corresponding ComputedFieldInfo objects.
- model_config: ClassVar[ConfigDict] = {'arbitrary_types_allowed': True, 'extra': 'forbid', 'frozen': True}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- model_fields: ClassVar[Dict[str, FieldInfo]] = {'metric': FieldInfo(annotation=Literal['response.regex.credit_card_number'], required=True), 'profile': FieldInfo(annotation=Union[bool, NoneType], required=False, default=True), 'validation': FieldInfo(annotation=Union[InlineConstraintOptions, NoneType], required=False, default=None, json_schema_extra={'additionalProperties': False})}¶
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.
- profile: bool | None¶
- validation: InlineConstraintOptions | None¶
- class whylogs_container.whylabs.container.policy.policy_0_0_1.ResponseRegexEmailAddressMetric(*, metric: Literal['response.regex.email_address'], profile: bool | None = True, validation: InlineConstraintOptions | None = None)¶
Bases:
BaseMetric
- metric: Literal['response.regex.email_address']¶
- model_computed_fields: ClassVar[Dict[str, ComputedFieldInfo]] = {}¶
A dictionary of computed field names and their corresponding ComputedFieldInfo objects.
- model_config: ClassVar[ConfigDict] = {'arbitrary_types_allowed': True, 'extra': 'forbid', 'frozen': True}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- model_fields: ClassVar[Dict[str, FieldInfo]] = {'metric': FieldInfo(annotation=Literal['response.regex.email_address'], required=True), 'profile': FieldInfo(annotation=Union[bool, NoneType], required=False, default=True), 'validation': FieldInfo(annotation=Union[InlineConstraintOptions, NoneType], required=False, default=None, json_schema_extra={'additionalProperties': False})}¶
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.
- profile: bool | None¶
- validation: InlineConstraintOptions | None¶
- class whylogs_container.whylabs.container.policy.policy_0_0_1.ResponseRegexMailingAddressMetric(*, metric: Literal['response.regex.mailing_address'], profile: bool | None = True, validation: InlineConstraintOptions | None = None)¶
Bases:
BaseMetric
- metric: Literal['response.regex.mailing_address']¶
- model_computed_fields: ClassVar[Dict[str, ComputedFieldInfo]] = {}¶
A dictionary of computed field names and their corresponding ComputedFieldInfo objects.
- model_config: ClassVar[ConfigDict] = {'arbitrary_types_allowed': True, 'extra': 'forbid', 'frozen': True}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- model_fields: ClassVar[Dict[str, FieldInfo]] = {'metric': FieldInfo(annotation=Literal['response.regex.mailing_address'], required=True), 'profile': FieldInfo(annotation=Union[bool, NoneType], required=False, default=True), 'validation': FieldInfo(annotation=Union[InlineConstraintOptions, NoneType], required=False, default=None, json_schema_extra={'additionalProperties': False})}¶
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.
- profile: bool | None¶
- validation: InlineConstraintOptions | None¶
- class whylogs_container.whylabs.container.policy.policy_0_0_1.ResponseRegexMetric(*, metric: Literal['response.regex'], profile: bool | None = True)¶
Bases:
BaseMetric
- metric: Literal['response.regex']¶
- model_computed_fields: ClassVar[Dict[str, ComputedFieldInfo]] = {}¶
A dictionary of computed field names and their corresponding ComputedFieldInfo objects.
- model_config: ClassVar[ConfigDict] = {'arbitrary_types_allowed': True, 'extra': 'forbid', 'frozen': True}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- model_fields: ClassVar[Dict[str, FieldInfo]] = {'metric': FieldInfo(annotation=Literal['response.regex'], required=True), 'profile': FieldInfo(annotation=Union[bool, NoneType], required=False, default=True)}¶
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.
- profile: bool | None¶
- class whylogs_container.whylabs.container.policy.policy_0_0_1.ResponseRegexPhoneNumberMetric(*, metric: Literal['response.regex.phone_number'], profile: bool | None = True, validation: InlineConstraintOptions | None = None)¶
Bases:
BaseMetric
- metric: Literal['response.regex.phone_number']¶
- model_computed_fields: ClassVar[Dict[str, ComputedFieldInfo]] = {}¶
A dictionary of computed field names and their corresponding ComputedFieldInfo objects.
- model_config: ClassVar[ConfigDict] = {'arbitrary_types_allowed': True, 'extra': 'forbid', 'frozen': True}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- model_fields: ClassVar[Dict[str, FieldInfo]] = {'metric': FieldInfo(annotation=Literal['response.regex.phone_number'], required=True), 'profile': FieldInfo(annotation=Union[bool, NoneType], required=False, default=True), 'validation': FieldInfo(annotation=Union[InlineConstraintOptions, NoneType], required=False, default=None, json_schema_extra={'additionalProperties': False})}¶
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.
- profile: bool | None¶
- validation: InlineConstraintOptions | None¶
- class whylogs_container.whylabs.container.policy.policy_0_0_1.ResponseRegexRefusalMetric(*, metric: Literal['response.regex.refusal'], profile: bool | None = True, validation: InlineConstraintOptions | None = None)¶
Bases:
BaseMetric
- metric: Literal['response.regex.refusal']¶
- model_computed_fields: ClassVar[Dict[str, ComputedFieldInfo]] = {}¶
A dictionary of computed field names and their corresponding ComputedFieldInfo objects.
- model_config: ClassVar[ConfigDict] = {'arbitrary_types_allowed': True, 'extra': 'forbid', 'frozen': True}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- model_fields: ClassVar[Dict[str, FieldInfo]] = {'metric': FieldInfo(annotation=Literal['response.regex.refusal'], required=True), 'profile': FieldInfo(annotation=Union[bool, NoneType], required=False, default=True), 'validation': FieldInfo(annotation=Union[InlineConstraintOptions, NoneType], required=False, default=None, json_schema_extra={'additionalProperties': False})}¶
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.
- profile: bool | None¶
- validation: InlineConstraintOptions | None¶
- class whylogs_container.whylabs.container.policy.policy_0_0_1.ResponseRegexSSNMetric(*, metric: Literal['response.regex.ssn'], profile: bool | None = True, validation: InlineConstraintOptions | None = None)¶
Bases:
BaseMetric
- metric: Literal['response.regex.ssn']¶
- model_computed_fields: ClassVar[Dict[str, ComputedFieldInfo]] = {}¶
A dictionary of computed field names and their corresponding ComputedFieldInfo objects.
- model_config: ClassVar[ConfigDict] = {'arbitrary_types_allowed': True, 'extra': 'forbid', 'frozen': True}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- model_fields: ClassVar[Dict[str, FieldInfo]] = {'metric': FieldInfo(annotation=Literal['response.regex.ssn'], required=True), 'profile': FieldInfo(annotation=Union[bool, NoneType], required=False, default=True), 'validation': FieldInfo(annotation=Union[InlineConstraintOptions, NoneType], required=False, default=None, json_schema_extra={'additionalProperties': False})}¶
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.
- profile: bool | None¶
- validation: InlineConstraintOptions | None¶
- class whylogs_container.whylabs.container.policy.policy_0_0_1.ResponseRegexURLMetric(*, metric: Literal['response.regex.url'], profile: bool | None = True, validation: InlineConstraintOptions | None = None)¶
Bases:
BaseMetric
- metric: Literal['response.regex.url']¶
- model_computed_fields: ClassVar[Dict[str, ComputedFieldInfo]] = {}¶
A dictionary of computed field names and their corresponding ComputedFieldInfo objects.
- model_config: ClassVar[ConfigDict] = {'arbitrary_types_allowed': True, 'extra': 'forbid', 'frozen': True}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- model_fields: ClassVar[Dict[str, FieldInfo]] = {'metric': FieldInfo(annotation=Literal['response.regex.url'], required=True), 'profile': FieldInfo(annotation=Union[bool, NoneType], required=False, default=True), 'validation': FieldInfo(annotation=Union[InlineConstraintOptions, NoneType], required=False, default=None, json_schema_extra={'additionalProperties': False})}¶
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.
- profile: bool | None¶
- validation: InlineConstraintOptions | None¶
- class whylogs_container.whylabs.container.policy.policy_0_0_1.ResponseSentenceCountMetric(*, metric: Literal['response.stats.sentence_count'], profile: bool | None = True, validation: InlineConstraintOptions | None = None)¶
Bases:
BaseMetric
- metric: Literal['response.stats.sentence_count']¶
- model_computed_fields: ClassVar[Dict[str, ComputedFieldInfo]] = {}¶
A dictionary of computed field names and their corresponding ComputedFieldInfo objects.
- model_config: ClassVar[ConfigDict] = {'arbitrary_types_allowed': True, 'extra': 'forbid', 'frozen': True}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- model_fields: ClassVar[Dict[str, FieldInfo]] = {'metric': FieldInfo(annotation=Literal['response.stats.sentence_count'], required=True), 'profile': FieldInfo(annotation=Union[bool, NoneType], required=False, default=True), 'validation': FieldInfo(annotation=Union[InlineConstraintOptions, NoneType], required=False, default=None, json_schema_extra={'additionalProperties': False})}¶
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.
- profile: bool | None¶
- validation: InlineConstraintOptions | None¶
- class whylogs_container.whylabs.container.policy.policy_0_0_1.ResponseSentimentMetric(*, metric: Literal['response.sentiment'], profile: bool | None = True)¶
Bases:
BaseMetric
- metric: Literal['response.sentiment']¶
- model_computed_fields: ClassVar[Dict[str, ComputedFieldInfo]] = {}¶
A dictionary of computed field names and their corresponding ComputedFieldInfo objects.
- model_config: ClassVar[ConfigDict] = {'arbitrary_types_allowed': True, 'extra': 'forbid', 'frozen': True}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- model_fields: ClassVar[Dict[str, FieldInfo]] = {'metric': FieldInfo(annotation=Literal['response.sentiment'], required=True), 'profile': FieldInfo(annotation=Union[bool, NoneType], required=False, default=True)}¶
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.
- profile: bool | None¶
- class whylogs_container.whylabs.container.policy.policy_0_0_1.ResponseSentimentScoreMetric(*, metric: Literal['response.sentiment.sentiment_score'], profile: bool | None = True, validation: InlineConstraintOptions | None = None)¶
Bases:
BaseMetric
- metric: Literal['response.sentiment.sentiment_score']¶
- model_computed_fields: ClassVar[Dict[str, ComputedFieldInfo]] = {}¶
A dictionary of computed field names and their corresponding ComputedFieldInfo objects.
- model_config: ClassVar[ConfigDict] = {'arbitrary_types_allowed': True, 'extra': 'forbid', 'frozen': True}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- model_fields: ClassVar[Dict[str, FieldInfo]] = {'metric': FieldInfo(annotation=Literal['response.sentiment.sentiment_score'], required=True), 'profile': FieldInfo(annotation=Union[bool, NoneType], required=False, default=True), 'validation': FieldInfo(annotation=Union[InlineConstraintOptions, NoneType], required=False, default=None, json_schema_extra={'additionalProperties': False})}¶
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.
- profile: bool | None¶
- validation: InlineConstraintOptions | None¶
- class whylogs_container.whylabs.container.policy.policy_0_0_1.ResponseSimilarityContextMetric(*, metric: Literal['response.similarity.context'], options: EmbeddingOptions = {}, profile: bool | None = True, validation: InlineConstraintOptions | None = None)¶
Bases:
BaseMetric
- metric: Literal['response.similarity.context']¶
- model_computed_fields: ClassVar[Dict[str, ComputedFieldInfo]] = {}¶
A dictionary of computed field names and their corresponding ComputedFieldInfo objects.
- model_config: ClassVar[ConfigDict] = {'arbitrary_types_allowed': True, 'extra': 'forbid', 'frozen': True}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- model_fields: ClassVar[Dict[str, FieldInfo]] = {'metric': FieldInfo(annotation=Literal['response.similarity.context'], required=True), 'options': FieldInfo(annotation=EmbeddingOptions, required=False, default={}, json_schema_extra={'additionalProperties': False}), 'profile': FieldInfo(annotation=Union[bool, NoneType], required=False, default=True), 'validation': FieldInfo(annotation=Union[InlineConstraintOptions, NoneType], required=False, default=None, json_schema_extra={'additionalProperties': False})}¶
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.
- options: EmbeddingOptions¶
- profile: bool | None¶
- validation: InlineConstraintOptions | None¶
- class whylogs_container.whylabs.container.policy.policy_0_0_1.ResponseSimilarityCustomColumnMetric(*, metric: Literal['response.similarity.CUSTOM_COLUMN'], options: ResponseSimilarityCustomColumnOptions, profile: bool | None = True)¶
Bases:
BaseMetric
- metric: Literal['response.similarity.CUSTOM_COLUMN']¶
- model_computed_fields: ClassVar[Dict[str, ComputedFieldInfo]] = {}¶
A dictionary of computed field names and their corresponding ComputedFieldInfo objects.
- model_config: ClassVar[ConfigDict] = {'arbitrary_types_allowed': True, 'extra': 'forbid', 'frozen': True}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- model_fields: ClassVar[Dict[str, FieldInfo]] = {'metric': FieldInfo(annotation=Literal['response.similarity.CUSTOM_COLUMN'], required=True), 'options': FieldInfo(annotation=ResponseSimilarityCustomColumnOptions, required=True, json_schema_extra={'additionalProperties': False}), 'profile': FieldInfo(annotation=Union[bool, NoneType], required=False, default=True)}¶
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.
- options: ResponseSimilarityCustomColumnOptions¶
- profile: bool | None¶
- class whylogs_container.whylabs.container.policy.policy_0_0_1.ResponseSimilarityMetric(*, metric: Literal['response.similarity'], profile: bool | None = True)¶
Bases:
BaseMetric
- metric: Literal['response.similarity']¶
- model_computed_fields: ClassVar[Dict[str, ComputedFieldInfo]] = {}¶
A dictionary of computed field names and their corresponding ComputedFieldInfo objects.
- model_config: ClassVar[ConfigDict] = {'arbitrary_types_allowed': True, 'extra': 'forbid', 'frozen': True}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- model_fields: ClassVar[Dict[str, FieldInfo]] = {'metric': FieldInfo(annotation=Literal['response.similarity'], required=True), 'profile': FieldInfo(annotation=Union[bool, NoneType], required=False, default=True)}¶
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.
- profile: bool | None¶
- class whylogs_container.whylabs.container.policy.policy_0_0_1.ResponseSimilarityPromptMetric(*, metric: Literal['response.similarity.prompt'], options: EmbeddingOptions = {}, profile: bool | None = True, validation: InlineConstraintOptions | None = None)¶
Bases:
BaseMetric
- metric: Literal['response.similarity.prompt']¶
- model_computed_fields: ClassVar[Dict[str, ComputedFieldInfo]] = {}¶
A dictionary of computed field names and their corresponding ComputedFieldInfo objects.
- model_config: ClassVar[ConfigDict] = {'arbitrary_types_allowed': True, 'extra': 'forbid', 'frozen': True}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- model_fields: ClassVar[Dict[str, FieldInfo]] = {'metric': FieldInfo(annotation=Literal['response.similarity.prompt'], required=True), 'options': FieldInfo(annotation=EmbeddingOptions, required=False, default={}, json_schema_extra={'additionalProperties': False}), 'profile': FieldInfo(annotation=Union[bool, NoneType], required=False, default=True), 'validation': FieldInfo(annotation=Union[InlineConstraintOptions, NoneType], required=False, default=None, json_schema_extra={'additionalProperties': False})}¶
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.
- options: EmbeddingOptions¶
- profile: bool | None¶
- validation: InlineConstraintOptions | None¶
- class whylogs_container.whylabs.container.policy.policy_0_0_1.ResponseSimilarityRefusalMetric(*, metric: Literal['response.similarity.refusal'], options: RefusalOptions = {}, profile: bool | None = True, validation: InlineConstraintOptions | None = None)¶
Bases:
BaseMetric
- metric: Literal['response.similarity.refusal']¶
- model_computed_fields: ClassVar[Dict[str, ComputedFieldInfo]] = {}¶
A dictionary of computed field names and their corresponding ComputedFieldInfo objects.
- model_config: ClassVar[ConfigDict] = {'arbitrary_types_allowed': True, 'extra': 'forbid', 'frozen': True}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- model_fields: ClassVar[Dict[str, FieldInfo]] = {'metric': FieldInfo(annotation=Literal['response.similarity.refusal'], required=True), 'options': FieldInfo(annotation=RefusalOptions, required=False, default={}, json_schema_extra={'additionalProperties': False}), 'profile': FieldInfo(annotation=Union[bool, NoneType], required=False, default=True), 'validation': FieldInfo(annotation=Union[InlineConstraintOptions, NoneType], required=False, default=None, json_schema_extra={'additionalProperties': False})}¶
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.
- options: RefusalOptions¶
- profile: bool | None¶
- validation: InlineConstraintOptions | None¶
- class whylogs_container.whylabs.container.policy.policy_0_0_1.ResponseTokenCountMetric(*, metric: Literal['response.stats.token_count'], options: TokenCountOptions = {}, profile: bool | None = True, validation: InlineConstraintOptions | None = None)¶
Bases:
BaseMetric
- metric: Literal['response.stats.token_count']¶
- model_computed_fields: ClassVar[Dict[str, ComputedFieldInfo]] = {}¶
A dictionary of computed field names and their corresponding ComputedFieldInfo objects.
- model_config: ClassVar[ConfigDict] = {'arbitrary_types_allowed': True, 'extra': 'forbid', 'frozen': True}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- model_fields: ClassVar[Dict[str, FieldInfo]] = {'metric': FieldInfo(annotation=Literal['response.stats.token_count'], required=True), 'options': FieldInfo(annotation=TokenCountOptions, required=False, default={}, json_schema_extra={'additionalProperties': False}), 'profile': FieldInfo(annotation=Union[bool, NoneType], required=False, default=True), 'validation': FieldInfo(annotation=Union[InlineConstraintOptions, NoneType], required=False, default=None, json_schema_extra={'additionalProperties': False})}¶
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.
- options: TokenCountOptions¶
- profile: bool | None¶
- validation: InlineConstraintOptions | None¶
- class whylogs_container.whylabs.container.policy.policy_0_0_1.ResponseTopicsCodeMetric(*, metric: Literal['response.topics.code'], profile: bool | None = True, validation: InlineConstraintOptions | None = None)¶
Bases:
BaseMetric
- metric: Literal['response.topics.code']¶
- model_computed_fields: ClassVar[Dict[str, ComputedFieldInfo]] = {}¶
A dictionary of computed field names and their corresponding ComputedFieldInfo objects.
- model_config: ClassVar[ConfigDict] = {'arbitrary_types_allowed': True, 'extra': 'forbid', 'frozen': True}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- model_fields: ClassVar[Dict[str, FieldInfo]] = {'metric': FieldInfo(annotation=Literal['response.topics.code'], required=True), 'profile': FieldInfo(annotation=Union[bool, NoneType], required=False, default=True), 'validation': FieldInfo(annotation=Union[InlineConstraintOptions, NoneType], required=False, default=None, json_schema_extra={'additionalProperties': False})}¶
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.
- profile: bool | None¶
- validation: InlineConstraintOptions | None¶
- class whylogs_container.whylabs.container.policy.policy_0_0_1.ResponseTopicsFinancialMetric(*, metric: Literal['response.topics.financial'], profile: bool | None = True, validation: InlineConstraintOptions | None = None)¶
Bases:
BaseMetric
- metric: Literal['response.topics.financial']¶
- model_computed_fields: ClassVar[Dict[str, ComputedFieldInfo]] = {}¶
A dictionary of computed field names and their corresponding ComputedFieldInfo objects.
- model_config: ClassVar[ConfigDict] = {'arbitrary_types_allowed': True, 'extra': 'forbid', 'frozen': True}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- model_fields: ClassVar[Dict[str, FieldInfo]] = {'metric': FieldInfo(annotation=Literal['response.topics.financial'], required=True), 'profile': FieldInfo(annotation=Union[bool, NoneType], required=False, default=True), 'validation': FieldInfo(annotation=Union[InlineConstraintOptions, NoneType], required=False, default=None, json_schema_extra={'additionalProperties': False})}¶
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.
- profile: bool | None¶
- validation: InlineConstraintOptions | None¶
- class whylogs_container.whylabs.container.policy.policy_0_0_1.ResponseTopicsMaliciousMetric(*, metric: Literal['response.topics.malicious'], profile: bool | None = True, validation: InlineConstraintOptions | None = None)¶
Bases:
BaseMetric
- metric: Literal['response.topics.malicious']¶
- model_computed_fields: ClassVar[Dict[str, ComputedFieldInfo]] = {}¶
A dictionary of computed field names and their corresponding ComputedFieldInfo objects.
- model_config: ClassVar[ConfigDict] = {'arbitrary_types_allowed': True, 'extra': 'forbid', 'frozen': True}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- model_fields: ClassVar[Dict[str, FieldInfo]] = {'metric': FieldInfo(annotation=Literal['response.topics.malicious'], required=True), 'profile': FieldInfo(annotation=Union[bool, NoneType], required=False, default=True), 'validation': FieldInfo(annotation=Union[InlineConstraintOptions, NoneType], required=False, default=None, json_schema_extra={'additionalProperties': False})}¶
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.
- profile: bool | None¶
- validation: InlineConstraintOptions | None¶
- class whylogs_container.whylabs.container.policy.policy_0_0_1.ResponseTopicsMedicalMetric(*, metric: Literal['response.topics.medical'], profile: bool | None = True, validation: InlineConstraintOptions | None = None)¶
Bases:
BaseMetric
- metric: Literal['response.topics.medical']¶
- model_computed_fields: ClassVar[Dict[str, ComputedFieldInfo]] = {}¶
A dictionary of computed field names and their corresponding ComputedFieldInfo objects.
- model_config: ClassVar[ConfigDict] = {'arbitrary_types_allowed': True, 'extra': 'forbid', 'frozen': True}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- model_fields: ClassVar[Dict[str, FieldInfo]] = {'metric': FieldInfo(annotation=Literal['response.topics.medical'], required=True), 'profile': FieldInfo(annotation=Union[bool, NoneType], required=False, default=True), 'validation': FieldInfo(annotation=Union[InlineConstraintOptions, NoneType], required=False, default=None, json_schema_extra={'additionalProperties': False})}¶
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.
- profile: bool | None¶
- validation: InlineConstraintOptions | None¶
- class whylogs_container.whylabs.container.policy.policy_0_0_1.ResponseTopicsMetric(*, metric: Literal['response.topics'], options: TopicsOptions, profile: bool | None = True)¶
Bases:
BaseMetric
- metric: Literal['response.topics']¶
- model_computed_fields: ClassVar[Dict[str, ComputedFieldInfo]] = {}¶
A dictionary of computed field names and their corresponding ComputedFieldInfo objects.
- model_config: ClassVar[ConfigDict] = {'arbitrary_types_allowed': True, 'extra': 'forbid', 'frozen': True}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- model_fields: ClassVar[Dict[str, FieldInfo]] = {'metric': FieldInfo(annotation=Literal['response.topics'], required=True), 'options': FieldInfo(annotation=TopicsOptions, required=True, json_schema_extra={'additionalProperties': False}), 'profile': FieldInfo(annotation=Union[bool, NoneType], required=False, default=True)}¶
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.
- options: TopicsOptions¶
- profile: bool | None¶
- class whylogs_container.whylabs.container.policy.policy_0_0_1.ResponseToxicityMetric(*, metric: Literal['response.toxicity'], profile: bool | None = True)¶
Bases:
BaseMetric
- metric: Literal['response.toxicity']¶
- model_computed_fields: ClassVar[Dict[str, ComputedFieldInfo]] = {}¶
A dictionary of computed field names and their corresponding ComputedFieldInfo objects.
- model_config: ClassVar[ConfigDict] = {'arbitrary_types_allowed': True, 'extra': 'forbid', 'frozen': True}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- model_fields: ClassVar[Dict[str, FieldInfo]] = {'metric': FieldInfo(annotation=Literal['response.toxicity'], required=True), 'profile': FieldInfo(annotation=Union[bool, NoneType], required=False, default=True)}¶
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.
- profile: bool | None¶
- class whylogs_container.whylabs.container.policy.policy_0_0_1.ResponseToxicityScoreMetric(*, metric: Literal['response.toxicity.toxicity_score'], options: ToxicityScoreOptions = {}, profile: bool | None = True, validation: InlineConstraintOptions | None = None)¶
Bases:
BaseMetric
- metric: Literal['response.toxicity.toxicity_score']¶
- model_computed_fields: ClassVar[Dict[str, ComputedFieldInfo]] = {}¶
A dictionary of computed field names and their corresponding ComputedFieldInfo objects.
- model_config: ClassVar[ConfigDict] = {'arbitrary_types_allowed': True, 'extra': 'forbid', 'frozen': True}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- model_fields: ClassVar[Dict[str, FieldInfo]] = {'metric': FieldInfo(annotation=Literal['response.toxicity.toxicity_score'], required=True), 'options': FieldInfo(annotation=ToxicityScoreOptions, required=False, default={}, json_schema_extra={'additionalProperties': False}), 'profile': FieldInfo(annotation=Union[bool, NoneType], required=False, default=True), 'validation': FieldInfo(annotation=Union[InlineConstraintOptions, NoneType], required=False, default=None, json_schema_extra={'additionalProperties': False})}¶
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.
- options: ToxicityScoreOptions¶
- profile: bool | None¶
- validation: InlineConstraintOptions | None¶
- class whylogs_container.whylabs.container.policy.policy_0_0_1.ResponseTruthfulnessRuleSet(*, ruleset: Literal['response.score.truthfulness'], options: TruthfulnessRuleSetOptions)¶
Bases:
BaseModel
- model_computed_fields: ClassVar[Dict[str, ComputedFieldInfo]] = {}¶
A dictionary of computed field names and their corresponding ComputedFieldInfo objects.
- model_config: ClassVar[ConfigDict] = {'extra': 'forbid', 'frozen': True}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- model_fields: ClassVar[Dict[str, FieldInfo]] = {'options': FieldInfo(annotation=TruthfulnessRuleSetOptions, required=True), 'ruleset': FieldInfo(annotation=Literal['response.score.truthfulness'], required=True)}¶
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.
- options: TruthfulnessRuleSetOptions¶
- ruleset: Literal['response.score.truthfulness']¶
- to_langkit_options() StrictLangkitOptions ¶
- class whylogs_container.whylabs.container.policy.policy_0_0_1.ResponseUtilEmbeddingsMetric(*, metric: Literal['response.util.embeddings'], options: EmbeddingOptions = {}, profile: bool | None = True, validation: InlineConstraintOptions | None = None)¶
Bases:
BaseMetric
- metric: Literal['response.util.embeddings']¶
- model_computed_fields: ClassVar[Dict[str, ComputedFieldInfo]] = {}¶
A dictionary of computed field names and their corresponding ComputedFieldInfo objects.
- model_config: ClassVar[ConfigDict] = {'arbitrary_types_allowed': True, 'extra': 'forbid', 'frozen': True}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- model_fields: ClassVar[Dict[str, FieldInfo]] = {'metric': FieldInfo(annotation=Literal['response.util.embeddings'], required=True), 'options': FieldInfo(annotation=EmbeddingOptions, required=False, default={}, json_schema_extra={'additionalProperties': False}), 'profile': FieldInfo(annotation=Union[bool, NoneType], required=False, default=True), 'validation': FieldInfo(annotation=Union[InlineConstraintOptions, NoneType], required=False, default=None, json_schema_extra={'additionalProperties': False})}¶
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.
- options: EmbeddingOptions¶
- profile: bool | None¶
- validation: InlineConstraintOptions | None¶
- class whylogs_container.whylabs.container.policy.policy_0_0_1.ResponseUtilRuleSet(*, ruleset: Literal['response.score.util'], options: UtilRuleSetOptions)¶
Bases:
BaseModel
- model_computed_fields: ClassVar[Dict[str, ComputedFieldInfo]] = {}¶
A dictionary of computed field names and their corresponding ComputedFieldInfo objects.
- model_config: ClassVar[ConfigDict] = {'extra': 'forbid', 'frozen': True}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- model_fields: ClassVar[Dict[str, FieldInfo]] = {'options': FieldInfo(annotation=UtilRuleSetOptions, required=True), 'ruleset': FieldInfo(annotation=Literal['response.score.util'], required=True)}¶
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.
- options: UtilRuleSetOptions¶
- ruleset: Literal['response.score.util']¶
- to_langkit_options() StrictLangkitOptions ¶
- class whylogs_container.whylabs.container.policy.policy_0_0_1.SlackValidationFailureCallback(*, callback: Literal['webhook.slack_validation_failure'], options: SlackValidationFailureOptions)¶
Bases:
BaseCallback
- callback: Literal['webhook.slack_validation_failure']¶
- model_computed_fields: ClassVar[Dict[str, ComputedFieldInfo]] = {}¶
A dictionary of computed field names and their corresponding ComputedFieldInfo objects.
- model_config: ClassVar[ConfigDict] = {'extra': 'forbid', 'frozen': True}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- model_fields: ClassVar[Dict[str, FieldInfo]] = {'callback': FieldInfo(annotation=Literal['webhook.slack_validation_failure'], required=True), 'options': FieldInfo(annotation=SlackValidationFailureOptions, required=True, json_schema_extra={'additionalProperties': False})}¶
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.
- options: SlackValidationFailureOptions¶
- class whylogs_container.whylabs.container.policy.policy_0_0_1.StaticBearerAuthValidationFailureCallback(*, callback: Literal['webhook.static_bearer_auth_validation_failure'], options: StaticBearerAuthValidationFailureOptions)¶
Bases:
BaseCallback
- callback: Literal['webhook.static_bearer_auth_validation_failure']¶
- model_computed_fields: ClassVar[Dict[str, ComputedFieldInfo]] = {}¶
A dictionary of computed field names and their corresponding ComputedFieldInfo objects.
- model_config: ClassVar[ConfigDict] = {'extra': 'forbid', 'frozen': True}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- model_fields: ClassVar[Dict[str, FieldInfo]] = {'callback': FieldInfo(annotation=Literal['webhook.static_bearer_auth_validation_failure'], required=True), 'options': FieldInfo(annotation=StaticBearerAuthValidationFailureOptions, required=True, json_schema_extra={'additionalProperties': False})}¶
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.
- options: StaticBearerAuthValidationFailureOptions¶
- class whylogs_container.whylabs.container.policy.policy_0_0_1.TruthfulnessRuleSet(*, ruleset: Literal['score.truthfulness'], options: TruthfulnessRuleSetOptions)¶
Bases:
MetaRulesetBaseModel
- model_computed_fields: ClassVar[Dict[str, ComputedFieldInfo]] = {}¶
A dictionary of computed field names and their corresponding ComputedFieldInfo objects.
- model_config: ClassVar[ConfigDict] = {'extra': 'forbid', 'frozen': True}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- model_fields: ClassVar[Dict[str, FieldInfo]] = {'options': FieldInfo(annotation=TruthfulnessRuleSetOptions, required=True), 'ruleset': FieldInfo(annotation=Literal['score.truthfulness'], required=True)}¶
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.
- options: TruthfulnessRuleSetOptions¶
- ruleset: Literal['score.truthfulness']¶
- to_rulesets() Sequence[PromptMisuseRuleSet | PromptBadActorsRuleSet | PromptCustomerExperienceRuleSet | PromptTruthfulnessRuleSet | PromptCostRuleSet | PromptUtilRuleSet | ResponseMisuseRuleSet | ResponseBadActorsRuleSet | ResponseCustomerExperienceRuleSet | ResponseTruthfulnessRuleSet | ResponseCostRuleSet | ResponseUtilRuleSet] ¶
- class whylogs_container.whylabs.container.policy.policy_0_0_1.TruthfulnessRuleSetOptions(*, behavior: Literal['observe', 'flag', 'block'], sensitivity: Literal['low', 'medium', 'high'], rag_enabled: bool, hallucinations_enabled: bool)¶
Bases:
BaseModel
- behavior: Literal['observe', 'flag', 'block']¶
- hallucinations_enabled: bool¶
- model_computed_fields: ClassVar[Dict[str, ComputedFieldInfo]] = {}¶
A dictionary of computed field names and their corresponding ComputedFieldInfo objects.
- model_config: ClassVar[ConfigDict] = {'extra': 'forbid', 'frozen': True}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- model_fields: ClassVar[Dict[str, FieldInfo]] = {'behavior': FieldInfo(annotation=Literal['observe', 'flag', 'block'], required=True), 'hallucinations_enabled': FieldInfo(annotation=bool, required=True), 'rag_enabled': FieldInfo(annotation=bool, required=True), 'sensitivity': FieldInfo(annotation=Literal['low', 'medium', 'high'], required=True)}¶
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.
- rag_enabled: bool¶
- sensitivity: Literal['low', 'medium', 'high']¶
- class whylogs_container.whylabs.container.policy.policy_0_0_1.UtilRuleSet(*, ruleset: Literal['score.util'], options: UtilRuleSetOptions)¶
Bases:
MetaRulesetBaseModel
- model_computed_fields: ClassVar[Dict[str, ComputedFieldInfo]] = {}¶
A dictionary of computed field names and their corresponding ComputedFieldInfo objects.
- model_config: ClassVar[ConfigDict] = {'extra': 'forbid', 'frozen': True}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- model_fields: ClassVar[Dict[str, FieldInfo]] = {'options': FieldInfo(annotation=UtilRuleSetOptions, required=True), 'ruleset': FieldInfo(annotation=Literal['score.util'], required=True)}¶
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.
- options: UtilRuleSetOptions¶
- ruleset: Literal['score.util']¶
- to_rulesets() Sequence[PromptMisuseRuleSet | PromptBadActorsRuleSet | PromptCustomerExperienceRuleSet | PromptTruthfulnessRuleSet | PromptCostRuleSet | PromptUtilRuleSet | ResponseMisuseRuleSet | ResponseBadActorsRuleSet | ResponseCustomerExperienceRuleSet | ResponseTruthfulnessRuleSet | ResponseCostRuleSet | ResponseUtilRuleSet] ¶
- class whylogs_container.whylabs.container.policy.policy_0_0_1.UtilRuleSetOptions(*, behavior: Literal['observe', 'flag', 'block'], sensitivity: Literal['low', 'medium', 'high'])¶
Bases:
BaseModel
- behavior: Literal['observe', 'flag', 'block']¶
- model_computed_fields: ClassVar[Dict[str, ComputedFieldInfo]] = {}¶
A dictionary of computed field names and their corresponding ComputedFieldInfo objects.
- model_config: ClassVar[ConfigDict] = {'extra': 'forbid', 'frozen': True}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- model_fields: ClassVar[Dict[str, FieldInfo]] = {'behavior': FieldInfo(annotation=Literal['observe', 'flag', 'block'], required=True), 'sensitivity': FieldInfo(annotation=Literal['low', 'medium', 'high'], required=True)}¶
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.
- sensitivity: Literal['low', 'medium', 'high']¶
- class whylogs_container.whylabs.container.policy.policy_0_0_1.ValidatorConverter¶
Bases:
object
- static to_langkit_options(validator: PolicyConstraintValidator | PolicyMultiColumnConstraintValidator) StrictLangkitOptions ¶
- whylogs_container.whylabs.container.policy.policy_0_0_1.combine_langkit_options(l1: StrictLangkitOptions, l2: StrictLangkitOptions) StrictLangkitOptions ¶