财富投资助手

AI驱动的聊天机器人,帮助用户发现和投资RBC共同基金。

  • by jun-hf
  • Python
  • 本地部署
  • 更新于
在 GitHub 查看 jun-hf/wealth-management-agent

使用说明

RBC财富助理

人工智能聊天机器人,帮助用户发现和投资RBC共同基金。

设置

# Install dependencies
pip install gradio google-generativeai google-cloud-firestore python-dotenv

# Create .env file
GEMINI_API_KEY=your_key_here
PROJECT_ID=your_gcp_project
GOOGLE_APPLICATION_CREDENTIALS=/path/to/service-account.json

# Run
python app.py

应用程序运行http://localhost:7860

它做什么

  • 搜索共同基金
  • 获取基金详细信息和业绩
  • 并排比较资金
  • 生成个性化投资组合
  • 捕获潜在客户信息

查询示例

  • “我想投资5万美元退休”
  • “给我看看低风险的加拿大股票基金”
  • “比较RBF460和RBF559”
  • “创建20年的保守投资组合”

系统流量

User Message
    ↓
Gradio Interface
    ↓
Gemini AI (decides what to do)
    ↓
Execute Function (search, compare, etc.)
    ↓
Query Firestore Database
    ↓
Format & Display Results

文件

  • app.py -主要应用
  • wealth_server.py -业务逻辑功能
  • utils/common.py -嵌入实用程序
  • .env -配置(由您创建)

故障排除

功能不工作?

  • 检查Gemini API密钥是否有效
  • 验证Firestore凭据
  • 确保wealth_server.py存在

连接错误?

  • 检查.env文件路径
  • 验证GCP项目ID
  • 确认Firestore已启用

需求

  • Python 3.8+
  • 谷歌云项目与Firestore
  • Gemini API密钥
  • Firestore“资金”集合中的资金数据