ai

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: May 2, 2026 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

View Source
const CommitDraftSystemPrompt = `` /* 465-byte string literal not displayed */
View Source
const CommitRefineSystemPrompt = `` /* 371-byte string literal not displayed */
View Source
const ConflictExplainerPrompt = `` /* 675-byte string literal not displayed */
View Source
const ExplainDiffSystemPrompt = `` /* 265-byte string literal not displayed */
View Source
const PRDraftSystemPrompt = `` /* 277-byte string literal not displayed */
View Source
const PlannerSystemPrompt = `` /* 1338-byte string literal not displayed */

Variables

View Source
var ErrAllProvidersFailed = errors.New("all AI providers failed")
View Source
var ErrNoAPIKey = errors.New("no API key configured")

Functions

func CompressStepHistory

func CompressStepHistory(steps []map[string]any) string

func RedactSecrets

func RedactSecrets(s string) string

func SummarizeDiff

func SummarizeDiff(diff string) string

func TaskTypeFor

func TaskTypeFor(action string) string

Types

type Client

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

func NewClient

func NewClient(cfg *config.Config, logger *observability.Logger) *Client

func (*Client) Complete

func (c *Client) Complete(ctx context.Context, system, user, taskType string) (string, error)

func (*Client) HasProvider

func (c *Client) HasProvider() bool

func (*Client) RotateModel

func (c *Client) RotateModel()

type Provider

type Provider struct {
	Name    string
	Model   string
	APIKey  string
	BaseURL string
}

Jump to

Keyboard shortcuts

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