langsmith 0.3.25 → 0.3.26

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.cjs CHANGED
@@ -8,4 +8,4 @@ Object.defineProperty(exports, "RunTree", { enumerable: true, get: function () {
8
8
  var fetch_js_1 = require("./singletons/fetch.cjs");
9
9
  Object.defineProperty(exports, "overrideFetchImplementation", { enumerable: true, get: function () { return fetch_js_1.overrideFetchImplementation; } });
10
10
  // Update using yarn bump-version
11
- exports.__version__ = "0.3.25";
11
+ exports.__version__ = "0.3.26";
package/dist/index.d.ts CHANGED
@@ -2,4 +2,4 @@ export { Client, type ClientConfig, type LangSmithTracingClientInterface, } from
2
2
  export type { Dataset, Example, TracerSession, Run, Feedback, RetrieverOutput, } from "./schemas.js";
3
3
  export { RunTree, type RunTreeConfig } from "./run_trees.js";
4
4
  export { overrideFetchImplementation } from "./singletons/fetch.js";
5
- export declare const __version__ = "0.3.25";
5
+ export declare const __version__ = "0.3.26";
package/dist/index.js CHANGED
@@ -2,4 +2,4 @@ export { Client, } from "./client.js";
2
2
  export { RunTree } from "./run_trees.js";
3
3
  export { overrideFetchImplementation } from "./singletons/fetch.js";
4
4
  // Update using yarn bump-version
5
- export const __version__ = "0.3.25";
5
+ export const __version__ = "0.3.26";
@@ -24,9 +24,7 @@ function wrapEvaluator(evaluator) {
24
24
  }
25
25
  const evalRunId = config?.runId ?? config?.id ?? (0, uuid_1.v4)();
26
26
  let evalResult;
27
- let currentRunTree;
28
27
  if ((0, globals_js_1.trackingEnabled)(context)) {
29
- currentRunTree = (0, traceable_js_1.getCurrentRunTree)();
30
28
  const wrappedEvaluator = (0, traceable_js_1.traceable)(async (_runTree, params) => {
31
29
  return evaluator(params);
32
30
  }, {
@@ -57,7 +55,7 @@ function wrapEvaluator(evaluator) {
57
55
  exampleId: context?.currentExample?.id,
58
56
  feedback: result,
59
57
  context,
60
- runTree: currentRunTree,
58
+ runTree: context.testRootRunTree,
61
59
  client: context.client,
62
60
  sourceRunId: evalRunId,
63
61
  });
@@ -1,4 +1,4 @@
1
- import { getCurrentRunTree, ROOT, traceable } from "../../../traceable.js";
1
+ import { ROOT, traceable } from "../../../traceable.js";
2
2
  import { testWrapperAsyncLocalStorageInstance, _logTestFeedback, trackingEnabled, } from "../globals.js";
3
3
  import { v4 } from "uuid";
4
4
  function isEvaluationResult(x) {
@@ -20,9 +20,7 @@ export function wrapEvaluator(evaluator) {
20
20
  }
21
21
  const evalRunId = config?.runId ?? config?.id ?? v4();
22
22
  let evalResult;
23
- let currentRunTree;
24
23
  if (trackingEnabled(context)) {
25
- currentRunTree = getCurrentRunTree();
26
24
  const wrappedEvaluator = traceable(async (_runTree, params) => {
27
25
  return evaluator(params);
28
26
  }, {
@@ -53,7 +51,7 @@ export function wrapEvaluator(evaluator) {
53
51
  exampleId: context?.currentExample?.id,
54
52
  feedback: result,
55
53
  context,
56
- runTree: currentRunTree,
54
+ runTree: context.testRootRunTree,
57
55
  client: context.client,
58
56
  sourceRunId: evalRunId,
59
57
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "langsmith",
3
- "version": "0.3.25",
3
+ "version": "0.3.26",
4
4
  "description": "Client library to connect to the LangSmith LLM Tracing and Evaluation Platform.",
5
5
  "packageManager": "yarn@1.22.19",
6
6
  "files": [