Struct HarmBlockThreshold
The threshold for blocking content. If the harm probability exceeds this threshold, the content will be blocked.
[JsonConverter(typeof(HarmBlockThresholdConverter))]
public readonly record struct HarmBlockThreshold : IEquatable<HarmBlockThreshold>
- Implements
- Inherited Members
Properties
AllValues
public static IReadOnlyList<HarmBlockThreshold> AllValues { get; }
Property Value
BlockLowAndAbove
Block content with a low harm probability or higher.
public static HarmBlockThreshold BlockLowAndAbove { get; }
Property Value
BlockMediumAndAbove
Block content with a medium harm probability or higher.
public static HarmBlockThreshold BlockMediumAndAbove { get; }
Property Value
BlockNone
Do not block any content, regardless of its harm probability.
public static HarmBlockThreshold BlockNone { get; }
Property Value
BlockOnlyHigh
Block content with a high harm probability.
public static HarmBlockThreshold BlockOnlyHigh { get; }
Property Value
HarmBlockThresholdUnspecified
The harm block threshold is unspecified.
public static HarmBlockThreshold HarmBlockThresholdUnspecified { get; }
Property Value
Off
Turn off the safety filter entirely.
public static HarmBlockThreshold Off { get; }
Property Value
Value
public string Value { get; }
Property Value
Methods
Equals(HarmBlockThreshold)
public bool Equals(HarmBlockThreshold other)
Parameters
otherHarmBlockThreshold
Returns
FromString(string)
public static HarmBlockThreshold FromString(string value)
Parameters
valuestring
Returns
GetHashCode()
public override int GetHashCode()
Returns
ToString()
public override string ToString()
Returns
Operators
implicit operator HarmBlockThreshold(string)
public static implicit operator HarmBlockThreshold(string value)
Parameters
valuestring