firebase/flutterfire

firebase_vertexai docs do not illustrate how to play nice with App Check

クローズ

#17,200 opened on 2025/03/16

 (4 件のコメント) (0 件のリアクション) (0 人の担当者)Dart (4,097 件のフォーク)batch import
good first issuetype: documentation

Repository metrics

Stars
 (9,199 個のスター)
PR merge metrics
 (平均マージ 3d 12h) (30d で 38 merged PRs)

説明

The docs don't include how to use firebase_appcheck with firebase_vertexai even though they recommend to do so.

At https://pub.dev/packages/firebase_vertexai/example it shows the following:

var vertex_instance = FirebaseVertexAI.instanceFor(auth: FirebaseAuth.instance);
final model = vertex_instance.generativeModel(model: 'gemini-1.5-flash');

At https://firebase.google.com/docs/vertex-ai/get-started?platform=flutter#initialize-service-and-model it shows this:

final model = FirebaseVertexAI.instance.generativeModel(model: 'gemini-2.0-flash');

It would be helpful to include the case where you have App Check enabled:

model = FirebaseVertexAI.instanceFor(appCheck: FirebaseAppCheck.instance).generativeModel(model: 'gemini-2.0-flash');

コントリビューターガイド