Skip to content

Leo AI Chatbot A modern, intelligent chatbot powered by Groq AI that understands and responds in multiple languages. Built with React and featuring a clean, responsive design, it provides natural conversations with context awareness and real-time interactions.

Notifications You must be signed in to change notification settings

hddgpp/react-sim

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

62 Commits
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Leo AI Chatbot - Intelligent Multilingual Assistant A sophisticated, AI-powered chatbot built with React and Groq AI. Features multilingual conversations, context-aware responses, and a clean, modern interface.

react-sim AI-Powered License Status


View Live Chatbot [https://leo-chatbot.netlify.app]

✨ Features 🌍 Multilingual Support - Automatically detects and responds in user's language

🧠 Context-Aware Conversations - Maintains conversation memory across messages

⚑ Lightning Fast - Powered by Groq's high-speed inference engine

πŸ’¬ Clean Interface - Modern, responsive chat design

🎯 Intelligent Responses - Helpful, friendly, and knowledgeable AI assistant

πŸ”„ Real-time Interaction - Smooth messaging with loading states

πŸ“± Mobile Responsive - Perfect experience on all devices

πŸ› οΈ Tech Stack Frontend: React 18, CSS3, HTML5

AI Integration: Groq API (Llama 3.1-8b-instant)

Styling: Modern CSS with Flexbox

Icons: Custom PNG assets

Environment: Vite

🎯 AI Chatbot Capabilities The core intelligence - a multilingual conversational AI that:

How It Works: Send Message - User types any question in any language

AI Processing - Groq API processes with context awareness

Smart Response - Returns helpful answer in user's language

Continuous Conversation - Maintains context across messages

Technical Features: Automatic Language Detection - Responds in user's input language

Conversation Memory - Remembers previous exchanges

Error Handling - Graceful fallbacks when API is unavailable

Real-time Updates - Immediate message display with loading states

πŸ“ Project Structure text src/ β”œβ”€β”€ components/ β”‚ β”œβ”€β”€ Input-text/ β”‚ β”‚ β”œβ”€β”€ Input-text.jsx # Message input with AI integration β”‚ β”‚ └── Input-text.css # Input styling β”‚ β”œβ”€β”€ ChatMessage/ β”‚ β”‚ β”œβ”€β”€ ChatMessage.jsx # Chat history container β”‚ β”‚ └── ChatMessage.css # Scrollable chat area β”‚ └── Chat/ β”‚ β”œβ”€β”€ Chat.jsx # Individual message component β”‚ └── Chat.css # Message bubble styling β”œβ”€β”€ services/ β”‚ └── ai.js # AI integration service β”œβ”€β”€ App.jsx # Main application component β”œβ”€β”€ App.css # Global styling └── main.jsx # Application entry point πŸš€ Quick Start Prerequisites Node.js (v16 or higher)

npm or yarn

Groq API account

Installation Clone the repository

bash git clone https://github.com/hddgpp/react-sim.git cd chatbot Install dependencies

bash npm install Set up environment variables

bash

Create .env.local

VITE_GROQ_API_KEY=your_groq_api_key_here Run development server

bash npm run dev Open your browser

text http://localhost:5173 πŸ”§ AI Integration Details Model: Llama-3.1-8b-instant via Groq API

Response Time: 1-2 seconds

Features: Multilingual support, conversation context, error recovery

Fallback: Smart error messages when AI is unavailable

πŸ’¬ Usage Example javascript // The AI service handles everything automatically const response = await getAIResponse("Hello, how are you?"); // Returns: "Hello! I'm doing great, thank you for asking. How can I help you today?"

// Multilingual example const spanishResponse = await getAIResponse("¿Cómo estÑs?"); // Returns: "‘Hola! Estoy muy bien, gracias por preguntar. ¿En qué puedo ayudarte?" 🎨 Customization Modify AI Personality Edit the SYSTEM_PROMPT in src/services/ai.js:

javascript const SYSTEM_PROMPT = You are a helpful, friendly AI assistant... // Customize your AI's personality and response style here ; Styling All CSS files are modular and easy to customize:

App.css - Global layout and theming

Component-specific CSS files for precise control

πŸ“„ License This project is licensed under the MIT License - see the LICENSE file for details.

πŸ‘¨β€πŸ’» Developer Mefouthi youssef Front-end Developer & AI Enthusiast GitHub: @hddgpp Email: [email protected]

πŸ™ Acknowledgments Groq API for lightning-fast AI inference

React Team for the amazing framework

Vite for excellent development experience

🌟 Project Journey This chatbot demonstrates practical AI integration in modern web applications. From basic React components to sophisticated AI conversations, it showcases the power of combining cutting-edge AI with clean, user-friendly interfaces, and its also my day 92 of learning.

⭐ Star this repo if you found the AI chatbot implementation useful!

About

Leo AI Chatbot A modern, intelligent chatbot powered by Groq AI that understands and responds in multiple languages. Built with React and featuring a clean, responsive design, it provides natural conversations with context awareness and real-time interactions.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published