We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 4c12914 commit 701a429Copy full SHA for 701a429
apps/sim/tools/langsmith/utils.ts
@@ -1,3 +1,4 @@
1
+import { randomUUID } from 'node:crypto'
2
import type { LangsmithRunPayload } from '@/tools/langsmith/types'
3
4
interface NormalizedRunPayload {
@@ -20,7 +21,7 @@ const toCompactTimestamp = (startTime?: string): string => {
20
21
}
22
23
export const normalizeLangsmithRunPayload = (run: LangsmithRunPayload): NormalizedRunPayload => {
- const runId = run.id ?? crypto.randomUUID()
24
+ const runId = run.id ?? randomUUID()
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}`
0 commit comments