ai

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Feb 21, 2026 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AssembleCommitMessage

func AssembleCommitMessage(resp CommitMessageResponse) string

func BuildResponseFormat

func BuildResponseFormat() map[string]any

func SupportsStructuredOutput

func SupportsStructuredOutput(apiURL, configOverride string) bool

Types

type Client

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

func NewClient

func NewClient(p Params) *Client

func (*Client) GenerateCommitMessage

func (c *Client) GenerateCommitMessage(messages []prompt.Message) (string, error)

func (*Client) IsStructuredOutput

func (c *Client) IsStructuredOutput() bool

type CommitMessageResponse

type CommitMessageResponse struct {
	ChangesSummary        string   `json:"changes_summary"`
	IntroducesNewBehavior bool     `json:"introduces_new_behavior"`
	FixesBrokenBehavior   bool     `json:"fixes_broken_behavior"`
	RestructuresOnly      bool     `json:"restructures_only"`
	TypeReasoning         string   `json:"type_reasoning"`
	Type                  string   `json:"type"`
	Scope                 string   `json:"scope"`
	Description           string   `json:"description"`
	BulletPoints          []string `json:"bullet_points"`
}

func ParseCommitMessageJSON

func ParseCommitMessageJSON(raw string) (CommitMessageResponse, error)

type ModelFamily

type ModelFamily int
const (
	ModelFamilyStandard ModelFamily = iota
	ModelFamilyReasoning
	ModelFamilyGPT5
)

func DetectModelFamily

func DetectModelFamily(model string) ModelFamily

type Params

type Params struct {
	APIKey           string
	APIURL           string
	Model            string
	MaxTokensOutput  int
	Temperature      float64
	HasTemperature   bool
	ReasoningEffort  string
	Verbosity        string
	StructuredOutput string
}

Jump to

Keyboard shortcuts

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