ai

package
v1.8.0 Latest Latest
Warning

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

Go to latest
Published: Sep 3, 2026 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CopilotResult

type CopilotResult struct {
	Language    string `json:"language"`
	Code        string `json:"code"`
	Explanation string `json:"explanation"`
}

type FixSuggestion

type FixSuggestion struct {
	Explanation string  `json:"explanation"`
	Description string  `json:"description,omitempty"`
	FixAction   string  `json:"fix_action"` // "update_mapping", "add_node", "change_config"
	ConfigPatch any     `json:"config_patch,omitempty"`
	Confidence  float64 `json:"confidence"`
	AutoFixable bool    `json:"auto_fixable"`
}

type PerformanceRecommendation

type PerformanceRecommendation struct {
	WorkflowID  string   `json:"workflow_id"`
	Bottlenecks []string `json:"bottlenecks"`
	Suggestions []string `json:"suggestions"`
	Score       float64  `json:"score"` // 0-100
}

type SchemaImpact

type SchemaImpact struct {
	Breaking      bool     `json:"breaking"`
	ImpactedNodes []string `json:"impacted_nodes"`
	Suggestion    string   `json:"suggestion"`
}

type SelfHealingService

type SelfHealingService struct {
	// contains filtered or unexported fields
}

func NewSelfHealingService

func NewSelfHealingService(logger hermod.Logger) *SelfHealingService

func (*SelfHealingService) AnalyzeError

func (s *SelfHealingService) AnalyzeError(ctx context.Context, workflowID string, nodeID string, errStr string, sampleData any) (*FixSuggestion, error)

func (*SelfHealingService) AnalyzeSchemaChange

func (s *SelfHealingService) AnalyzeSchemaChange(ctx context.Context, oldSchema, newSchema map[string]any, workflowID string) (*SchemaImpact, error)

func (*SelfHealingService) AnalyzeWorkflow

AnalyzeWorkflow provides holistic performance and configuration recommendations for a workflow.

func (*SelfHealingService) GenerateLogic

func (s *SelfHealingService) GenerateLogic(ctx context.Context, prompt string) (*CopilotResult, error)

func (*SelfHealingService) GenerateWorkflow

func (s *SelfHealingService) GenerateWorkflow(ctx context.Context, prompt string) (any, error)

func (*SelfHealingService) SuggestMapping

func (s *SelfHealingService) SuggestMapping(ctx context.Context, sourceData map[string]any, targetSchema map[string]any) (string, error)

SuggestMapping analyzes source data and a target schema to suggest field mappings.

Jump to

Keyboard shortcuts

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