tuning

package
v1.99.0 Latest Latest
Warning

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

Go to latest
Published: Jul 6, 2026 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Overview

Package tuning provides AI tuning capabilities for the platform.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type PromptConfig

type PromptConfig struct {
	PromptsDir string
}

PromptConfig configures prompt management.

type PromptManager

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

PromptManager manages prompt resources.

func NewPromptManager

func NewPromptManager(cfg PromptConfig) *PromptManager

NewPromptManager creates a new prompt manager.

func (*PromptManager) All

func (m *PromptManager) All() map[string]string

All returns all prompts.

func (*PromptManager) Get

func (m *PromptManager) Get(name string) (string, bool)

Get retrieves a prompt by name.

func (*PromptManager) LoadPrompts

func (m *PromptManager) LoadPrompts() error

LoadPrompts loads prompts from the configured directory.

func (*PromptManager) Set

func (m *PromptManager) Set(name, content string)

Set sets a prompt.

type RuleEngine

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

RuleEngine evaluates rules against actions.

func NewRuleEngine

func NewRuleEngine(rules *Rules) *RuleEngine

NewRuleEngine creates a new rule engine.

func (*RuleEngine) GetCustomRule

func (e *RuleEngine) GetCustomRule(name string) (any, bool)

GetCustomRule retrieves a custom rule value.

func (*RuleEngine) GetMaxQueryLimit

func (e *RuleEngine) GetMaxQueryLimit() int

GetMaxQueryLimit returns the maximum query limit.

type Rules

type Rules struct {
	// QualityThreshold is the minimum quality score for data access.
	QualityThreshold float64 `yaml:"quality_threshold"`

	// MaxQueryLimit is the maximum number of rows a query can return.
	MaxQueryLimit int `yaml:"max_query_limit"`

	// Custom rules
	Custom map[string]any `yaml:"custom,omitempty"`
}

Rules defines operational rules for the platform.

func DefaultRules

func DefaultRules() *Rules

DefaultRules returns sensible default rules.

Jump to

Keyboard shortcuts

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