FinanceEducationAssistant / src /core /FinanceState.py
Fade0510's picture
Cleaned up code before reimplementing semantic cache
6710fbe
Raw
History Blame Contribute Delete
580 Bytes
from typing import Any, Dict, List, Optional, TypedDict
class FinanceState(TypedDict, total=False):
# Core request/response
user_query: str
response: str
trace_id: str
# Routing
intent: str
agents: List[str]
# Entities
symbol: Optional[str]
crypto_symbol: Optional[str]
portfolio: Optional[List[Dict[str, Any]]]
# Context/state (passed from the UI)
conversation_history: List[Dict[str, str]]
user_profile: Dict[str, Any]
# Optional telemetry/debug
retrieved_sources: List[Dict[str, Any]]
errors: List[str]