withResponseSpan
const withResponseSpan: <TOutput>(fn, options?, parent?) => Promise<TOutput>;
Create a new response span and automatically start and end it.
This span captures the details of a model response, primarily the response identifier.
If you need to capture detailed generation information such as input/output messages,
model configuration, or usage data, use generationSpan()
instead.
Type Parameters
Section titled “Type Parameters”Type Parameter |
---|
|
Parameters
Section titled “Parameters”Parameter | Type |
---|---|
|
( |
|
|
|
Returns
Section titled “Returns”Promise
<TOutput
>