langsmith
Advanced tools
Comparing version 0.1.56 to 0.1.57
@@ -5,2 +5,2 @@ export { Client, type ClientConfig } from "./client.js"; | ||
export { overrideFetchImplementation } from "./singletons/fetch.js"; | ||
export declare const __version__ = "0.1.56"; | ||
export declare const __version__ = "0.1.57"; |
@@ -5,2 +5,2 @@ export { Client } from "./client.js"; | ||
// Update using yarn bump-version | ||
export const __version__ = "0.1.56"; | ||
export const __version__ = "0.1.57"; |
@@ -52,2 +52,3 @@ import { BaseRun, KVMap, RunCreate } from "./schemas.js"; | ||
export declare class RunTree implements BaseRun { | ||
private static sharedClient; | ||
id: string; | ||
@@ -77,2 +78,3 @@ name: RunTreeConfig["name"]; | ||
private static getDefaultConfig; | ||
private static getSharedClient; | ||
createChild(config: RunTreeConfig): RunTree; | ||
@@ -79,0 +81,0 @@ end(outputs?: KVMap, error?: string, endTime?: number): Promise<void>; |
@@ -198,3 +198,3 @@ import * as uuid from "uuid"; | ||
const { metadata, ...config } = originalConfig; | ||
const client = config.client ?? new Client(); | ||
const client = config.client ?? RunTree.getSharedClient(); | ||
const dedupedMetadata = { | ||
@@ -244,2 +244,8 @@ ...metadata, | ||
} | ||
static getSharedClient() { | ||
if (!RunTree.sharedClient) { | ||
RunTree.sharedClient = new Client(); | ||
} | ||
return RunTree.sharedClient; | ||
} | ||
createChild(config) { | ||
@@ -456,2 +462,8 @@ const child_execution_order = this.child_execution_order + 1; | ||
} | ||
Object.defineProperty(RunTree, "sharedClient", { | ||
enumerable: true, | ||
configurable: true, | ||
writable: true, | ||
value: null | ||
}); | ||
export function isRunTree(x) { | ||
@@ -458,0 +470,0 @@ return (x !== undefined && |
{ | ||
"name": "langsmith", | ||
"version": "0.1.56", | ||
"version": "0.1.57", | ||
"description": "Client library to connect to the LangSmith LLM Tracing and Evaluation Platform.", | ||
@@ -5,0 +5,0 @@ "packageManager": "yarn@1.22.19", |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
645430
17151