langsmith 0.1.48 → 0.1.50

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/client.cjs CHANGED
@@ -202,7 +202,7 @@ class Client {
202
202
  writable: true,
203
203
  value: void 0
204
204
  });
205
- Object.defineProperty(this, "sampledPostUuids", {
205
+ Object.defineProperty(this, "filteredPostUuids", {
206
206
  enumerable: true,
207
207
  configurable: true,
208
208
  writable: true,
@@ -449,9 +449,11 @@ class Client {
449
449
  if (patch) {
450
450
  const sampled = [];
451
451
  for (const run of runs) {
452
- if (this.sampledPostUuids.has(run.id)) {
452
+ if (!this.filteredPostUuids.has(run.id)) {
453
453
  sampled.push(run);
454
- this.sampledPostUuids.delete(run.id);
454
+ }
455
+ else {
456
+ this.filteredPostUuids.delete(run.id);
455
457
  }
456
458
  }
457
459
  return sampled;
@@ -459,9 +461,13 @@ class Client {
459
461
  else {
460
462
  const sampled = [];
461
463
  for (const run of runs) {
462
- if (Math.random() < this.tracingSampleRate) {
464
+ if ((run.id !== run.trace_id &&
465
+ !this.filteredPostUuids.has(run.trace_id)) ||
466
+ Math.random() < this.tracingSampleRate) {
463
467
  sampled.push(run);
464
- this.sampledPostUuids.add(run.id);
468
+ }
469
+ else {
470
+ this.filteredPostUuids.add(run.id);
465
471
  }
466
472
  }
467
473
  return sampled;
package/dist/client.d.ts CHANGED
@@ -166,7 +166,7 @@ export declare class Client {
166
166
  private hideInputs?;
167
167
  private hideOutputs?;
168
168
  private tracingSampleRate?;
169
- private sampledPostUuids;
169
+ private filteredPostUuids;
170
170
  private autoBatchTracing;
171
171
  private batchEndpointSupported?;
172
172
  private autoBatchQueue;
package/dist/client.js CHANGED
@@ -175,7 +175,7 @@ export class Client {
175
175
  writable: true,
176
176
  value: void 0
177
177
  });
178
- Object.defineProperty(this, "sampledPostUuids", {
178
+ Object.defineProperty(this, "filteredPostUuids", {
179
179
  enumerable: true,
180
180
  configurable: true,
181
181
  writable: true,
@@ -422,9 +422,11 @@ export class Client {
422
422
  if (patch) {
423
423
  const sampled = [];
424
424
  for (const run of runs) {
425
- if (this.sampledPostUuids.has(run.id)) {
425
+ if (!this.filteredPostUuids.has(run.id)) {
426
426
  sampled.push(run);
427
- this.sampledPostUuids.delete(run.id);
427
+ }
428
+ else {
429
+ this.filteredPostUuids.delete(run.id);
428
430
  }
429
431
  }
430
432
  return sampled;
@@ -432,9 +434,13 @@ export class Client {
432
434
  else {
433
435
  const sampled = [];
434
436
  for (const run of runs) {
435
- if (Math.random() < this.tracingSampleRate) {
437
+ if ((run.id !== run.trace_id &&
438
+ !this.filteredPostUuids.has(run.trace_id)) ||
439
+ Math.random() < this.tracingSampleRate) {
436
440
  sampled.push(run);
437
- this.sampledPostUuids.add(run.id);
441
+ }
442
+ else {
443
+ this.filteredPostUuids.add(run.id);
438
444
  }
439
445
  }
440
446
  return sampled;
package/dist/index.cjs CHANGED
@@ -6,4 +6,4 @@ Object.defineProperty(exports, "Client", { enumerable: true, get: function () {
6
6
  var run_trees_js_1 = require("./run_trees.cjs");
7
7
  Object.defineProperty(exports, "RunTree", { enumerable: true, get: function () { return run_trees_js_1.RunTree; } });
8
8
  // Update using yarn bump-version
9
- exports.__version__ = "0.1.48";
9
+ exports.__version__ = "0.1.50";
package/dist/index.d.ts CHANGED
@@ -1,4 +1,4 @@
1
1
  export { Client, type ClientConfig } from "./client.js";
2
2
  export type { Dataset, Example, TracerSession, Run, Feedback, RetrieverOutput, } from "./schemas.js";
3
3
  export { RunTree, type RunTreeConfig } from "./run_trees.js";
4
- export declare const __version__ = "0.1.48";
4
+ export declare const __version__ = "0.1.50";
package/dist/index.js CHANGED
@@ -1,4 +1,4 @@
1
1
  export { Client } from "./client.js";
2
2
  export { RunTree } from "./run_trees.js";
3
3
  // Update using yarn bump-version
4
- export const __version__ = "0.1.48";
4
+ export const __version__ = "0.1.50";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "langsmith",
3
- "version": "0.1.48",
3
+ "version": "0.1.50",
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": [