Documentation
¶
Index ¶
- Constants
- type PhindClient
- func (p *PhindClient) GetCommitMessage(ctx context.Context, prompt string) (string, error)
- func (p *PhindClient) MaybeSummarizeDiff(diff string, maxLength int) (string, bool)
- func (p *PhindClient) ProviderName() string
- func (p *PhindClient) SanitizeResponse(message, commitType string) string
- func (p *PhindClient) StreamCommitMessage(ctx context.Context, prompt string, onDelta func(string)) (string, error)
Constants ¶
View Source
const ProviderName = "phind"
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type PhindClient ¶
type PhindClient struct {
ai.BaseAIClient
// contains filtered or unexported fields
}
func NewPhindClient ¶
func NewPhindClient(provider, token, model, baseURL string) (*PhindClient, error)
func (*PhindClient) GetCommitMessage ¶
func (*PhindClient) MaybeSummarizeDiff ¶
func (p *PhindClient) MaybeSummarizeDiff(diff string, maxLength int) (string, bool)
func (*PhindClient) ProviderName ¶
func (p *PhindClient) ProviderName() string
func (*PhindClient) SanitizeResponse ¶
func (p *PhindClient) SanitizeResponse(message, commitType string) string
func (*PhindClient) StreamCommitMessage ¶ added in v0.9.0
func (p *PhindClient) StreamCommitMessage(ctx context.Context, prompt string, onDelta func(string)) (string, error)
StreamCommitMessage implements incremental SSE streaming for Phind and emits text deltas via onDelta as they arrive. It returns the final aggregated text.
Click to show internal directories.
Click to hide internal directories.