firebase/flutterfire

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

已關閉

#17,200 建立於 2025年3月16日

 (4 則留言) (0 個反應) (0 位負責人)Dart (4,097 個分叉)batch import
good first issuetype: documentation

倉庫指標

星標
 (9,199 顆星)
PR 合併指標
 (平均合併 3天 12小時) (30 天內合併 38 個 PR)

描述

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');

貢獻者指南