Skip to content

Commit

Permalink
host
Browse files Browse the repository at this point in the history
  • Loading branch information
KajalDeore04 committed Jan 13, 2025
1 parent 0474b11 commit 7b5683d
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 1 deletion.
1 change: 1 addition & 0 deletions .env
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
VITE_GOOGLE_API_KEY=AIzaSyB8lrSB52tHtyIzAeuY_V4w9JBWJVMUA3M
12 changes: 12 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
},
"dependencies": {
"@google/generative-ai": "^0.21.0",
"dotenv": "^16.4.7",
"react": "^18.3.1",
"react-dom": "^18.3.1"
},
Expand Down
5 changes: 4 additions & 1 deletion src/config/gemini.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,11 @@ import {
HarmCategory,
HarmBlockThreshold,
} from "@google/generative-ai";
import dotenv from "dotenv";

dotenv.config();

const apiKey = "Your API Key";
const apiKey = import.meta.env.VITE_GOOGLE_API_KEY;
const genAI = new GoogleGenerativeAI(apiKey);

const model = genAI.getGenerativeModel({
Expand Down

0 comments on commit 7b5683d

Please sign in to comment.