ai

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Dec 8, 2025 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AIProvider

type AIProvider interface {
	GenerateCommitMessage(ctx context.Context, diff string, opts MessageOptions) (string, error)
}

AIProvider defines the interface for AI providers

type Config

type Config struct {
	Provider   string
	APIKey     string
	URL        string
	Timeout    time.Duration
	Proxy      string
	UseGitmoji bool

	Message MessageOptions
}

Config holds the full application configuration

func (*Config) Validate

func (c *Config) Validate() error

validateConfig performs basic validation of the AI configuration. Returns an error if required fields are missing or invalid.

type MessageOptions

type MessageOptions struct {
	Model            string
	Language         string
	CommitType       string
	Scope            string
	CustomConvention string
	MaxLength        int
	Temperature      float64
	MaxRedirects     int
}

MessageOptions contains only fields needed to generate a commit message

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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