Function llm_call_end
Function llm_call_end
Generated from cargo doc --no-deps -p nemo-relay -p nemo-relay-adaptive -p nemo-relay-ffi.
pub fn llm_call_end(params: LlmCallEndParams<'_>) -> Result<()>
Finish a manual LLM lifecycle span.
This emits an LLM-end event for a handle previously returned by llm_call.
Parameters
handle: LLM handle to close.response: Raw provider response associated with the end event.data: Optional application payload retained for compatibility. The emitted end event data is the sanitizedresponseunless it sanitizes to JSON null, in which case this payload is used.metadata: Optional JSON metadata recorded on the end event.annotated_response: Optional normalized response annotation produced by a response codec. When omitted andresponse_codecis supplied, the annotation is decoded from the sanitized end-event payload.response_codec: Optional response codec used to produce a normalized response annotation from the sanitized end-event payload.timestamp: Optional timestamp recorded on the emitted end event. WhenNone, the runtime uses the current UTC time, or one microsecond after the handle start time if the current time is not later.
Returns
A Result that is Ok(()) when the end event has been emitted.
Errors
Returns an error when the runtime owner check fails, internal state cannot be read safely, or response codec decoding fails.
Notes
Sanitize-response guardrails affect only the emitted end-event payload, not the caller-owned response value.