@@ -276,6 +276,7 @@ def score(
276276 data_type : Optional [Literal ["NUMERIC" , "BOOLEAN" ]] = None ,
277277 comment : Optional [str ] = None ,
278278 config_id : Optional [str ] = None ,
279+ timestamp : Optional [datetime ] = None ,
279280 ) -> None : ...
280281
281282 @overload
@@ -288,6 +289,7 @@ def score(
288289 data_type : Optional [Literal ["CATEGORICAL" ]] = "CATEGORICAL" ,
289290 comment : Optional [str ] = None ,
290291 config_id : Optional [str ] = None ,
292+ timestamp : Optional [datetime ] = None ,
291293 ) -> None : ...
292294
293295 def score (
@@ -299,6 +301,7 @@ def score(
299301 data_type : Optional [ScoreDataType ] = None ,
300302 comment : Optional [str ] = None ,
301303 config_id : Optional [str ] = None ,
304+ timestamp : Optional [datetime ] = None ,
302305 ) -> None :
303306 """Create a score for this specific span.
304307
@@ -312,6 +315,7 @@ def score(
312315 data_type: Type of score (NUMERIC, BOOLEAN, or CATEGORICAL)
313316 comment: Optional comment or explanation for the score
314317 config_id: Optional ID of a score config defined in Langfuse
318+ timestamp: Optional timestamp for the score (defaults to current UTC time)
315319
316320 Example:
317321 ```python
@@ -337,6 +341,7 @@ def score(
337341 data_type = cast (Literal ["CATEGORICAL" ], data_type ),
338342 comment = comment ,
339343 config_id = config_id ,
344+ timestamp = timestamp ,
340345 )
341346
342347 @overload
@@ -349,6 +354,7 @@ def score_trace(
349354 data_type : Optional [Literal ["NUMERIC" , "BOOLEAN" ]] = None ,
350355 comment : Optional [str ] = None ,
351356 config_id : Optional [str ] = None ,
357+ timestamp : Optional [datetime ] = None ,
352358 ) -> None : ...
353359
354360 @overload
@@ -361,6 +367,7 @@ def score_trace(
361367 data_type : Optional [Literal ["CATEGORICAL" ]] = "CATEGORICAL" ,
362368 comment : Optional [str ] = None ,
363369 config_id : Optional [str ] = None ,
370+ timestamp : Optional [datetime ] = None ,
364371 ) -> None : ...
365372
366373 def score_trace (
@@ -372,6 +379,7 @@ def score_trace(
372379 data_type : Optional [ScoreDataType ] = None ,
373380 comment : Optional [str ] = None ,
374381 config_id : Optional [str ] = None ,
382+ timestamp : Optional [datetime ] = None ,
375383 ) -> None :
376384 """Create a score for the entire trace that this span belongs to.
377385
@@ -386,6 +394,7 @@ def score_trace(
386394 data_type: Type of score (NUMERIC, BOOLEAN, or CATEGORICAL)
387395 comment: Optional comment or explanation for the score
388396 config_id: Optional ID of a score config defined in Langfuse
397+ timestamp: Optional timestamp for the score (defaults to current UTC time)
389398
390399 Example:
391400 ```python
@@ -410,6 +419,7 @@ def score_trace(
410419 data_type = cast (Literal ["CATEGORICAL" ], data_type ),
411420 comment = comment ,
412421 config_id = config_id ,
422+ timestamp = timestamp ,
413423 )
414424
415425 def _set_processed_span_attributes (
0 commit comments