Skip to content
Closed
Show file tree
Hide file tree
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
8 changes: 4 additions & 4 deletions vertexai/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand All @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion vertexai/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,6 @@
"format": "prettier --write ."
},
"dependencies": {
"firebase": "^11.1.0"
"firebase": "^11.7.0"
}
}
Loading