A modern AI chat application that can search the web and provide informative answers, built with React and FastAPI.
- Modern, sleek UI with dark mode
- Animated background with neon accents
- Real-time chat via WebSockets
- Web search capabilities
- Markdown support for responses
- Code syntax highlighting
- Mobile-responsive design
- FastAPI
- WebSockets for streaming responses
- smolagents with LiteLLM integration
- DuckDuckGo search tools
- React
- WebSockets for real-time communication
- React Markdown for rendering formatted responses
- Syntax highlighting for code blocks
- Python 3.8+
- Node.js 14+ and npm
-
Install Python dependencies:
pip install -r requirements.txt -
Configure environment variables:
- Rename
.env.exampleto.env - Add your API keys (NEBIUS_APIKEY, NEBIUS_BASE_URL) in the
.envfile
- Rename
-
Run the backend server:
run_backend.bator manually with:
uvicorn server:app --reload --host 0.0.0.0 --port 8000
-
Navigate to the frontend directory:
cd frontend -
Install Node.js dependencies:
npm install -
Start the React development server:
npm startor run from the root directory:
run_frontend.bat
- Clone the repository
- Set up environment variables in a
.envfile - Install backend dependencies:
pip install -r requirements.txt - Install frontend dependencies:
cd frontend && npm install - Run backend:
uvicorn server:app --reload - Run frontend:
cd frontend && npm start
- Open your browser and navigate to
http://localhost:3000 - Type your question in the input field and press Enter or click "Send"
- The AI will process your question, search the web if needed, and provide a response with sources
NEBIUS_BASE_URL: LLM API base URLNEBIUS_APIKEY: LLM API keyREACT_APP_API_URL(frontend): WebSocket URL for the backend API (e.g.,wss://your-api.example.com/ws)FRONTEND_URL(backend): URL for the frontend application for CORS configuration
MIT