in databao/visualizers/vega_chat.py [0:0]
def visualize(self, request: str | None, data: ExecutionResult, *, stream: bool = False) -> VegaChatResult:
if data.df is None:
return VegaChatResult(text="Nothing to visualize", meta={}, plot=None, code=None, visualizer=self)
if request is None:
# We could also call the ChartRecommender module, but since we want a
# single output plot, we'll just use a simple prompt.
request = "I don't know what the data is about. Show me an interesting plot."
return self._run_vega_chat(request, data.df, stream=stream)