langsmith-sdk icon indicating copy to clipboard operation
langsmith-sdk copied to clipboard

`BaseRun.start_time` and `BaseRun.end_time` should be strings

Open davidfant opened this issue 9 months ago • 0 comments

Today I used patch-package to patch [email protected] for the project I'm working on. start/end time from the API is an ISO string, not a number

Here is the diff that solved my problem:

diff --git a/node_modules/langsmith/dist/schemas.d.ts b/node_modules/langsmith/dist/schemas.d.ts
index 189a1cd..80d53ae 100644
--- a/node_modules/langsmith/dist/schemas.d.ts
+++ b/node_modules/langsmith/dist/schemas.d.ts
@@ -39,11 +39,11 @@ export interface BaseRun {
     /** A human-readable name for the run. */
     name: string;
     /** The epoch time at which the run started, if available. */
-    start_time?: number;
+    start_time?: string;
     /** Specifies the type of run (tool, chain, llm, etc.). */
     run_type: string;
     /** The epoch time at which the run ended, if applicable. */
-    end_time?: number;
+    end_time?: string;
     /** Any additional metadata or settings for the run. */
     extra?: KVMap;
     /** Error message, captured if the run faces any issues. */

This issue body was partially generated by patch-package.

davidfant avatar Apr 30 '24 08:04 davidfant