MCPcopy Index your code
hub / github.com/simstudioai/sim / normalizeLangsmithRunPayload

Function normalizeLangsmithRunPayload

apps/sim/tools/langsmith/utils.ts:23–39  ·  view source on GitHub ↗
(run: LangsmithRunPayload)

Source from the content-addressed store, hash-verified

21}
22
23export const normalizeLangsmithRunPayload = (run: LangsmithRunPayload): NormalizedRunPayload => {
24 const runId = run.id ?? generateId()
25 const traceId = run.trace_id ?? runId
26 const startTime = run.start_time ?? new Date().toISOString()
27 const dottedOrder = run.dotted_order ?? `${toCompactTimestamp(startTime)}Z${runId}`
28
29 return {
30 runId,
31 payload: {
32 ...run,
33 id: runId,
34 trace_id: traceId,
35 start_time: startTime,
36 dotted_order: dottedOrder,
37 },
38 }
39}

Callers 3

collectRunIdsFunction · 0.90
create_run.tsFile · 0.90

Calls 2

generateIdFunction · 0.90
toCompactTimestampFunction · 0.85

Tested by

no test coverage detected