langsmith 0.3.12 → 0.3.13
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 +9 -2
- package/dist/client.js +9 -2
- package/dist/index.cjs +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +1 -1
- package/package.json +1 -1
package/dist/client.cjs
CHANGED
|
@@ -102,6 +102,13 @@ const handle429 = async (response) => {
|
|
|
102
102
|
// Fall back to existing status checks
|
|
103
103
|
return false;
|
|
104
104
|
};
|
|
105
|
+
function _formatFeedbackScore(score) {
|
|
106
|
+
if (typeof score === "number") {
|
|
107
|
+
// Truncate at 4 decimal places
|
|
108
|
+
return Number(score.toFixed(4));
|
|
109
|
+
}
|
|
110
|
+
return score;
|
|
111
|
+
}
|
|
105
112
|
class AutoBatchQueue {
|
|
106
113
|
constructor() {
|
|
107
114
|
Object.defineProperty(this, "items", {
|
|
@@ -2333,7 +2340,7 @@ class Client {
|
|
|
2333
2340
|
id: feedbackId ?? uuid.v4(),
|
|
2334
2341
|
run_id: runId,
|
|
2335
2342
|
key,
|
|
2336
|
-
score,
|
|
2343
|
+
score: _formatFeedbackScore(score),
|
|
2337
2344
|
value,
|
|
2338
2345
|
correction,
|
|
2339
2346
|
comment,
|
|
@@ -2356,7 +2363,7 @@ class Client {
|
|
|
2356
2363
|
async updateFeedback(feedbackId, { score, value, correction, comment, }) {
|
|
2357
2364
|
const feedbackUpdate = {};
|
|
2358
2365
|
if (score !== undefined && score !== null) {
|
|
2359
|
-
feedbackUpdate["score"] = score;
|
|
2366
|
+
feedbackUpdate["score"] = _formatFeedbackScore(score);
|
|
2360
2367
|
}
|
|
2361
2368
|
if (value !== undefined && value !== null) {
|
|
2362
2369
|
feedbackUpdate["value"] = value;
|
package/dist/client.js
CHANGED
|
@@ -75,6 +75,13 @@ const handle429 = async (response) => {
|
|
|
75
75
|
// Fall back to existing status checks
|
|
76
76
|
return false;
|
|
77
77
|
};
|
|
78
|
+
function _formatFeedbackScore(score) {
|
|
79
|
+
if (typeof score === "number") {
|
|
80
|
+
// Truncate at 4 decimal places
|
|
81
|
+
return Number(score.toFixed(4));
|
|
82
|
+
}
|
|
83
|
+
return score;
|
|
84
|
+
}
|
|
78
85
|
export class AutoBatchQueue {
|
|
79
86
|
constructor() {
|
|
80
87
|
Object.defineProperty(this, "items", {
|
|
@@ -2305,7 +2312,7 @@ export class Client {
|
|
|
2305
2312
|
id: feedbackId ?? uuid.v4(),
|
|
2306
2313
|
run_id: runId,
|
|
2307
2314
|
key,
|
|
2308
|
-
score,
|
|
2315
|
+
score: _formatFeedbackScore(score),
|
|
2309
2316
|
value,
|
|
2310
2317
|
correction,
|
|
2311
2318
|
comment,
|
|
@@ -2328,7 +2335,7 @@ export class Client {
|
|
|
2328
2335
|
async updateFeedback(feedbackId, { score, value, correction, comment, }) {
|
|
2329
2336
|
const feedbackUpdate = {};
|
|
2330
2337
|
if (score !== undefined && score !== null) {
|
|
2331
|
-
feedbackUpdate["score"] = score;
|
|
2338
|
+
feedbackUpdate["score"] = _formatFeedbackScore(score);
|
|
2332
2339
|
}
|
|
2333
2340
|
if (value !== undefined && value !== null) {
|
|
2334
2341
|
feedbackUpdate["value"] = value;
|
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.
|
|
11
|
+
exports.__version__ = "0.3.13";
|
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.
|
|
5
|
+
export declare const __version__ = "0.3.13";
|
package/dist/index.js
CHANGED