autofix

package
v2.24.7 Latest Latest
Warning

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

Go to latest
Published: Mar 1, 2026 License: Apache-2.0 Imports: 13 Imported by: 1 module, 1 package

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

View Source
const (
	AIProviderFlagHelp = `` /* 354-byte string literal not displayed */

	AIPrompt = `` /* 175-byte string literal not displayed */

)
View Source
const (
	ModelClaudeOpus4_0   = anthropic.ModelClaudeOpus4_0
	ModelClaudeOpus4_1   = anthropic.ModelClaudeOpus4_1_20250805
	ModelClaudeSonnet4_0 = anthropic.ModelClaudeSonnet4_0
	ModelClaudeSonnet4_5 = anthropic.ModelClaudeSonnet4_5_20250929
	ModelClaudeHaiku4_5  = anthropic.ModelClaudeHaiku4_5_20251001
)
View Source
const (
	ModelGPT4o           = openai.ChatModelGPT4o
	ModelGPT4oMini       = openai.ChatModelGPT4oMini
	DefaultOpenAIBaseURL = "https://api.openai.com/v1"
)

Variables

This section is empty.

Functions

func GenerateSolution

func GenerateSolution(model, aiAPIKey, baseURL string, skipSSL bool, issues []*issue.Issue) (err error)

GenerateSolution generates a solution for the given issues using the specified AI provider

Types

type GenAIClient

type GenAIClient interface {
	GenerateSolution(ctx context.Context, prompt string) (string, error)
}

func NewClaudeClient added in v2.22.9

func NewClaudeClient(model, apiKey string) (GenAIClient, error)

func NewGeminiClient added in v2.22.9

func NewGeminiClient(model, apiKey string) (GenAIClient, error)

func NewOpenAIClient added in v2.22.11

func NewOpenAIClient(config OpenAIConfig) (GenAIClient, error)

type GenAIModel added in v2.22.9

type GenAIModel string

https://ai.google.dev/gemini-api/docs/models

const (
	ModelGeminiPro2_5       GenAIModel = "gemini-2.5-pro"
	ModelGeminiFlash2_5     GenAIModel = "gemini-2.5-flash"
	ModelGeminiFlash2_5Lite GenAIModel = "gemini-2.5-flash-lite"
	ModelGeminiFlash2_0     GenAIModel = "gemini-2.0-flash"
	ModelGeminiFlash2_0Lite GenAIModel = "gemini-2.0-flash-lite"
	// Deprecated: Use Gemini 2.x models.
	ModelGeminiFlash1_5 GenAIModel = "gemini-1.5-flash"
)

type OpenAIConfig added in v2.22.11

type OpenAIConfig struct {
	Model       string
	APIKey      string `json:"-"`
	BaseURL     string
	MaxTokens   int
	Temperature float64
	SkipSSL     bool
}

Jump to

Keyboard shortcuts

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