ai

package
v0.8.0 Latest Latest
Warning

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

Go to latest
Published: Apr 18, 2025 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AIClient

type AIClient interface {
	GetCommitMessage(ctx context.Context, prompt string) (string, error)
	SanitizeResponse(message, commitType string) string
	ProviderName() string
	MaybeSummarizeDiff(diff string, maxLength int) (string, bool)
}

AIClient defines the interface for AI providers.

type BaseAIClient

type BaseAIClient struct {
	Provider string
}

func (*BaseAIClient) MaybeSummarizeDiff

func (b *BaseAIClient) MaybeSummarizeDiff(diff string, maxLength int) (string, bool)

func (*BaseAIClient) ProviderName

func (b *BaseAIClient) ProviderName() string

func (*BaseAIClient) SanitizeResponse

func (b *BaseAIClient) SanitizeResponse(message, commitType string) string

Jump to

Keyboard shortcuts

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