langsmith 0.1.56 → 0.1.58
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/evaluation/_runner.cjs +1 -0
- package/dist/evaluation/_runner.js +1 -0
- package/dist/index.cjs +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +1 -1
- package/dist/run_trees.cjs +13 -1
- package/dist/run_trees.d.ts +2 -0
- package/dist/run_trees.js +13 -1
- package/package.json +1 -1
|
@@ -421,6 +421,7 @@ class _ExperimentManager {
|
|
|
421
421
|
: new Date(example.created_at).toISOString(),
|
|
422
422
|
},
|
|
423
423
|
client: fields.client,
|
|
424
|
+
tracingEnabled: true,
|
|
424
425
|
};
|
|
425
426
|
const evaluatorResponse = await evaluator.evaluateRun(run, example, options);
|
|
426
427
|
evaluationResults.results.push(...(await fields.client.logEvaluationFeedback(evaluatorResponse, run)));
|
|
@@ -417,6 +417,7 @@ export class _ExperimentManager {
|
|
|
417
417
|
: new Date(example.created_at).toISOString(),
|
|
418
418
|
},
|
|
419
419
|
client: fields.client,
|
|
420
|
+
tracingEnabled: true,
|
|
420
421
|
};
|
|
421
422
|
const evaluatorResponse = await evaluator.evaluateRun(run, example, options);
|
|
422
423
|
evaluationResults.results.push(...(await fields.client.logEvaluationFeedback(evaluatorResponse, run)));
|
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.1.
|
|
11
|
+
exports.__version__ = "0.1.58";
|
package/dist/index.d.ts
CHANGED
|
@@ -2,4 +2,4 @@ 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
4
|
export { overrideFetchImplementation } from "./singletons/fetch.js";
|
|
5
|
-
export declare const __version__ = "0.1.
|
|
5
|
+
export declare const __version__ = "0.1.58";
|
package/dist/index.js
CHANGED
package/dist/run_trees.cjs
CHANGED
|
@@ -222,7 +222,7 @@ class RunTree {
|
|
|
222
222
|
});
|
|
223
223
|
const defaultConfig = RunTree.getDefaultConfig();
|
|
224
224
|
const { metadata, ...config } = originalConfig;
|
|
225
|
-
const client = config.client ??
|
|
225
|
+
const client = config.client ?? RunTree.getSharedClient();
|
|
226
226
|
const dedupedMetadata = {
|
|
227
227
|
...metadata,
|
|
228
228
|
...config?.extra?.metadata,
|
|
@@ -267,6 +267,12 @@ class RunTree {
|
|
|
267
267
|
extra: {},
|
|
268
268
|
};
|
|
269
269
|
}
|
|
270
|
+
static getSharedClient() {
|
|
271
|
+
if (!RunTree.sharedClient) {
|
|
272
|
+
RunTree.sharedClient = new client_js_1.Client();
|
|
273
|
+
}
|
|
274
|
+
return RunTree.sharedClient;
|
|
275
|
+
}
|
|
270
276
|
createChild(config) {
|
|
271
277
|
const child_execution_order = this.child_execution_order + 1;
|
|
272
278
|
const child = new RunTree({
|
|
@@ -479,6 +485,12 @@ class RunTree {
|
|
|
479
485
|
}
|
|
480
486
|
}
|
|
481
487
|
exports.RunTree = RunTree;
|
|
488
|
+
Object.defineProperty(RunTree, "sharedClient", {
|
|
489
|
+
enumerable: true,
|
|
490
|
+
configurable: true,
|
|
491
|
+
writable: true,
|
|
492
|
+
value: null
|
|
493
|
+
});
|
|
482
494
|
function isRunTree(x) {
|
|
483
495
|
return (x !== undefined &&
|
|
484
496
|
typeof x.createChild === "function" &&
|
package/dist/run_trees.d.ts
CHANGED
|
@@ -49,6 +49,7 @@ interface HeadersLike {
|
|
|
49
49
|
set(name: string, value: string): void;
|
|
50
50
|
}
|
|
51
51
|
export declare class RunTree implements BaseRun {
|
|
52
|
+
private static sharedClient;
|
|
52
53
|
id: string;
|
|
53
54
|
name: RunTreeConfig["name"];
|
|
54
55
|
run_type: string;
|
|
@@ -73,6 +74,7 @@ export declare class RunTree implements BaseRun {
|
|
|
73
74
|
child_execution_order: number;
|
|
74
75
|
constructor(originalConfig: RunTreeConfig);
|
|
75
76
|
private static getDefaultConfig;
|
|
77
|
+
private static getSharedClient;
|
|
76
78
|
createChild(config: RunTreeConfig): RunTree;
|
|
77
79
|
end(outputs?: KVMap, error?: string, endTime?: number): Promise<void>;
|
|
78
80
|
private _convertToCreate;
|
package/dist/run_trees.js
CHANGED
|
@@ -195,7 +195,7 @@ export class RunTree {
|
|
|
195
195
|
});
|
|
196
196
|
const defaultConfig = RunTree.getDefaultConfig();
|
|
197
197
|
const { metadata, ...config } = originalConfig;
|
|
198
|
-
const client = config.client ??
|
|
198
|
+
const client = config.client ?? RunTree.getSharedClient();
|
|
199
199
|
const dedupedMetadata = {
|
|
200
200
|
...metadata,
|
|
201
201
|
...config?.extra?.metadata,
|
|
@@ -240,6 +240,12 @@ export class RunTree {
|
|
|
240
240
|
extra: {},
|
|
241
241
|
};
|
|
242
242
|
}
|
|
243
|
+
static getSharedClient() {
|
|
244
|
+
if (!RunTree.sharedClient) {
|
|
245
|
+
RunTree.sharedClient = new Client();
|
|
246
|
+
}
|
|
247
|
+
return RunTree.sharedClient;
|
|
248
|
+
}
|
|
243
249
|
createChild(config) {
|
|
244
250
|
const child_execution_order = this.child_execution_order + 1;
|
|
245
251
|
const child = new RunTree({
|
|
@@ -451,6 +457,12 @@ export class RunTree {
|
|
|
451
457
|
return result;
|
|
452
458
|
}
|
|
453
459
|
}
|
|
460
|
+
Object.defineProperty(RunTree, "sharedClient", {
|
|
461
|
+
enumerable: true,
|
|
462
|
+
configurable: true,
|
|
463
|
+
writable: true,
|
|
464
|
+
value: null
|
|
465
|
+
});
|
|
454
466
|
export function isRunTree(x) {
|
|
455
467
|
return (x !== undefined &&
|
|
456
468
|
typeof x.createChild === "function" &&
|