| export type SessionState = { | |
| authenticated: boolean; | |
| configured: boolean; | |
| }; | |
| export type DataInfo = { | |
| ready: boolean; | |
| first_date?: string; | |
| last_date?: string; | |
| records?: number; | |
| cities?: number; | |
| }; | |
| export type Visualization = "none" | "bar" | "line" | "scatter"; | |
| export type AnalysisStep = { | |
| function_name: string; | |
| arguments: Record<string, unknown>; | |
| }; | |
| export type ChatResult = { | |
| answer: string; | |
| key_points: string[]; | |
| method_note: string; | |
| analysis_steps: AnalysisStep[]; | |
| columns: string[]; | |
| rows: Array<Record<string, string | number | null>>; | |
| visualization: Visualization; | |
| title: string; | |
| x_key: string; | |
| y_keys: string[]; | |
| truncated: boolean; | |
| analysis_type: string; | |
| elapsed_ms: number; | |
| suggested_questions: string[]; | |
| }; | |
| export type ConversationMessage = { | |
| id: string; | |
| role: "user" | "assistant"; | |
| content: string; | |
| result?: ChatResult; | |
| error?: string; | |
| }; | |