16 Redesigning my Portfolio Website A developer redesigned their portfolio website by migrating the AI chatbot from OpenAI to Hugging Face, switching the database from MongoDB to Neon PostgreSQL, and implementing streaming responses for a ChatGPT-like user experience. The project now uses the Qwen/Qwen3-4B model via the Nebius provider and features a robust fallback system with vector search and text matching. Published on Aug 18, 2025 I have installed Cursor on my laptop this weekend, and I am amazed at how much it speeds up my coding. I have a new debugging buddy This week, I have made several updates to the Portfolio website. In my previous post, I shared the excitement of implementing a chatbot based on ChatGPT for my portfolio website. The initial experience was promising - I successfully created content embeddings and integrated them with OpenAI's API. However, as many developers know, relying on a single service provider can lead to unexpected roadblocks. When my OpenAI account encountered issues, I faced a critical decision: abandon the chat functionality or find an alternative solution. I chose the latter, embarking on a journey that would transform my portfolio's AI capabilities and teach me valuable lessons about building robust, fallback-ready systems. The transition from OpenAI to Hugging Face wasn't just a simple API swap - it was a complete architectural evolution. Here's what I learned: 1. Model Selection Complexity Finding the right model on Hugging Face proved more challenging than expected. After testing several options: microsoft/DialoGPT-medium - No inference provider available gpt2 and distilgpt2 - Limited conversational capabilities Qwen/Qwen3-4B - Perfect fit with the nebius provider 2. Database Architecture Evolution The migration also prompted a database upgrade from MongoDB to Neon PostgreSQL. This wasn't just about changing providers - it was about building a more scalable, production-ready foundation for my portfolio. Streaming Responses for Better UX One of the most significant improvements was implementing streaming text responses. Instead of waiting for complete AI responses, users now see text appear word-by-word, creating a ChatGPT-like experience: js // Streaming implementation with word-by-word appearance const stream = new ReadableStream { start controller { const encoder = new TextEncoder ; const words = response.split ' ' ; words.forEach word, index = { setTimeout = { controller.enqueue encoder.encode word + ' ' ; if index === words.length - 1 { controller.close ; } }, index 100 ; } ; } } ; Robust Fallback System I implemented a multi-layered fallback approach: Vector Search : Primary method using Pinecone embeddings Text Search : Fallback to simple text matching Intelligent Responses : Pre-built responses for common queries Input Focus Management Users can now have continuous conversations without losing focus: js useEffect = { if inputRef.current { inputRef.current.focus ; } }, messages ; Response Filtering Hidden internal AI processing tags for cleaner output: js const cleanResponse = response.replace /