diff --git a/langchain-core/src/runnables/base.ts b/langchain-core/src/runnables/base.ts index 98d0fdfb618d..f4991408ee3f 100644 --- a/langchain-core/src/runnables/base.ts +++ b/langchain-core/src/runnables/base.ts @@ -5,7 +5,6 @@ import { type TraceableFunction, isTraceableFunction, } from "langsmith/singletons/traceable"; - import type { RunnableInterface, RunnableBatchOptions } from "./types.js"; import { CallbackManager, diff --git a/langchain-core/src/tracers/tracer_langchain.ts b/langchain-core/src/tracers/tracer_langchain.ts index 6548b79df65c..be43323d55ed 100644 --- a/langchain-core/src/tracers/tracer_langchain.ts +++ b/langchain-core/src/tracers/tracer_langchain.ts @@ -149,6 +149,8 @@ export class LangChainTracer getTraceableRunTree(): RunTree | undefined { try { + // TODO: this might be an unsafe/breaking operation + // as now we have a hard dependency on node:async_hooks return getCurrentRunTree(); } catch { return undefined; diff --git a/langchain/src/smith/runner_utils.ts b/langchain/src/smith/runner_utils.ts index 948a9e62cb76..753deb4929d2 100644 --- a/langchain/src/smith/runner_utils.ts +++ b/langchain/src/smith/runner_utils.ts @@ -25,7 +25,7 @@ import { } from "langsmith"; import { EvaluationResult, RunEvaluator } from "langsmith/evaluation"; import { DataType } from "langsmith/schemas"; -import type { TraceableFunction } from "langsmith/traceable"; +import type { TraceableFunction } from "langsmith/singletons/traceable"; import { LLMStringEvaluator } from "../evaluation/base.js"; import { loadEvaluator } from "../evaluation/loader.js"; import { EvaluatorType } from "../evaluation/types.js";