AI Conversational Assistant
A production-shaped conversational assistant on React, FastAPI, and the OpenAI API.
- Streaming responses
- Prompt logic decoupled from UI
- React + FastAPI + OpenAI
The problem
Wiring a chat box to a completions endpoint takes an afternoon. Building an AI feature that a team can still maintain a year later is a different exercise, and most of the difference is architectural rather than model-related.
What I built
A React chat interface against a FastAPI backend handling OpenAI API calls, prompt construction, and conversation context and session management. Response streaming for low-latency replies, so the interface starts responding while the model is still working.
The decision that mattered: prompt logic and conversation state stay fully decoupled from the UI.
Why that decision
Prompts change constantly — every week, sometimes every day. Interfaces shouldn't. If your prompt construction lives in your components, every prompt iteration becomes a frontend deploy and every A/B test becomes a merge conflict.
Keeping them separate is also what makes it possible to wire custom agents into an existing product later, rather than bolting a chatbot onto the side of one. The same service layer that answers a chat message can answer a tool call.
Stack
React · Python (FastAPI) · OpenAI API