Skip to content

Commit

Permalink
fix searchbar ai
Browse files Browse the repository at this point in the history
  • Loading branch information
Amitminer committed Nov 17, 2024
1 parent 56756ce commit 7973fa7
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 1 deletion.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -23,4 +23,5 @@ dist-ssr
*.sln
*.sw?

secert
..env
.env
3 changes: 3 additions & 0 deletions example.env
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
API_KEY=
CSE_ID=
VITE_GOOGLE_API_KEY=
4 changes: 4 additions & 0 deletions src/components/SearchBar.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,10 @@ import { MessageCircle } from 'lucide-react';
import { GoogleGenerativeAI } from '@google/generative-ai';
import { motion } from 'framer-motion';


const apiKey = import.meta.env.VITE_GOOGLE_API_KEY;
const genAI = new GoogleGenerativeAI(apiKey);
const model = genAI.getGenerativeModel({ model: 'gemini-1.5-flash' });
/**
* SearchBar Component
*
Expand Down

0 comments on commit 7973fa7

Please sign in to comment.