Skip to content

Malikasadjaved/Physical--AI

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

The Autonomous Humanoid Textbook

Overview

This project is a Docusaurus-based textbook application focused on robotics and AI with an integrated chatbot. The frontend is built with Docusaurus and React, while the backend is a Python FastAPI application.

Running the Project

Prerequisites

  • Node.js (v18 or higher)
  • Python (v3.9 or higher)
  • pip (Python package manager)

Project Structure

Hackathone_Book/
├── apps/
│   ├── textbook/           # Docusaurus frontend
│   └── chatbot_backend/    # Python FastAPI backend
├── specs/                  # Feature specifications
└── history/                # Prompt history records

Running the Application

1. Backend (Chatbot API)

Navigate to the chatbot backend directory and start the server:

cd apps/chatbot_backend
pip install -r requirements.txt
python -m uvicorn main:app --host 0.0.0.0 --port 8001

The backend will be available at http://localhost:8001

2. Frontend (Docusaurus App)

In a separate terminal, navigate to the textbook directory and start the frontend:

cd apps/textbook
npm install
npm run start

The frontend will be available at http://localhost:3000/Hackathone_Book/

Key Features

Chatbot Widget

  • Modern, responsive design with blue (user) and green (bot) message bubbles
  • Typing indicators with animated dots
  • Relative timestamps (e.g., "2 min ago")
  • Smooth animations and transitions
  • Works with the FastAPI backend at http://localhost:8001

Textbook Content

  • Docusaurus-based documentation site
  • Multi-language support (English and Urdu)
  • Module-based organization for robotics content
  • Interactive chatbot widget integrated throughout

Troubleshooting

Common Issues

  1. Port conflicts: Ensure ports 3000 (frontend) and 8001 (backend) are available
  2. Missing dependencies: Run npm install in apps/textbook/ and pip install -r requirements.txt in apps/chatbot_backend/
  3. API connection issues: Verify both servers are running and accessible

Backend Endpoints

  • GET / - Health check
  • GET /test_qdrant - Test Qdrant connection
  • POST /chat - Chat endpoint (expects {"query": "your message"})
  • POST /query_selection - Query with selected text (expects {"selected_text": "", "query": ""})

Development Notes

  • The chatbot widget is located at apps/textbook/src/components/ChatbotWidget.js
  • The chatbot styling is in apps/textbook/src/components/ChatbotWidget.css
  • The backend API is in apps/chatbot_backend/main.py
  • All environment variables should be in .env files (not committed to version control)

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors