collect采用gpt生成,适用于mosaic结果的分析
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24
| #!/bin/bash
input=$(cat)
if ! echo "$input" | jq -e '.vertices and .edges' > /dev/null; then echo "Error: JSON input must contain 'vertices' and 'edges' arrays." exit 1 fi
path=$(echo "$input" | jq -r '.vertices[-1].stdout')
num_vertices=$(echo "$input" | jq '.vertices | length') num_edges=$(echo "$input" | jq '.edges | length')
unique_outputs=1
echo "$path" echo "|V| = $num_vertices, |E| = $num_edges." echo "There are $unique_outputs distinct outputs."
|