Skip to content
Merged
Changes from all 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
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ public class UIHandler : MonoBehaviour {

private string appCheckDebugToken = "REPLACE_WITH_APP_CHECK_TOKEN";

protected void InitializeAppCheck() {
protected virtual void InitializeAppCheck() {
DebugLog("Initializing App Check directly in manual UIHandler");
DebugAppCheckProviderFactory.Instance.SetDebugToken(appCheckDebugToken);
FirebaseAppCheck.SetAppCheckProviderFactory(DebugAppCheckProviderFactory.Instance);
Expand Down Expand Up @@ -76,11 +76,11 @@ protected void InitializeFirebase() {
public string ModelName = "gemini-3.1-flash-lite";

private int backendSelection = 0;
private string[] backendChoices = new string[] { "Google AI Backend", "Vertex AI Backend" };
private string[] backendChoices = new string[] { "Google AI Backend", "Agent Platform Backend" };

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

The backendChoices array is only initialized and never reassigned. Marking it as readonly is a good practice to prevent accidental reassignments and improve maintainability.

    private readonly string[] backendChoices = new string[] { "Google AI Backend", "Agent Platform Backend" };

private GenerativeModel GetModel() {
var backend = backendSelection == 0
? FirebaseAI.Backend.GoogleAI()
: FirebaseAI.Backend.VertexAI();
: FirebaseAI.Backend.AgentPlatform();

return FirebaseAI.GetInstance(backend, useLimitedUseAppCheckTokens: true).GetGenerativeModel(ModelName);
}
Expand Down