File size: 521 Bytes
711bc31 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 |
from typing import Any, Callable, Optional, TypedDict
from plotly.graph_objects import Figure
import pandas as pd
from climateqa.engine.talk_to_data.objects.plot import Plot
class TTDOutput(TypedDict):
status: str
plot: Plot
table: str
sql_query: Optional[str]
dataframe: Optional[pd.DataFrame]
figure: Optional[Callable[..., Figure]]
plot_information: Optional[str]
class State(TypedDict):
user_input: str
plots: list[str]
outputs: dict[str, TTDOutput]
error: Optional[str]
|