autofix

package
v2.22.2 Latest Latest
Warning

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

Go to latest
Published: Mar 5, 2025 License: Apache-2.0 Imports: 7 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 (
	GeminiModel = "gemini-1.5-flash"
	AIPrompt    = `` /* 175-byte string literal not displayed */

	GeminiProvider = "gemini"
)

Variables

This section is empty.

Functions

func GenerateSolution

func GenerateSolution(aiApiProvider, aiApiKey, endpoint string, issues []*issue.Issue) error

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

Types

type GenAIClient

type GenAIClient interface {
	// Close clean up and close the client.
	Close() error
	// GenerativeModel build the generative mode.
	GenerativeModel(name string) GenAIGenerativeModel
}

GenAIClient defines the interface for the GenAI client.

func NewGenAIClient

func NewGenAIClient(ctx context.Context, aiApiKey, endpoint string) (GenAIClient, error)

NewGenAIClient creates a new gemini API client.

type GenAIGenerativeModel

type GenAIGenerativeModel interface {
	// GenerateContent generates an response for given prompt.
	GenerateContent(ctx context.Context, prompt string) (string, error)
}

GenAIGenerativeModel defines the interface for the Generative Model.

Jump to

Keyboard shortcuts

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