firebase / firebase/firebase-js-sdk

VertexAI `SafetyRating.blocked` is `undefined`.

Open
#8,819 1 comment 0 reactions 1 assignee Claimed by @dlarocque View on GitHub
api: firebaseai bug
Dominant language
TypeScript
Stars
5.1k
Forks
1k
Avg merge
2d 21h
Merged PRs (30d)
37

Description

### Operating System

n/a

### Environment (if applicable)

n/a

### Firebase SDK Version

11.4.0

### Firebase SDK Product(s)

VertexAI

### Project Tooling

TypeScript

### Detailed Problem Description

`SafetyRating.blocked` is a required property, but it is undefined when it is not true. The default value should be false, or the type should be optional

See https://github.com/firebase/firebase-ios-sdk/blob/1d32f365dea853d543e0f111a67d458e6cc49f35/FirebaseVertexAI/Sources/Safety.swift#L290

### Steps and code to reproduce issue

call `generateContent()` with a prompt that will be blocked due to safety settings.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.