Documentation
¶
Overview ¶
Package guard implements deterministic and model-based message policy checks.
Index ¶
Constants ¶
View Source
const ( DecisionAllow = "allow" DecisionReview = "review" DecisionDeny = "deny" )
Variables ¶
View Source
var ErrMissingAPIKey = errors.New("guard API key is not configured")
Functions ¶
This section is empty.
Types ¶
type Evaluation ¶
Evaluation adds provider evidence to a model verdict.
type Evaluator ¶
type Evaluator interface {
Evaluate(context.Context, Input) (Evaluation, error)
}
Evaluator checks one message. Errors must fail the caller closed.
type HTTP ¶
type HTTP struct {
// contains filtered or unexported fields
}
HTTP evaluates messages with strict Structured Outputs and no tools.
func NewHTTP ¶
func NewHTTP(cfg HTTPConfig) (*HTTP, error)
type HTTPConfig ¶
type HTTPConfig struct {
Endpoint string
Model string
APIKeyEnv string
PromptCacheRetention string
Timeout time.Duration
Client *http.Client
}
HTTPConfig configures the mandatory Responses API classifier.
Click to show internal directories.
Click to hide internal directories.