langsmith 0.2.4-dev.0 → 0.2.4

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/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.2.4-dev.0";
11
+ exports.__version__ = "0.2.4";
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.2.4-dev.0";
5
+ export declare const __version__ = "0.2.4";
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.2.4-dev.0";
5
+ export const __version__ = "0.2.4";
package/dist/vercel.cjs CHANGED
@@ -5,6 +5,7 @@ const index_js_1 = require("./index.cjs");
5
5
  const uuid_1 = require("uuid");
6
6
  const traceable_js_1 = require("./singletons/traceable.cjs");
7
7
  const env_js_1 = require("./utils/env.cjs");
8
+ const env_js_2 = require("./env.cjs");
8
9
  // Attempt to convert CoreMessage to a LangChain-compatible format
9
10
  // which allows us to render messages more nicely in LangSmith
10
11
  function convertCoreToSmith(message) {
@@ -223,6 +224,7 @@ class AISDKExporter {
223
224
  this.client = args?.client ?? new index_js_1.Client();
224
225
  this.debug =
225
226
  args?.debug ?? (0, env_js_1.getEnvironmentVariable)("OTEL_LOG_LEVEL") === "DEBUG";
227
+ this.logDebug("creating exporter", { tracingEnabled: (0, env_js_2.isTracingEnabled)() });
226
228
  }
227
229
  static getSettings(settings) {
228
230
  const { runId, runName, ...rest } = settings ?? {};
@@ -232,7 +234,7 @@ class AISDKExporter {
232
234
  if (runName != null)
233
235
  metadata[RUN_NAME_METADATA_KEY.input] = runName;
234
236
  // attempt to obtain the run tree if used within a traceable function
235
- let defaultEnabled = true;
237
+ let defaultEnabled = settings?.isEnabled ?? (0, env_js_2.isTracingEnabled)();
236
238
  try {
237
239
  const runTree = (0, traceable_js_1.getCurrentRunTree)();
238
240
  const headers = runTree.toHeaders();
package/dist/vercel.js CHANGED
@@ -2,6 +2,7 @@ import { Client, RunTree } from "./index.js";
2
2
  import { v5 as uuid5, v4 as uuid4 } from "uuid";
3
3
  import { getCurrentRunTree } from "./singletons/traceable.js";
4
4
  import { getLangSmithEnvironmentVariable, getEnvironmentVariable, } from "./utils/env.js";
5
+ import { isTracingEnabled } from "./env.js";
5
6
  // Attempt to convert CoreMessage to a LangChain-compatible format
6
7
  // which allows us to render messages more nicely in LangSmith
7
8
  function convertCoreToSmith(message) {
@@ -220,6 +221,7 @@ export class AISDKExporter {
220
221
  this.client = args?.client ?? new Client();
221
222
  this.debug =
222
223
  args?.debug ?? getEnvironmentVariable("OTEL_LOG_LEVEL") === "DEBUG";
224
+ this.logDebug("creating exporter", { tracingEnabled: isTracingEnabled() });
223
225
  }
224
226
  static getSettings(settings) {
225
227
  const { runId, runName, ...rest } = settings ?? {};
@@ -229,7 +231,7 @@ export class AISDKExporter {
229
231
  if (runName != null)
230
232
  metadata[RUN_NAME_METADATA_KEY.input] = runName;
231
233
  // attempt to obtain the run tree if used within a traceable function
232
- let defaultEnabled = true;
234
+ let defaultEnabled = settings?.isEnabled ?? isTracingEnabled();
233
235
  try {
234
236
  const runTree = getCurrentRunTree();
235
237
  const headers = runTree.toHeaders();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "langsmith",
3
- "version": "0.2.4-dev.0",
3
+ "version": "0.2.4",
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": [