createGenerationSpan
function createGenerationSpan(options?, parent?): Span<GenerationSpanData>
Create a new generation span. The span will not be started automatically, you should either
use withGenerationSpan()
or call span.start()
and span.end()
manually.
This span captures the details of a model generation, including input/output message
sequences, model information, and usage data. If you only need to capture a model response
identifier, consider using createResponseSpan()
instead.
Parameters
Section titled “Parameters”Parameter | Type |
---|---|
|
|
|
Returns
Section titled “Returns”Span
<GenerationSpanData
>