Welcome to the AI Stock Chatbot, a Reflex-based web application that provides smart investment recommendations using real-time stock data from the Polygon API and AI-powered insights from OpenAI.
- 🔍 Search for stock symbols (e.g., AAPL, TSLA, MSFT)
- 📈 Fetches 3-day market data via Polygon API
- 🤖 AI-generated analysis using OpenAI GPT
- 💬 Chat-like interface
- 🎨 Responsive UI with Reflex components
- 🌀 Loading spinner while data is being fetched
- 🧹 Clear chat history button
ai_stock_chatbot/
├── ai_stock_chatbot/ # Main application
│ ├── backend/ # Business logic & services
│ │ ├── core/ # Core AI logic
│ │ ├── services/ # API wrappers (OpenAI, Polygon)
│ │ └── prompts/ # Prompt templates
│ ├── components/ # Reusable Reflex components (optional)
│ ├── pages/ # Pages rendered by Reflex
│ ├── state/ # Application state logic
│ ├── config.py # API keys and environment config
│ └── ai_stock_chatbot.py # App entry point
├── assets/ # Static files (favicon, etc.)
├── .env # Environment variables
├── requirements.txt # Python dependencies
├── rxconfig.py # Reflex app config
└── README.md
- Fork the repository on GitHub
Go to https://github.com/jasonssdev/ai-stock-chatbot and click the Fork button in the upper right corner to create your own copy.
- Create
.envfile
API_KEY_OPENAI=your-openai-api-key
API_KEY_POLYGON=your-polygon-api-key
DEBUG=True
ENV=development- Install dependencies
pip install -r requirements.txt- Run the app
reflex runVisit: http://localhost:3000
Built with ❤️ using:
Apache License 2.0