We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 76a18cc commit 4fb9d4aCopy full SHA for 4fb9d4a
1 file changed
dash/mcp/primitives/tools/results/result_plotly_figure.py
@@ -6,6 +6,7 @@
6
import logging
7
from typing import Any
8
9
+import plotly.graph_objects as go
10
from mcp.types import ImageContent, TextContent
11
12
from dash.mcp.types import MCPOutput
@@ -52,11 +53,6 @@ def format(
52
53
if not isinstance(returned_output_value, dict):
54
return []
55
- try:
56
- import plotly.graph_objects as go
57
- except ImportError:
58
- return []
59
-
60
fig = go.Figure(returned_output_value)
61
image = _render_image(fig)
62
return [image] if image is not None else []
0 commit comments