Help us shape the future of Go! Take the 2026 Go Developer Survey

ai

package
v0.3.0 Latest Latest
Warning

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

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

Documentation

Index

Constants

View Source
const (
	ProviderOpenAI    = "openai"
	ProviderClaude    = "claude"
	ProviderAnthropic = "anthropic"

	EndpointOpenAI    = "https://api.openai.com/v1"
	EndpointAnthropic = "https://api.anthropic.com/v1"

	DefaultModel     = "gpt-4"
	DefaultMaxTokens = 1024
	DefaultTimeout   = 30
	DefaultHistory   = 20
)

Provider constants

Variables

This section is empty.

Functions

func AIConfigCommand

func AIConfigCommand(con *core.Console) *cobra.Command

AIConfigCommand returns the ai subcommand for use under `config`.

func AIDisableCmd

func AIDisableCmd(con *core.Console) error

AIDisableCmd disables the AI assistant.

func AIEnableCmd

func AIEnableCmd(cmd *cobra.Command, con *core.Console) error

AIEnableCmd enables AI and updates configuration flags.

func AIShowCmd

func AIShowCmd(con *core.Console) error

AIShowCmd displays the current AI configuration as a KV table.

func AnalyzeCmd

func AnalyzeCmd(cmd *cobra.Command, con *core.Console, args []string) error

AnalyzeCmd handles the analyze command - analyzes errors and provides suggestions

func AskCmd

func AskCmd(cmd *cobra.Command, con *core.Console, args []string) error

AskCmd handles the ask command

func Commands

func Commands(con *core.Console) []*cobra.Command

Commands returns AI interaction commands (ask, analyze). The ai-config command lives under `config ai`.

Types

This section is empty.

Jump to

Keyboard shortcuts

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