anthropic

package
v0.0.0-...-87e4b86 Latest Latest
Warning

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

Go to latest
Published: Mar 18, 2025 License: MIT Imports: 9 Imported by: 0

Documentation

Overview

Package anthropic provides integration with Anthropic's API for issue analysis

Index

Constants

View Source
const (
	AnalysisModel   = "claude-3-7-sonnet-20250219" // For detailed analysis
	SummaryModel    = "claude-3-7-sonnet-20250219" // For issue summarization
	ClassifierModel = "claude-3-5-haiku-20241022"  // For classification tasks
	CommitModel     = "claude-3-5-haiku-20241022"  // For commit messages
)

Constants for API

View Source
const (
	TypeBug     = "bug"
	TypeFeature = "feature"
	TypeChore   = "chore"
)

Issue type classification

Variables

This section is empty.

Functions

This section is empty.

Types

type IssueAnalyzer

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

IssueAnalyzer provides methods to analyze GitHub issues using Anthropic API

func NewAnalyzer

func NewAnalyzer(cfg *config.Config) *IssueAnalyzer

NewAnalyzer creates a new issue analyzer

func (*IssueAnalyzer) AnalyzeIssue

func (a *IssueAnalyzer) AnalyzeIssue(issue *models.Issue) (string, error)

AnalyzeIssue analyzes an issue using the Anthropic API and returns a branch name suggestion

func (*IssueAnalyzer) GenerateCommitMessage

func (a *IssueAnalyzer) GenerateCommitMessage(issue *models.Issue, changedFiles []string, changeSummary string) (string, error)

GenerateCommitMessage creates a concise, descriptive commit message using Claude 3.5 Haiku

func (*IssueAnalyzer) GenerateImplementationPlan

func (a *IssueAnalyzer) GenerateImplementationPlan(issue *models.Issue) (string, error)

GenerateImplementationPlan generates a detailed implementation plan for solving an issue

func (*IssueAnalyzer) GeneratePRDescription

func (a *IssueAnalyzer) GeneratePRDescription(issue *models.Issue, implementationPlan string, changedFiles []string) (string, error)

GeneratePRDescription generates a comprehensive PR description for the created implementation

func (*IssueAnalyzer) SummarizeIssue

func (a *IssueAnalyzer) SummarizeIssue(transcript string) (string, error)

SummarizeIssue takes an issue transcript and returns a concise summary

Jump to

Keyboard shortcuts

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