llm

package
v0.20.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 13, 2026 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type LLMClient

type LLMClient interface {
	// SummarizeReport generates a concise, prioritised summary of an audit report.
	SummarizeReport(ctx context.Context, req SummaryRequest) (*SummaryResponse, error)

	// IsAvailable returns true when the LLM backend is configured and reachable.
	// Use this to gate LLM calls and provide graceful degradation.
	IsAvailable(ctx context.Context) bool
}

LLMClient is the interface for all AI-assisted operations. Implementations are optional; the engine functions correctly without one.

The LLM must never:

  • Execute shell commands
  • Control program flow
  • Make AWS SDK calls
  • Generate executable code dynamically

The LLM is only for summarization, prioritization, and report generation.

type SummaryRequest

type SummaryRequest struct {
	// Report is the structured audit output to summarise.
	Report *models.AuditReport

	// MaxWords is an advisory limit on the generated summary length.
	MaxWords int
}

SummaryRequest asks the LLM to produce a human-readable summary of a completed audit report.

type SummaryResponse

type SummaryResponse struct {
	Summary    string `json:"summary"`
	TokensUsed int    `json:"tokens_used"`
}

SummaryResponse contains the generated summary and usage metadata.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL