Skip to content

RaymussenArthur/datamentor-ai-bot

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

DataMentor AI: Full-Stack Machine Learning Assistant

Overview

DataMentor AI is an end-to-end, full-stack chatbot application designed to act as an expert technical assistant for data science and machine learning. Built with a lightweight Node.js/Express backend and a responsive Vanilla JavaScript frontend, the application integrates Google's Gemini 2.5 Flash API to deliver real-time, context-aware responses.

Key Features

  • Stateful Conversation Memory: The frontend maintains an array-based conversation history, passing the full context to the backend on each request to ensure continuous, multi-turn dialogue.
  • Engineered AI Persona: Utilizes Gemini's systemInstruction parameters to enforce a strict domain focus (Data Science/ML) and specific coding standards.
  • Asynchronous Data Handling: Implements robust asynchronous fetch requests and error handling to manage API latency and provide immediate visual feedback (e.g., "thinking..." states) to the user.
  • RESTful Backend Architecture: A cleanly separated Express.js server handles API routing, CORS, environment variable security, and communication with the Google GenAI SDK.

Tech Stack

  • Frontend: HTML5, CSS3, Vanilla JavaScript (DOM Manipulation, Fetch API)
  • Backend: Node.js, Express.js
  • AI Integration: Google GenAI SDK (@google/genai), Gemini 2.5 Flash Model
  • Security & Config: dotenv, cors

System Architecture

  1. Client Layer: The user inputs a prompt via the web interface. The frontend captures the input, updates the UI, and appends the message to the session's history array.
  2. API Layer: A POST request containing the full conversation payload is sent to the /api/chat Express endpoint.
  3. AI Layer: The Node.js server transforms the payload into the required schema and passes it to the Gemini API, injecting the custom system instructions and temperature configurations.
  4. Resolution: The AI's generated text is returned to the client and dynamically rendered in the chat interface.

Local Setup & Installation

  1. Clone the repository:

    git clone https://github.com/yourusername/datamentor-ai-bot.git
    cd datamentor-ai-bot
  2. Install dependencies:

    npm install
  3. Environment Configuration: Create a .env file in the project root and add the following lines:

    GEMINI_API_KEY=your_api_key_here
    PORT=3000
  4. Start the server:

    npm start
  5. Access the application: Open your browser and navigate to http://localhost:3000.

About

gemini based chatbot project

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors