MCPcopy Create free account
hub / github.com/IyadhKhalfallah/Code2Flowchart / FlowchartGenTool

Class FlowchartGenTool

code2flowchart/tools/FlowchartGenTool.py:8–24  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

6
7
8class FlowchartGenTool(BaseTool):
9 name = "Generate flowchart"
10 description = (
11 "A flowchart generator, which generates a flowchart out of some text explaining a code process."
12 "Input should be a valid a detailed text explaining a process."
13 ""
14 )
15 llm = OpenAI(temperature=0.9)
16
17 def _run(self, query: str) -> str:
18 """Use the tool."""
19 code = self.llm(flowchart_template(query))
20 return generate_flowchart(code.replace('`', ''))
21
22 async def _arun(self, query: str) -> str:
23 """Use the tool asynchronously."""
24 raise NotImplementedError("CodeExplanationTool does not support async")

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected