Documentation
¶
Overview ¶
Package ai provides AI backends for article translation and summarization. Supports OpenAI-compatible HTTP APIs and local AI CLIs (Claude Code, pi, opencode).
Index ¶
Constants ¶
View Source
const ( ProviderOpenAI = "openai" // OpenAI-compatible HTTP API ProviderClaude = "claude" // Claude Code CLI (subscription) ProviderPi = "pi" // pi CLI ProviderOpencode = "opencode" // opencode CLI )
Provider selects the AI backend.
Variables ¶
This section is empty.
Functions ¶
func Complete ¶
Complete sends a request and returns the assistant reply. Routes to the appropriate backend based on cfg.Provider.
Types ¶
type Config ¶
type Config struct {
Provider string // "openai", "claude", "pi", or "opencode"
Endpoint string // HTTP API URL (openai provider only)
APIKey string // optional API key (openai provider only)
Model string // model name (openai) or optional CLI model flag
}
Config holds the connection parameters for AI.
Click to show internal directories.
Click to hide internal directories.