A fully local demo for a financial AI system internship.
It includes:
- FastAPI backend
- SQLite local database
- Portfolio and ETF API tools
- LM Studio local LLM integration
- OpenAI-compatible function calling
- Streamlit dashboard
- Swagger / OpenAPI docs
- Windows 11 scripts
- Optional Docker Compose
User
-> Streamlit Dashboard
-> FastAPI Backend
-> SQLite Local DB
-> Portfolio / ETF / Rebalance Tools
-> LM Studio Local LLM
-> Final answer + visible tool calls
FastAPI Swagger: http://localhost:8000/docs
Dashboard: http://localhost:8501
LM Studio API: http://localhost:1234/v1
Use this in Swagger Authorize:
Bearer demo-token
See RUN_WINDOWS.md for full step-by-step instructions.
Quick version:
Set-ExecutionPolicy -Scope Process -ExecutionPolicy Bypass
.\scripts\install_windows.ps1
.\scripts\run_backend_windows.ps1Open another PowerShell:
.\scripts\run_dashboard_windows.ps1Then open:
http://localhost:8501
我個 portfolio 有咩風險?
QQQ 同 SPY 邊個近期表現好啲?
SPY 最新價係幾多?
幫我建議一個 rebalance plan,要講原因。
- Open LM Studio and start local server on port 1234.
- Start FastAPI backend.
- Start Streamlit dashboard.
- Click
Seed / Reset Demo Data. - Show Portfolio Dashboard.
- Show ETF Data tab.
- Ask the AI Agent:
我個 portfolio 有咩風險? - Show answer, tool calls, and tool results.
- Open Swagger docs and show API routes.
If you use Docker Desktop:
docker compose up --buildDocker backend uses:
LM_STUDIO_BASE_URL=http://host.docker.internal:1234/v1
So LM Studio should still run on your Windows host machine.