Documentation
¶
Overview ¶
nolint:lll
Index ¶
Constants ¶
View Source
const VerificationSystemPrompt = `` /* 1256-byte string literal not displayed */
View Source
const VerificationUserPrompt = `` /* 1015-byte string literal not displayed */
Variables ¶
View Source
var EmbeddedAgentRules embed.FS
Functions ¶
func GetEmbeddedAgentRule ¶
GetEmbeddedAgentRule returns the content of an embedded agent rule file. The ruleID is converted to a filename by replacing "/" with "-" and appending ".md". For example: "datadog/go-cmdi" -> "datadog-go-cmdi.md"
Types ¶
type AgentOption ¶
type DetectionAgent ¶
type DetectionAgent struct {
// contains filtered or unexported fields
}
func NewDetectionAgent ¶
func NewDetectionAgent(ctx context.Context, agentOption *AgentOption) (*DetectionAgent, error)
func (*DetectionAgent) Detect ¶
func (agent *DetectionAgent) Detect(ctx context.Context, scanData *model.ScanData) (*DetectionResult, error)
func (*DetectionAgent) VerifyViolation ¶
func (agent *DetectionAgent) VerifyViolation(ctx context.Context, scanData *model.ScanData, violation model.LLMResultViolation) (*VerificationResult, error)
type DetectionResult ¶
type VerificationResult ¶
type VerificationResult struct {
VerificationResultData
InputTokens int32 `json:"input_tokens"`
OutputTokens int32 `json:"output_tokens"`
}
type VerificationResultData ¶
Click to show internal directories.
Click to hide internal directories.