diff --git a/js/package.json b/js/package.json index 4b8881b4d..ea27664f6 100644 --- a/js/package.json +++ b/js/package.json @@ -1,6 +1,6 @@ { "name": "langsmith", - "version": "0.2.7", + "version": "0.2.8", "description": "Client library to connect to the LangSmith LLM Tracing and Evaluation Platform.", "packageManager": "yarn@1.22.19", "files": [ diff --git a/js/src/client.ts b/js/src/client.ts index 6e75751bb..54f4a5e27 100644 --- a/js/src/client.ts +++ b/js/src/client.ts @@ -437,7 +437,7 @@ export const DEFAULT_BATCH_SIZE_LIMIT_BYTES = 20_971_520; const SERVER_INFO_REQUEST_TIMEOUT = 1000; -export class Client { +export class Client implements LangSmithTracingClientInterface { private apiKey?: string; private apiUrl: string; @@ -4171,3 +4171,9 @@ export class Client { ]); } } + +export interface LangSmithTracingClientInterface { + createRun: (run: CreateRunParams) => Promise; + + updateRun: (runId: string, run: RunUpdate) => Promise; +} diff --git a/js/src/index.ts b/js/src/index.ts index daf8c12a8..d648d23c5 100644 --- a/js/src/index.ts +++ b/js/src/index.ts @@ -1,4 +1,8 @@ -export { Client, type ClientConfig } from "./client.js"; +export { + Client, + type ClientConfig, + type LangSmithTracingClientInterface, +} from "./client.js"; export type { Dataset, @@ -14,4 +18,4 @@ export { RunTree, type RunTreeConfig } from "./run_trees.js"; export { overrideFetchImplementation } from "./singletons/fetch.js"; // Update using yarn bump-version -export const __version__ = "0.2.7"; +export const __version__ = "0.2.8";