llm

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Dec 17, 2025 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ProviderOpenAI   = "openai"
	ProviderGemini   = "gemini"
	ProviderDoubao   = "doubao"
	ProviderDeepseek = "deepseek"
	ProviderQwen     = "qwen"
)
View Source
const (
	DefaultApiKey   = "YzAzZDIyN2ItMWFkNS00MDNkLWJkM2YtZjgzNzczOWE4YzFj"
	DefaultEndpoint = "ZXAtMjAyNTAxMTMyMzE5NTEtOTJ4bjI="
)

Variables

This section is empty.

Functions

func GenerateDeepseekCommitMessage added in v0.0.3

func GenerateDeepseekCommitMessage(diff, apiKey string) (string, error)

func GenerateDoubaoCommitMessage

func GenerateDoubaoCommitMessage(diff, apiKey string, endpointId string) (string, error)

func GenerateGeminiCommitMessage

func GenerateGeminiCommitMessage(diff, apiKey string) (string, error)

func GenerateOpenAICommitMessage added in v0.0.3

func GenerateOpenAICommitMessage(diff, apiKey string) (string, error)

func GenerateQwenCommitMessage added in v0.1.1

func GenerateQwenCommitMessage(diff, apiKey string) (string, error)

Types

type Config

type Config struct {
	CurrentProvider string              `json:"current_provider"`
	Providers       map[string]Provider `json:"providers"`
}

func NewConfig

func NewConfig() *Config

func (*Config) AddProvider

func (c *Config) AddProvider(provider, apiKey string, endpoint ...string) error

func (*Config) GetAPIKey

func (c *Config) GetAPIKey(provider string) (string, error)

func (*Config) ListProviders

func (c *Config) ListProviders() []string

func (*Config) Load

func (c *Config) Load() error

func (*Config) Save

func (c *Config) Save() error

func (*Config) UseProvider

func (c *Config) UseProvider(provider string) error

type Provider

type Provider struct {
	APIKey   string `json:"api_key"`
	Endpoint string `json:"endpoint"`
}

Jump to

Keyboard shortcuts

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