langsmith 0.1.59 → 0.1.60

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
@@ -273,8 +273,14 @@ class Client {
273
273
  const defaultConfig = Client.getDefaultClientConfig();
274
274
  this.tracingSampleRate = getTracingSamplingRate();
275
275
  this.apiUrl = trimQuotes(config.apiUrl ?? defaultConfig.apiUrl) ?? "";
276
+ if (this.apiUrl.endsWith("/")) {
277
+ this.apiUrl = this.apiUrl.slice(0, -1);
278
+ }
276
279
  this.apiKey = trimQuotes(config.apiKey ?? defaultConfig.apiKey);
277
280
  this.webUrl = trimQuotes(config.webUrl ?? defaultConfig.webUrl);
281
+ if (this.webUrl?.endsWith("/")) {
282
+ this.webUrl = this.webUrl.slice(0, -1);
283
+ }
278
284
  this.timeout_ms = config.timeout_ms ?? 12_000;
279
285
  this.caller = new async_caller_js_1.AsyncCaller(config.callerOptions ?? {});
280
286
  this.batchIngestCaller = new async_caller_js_1.AsyncCaller({
@@ -504,7 +510,7 @@ class Client {
504
510
  const itemPromise = this.autoBatchQueue.push(item);
505
511
  if (immediatelyTriggerBatch ||
506
512
  this.autoBatchQueue.size > this.pendingAutoBatchedRunLimit) {
507
- await this.drainAutoBatchQueue();
513
+ await this.drainAutoBatchQueue().catch(console.error);
508
514
  }
509
515
  if (this.autoBatchQueue.size > 0) {
510
516
  this.autoBatchTimeout = setTimeout(() => {
package/dist/client.js CHANGED
@@ -246,8 +246,14 @@ export class Client {
246
246
  const defaultConfig = Client.getDefaultClientConfig();
247
247
  this.tracingSampleRate = getTracingSamplingRate();
248
248
  this.apiUrl = trimQuotes(config.apiUrl ?? defaultConfig.apiUrl) ?? "";
249
+ if (this.apiUrl.endsWith("/")) {
250
+ this.apiUrl = this.apiUrl.slice(0, -1);
251
+ }
249
252
  this.apiKey = trimQuotes(config.apiKey ?? defaultConfig.apiKey);
250
253
  this.webUrl = trimQuotes(config.webUrl ?? defaultConfig.webUrl);
254
+ if (this.webUrl?.endsWith("/")) {
255
+ this.webUrl = this.webUrl.slice(0, -1);
256
+ }
251
257
  this.timeout_ms = config.timeout_ms ?? 12_000;
252
258
  this.caller = new AsyncCaller(config.callerOptions ?? {});
253
259
  this.batchIngestCaller = new AsyncCaller({
@@ -477,7 +483,7 @@ export class Client {
477
483
  const itemPromise = this.autoBatchQueue.push(item);
478
484
  if (immediatelyTriggerBatch ||
479
485
  this.autoBatchQueue.size > this.pendingAutoBatchedRunLimit) {
480
- await this.drainAutoBatchQueue();
486
+ await this.drainAutoBatchQueue().catch(console.error);
481
487
  }
482
488
  if (this.autoBatchQueue.size > 0) {
483
489
  this.autoBatchTimeout = setTimeout(() => {
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.59";
11
+ exports.__version__ = "0.1.60";
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.59";
5
+ export declare const __version__ = "0.1.60";
package/dist/index.js CHANGED
@@ -2,4 +2,4 @@ export { Client } from "./client.js";
2
2
  export { RunTree } from "./run_trees.js";
3
3
  export { overrideFetchImplementation } from "./singletons/fetch.js";
4
4
  // Update using yarn bump-version
5
- export const __version__ = "0.1.59";
5
+ export const __version__ = "0.1.60";
package/dist/schemas.d.ts CHANGED
@@ -317,7 +317,7 @@ export type RetrieverOutput = Array<{
317
317
  export interface InvocationParamsSchema {
318
318
  ls_provider?: string;
319
319
  ls_model_name?: string;
320
- ls_model_type: "chat" | "text";
320
+ ls_model_type: "chat" | "llm";
321
321
  ls_temperature?: number;
322
322
  ls_max_tokens?: number;
323
323
  ls_stop?: string[];
@@ -179,7 +179,7 @@ const wrapOpenAI = (openai, options) => {
179
179
  undefined;
180
180
  return {
181
181
  ls_provider: "openai",
182
- ls_model_type: "text",
182
+ ls_model_type: "llm",
183
183
  ls_model_name: params.model,
184
184
  ls_max_tokens: params.max_tokens ?? undefined,
185
185
  ls_temperature: params.temperature ?? undefined,
@@ -176,7 +176,7 @@ export const wrapOpenAI = (openai, options) => {
176
176
  undefined;
177
177
  return {
178
178
  ls_provider: "openai",
179
- ls_model_type: "text",
179
+ ls_model_type: "llm",
180
180
  ls_model_name: params.model,
181
181
  ls_max_tokens: params.max_tokens ?? undefined,
182
182
  ls_temperature: params.temperature ?? undefined,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "langsmith",
3
- "version": "0.1.59",
3
+ "version": "0.1.60",
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": [