🎉 Complete AI-Enhanced University Portal - Ready for Production
✨ Major Features Added: - AI Chat with conversation memory and university-specific knowledge base - Multi-tenant university support with white-label capabilities - Professional admin interface for knowledge base management - Advanced database schema with Prisma ORM - Comprehensive documentation and guides - Modern Next.js 15 + React 19 architecture - Bilingual support (English/Arabic) - Role-based access control - Real-time chat interface with loading states 🔧 Technical Improvements: - Fixed all linter errors and TypeScript issues - Cleaned up codebase and removed legacy files - Added comprehensive .gitignore - Updated README with detailed setup instructions - Optimized database schema and migrations - Enhanced error handling and user experience 📚 Documentation: - AI Conversation Memory Guide - AI Enhancement Summary - Developer Guide - User Guide - Complete setup and deployment instructions 🚀 Ready for GitHub deployment and production use!
This commit is contained in:
Executable
+63
@@ -0,0 +1,63 @@
|
||||
#!/bin/bash
|
||||
|
||||
echo "🚀 Setting up Ollama for University Portal AI Chat"
|
||||
|
||||
# Check if Ollama is already installed
|
||||
if command -v ollama &> /dev/null; then
|
||||
echo "✅ Ollama is already installed"
|
||||
else
|
||||
echo "📥 Installing Ollama..."
|
||||
|
||||
# Detect OS and install Ollama
|
||||
if [[ "$OSTYPE" == "darwin"* ]]; then
|
||||
# macOS
|
||||
echo "Installing Ollama for macOS..."
|
||||
curl -fsSL https://ollama.ai/install.sh | sh
|
||||
elif [[ "$OSTYPE" == "linux-gnu"* ]]; then
|
||||
# Linux
|
||||
echo "Installing Ollama for Linux..."
|
||||
curl -fsSL https://ollama.ai/install.sh | sh
|
||||
elif [[ "$OSTYPE" == "msys" ]] || [[ "$OSTYPE" == "cygwin" ]]; then
|
||||
# Windows
|
||||
echo "For Windows, please install Ollama manually from: https://ollama.ai/download"
|
||||
echo "After installation, run: ollama serve"
|
||||
exit 1
|
||||
else
|
||||
echo "❌ Unsupported operating system: $OSTYPE"
|
||||
echo "Please install Ollama manually from: https://ollama.ai/download"
|
||||
exit 1
|
||||
fi
|
||||
fi
|
||||
|
||||
# Start Ollama service
|
||||
echo "🔄 Starting Ollama service..."
|
||||
ollama serve &
|
||||
|
||||
# Wait a moment for the service to start
|
||||
sleep 3
|
||||
|
||||
# Check if Ollama is running
|
||||
if curl -s http://localhost:11434/api/tags &> /dev/null; then
|
||||
echo "✅ Ollama service is running"
|
||||
else
|
||||
echo "❌ Failed to start Ollama service"
|
||||
echo "Please try running 'ollama serve' manually"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Pull the default model (llama2)
|
||||
echo "📦 Pulling Llama2 model (this may take a while)..."
|
||||
ollama pull llama2
|
||||
|
||||
echo "🎉 Setup complete! Ollama is ready to use with the University Portal AI Chat."
|
||||
echo ""
|
||||
echo "To use the AI chat:"
|
||||
echo "1. Make sure Ollama is running: ollama serve"
|
||||
echo "2. Start the development server: npm run dev"
|
||||
echo "3. Click the AI chat button in the bottom-right corner of the portal"
|
||||
echo ""
|
||||
echo "Available commands:"
|
||||
echo "- Start Ollama: ollama serve"
|
||||
echo "- Stop Ollama: pkill ollama"
|
||||
echo "- List models: ollama list"
|
||||
echo "- Pull a model: ollama pull <model-name>"
|
||||
Reference in New Issue
Block a user