Skip to navigation

Generated from cargo doc --no-deps -p nemo-relay-builtins -p nemo-relay-diagnostics -p nemo-relay-logging -p nemo-relay-plugin-host -p nemo-relay-codecs -p nemo-relay -p nemo-relay-runtime -p nemo-relay-model-pricing -p nemo-relay-resource-metrics -p nemo-relay-observability -p nemo-relay-adaptive -p nemo-relay-pii-redaction -p nemo-relay-ffi -p nemo-relay-types -p nemo-relay-plugin -p nemo-relay-worker-proto -p nemo-relay-worker.

The public Rust SDK for NeMo Relay.

Instrument through scope, tool, and llm, register middleware through registry, and observe events through subscriber or exporter. Shared request, response, error, and codec contracts are re-exported directly. Bindings and component implementations use their owning crates and the execution engine in nemo-relay-runtime instead of depending on this SDK.

Re-exports

  • pub use nemo_relay_logging as logging;

Modules

  • codec: Normalized LLM request and response data types. Shared normalized LLM request and response data types.
  • config_editor: Typed configuration editor metadata. Typed configuration editor metadata.
  • context: Task, thread, and distributed request context propagation. Opaque scope ownership and propagation across tasks and threads.
  • diagnostics: Diagnostic collection, configuration, inspection, and shared evidence contracts. Diagnostic ownership, collection, and inspection for Rust applications.
  • error: Shared errors returned by the runtime and first-party components. Error types for the NeMo Relay runtime.
  • event: Canonical lifecycle events and normalized LLM accessors.
  • exporter: Runtime-bound exporter constructors and their configuration contracts.
  • llm: Managed and manual LLM calls.
  • middleware: Shared middleware callback, stream, and invocation-context contracts.
  • optimization: Adaptive contribution recording for Rust integrations. Plugin-neutral evidence recording for managed LLM calls. Managed, bounded LLM optimization accounting.
  • plugin: Plugin contracts, configuration, and activation.
  • registry: Global and scope-local middleware registration.
  • resource_metrics: Structured resource measurements and on-demand collection.
  • scope: Scope lifecycle and event emission.
  • subscriber: Lifecycle event subscriptions and delivery barriers.
  • tool: Managed and manual tool calls.

Macros

Structs

  • AnnotatedLlmRequest: Structured view of an LLM request, produced by a Codec from opaque LlmRequest content.
  • AnnotatedLlmResponse: Structured view of an LLM response, produced by a response codec from raw JSON API output.
  • ExecutionOptions: Stage options for managed calls. Choose which middleware stages run for one managed call.
  • LlmRequest: JSON-shaped LLM request payload passed through the runtime.
  • Usage: Token usage statistics from an LLM API response.

Enums

  • Event: Tagged union covering the two ATOF event kinds emitted by the runtime.
  • FlowError: The error type for all NeMo Relay runtime operations.
  • NormalizedStreamEvent: Provider-neutral incremental stream item used by cross-protocol transcoders.

Traits

Functions

Type Aliases

  • Json: Type alias for serde_json::Value, used as the universal JSON representation throughout NeMo Relay APIs.
  • Result: A specialized Result type for NeMo Relay operations.