# \donttest{
if (interactive()) {
visualizer <- create_visualizer_agent()
session <- create_shared_session(model = "openai:gpt-4o")
session$set_var("df", data.frame(x = 1:10, y = (1:10)^2))
result <- visualizer$run(
"Create a scatter plot of df showing the relationship between x and y",
session = session,
model = "openai:gpt-4o"
)
}
# }
Run the code above in your browser using DataLab