import { ... } from "langsmith/traceable";Return the current run tree from within a traceable-wrapped function. Will throw an error if called outside of a traceable function.
Higher-order function that takes function as input and returns a "TraceableFunction" - a wrapped version of the input that automatically handles tracing. If the returned traceable function calls any traceable functions, those are automatically traced as well.
The returned TraceableFunction can accept a run tree or run tree config as its first argument. If omitted, it will default to the caller's run tree, or will be treated as a root run.