langsmith 0.3.15 → 0.3.16
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 +3 -2
- package/dist/client.js +3 -2
- package/dist/index.cjs +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +1 -1
- package/dist/run_trees.cjs +1 -0
- package/dist/run_trees.js +1 -0
- package/dist/schemas.d.ts +1 -0
- package/dist/utils/jestlike/index.cjs +3 -0
- package/dist/utils/jestlike/index.js +4 -1
- package/package.json +1 -1
package/dist/client.cjs
CHANGED
|
@@ -2928,7 +2928,7 @@ class Client {
|
|
|
2928
2928
|
}
|
|
2929
2929
|
async _updateExamplesMultipart(datasetId, updates = []) {
|
|
2930
2930
|
if (!(await this._getMultiPartSupport())) {
|
|
2931
|
-
throw new Error("Your LangSmith
|
|
2931
|
+
throw new Error("Your LangSmith deployment does not allow using the multipart examples endpoint, please upgrade your deployment to the latest version.");
|
|
2932
2932
|
}
|
|
2933
2933
|
const formData = new FormData();
|
|
2934
2934
|
for (const example of updates) {
|
|
@@ -3006,7 +3006,7 @@ class Client {
|
|
|
3006
3006
|
}
|
|
3007
3007
|
async _uploadExamplesMultipart(datasetId, uploads = []) {
|
|
3008
3008
|
if (!(await this._getMultiPartSupport())) {
|
|
3009
|
-
throw new Error("Your LangSmith
|
|
3009
|
+
throw new Error("Your LangSmith deployment does not allow using the multipart examples endpoint, please upgrade your deployment to the latest version.");
|
|
3010
3010
|
}
|
|
3011
3011
|
const formData = new FormData();
|
|
3012
3012
|
for (const example of uploads) {
|
|
@@ -3070,6 +3070,7 @@ class Client {
|
|
|
3070
3070
|
headers: this.headers,
|
|
3071
3071
|
body: formData,
|
|
3072
3072
|
});
|
|
3073
|
+
await (0, error_js_1.raiseForStatus)(response, "upload examples");
|
|
3073
3074
|
const result = await response.json();
|
|
3074
3075
|
return result;
|
|
3075
3076
|
}
|
package/dist/client.js
CHANGED
|
@@ -2890,7 +2890,7 @@ export class Client {
|
|
|
2890
2890
|
}
|
|
2891
2891
|
async _updateExamplesMultipart(datasetId, updates = []) {
|
|
2892
2892
|
if (!(await this._getMultiPartSupport())) {
|
|
2893
|
-
throw new Error("Your LangSmith
|
|
2893
|
+
throw new Error("Your LangSmith deployment does not allow using the multipart examples endpoint, please upgrade your deployment to the latest version.");
|
|
2894
2894
|
}
|
|
2895
2895
|
const formData = new FormData();
|
|
2896
2896
|
for (const example of updates) {
|
|
@@ -2968,7 +2968,7 @@ export class Client {
|
|
|
2968
2968
|
}
|
|
2969
2969
|
async _uploadExamplesMultipart(datasetId, uploads = []) {
|
|
2970
2970
|
if (!(await this._getMultiPartSupport())) {
|
|
2971
|
-
throw new Error("Your LangSmith
|
|
2971
|
+
throw new Error("Your LangSmith deployment does not allow using the multipart examples endpoint, please upgrade your deployment to the latest version.");
|
|
2972
2972
|
}
|
|
2973
2973
|
const formData = new FormData();
|
|
2974
2974
|
for (const example of uploads) {
|
|
@@ -3032,6 +3032,7 @@ export class Client {
|
|
|
3032
3032
|
headers: this.headers,
|
|
3033
3033
|
body: formData,
|
|
3034
3034
|
});
|
|
3035
|
+
await raiseForStatus(response, "upload examples");
|
|
3035
3036
|
const result = await response.json();
|
|
3036
3037
|
return result;
|
|
3037
3038
|
}
|
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.16";
|
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.16";
|
package/dist/index.js
CHANGED
package/dist/run_trees.cjs
CHANGED
package/dist/run_trees.js
CHANGED
package/dist/schemas.d.ts
CHANGED
|
@@ -230,6 +230,9 @@ function generateWrapperFromJestlikeMethods(methods, testRunnerName) {
|
|
|
230
230
|
return storageValue;
|
|
231
231
|
}
|
|
232
232
|
function wrapDescribeMethod(method) {
|
|
233
|
+
if ((0, env_js_1.isJsDom)()) {
|
|
234
|
+
console.error(`[LANGSMITH]: You seem to be using a jsdom environment. This is not supported and you may experience unexpected behavior. Please set the "environment" or "testEnvironment" field in your test config file to "node".`);
|
|
235
|
+
}
|
|
233
236
|
return function (testSuiteName, fn, experimentConfig) {
|
|
234
237
|
const client = experimentConfig?.client ?? globals_js_1.DEFAULT_TEST_CLIENT;
|
|
235
238
|
const suiteName = experimentConfig?.testSuiteName ?? testSuiteName;
|
|
@@ -11,7 +11,7 @@ import { randomName } from "../../evaluation/_random_name.js";
|
|
|
11
11
|
import { toBeRelativeCloseTo, toBeAbsoluteCloseTo, toBeSemanticCloseTo, } from "./matchers.js";
|
|
12
12
|
import { evaluatorLogFeedbackPromises, testWrapperAsyncLocalStorageInstance, _logTestFeedback, syncExamplePromises, trackingEnabled, DEFAULT_TEST_CLIENT, } from "./globals.js";
|
|
13
13
|
import { wrapExpect } from "./vendor/chain.js";
|
|
14
|
-
import { getEnvironmentVariable } from "../env.js";
|
|
14
|
+
import { getEnvironmentVariable, isJsDom } from "../env.js";
|
|
15
15
|
import { STRIP_ANSI_REGEX, TEST_ID_DELIMITER, DEFAULT_TEST_TIMEOUT, UUID5_NAMESPACE, } from "./constants.js";
|
|
16
16
|
export function logFeedback(feedback, config) {
|
|
17
17
|
const context = testWrapperAsyncLocalStorageInstance.getStore();
|
|
@@ -183,6 +183,9 @@ export function generateWrapperFromJestlikeMethods(methods, testRunnerName) {
|
|
|
183
183
|
return storageValue;
|
|
184
184
|
}
|
|
185
185
|
function wrapDescribeMethod(method) {
|
|
186
|
+
if (isJsDom()) {
|
|
187
|
+
console.error(`[LANGSMITH]: You seem to be using a jsdom environment. This is not supported and you may experience unexpected behavior. Please set the "environment" or "testEnvironment" field in your test config file to "node".`);
|
|
188
|
+
}
|
|
186
189
|
return function (testSuiteName, fn, experimentConfig) {
|
|
187
190
|
const client = experimentConfig?.client ?? DEFAULT_TEST_CLIENT;
|
|
188
191
|
const suiteName = experimentConfig?.testSuiteName ?? testSuiteName;
|