VertexAIPredictionSafetyAttributes class
Content processed through the Vertex AI PaLM API is assessed against a list of safety attributes, which include "harmful categories" and topics that may be considered sensitive. https://cloud.google.com/vertex-ai/docs/generative-ai/learn/responsible-ai#safety_attribute_confidence_scoring
- Annotations
-
- @immutable
Constructors
-
VertexAIPredictionSafetyAttributes.new({required List<
VertexAIPredictionSafetyAttributesCategory> categories, required List<double> scores, required bool blocked}) -
Content processed through the Vertex AI PaLM API is assessed against a list
of safety attributes, which include "harmful categories" and topics that
may be considered sensitive.
https://cloud.google.com/vertex-ai/docs/generative-ai/learn/responsible-ai#safety_attribute_confidence_scoring
const
-
VertexAIPredictionSafetyAttributes.fromMap(Map<
String, dynamic> safetyAttributesJson) -
Factory method for creating a VertexAIPredictionSafetyAttributes from a
JSON map.
factory
Properties
- blocked → bool
-
Whether Google has blocked the model response because it exceed the
designated confidence scores for Derogatory, Toxic, Sexual or Violent.
final
-
categories
→ List<
VertexAIPredictionSafetyAttributesCategory> -
The display names of Safety Attribute categories associated with the
generated content. Order matches the scores.
final
- hashCode → int
-
The hash code for this object.
no setteroverride
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
-
scores
→ List<
double> -
Confidence scores between 0.0 and 1.0, rounded to one decimal place,
reflecting the likelihood of the input or response belonging to a given
category.
final
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toMap(
) → Map< String, dynamic> - Converts this VertexAIPredictionSafetyAttributes to a JSON map.
-
toString(
) → String -
A string representation of this object.
override
Operators
-
operator ==(
covariant VertexAIPredictionSafetyAttributes other) → bool -
The equality operator.
override