Function llm_call
Function llm_call
Generated from cargo doc --no-deps -p nemo-relay -p nemo-relay-adaptive -p nemo-relay-ffi.
pub fn llm_call(params: LlmCallParams<'_>) -> Result<LlmHandle>
Start a manual LLM lifecycle span.
This emits an LLM-start event after applying sanitize-request guardrails to the payload recorded for observability.
Parameters
name: Logical provider or model family name recorded on the span.request: RawLlmRequestassociated with the span.parent: Optional explicit parent scope.attributes: LLM attribute bitflags applied to the span.data: Optional application payload stored on the returned handle. The emitted start event data is the sanitizedrequestpayload.metadata: Optional JSON metadata recorded on the start event.model_name: Optional normalized model name recorded separately from the request payload.annotated_request: Optional normalized request annotation produced by a codec.timestamp: Optional timestamp recorded as the handle start time and on the emitted start event. WhenNone, the current UTC time is used.
Returns
A Result containing the created LlmHandle.
Errors
Returns an error when the runtime owner check fails or when internal state cannot be read safely.
Notes
Sanitize-request guardrails affect only the emitted start-event payload, not the caller-owned LlmRequest.