Skip to content
Merged
Show file tree
Hide file tree
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion firebase-vertexai/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# Unreleased

* [feature] Added support for `HarmBlockThreshold.OFF`. See the
[model documentation](https://cloud.google.com/vertex-ai/generative-ai/docs/multimodal/configure-safety-filters#how_to_configure_content_filters){: .external}
for more information.

# 16.3.0
* [feature] Emits a warning when attempting to use an incompatible model with
Expand Down
2 changes: 1 addition & 1 deletion firebase-vertexai/gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,5 @@
# See the License for the specific language governing permissions and
# limitations under the License.

version=16.3.1
version=16.4.0
latestReleasedVersion=16.3.0
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ public class HarmBlockThreshold private constructor(public val ordinal: Int) {

internal fun toInternal() =
when (this) {
OFF -> Internal.OFF
NONE -> Internal.BLOCK_NONE
ONLY_HIGH -> Internal.BLOCK_ONLY_HIGH
MEDIUM_AND_ABOVE -> Internal.BLOCK_MEDIUM_AND_ABOVE
Expand All @@ -39,6 +40,7 @@ public class HarmBlockThreshold private constructor(public val ordinal: Int) {
BLOCK_MEDIUM_AND_ABOVE,
BLOCK_ONLY_HIGH,
BLOCK_NONE,
OFF
}

public companion object {
Expand All @@ -53,5 +55,13 @@ public class HarmBlockThreshold private constructor(public val ordinal: Int) {

/** All content is allowed regardless of harm. */
@JvmField public val NONE: HarmBlockThreshold = HarmBlockThreshold(3)

/**
* All content is allowed regardless of harm.
*
* The same as [NONE], but metadata when the corresponding [HarmCategory] occurs will **NOT** be
* present in the response.
*/
@JvmField public val OFF: HarmBlockThreshold = HarmBlockThreshold(4)
}
}
Loading