langsmith 0.1.40 → 0.1.41

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
@@ -1263,7 +1263,7 @@ class Client {
1263
1263
  }
1264
1264
  throw new Error("No projects found to resolve tenant.");
1265
1265
  }
1266
- async *listProjects({ projectIds, name, nameContains, referenceDatasetId, referenceDatasetName, referenceFree, } = {}) {
1266
+ async *listProjects({ projectIds, name, nameContains, referenceDatasetId, referenceDatasetName, referenceFree, metadata, } = {}) {
1267
1267
  const params = new URLSearchParams();
1268
1268
  if (projectIds !== undefined) {
1269
1269
  for (const projectId of projectIds) {
@@ -1288,6 +1288,9 @@ class Client {
1288
1288
  if (referenceFree !== undefined) {
1289
1289
  params.append("reference_free", referenceFree.toString());
1290
1290
  }
1291
+ if (metadata !== undefined) {
1292
+ params.append("metadata", JSON.stringify(metadata));
1293
+ }
1291
1294
  for await (const projects of this._getPaginated("/sessions", params)) {
1292
1295
  yield* projects;
1293
1296
  }
@@ -2328,12 +2331,14 @@ class Client {
2328
2331
  async pushPrompt(promptIdentifier, options) {
2329
2332
  // Create or update prompt metadata
2330
2333
  if (await this.promptExists(promptIdentifier)) {
2331
- await this.updatePrompt(promptIdentifier, {
2332
- description: options?.description,
2333
- readme: options?.readme,
2334
- tags: options?.tags,
2335
- isPublic: options?.isPublic,
2336
- });
2334
+ if (options && Object.keys(options).some((key) => key !== "object")) {
2335
+ await this.updatePrompt(promptIdentifier, {
2336
+ description: options?.description,
2337
+ readme: options?.readme,
2338
+ tags: options?.tags,
2339
+ isPublic: options?.isPublic,
2340
+ });
2341
+ }
2337
2342
  }
2338
2343
  else {
2339
2344
  await this.createPrompt(promptIdentifier, {
package/dist/client.d.ts CHANGED
@@ -365,13 +365,14 @@ export declare class Client {
365
365
  datasetName?: string;
366
366
  }): Promise<string>;
367
367
  private _getTenantId;
368
- listProjects({ projectIds, name, nameContains, referenceDatasetId, referenceDatasetName, referenceFree, }?: {
368
+ listProjects({ projectIds, name, nameContains, referenceDatasetId, referenceDatasetName, referenceFree, metadata, }?: {
369
369
  projectIds?: string[];
370
370
  name?: string;
371
371
  nameContains?: string;
372
372
  referenceDatasetId?: string;
373
373
  referenceDatasetName?: string;
374
374
  referenceFree?: boolean;
375
+ metadata?: RecordStringAny;
375
376
  }): AsyncIterable<TracerSession>;
376
377
  deleteProject({ projectId, projectName, }: {
377
378
  projectId?: string;
package/dist/client.js CHANGED
@@ -1236,7 +1236,7 @@ export class Client {
1236
1236
  }
1237
1237
  throw new Error("No projects found to resolve tenant.");
1238
1238
  }
1239
- async *listProjects({ projectIds, name, nameContains, referenceDatasetId, referenceDatasetName, referenceFree, } = {}) {
1239
+ async *listProjects({ projectIds, name, nameContains, referenceDatasetId, referenceDatasetName, referenceFree, metadata, } = {}) {
1240
1240
  const params = new URLSearchParams();
1241
1241
  if (projectIds !== undefined) {
1242
1242
  for (const projectId of projectIds) {
@@ -1261,6 +1261,9 @@ export class Client {
1261
1261
  if (referenceFree !== undefined) {
1262
1262
  params.append("reference_free", referenceFree.toString());
1263
1263
  }
1264
+ if (metadata !== undefined) {
1265
+ params.append("metadata", JSON.stringify(metadata));
1266
+ }
1264
1267
  for await (const projects of this._getPaginated("/sessions", params)) {
1265
1268
  yield* projects;
1266
1269
  }
@@ -2301,12 +2304,14 @@ export class Client {
2301
2304
  async pushPrompt(promptIdentifier, options) {
2302
2305
  // Create or update prompt metadata
2303
2306
  if (await this.promptExists(promptIdentifier)) {
2304
- await this.updatePrompt(promptIdentifier, {
2305
- description: options?.description,
2306
- readme: options?.readme,
2307
- tags: options?.tags,
2308
- isPublic: options?.isPublic,
2309
- });
2307
+ if (options && Object.keys(options).some((key) => key !== "object")) {
2308
+ await this.updatePrompt(promptIdentifier, {
2309
+ description: options?.description,
2310
+ readme: options?.readme,
2311
+ tags: options?.tags,
2312
+ isPublic: options?.isPublic,
2313
+ });
2314
+ }
2310
2315
  }
2311
2316
  else {
2312
2317
  await this.createPrompt(promptIdentifier, {
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.40";
9
+ exports.__version__ = "0.1.41";
package/dist/index.d.ts CHANGED
@@ -1,4 +1,4 @@
1
1
  export { Client } 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.40";
4
+ export declare const __version__ = "0.1.41";
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.40";
4
+ export const __version__ = "0.1.41";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "langsmith",
3
- "version": "0.1.40",
3
+ "version": "0.1.41",
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": [