| 106 | return f'❓ Unsupported tool type: {type(tool_or_agent)}' |
| 107 | |
| 108 | def get_node_shape(tool_or_agent: Union[BaseAgent, BaseTool]): |
| 109 | if isinstance(tool_or_agent, BaseAgent): |
| 110 | return 'ellipse' |
| 111 | elif retrieval_tool_module_loaded and isinstance( |
| 112 | tool_or_agent, BaseRetrievalTool |
| 113 | ): |
| 114 | return 'cylinder' |
| 115 | elif isinstance(tool_or_agent, FunctionTool): |
| 116 | return 'box' |
| 117 | elif isinstance(tool_or_agent, BaseTool): |
| 118 | return 'box' |
| 119 | elif hasattr(tool_or_agent, 'name'): |
| 120 | return 'box' |
| 121 | else: |
| 122 | logger.warning( |
| 123 | 'Unsupported tool, type: %s, obj: %s', |
| 124 | type(tool_or_agent), |
| 125 | tool_or_agent, |
| 126 | ) |
| 127 | return 'cylinder' |
| 128 | |
| 129 | def should_build_agent_cluster(tool_or_agent): |
| 130 | if isinstance(tool_or_agent, Workflow): |