Documentation
¶
Overview ¶
Package ai provides AI-powered enhancements for Nexlayer configurations
Index ¶
- type EnhancementIssue
- type EnhancementResult
- type Enhancer
- func (e *Enhancer) Enhance(ctx context.Context, config *yaml.NexlayerYAML, detectionDir string) (*EnhancementResult, error)
- func (e *Enhancer) EnhanceAsync(ctx context.Context, config *yaml.NexlayerYAML, detectionDir string) (<-chan *EnhancementResult, <-chan error)
- func (e *Enhancer) Shutdown(ctx context.Context)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type EnhancementIssue ¶
type EnhancementIssue struct {
Type string // Type of issue: "error", "warning", "suggestion"
Field string // The field with the issue
Message string // Description of the issue
Suggestions []string // Suggestions to fix the issue
}
EnhancementIssue represents a single issue detected during enhancement
type EnhancementResult ¶
type EnhancementResult struct {
ImprovedConfig *yaml.NexlayerYAML
Comments map[string]string
DetectionResult *detection.DetectionResult
Issues []EnhancementIssue
Suggestions []string
EnhancementTime time.Duration
}
EnhancementResult contains the results of an enhancement operation
type Enhancer ¶
type Enhancer struct {
// contains filtered or unexported fields
}
Enhancer provides AI-powered enhancements for Nexlayer configurations
func NewEnhancer ¶
func NewEnhancer(llmEnricher *knowledge.LLMEnricher, detectionMgr *detection.DetectionManager) *Enhancer
NewEnhancer creates a new AI Enhancer with the provided LLM enricher
func (*Enhancer) Enhance ¶
func (e *Enhancer) Enhance(ctx context.Context, config *yaml.NexlayerYAML, detectionDir string) (*EnhancementResult, error)
Enhance enhances a configuration
func (*Enhancer) EnhanceAsync ¶
func (e *Enhancer) EnhanceAsync(ctx context.Context, config *yaml.NexlayerYAML, detectionDir string) (<-chan *EnhancementResult, <-chan error)
EnhanceAsync enhances a configuration asynchronously
Click to show internal directories.
Click to hide internal directories.