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

Function generate_output

code2flowchart/generators.py:7–15  ·  view source on GitHub ↗
(code)

Source from the content-addressed store, hash-verified

5
6
7def generate_output(code):
8 llm = OpenAI(temperature=0.9)
9
10 prompt = flowchart_template(
11 f"""
12 {code}
13 """)
14 res = llm(prompt)
15 return generate_flowchart(res.replace('```', '').replace('mermaid', ''))
16
17
18async def async_generate_output(file_name, code):

Callers

nothing calls this directly

Calls 2

flowchart_templateFunction · 0.90
generate_flowchartFunction · 0.90

Tested by

no test coverage detected