autofix

package
v2.21.4-beta1 Latest Latest
Warning

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

Go to latest
Published: Nov 2, 2024 License: Apache-2.0 Imports: 7 Imported by: 0

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