VizroAI
vizro_ai
VizroAI
Vizro-AI main class.
__init__
Initialization of VizroAI.
Parameters:
-
model
(Optional[Union[BaseChatModel, str]]
, default:None
) –model instance or model name.
dashboard
Creates a Vizro dashboard using english descriptions.
Parameters:
-
dfs
(list[DataFrame]
) –The dataframes to be analyzed.
-
user_input
(str
) –User questions or descriptions of the desired visual.
-
return_elements
(bool
, default:False
) –Flag to return DashboardOutputs dataclass that includes all possible elements generated.
Returns:
-
Union[DashboardOutputs, Dashboard]
–vm.Dashboard or DashboardOutputs dataclass.
plot
Plot visuals using vizro via english descriptions, english to chart translation.
Parameters:
-
df
(DataFrame
) –The dataframe to be analyzed.
-
user_input
(str
) –User questions or descriptions of the desired visual.
-
max_debug_retry
(int
, default:1
) –Maximum number of retries to debug errors. Defaults to
1
. -
return_elements
(bool
, default:False
) –Flag to return ChartPlan pydantic model that includes all possible elements generated. Defaults to
False
. -
validate_code
(bool
, default:True
) –Flag if produced code should be executed to validate it. Defaults to
True
.
Returns:
-
Union[Figure, ChartPlan]
–go.Figure or ChartPlan pydantic model