This project is a simple yet powerful chatbot application that mimics a WhatsApp-like user interface and leverages Google's Generative AI (gemini-1.5-flash
) to provide intelligent responses to user queries.
- Real-Time Messaging: Interact with the chatbot in a seamless conversational manner.
- AI-Powered Responses: Uses Google's Generative AI for accurate and relevant replies.
- User-Friendly Interface: Clean and intuitive design for enhanced user experience.
- HTML5, CSS3, JavaScript
- Node.js, Express.js
- Google Generative AI SDK (
@google/generative-ai
)
- Axios for API calls
- CORS for cross-origin support
- Node.js installed on your machine
- A valid API key for Google's Generative AI
- Clone the repository.
git clone https://github.com/your-username/whatsapp-like-chatbot.git cd WhatsApp-like-chatbot
- Install dependencies.
npm install
- Create a
.env
file in the root directory and add your API key.API_KEY=your_google_api_key
- Start the server.
node main.js
- Open
index.html
in your browser to start using the chatbot.
- Type a message in the input field.
- Press Enter or click the Send button to submit your message.
- Wait for the chatbot to respond.
- main.js: Backend server and API integration with Google's Generative AI.
- index.html: Frontend layout of the chatbot.
- script.js: Handles chat functionalities and communication with the backend.
This open-source project is available under the MIT License.