File size: 1,130 Bytes
eb606e1
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
from pydantic import BaseModel, Field
from typing import List, Dict, Optional, Any
from enum import Enum

class AnalysisFocus(str, Enum):
    FUND_SELECTION = "Fund Selection"
    RISK_ASSESSMENT = "Risk Assessment"
    GOAL_ALIGNMENT = "Goal Alignment"
    TAX_OPTIMIZATION = "Tax Optimization"
    REBALANCING = "Rebalancing"

class MarketView(str, Enum):
    BULLISH = "Bullish"
    NEUTRAL = "Neutral"
    BEARISH = "Bearish"
    VOLATILE = "Volatile"

class InvestmentHorizon(str, Enum):
    SHORT_TERM = "Short Term (1-3 years)"
    MEDIUM_TERM = "Medium Term (3-7 years)"
    LONG_TERM = "Long Term (7+ years)"

class AIAnalysisRequest(BaseModel):
    client_profile: Dict[str, Any]
    portfolio_data: Dict[str, Any]
    goals_data: Dict[str, Any]
    analysis_focus: List[AnalysisFocus]
    market_conditions: MarketView
    investment_horizon: InvestmentHorizon

class AISwarmAgent(BaseModel):
    agent_name: str
    content: Optional[str] = None

class AIAnalysisResponse(BaseModel):
    success: bool
    error: Optional[str] = None
    output: Optional[List[AISwarmAgent]] = None