langsmith 0.1.64 → 0.1.65-rc.0

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.
@@ -220,6 +220,11 @@ class RunTree {
220
220
  writable: true,
221
221
  value: void 0
222
222
  });
223
+ if (originalConfig.__shallowClone) {
224
+ delete originalConfig.__shallowClone;
225
+ Object.assign(this, originalConfig);
226
+ return;
227
+ }
223
228
  const defaultConfig = RunTree.getDefaultConfig();
224
229
  const { metadata, ...config } = originalConfig;
225
230
  const client = config.client ?? RunTree.getSharedClient();
@@ -284,6 +289,11 @@ class RunTree {
284
289
  execution_order: child_execution_order,
285
290
  child_execution_order: child_execution_order,
286
291
  });
292
+ const CONTEXT_VARIABLES_KEY = Symbol.for("lc:context_variables");
293
+ if (CONTEXT_VARIABLES_KEY in this) {
294
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
295
+ child[CONTEXT_VARIABLES_KEY] = this[CONTEXT_VARIABLES_KEY];
296
+ }
287
297
  const LC_CHILD = Symbol.for("lc:child_config");
288
298
  const presentConfig = config.extra?.[LC_CHILD] ??
289
299
  this.extra[LC_CHILD];
@@ -26,6 +26,8 @@ export interface RunTreeConfig {
26
26
  child_execution_order?: number;
27
27
  trace_id?: string;
28
28
  dotted_order?: string;
29
+ /** @internal */
30
+ __shallowClone?: boolean;
29
31
  }
30
32
  export interface RunnableConfigLike {
31
33
  /**
package/dist/run_trees.js CHANGED
@@ -193,6 +193,11 @@ export class RunTree {
193
193
  writable: true,
194
194
  value: void 0
195
195
  });
196
+ if (originalConfig.__shallowClone) {
197
+ delete originalConfig.__shallowClone;
198
+ Object.assign(this, originalConfig);
199
+ return;
200
+ }
196
201
  const defaultConfig = RunTree.getDefaultConfig();
197
202
  const { metadata, ...config } = originalConfig;
198
203
  const client = config.client ?? RunTree.getSharedClient();
@@ -257,6 +262,11 @@ export class RunTree {
257
262
  execution_order: child_execution_order,
258
263
  child_execution_order: child_execution_order,
259
264
  });
265
+ const CONTEXT_VARIABLES_KEY = Symbol.for("lc:context_variables");
266
+ if (CONTEXT_VARIABLES_KEY in this) {
267
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
268
+ child[CONTEXT_VARIABLES_KEY] = this[CONTEXT_VARIABLES_KEY];
269
+ }
260
270
  const LC_CHILD = Symbol.for("lc:child_config");
261
271
  const presentConfig = config.extra?.[LC_CHILD] ??
262
272
  this.extra[LC_CHILD];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "langsmith",
3
- "version": "0.1.64",
3
+ "version": "0.1.65-rc.0",
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": [