ai

package
v0.9.2 Latest Latest
Warning

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

Go to latest
Published: Apr 6, 2026 License: Apache-2.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var DefaultRetryConfig = RetryConfig{
	MaxAttempts: 3,
	BaseDelay:   2 * time.Second,
	MaxDelay:    30 * time.Second,
}

DefaultRetryConfig is used for all AI provider calls.

Functions

func GenerateSlides

func GenerateSlides(cfg *config.Config, content *crawler.CollectedContent) (string, error)

GenerateSlides routes the slide generation request to the appropriate LLM provider based on the model name in the config. Accepts either *crawler.CollectedContent (structured) or a flat code string.

func IsLocalModel added in v0.9.1

func IsLocalModel(model string) bool

IsLocalModel is the exported version of isLocalModel for use by cmd/.

func RequiresAPIKey

func RequiresAPIKey(model string) bool

RequiresAPIKey returns true if the model needs a remote API key.

Types

type DocOutline added in v0.9.1

type DocOutline struct {
	ProjectName string
	Description string
	Sections    []OutlineSection
	KeyStats    []string
}

DocOutline holds the structural information extracted from project docs. It drives the dynamic slide plan so presentations use project-specific topics instead of generic placeholders like "Key Feature 1".

type HTTPError

type HTTPError struct {
	StatusCode int
	Body       string
}

HTTPError wraps a non-2xx HTTP response so the retry logic can inspect the status code without string parsing.

func (*HTTPError) Error

func (e *HTTPError) Error() string

type OutlineSection added in v0.9.1

type OutlineSection struct {
	Title   string
	Bullets []string
	Source  string // which doc file this came from
}

OutlineSection represents a topic heading extracted from documentation.

type RetryConfig

type RetryConfig struct {
	MaxAttempts int
	BaseDelay   time.Duration
	MaxDelay    time.Duration
}

RetryConfig controls retry behaviour for transient AI provider errors.

Jump to

Keyboard shortcuts

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