Documentation
Table of Contents

Struct GuardrailCheckpoint

Namespace
IntentSharp.Guardrails
Assembly
IntentSharp.dll

A place in an operation where guardrail rules are checked, by name. The names are open: the six built in here are the ones the library raises, and a target or an application may raise a checkpoint of its own and check it with CheckAsync(GuardrailCheckpoint, SubjectValues, IReadOnlyList<string>, CancellationToken). Two checkpoints are equal exactly when their names are equal, compared ordinally (case-sensitive).

public readonly record struct GuardrailCheckpoint : IEquatable<GuardrailCheckpoint>
Implements
Inherited Members
ValueType.Equals(object)
ValueType.GetHashCode()
object.Equals(object, object)
object.GetType()
object.ReferenceEquals(object, object)
Extension Methods

Constructors

GuardrailCheckpoint(string)

A place in an operation where guardrail rules are checked, by name. The names are open: the six built in here are the ones the library raises, and a target or an application may raise a checkpoint of its own and check it with CheckAsync(GuardrailCheckpoint, SubjectValues, IReadOnlyList<string>, CancellationToken). Two checkpoints are equal exactly when their names are equal, compared ordinally (case-sensitive).

Fields

Data

Before a target reads or changes data, with the data.* subjects and the target's own.

Embedding

Before an embedding call, with the embedding.* subjects.

Environment

When a change in the environment is detected, with the environment.* subjects.

Reply

After a reply is read, cached replies included, with the reply.* subjects.

Request

Before a model call, with the request.* subjects.

Tool

When a tool is listed or called, with the tool.* subjects.

Properties

Name

The checkpoint's name; never empty for a checkpoint created with the constructor.

Methods

ToString()

Returns Name.