langfuse/langfuse-python

Add end() method to spans and generations

Closed this issue · 4 comments

Users want to be able to quickly end spans and generations.

generation = langfuse.generation(...)
generation.end()

  • For StatefulGenerationClient and StatefulSpanClient, add end() methods, send endTime to the Langfuse server. Under the hood, they can use the existing update functions.
  • Create test coverage for both of the functions

Should this method still accept the update body excluding the endTime (optionally)?

Should this method still accept the update body excluding the endTime (optionally)?

You mean it should take an object that takes everything except the endTime? Sure, we can do this.

@marcklingen @maxdeichmann This function is added!

It can be closed now @maxdeichmann