File size: 779 Bytes
31add3b
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
"""
State management for InsightFlow AI.
"""

from typing import TypedDict, List, Dict, Optional, Any
from langchain_core.documents import Document

class InsightFlowState(TypedDict):
    """
    State for InsightFlow AI.
    
    This state is used by LangGraph to track the current state of the system.
    """
    # Query information
    panel_type: str  # "research" or "discussion"
    query: str
    selected_personas: List[str]
    
    # Research results
    persona_responses: Dict[str, str]
    synthesized_response: Optional[str]
    visualization_code: Optional[str]  # For storing Mermaid diagram code
    visualization_image_url: Optional[str]  # For storing DALL-E generated image URL
    
    # Control
    current_step_name: str
    error_message: Optional[str]