little fix to gpt generateDirectedGraph