llm

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Jul 15, 2026 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AnalysisRequest

type AnalysisRequest struct {
	FilePath    string
	Language    string
	DiffContent string
	FullContent string
	Context     string
}

type AnalysisResponse

type AnalysisResponse struct {
	Findings []Finding
	Summary  string
}

type AnthropicProvider

type AnthropicProvider struct {
	// contains filtered or unexported fields
}

func (*AnthropicProvider) AnalyzeCode

func (*AnthropicProvider) Name

func (p *AnthropicProvider) Name() string

type Finding

type Finding struct {
	Rule       string
	Severity   Severity
	Message    string
	Line       int
	Column     int
	Suggestion string
	Category   string
}

type OllamaProvider

type OllamaProvider struct {
	// contains filtered or unexported fields
}

func (*OllamaProvider) AnalyzeCode

func (p *OllamaProvider) AnalyzeCode(ctx context.Context, req AnalysisRequest) (*AnalysisResponse, error)

func (*OllamaProvider) Name

func (p *OllamaProvider) Name() string

type OpenAIProvider

type OpenAIProvider struct {
	// contains filtered or unexported fields
}

func (*OpenAIProvider) AnalyzeCode

func (p *OpenAIProvider) AnalyzeCode(ctx context.Context, req AnalysisRequest) (*AnalysisResponse, error)

func (*OpenAIProvider) Name

func (p *OpenAIProvider) Name() string

type Provider

type Provider interface {
	AnalyzeCode(ctx context.Context, req AnalysisRequest) (*AnalysisResponse, error)
	Name() string
}

func NewProvider

func NewProvider(name string, cfg ProviderConfig) Provider

type ProviderConfig

type ProviderConfig struct {
	Model       string
	Temperature float64
	APIKey      string
	BaseURL     string
}

type Severity

type Severity string
const (
	SeverityError   Severity = "error"
	SeverityWarning Severity = "warning"
	SeverityInfo    Severity = "info"
)

Jump to

Keyboard shortcuts

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