Documentation
¶
Index ¶
- Variables
- type ComplexityFactors
- type ComplexityLevel
- type ComplexityScorer
- type ModelCapability
- type ModelRecommendationEngine
- type Recommendation
- type RightSizingRecord
- type RightSizingStore
- func (s *RightSizingStore) AcceptRecommendation(id int64) error
- func (s *RightSizingStore) GetAccuracy() (float64, error)
- func (s *RightSizingStore) GetRecent(limit int) ([]RightSizingRecord, error)
- func (s *RightSizingStore) Init() error
- func (s *RightSizingStore) Record(rec *RightSizingRecord) error
Constants ¶
This section is empty.
Variables ¶
View Source
var DefaultModels = []ModelCapability{ {Name: "gpt-4o-mini", MaxComplexity: ComplexityIntermediate, CostPer1KInput: 0.00015, CostPer1KOutput: 0.0006}, {Name: "claude-3-haiku", MaxComplexity: ComplexityIntermediate, CostPer1KInput: 0.00025, CostPer1KOutput: 0.00125}, {Name: "gpt-4o", MaxComplexity: ComplexityExpert, CostPer1KInput: 0.0025, CostPer1KOutput: 0.01}, {Name: "claude-3-5-sonnet", MaxComplexity: ComplexitySpecialist, CostPer1KInput: 0.003, CostPer1KOutput: 0.015}, {Name: "claude-3-opus", MaxComplexity: ComplexityFrontier, CostPer1KInput: 0.015, CostPer1KOutput: 0.075}, {Name: "gemini-1.5-flash", MaxComplexity: ComplexityModerate, CostPer1KInput: 0.000075, CostPer1KOutput: 0.0003}, {Name: "gemini-1.5-pro", MaxComplexity: ComplexityExpert, CostPer1KInput: 0.00125, CostPer1KOutput: 0.005}, }
Functions ¶
This section is empty.
Types ¶
type ComplexityFactors ¶
type ComplexityLevel ¶
type ComplexityLevel int
const ( ComplexityTrivial ComplexityLevel = 0 ComplexitySimple ComplexityLevel = 1 ComplexityModerate ComplexityLevel = 2 ComplexityIntermediate ComplexityLevel = 3 ComplexityComplex ComplexityLevel = 4 ComplexityAdvanced ComplexityLevel = 5 ComplexityExpert ComplexityLevel = 6 ComplexitySpecialist ComplexityLevel = 7 ComplexityResearch ComplexityLevel = 8 ComplexityFrontier ComplexityLevel = 9 )
type ComplexityScorer ¶
type ComplexityScorer struct{}
func NewComplexityScorer ¶
func NewComplexityScorer() *ComplexityScorer
func (*ComplexityScorer) Score ¶
func (s *ComplexityScorer) Score(factors ComplexityFactors) ComplexityLevel
func (*ComplexityScorer) ScoreFromText ¶
func (s *ComplexityScorer) ScoreFromText(text string) ComplexityLevel
type ModelCapability ¶
type ModelCapability struct {
Name string
MaxComplexity ComplexityLevel
CostPer1KInput float64
CostPer1KOutput float64
Strengths []string
}
type ModelRecommendationEngine ¶
type ModelRecommendationEngine struct {
// contains filtered or unexported fields
}
func NewModelRecommendationEngine ¶
func NewModelRecommendationEngine() *ModelRecommendationEngine
func (*ModelRecommendationEngine) GetAllModels ¶
func (e *ModelRecommendationEngine) GetAllModels() []ModelCapability
func (*ModelRecommendationEngine) Recommend ¶
func (e *ModelRecommendationEngine) Recommend(complexity ComplexityLevel, currentModel string) *Recommendation
type Recommendation ¶
type RightSizingRecord ¶
type RightSizingRecord struct {
ID int64 `json:"id"`
Command string `json:"command"`
CurrentModel string `json:"current_model"`
RecommendedModel string `json:"recommended_model"`
ComplexityScore int `json:"complexity_score"`
EstimatedSavings float64 `json:"estimated_savings"`
Accepted bool `json:"accepted"`
CreatedAt time.Time `json:"created_at"`
}
type RightSizingStore ¶
type RightSizingStore struct {
// contains filtered or unexported fields
}
func NewRightSizingStore ¶
func NewRightSizingStore(db *sql.DB) *RightSizingStore
func (*RightSizingStore) AcceptRecommendation ¶
func (s *RightSizingStore) AcceptRecommendation(id int64) error
func (*RightSizingStore) GetAccuracy ¶
func (s *RightSizingStore) GetAccuracy() (float64, error)
func (*RightSizingStore) GetRecent ¶
func (s *RightSizingStore) GetRecent(limit int) ([]RightSizingRecord, error)
func (*RightSizingStore) Init ¶
func (s *RightSizingStore) Init() error
func (*RightSizingStore) Record ¶
func (s *RightSizingStore) Record(rec *RightSizingRecord) error
Click to show internal directories.
Click to hide internal directories.