本頁面由機器翻譯。閱讀英文原文。

Component

core/security/nemo-guardrails

NVIDIA NeMo Guardrails' server as a guard in a model's path: a service speaking the OpenAI chat-completions API that checks each request against its input rail, forwards what it admits to the upstream model API in infra.upstream_endpoint, and returns the upstream's answer, streamed or not. A request the rail refuses is answered by the guard itself with an ordinary completion, and nothing of it reaches the upstream. The rail sends the latest user message to the detector wired on the detector socket and refuses the request when the detector reports one of values.blocked_labels at or above values.threshold; a detector that cannot be reached, or answers with an error, refuses the request too. It judges the latest user message alone. Its verdict is a probabilistic classifier's: it misses some attacks, refuses some legitimate requests and is known to be evadable. Only a flow in its configuration, redefining the product's own, keeps a request body from switching the rail off, and that closure has to be proved again for any image or flow it was not proved on. NVIDIA's NemoGuard models add rails on the content_safety and jailbreak_detection sockets; the jailbreak rail admits a request when its classifier is unreachable. It authenticates no caller, and with no credential attached to its upstream_key slot a caller can reach the upstream on a credential of its own. The Release supplies the image in infra.image and the catalog names none: TrustyAI's published build carries NLTK's punkt tokenizer model, whose licence is unresolved upstream, and is published only under a floating tag, whose superseded digests stop resolving. Nothing renders until the Release sets `infra.image`.

出處

官方由本目錄認可為官方發布者的簽署身分所簽署。
內容摘要
sha256:f871e845d92afd93e2d6d8c7fc6a9b33f86abbcfe1730cc89aab9d44fb3f2721
發布時間
2026-11-10T10:13:39Z
簽署身分
https://token.actions.githubusercontent.com/https://github.com/aggrega-ai/aggrega-hub/.github/workflows/catalog-publish-sign.yml@refs/heads/main

簽章

  • 官方application/vnd.dev.sigstore.bundle.v0.3+json

    https://token.actions.githubusercontent.com/https://github.com/aggrega-ai/aggrega-hub/.github/workflows/catalog-publish-sign.yml@refs/heads/main

    sha256:4a2b09d9b13c5c2efc29928cc9bd5abc2304b72043e199a4b9ffddab6eb8b06e

此版本的參照

oci://hub.aggrega.ai/component/core/security/nemo-guardrails:1.0.0

開發者參數

開發者在 Aggregate 中設定的值。

名稱型別預設必填描述
thresholdnumber (min 0, max 1)0.5否Probability at or above which a label the detector reports refuses the request. Measured with the detector's default model, which scores most texts close to 0 or close to 1: at 0.5 the guard refuses plain attempts to override a model's instructions; at 0.001 it also refuses an override respelled in leetspeak, which the model scores near 0.008, and with it some ordinary requests the model scores low but not near zero. At either value it refuses the ordinary requests the model scores close to 1, and serves attacks it scores close to 0. Those two numbers hold for that model only, and are measured again for any other.
blocked_labelsarray (min 1)INJECTION否Labels of the detector's classifier that refuse a request when reported at or above the threshold. The default is the label the detector's default model gives an attempt to override a model's instructions; another model labels by its own vocabulary, which this list follows. It may not be empty, because a guard refusing on no label forwards everything.

操作員資源規格

操作員依各環境調整的基礎架構資源規格。

名稱型別預設必填描述
portinteger (min 1024, max 65535)8000否Port the guard listens on and its Service accepts callers on. Most operators should omit this and let the Recipe assign the default (8000), the port the published image listens on unless told otherwise.
upstream_endpointstring—是Base URL of the OpenAI-compatible model API the guard forwards the requests it admits to, with its API path, for example http://model-server:8000/v1. A deterministic pointer string the guard resolves when it forwards; the compiler never contacts it. The request is forwarded under the model name the caller asked for.
imagestring—是Image the guard runs, supplied by the Release; the catalog names none. The Recipes run the published build's own start-up and paths, so the image is TrustyAI's NeMo Guardrails server or a copy of it. That build carries a data package whose licence is unresolved upstream and is tagged only as latest, under which the registry stops serving a build once the tag moves on, so a Release that must keep one build mirrors it and names the copy here. The guard's refusal of a request-body switch was proved on one build, and is proved again for any other image.
computeobject—否—

輸出契約

此元件透過 uses 拓撲向使用端發布的值。

名稱型別預設必填描述
hoststring—是In-cluster DNS name of the Service fronting the guard. Every caller reaching this name can send requests through the guard, so it is an address for the component routing model traffic through it rather than one to publish.
portinteger—是TCP port that Service accepts callers on. It follows the port an operator set in the Release, so a consumer reads it rather than assuming a default.
endpointstring—是Base URL of the OpenAI-compatible API the guard serves, with the host, the port and the API path already composed. A consumer hands it to a client library as its base URL, and sends chat completions to it.
protocolstring—否URL scheme to reach `host` and `port` over, for a consumer composing its own address rather than reading `endpoint`.
thresholdnumber—是values.threshold, the probability at or above which a label the detector reports refuses the request.

Uses 插槽

此元件用來連線的相依插槽。經由插槽連接的每個連線,其目標都必須符合該插槽的標籤選擇器,且每個連線可在該插槽宣告的槽位中帶有附加項目。Aggregate 或 Release 經由該插槽連接的每個連線,都必須提供必填槽位。

detector

選擇器
security.aggrega.ai/text-detection=detector
注入
—

此插槽未宣告任何附加槽位,因此經由它的連線不帶任何附加項目。

content_safety

選擇器
component.aggrega.ai/category=ai-model, model.aggrega.ai/api=openai
注入
—

此插槽未宣告任何附加槽位,因此經由它的連線不帶任何附加項目。

jailbreak_detection

選擇器
component.aggrega.ai/category=security
注入
—

此插槽未宣告任何附加槽位,因此經由它的連線不帶任何附加項目。

附加槽位

Feature 附加到此元件的具名繫結點。槽位的選擇器限制哪個 Feature 可以填入該槽位,其注入清單則指明該 Feature 的內容可以如何傳遞。必填槽位必須在每個實例上繫結,方式是在該實例上或其上層範圍中附加項目;敏感槽位則宣告用於處理機密內容。Feature 也可以附加在沒有任何槽位宣告的名稱之下。

槽位選擇器必填注入敏感描述
upstream_keyfeature.aggrega.ai/kind=secret否env是Optional credential the guard presents to the upstream model API as a bearer token. Attached, every forwarded request carries it, whatever the caller sends. Unattached, the guard holds no upstream credential, which suits an upstream that asks for none: the product then sends a fixed placeholder in its place, which an upstream requiring a key refuses, or passes a caller's X-Authorization header on as the credential when the caller sends one.

自我注入允許清單

未宣告任何自我注入管道。

關係

與其他已發布實體之間具型別的邊。沒有已發布目標的參照,會渲染為中斷的邊,而不是連結。

使用

被使用於

Component 概念參考

Aggrega 目錄:元件、功能、配方,以及負責渲染它們的外掛程式的開放索引。

以共用的 Aggrega 設計系統建置。

隱私權