insight

package
v0.14.0 Latest Latest
Warning

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

Go to latest
Published: Nov 8, 2026 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DashboardPrompt added in v0.14.0

func DashboardPrompt(custom string, data []byte) string

DashboardPrompt is the prompt for the skill analytics dashboard's insight: the caller's own prompt when given, else the default instructions followed by the dashboard data. data is ignored when custom is given.

func Generate

func Generate(cfg Config, prompt string) (string, error)

Generate sends a prompt to the configured model through the shared client (Messages API only, 30 s, max_tokens 2048) and returns the response text. Each successful call's usage is recorded under "insight".

Types

type Config

type Config struct {
	Model       string                 // "haiku" (default), "sonnet", "opus" (llm.ResolveModel; unknown names give haiku)
	APIKey      string                 // optional override; falls back to env vars
	RecordUsage func(cost.Usage) error // default: cost.AppendUsage to cost.DefaultUsagePath()
}

Jump to

Keyboard shortcuts

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