Skip to navigation

nemoguardrails.server.experimental.provider.types

View as MarkdownOpen in Claude

Define provider-neutral values shared by the guarded proxy pipeline.

Module Contents

Classes

NameDescription
GuardedMessageRepresent one message inspected by input or output rails.
UnknownContentFieldPolicyControl whether unreviewed fields may accompany guarded content.

Data

JsonObject

API

class nemoguardrails.server.experimental.provider.types.GuardedMessage(
role: typing.Literal['user', 'assistant'],
content: str
)
Dataclass

Represent one message inspected by input or output rails.

content
str
role
Literal['user', 'assistant']
nemoguardrails.server.experimental.provider.types.GuardedMessage.__post_init__() -> None

Reject roles and content that the checker boundary does not define.

class nemoguardrails.server.experimental.provider.types.UnknownContentFieldPolicy

Bases: enum.Enum

Control whether unreviewed fields may accompany guarded content.

ALLOW
= 'allow'
FORBID
= 'forbid'
nemoguardrails.server.experimental.provider.types.JsonObject = dict[str, Any]