MCPcopy Create free account
hub / github.com/InferCore/InferCore / stepsToJSON

Function stepsToJSON

cmd/infercore/main.go:159–176  ·  view source on GitHub ↗
(steps []requests.StepRow)

Source from the content-addressed store, hash-verified

157}
158
159func stepsToJSON(steps []requests.StepRow) []map[string]any {
160 out := make([]map[string]any, 0, len(steps))
161 for _, s := range steps {
162 out = append(out, map[string]any{
163 "request_id": s.RequestID,
164 "step_index": s.StepIndex,
165 "step_type": s.StepType,
166 "input_json": json.RawMessage(s.InputJSON),
167 "output_json": json.RawMessage(s.OutputJSON),
168 "backend": s.Backend,
169 "status": s.Status,
170 "error": s.Error,
171 "latency_ms": s.LatencyMs,
172 "metadata_json": json.RawMessage(s.MetadataJSON),
173 })
174 }
175 return out
176}
177
178func replayCmd(cfgPath *string) *cobra.Command {
179 var mode, idsFile string

Callers 1

traceCmdFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected