diff --git a/vertexai/main.ts b/vertexai/main.ts index 78356cd29..08361dccb 100644 --- a/vertexai/main.ts +++ b/vertexai/main.ts @@ -21,7 +21,7 @@ import { initializeAppCheck, ReCaptchaEnterpriseProvider, } from "firebase/app-check"; -import { getVertexAI, getGenerativeModel } from "firebase/vertexai"; +import { getAI, getGenerativeModel } from "firebase/ai"; async function main() { const app = initializeApp(firebaseConfig); @@ -33,11 +33,11 @@ async function main() { provider: new ReCaptchaEnterpriseProvider(RECAPTCHA_ENTERPRISE_SITE_KEY), }); - // Get VertexAI instance - const vertexAI = getVertexAI(app); + // Get AI instance + const ai = getAI(app); // Get a Gemini model const model = getGenerativeModel( - vertexAI, + ai, { model: "gemini-2.0-flash" } ); // Call generateContent with a string or Content(s) diff --git a/vertexai/package.json b/vertexai/package.json index 6c859d63f..992a7c4c1 100644 --- a/vertexai/package.json +++ b/vertexai/package.json @@ -26,6 +26,6 @@ "format": "prettier --write ." }, "dependencies": { - "firebase": "^11.1.0" + "firebase": "^11.7.0" } }