Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Adapter ¶
type Adapter interface { // GeneratePullRequestSpec calls the LLM to generate PR details GeneratePullRequestSpec(ctx context.Context, llmCommand string, promptParams map[string]interface{}, diffContent string, commitHistoryContent string, otherContext map[string]string) (string, error) // CountTokens calls the LLM's token counter for given text CountTokens(ctx context.Context, llmCommand string, textContent string) (int, error) }
Adapter defines the interface for LLM operations
type MockAdapter ¶
MockAdapter provides a mock implementation for testing
func NewMockAdapter ¶
func NewMockAdapter() *MockAdapter
NewMockAdapter creates a new mock adapter with sample data
func (*MockAdapter) CountTokens ¶
func (m *MockAdapter) CountTokens(ctx context.Context, llmCommand string, textContent string) (int, error)
CountTokens implements the Adapter interface with mock data
func (*MockAdapter) GeneratePullRequestSpec ¶
func (m *MockAdapter) GeneratePullRequestSpec(ctx context.Context, llmCommand string, promptParams map[string]interface{}, diffContent string, commitHistoryContent string, otherContext map[string]string) (string, error)
GeneratePullRequestSpec implements the Adapter interface with mock data
type PinocchioAdapter ¶
type PinocchioAdapter struct{}
PinocchioAdapter provides an implementation that calls pinocchio
func NewPinocchioAdapter ¶
func NewPinocchioAdapter() *PinocchioAdapter
NewPinocchioAdapter creates a new adapter for pinocchio
func (*PinocchioAdapter) CountTokens ¶
func (a *PinocchioAdapter) CountTokens(ctx context.Context, llmCommand string, textContent string) (int, error)
CountTokens implements the Adapter interface
func (*PinocchioAdapter) GeneratePullRequestSpec ¶
func (a *PinocchioAdapter) GeneratePullRequestSpec(ctx context.Context, llmCommand string, promptParams map[string]interface{}, diffContent string, commitHistoryContent string, otherContext map[string]string) (string, error)
GeneratePullRequestSpec implements the Adapter interface
Click to show internal directories.
Click to hide internal directories.