Skip to content

Commit 264df10

Browse files
authored
[VertexAI] Add HarmBlockThreshold Off (#1241)
1 parent ccb7b52 commit 264df10

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

vertexai/src/Safety.cs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,10 @@ public enum HarmBlockThreshold {
7676
/// All content is allowed regardless of harm.
7777
/// </summary>
7878
None,
79+
/// <summary>
80+
/// All content is allowed regardless of harm, and metadata will not be included in the response.
81+
/// </summary>
82+
Off,
7983
}
8084

8185
/// <summary>
@@ -128,6 +132,7 @@ private string ConvertThreshold(HarmBlockThreshold threshold) {
128132
HarmBlockThreshold.MediumAndAbove => "BLOCK_MEDIUM_AND_ABOVE",
129133
HarmBlockThreshold.OnlyHigh => "BLOCK_ONLY_HIGH",
130134
HarmBlockThreshold.None => "BLOCK_NONE",
135+
HarmBlockThreshold.Off => "OFF",
131136
_ => threshold.ToString(), // Fallback
132137
};
133138
}

0 commit comments

Comments
 (0)