This is a simple Next.js application that allows users to voice chat with Google Gemeni via its public API.
- Clone the repository.
- Install the dependencies with
npm install
. (you must have Node.js version >=18 installed) - Register your Google Gemini API key and add it to
.env.local
i.e. API_KEY=<api_key_here>. - Run the development server with
npm run dev
. - Open http://localhost:3000 in your browser.
The API route is located at pages/api/chat.js
. It handles communication with the Google Gemini API.
The chat interface is implemented in pages/index.js
. It allows users to send messages and display responses from the Gemini API.
To deploy, build the application with npm run build
and then start the server with npm start
.