cmd

package
v0.0.0-...-f6e17a8 Latest Latest
Warning

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

Go to latest
Published: Mar 22, 2025 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// APIEndpoint is the URL for the OpenAI API
	APIEndpoint = "https://api.openai.com/v1/chat/completions"
	// Using gpt-3.5-turbo as it's more stable, cost-effective, and sufficient for kubectl command generation
	ModelName = "gpt-3.5-turbo"
)

Variables

This section is empty.

Functions

func NewPrompt

func NewPrompt(streams genericclioptions.IOStreams) *cobra.Command

func OpenAIRequest

func OpenAIRequest(chatPrompt, apiKey string) error

func RunCommand

func RunCommand(command string) error

RunCommand executes the given kubectl command

Types

type Options

type Options struct {
	genericclioptions.IOStreams
	OpenAIKey string
}

Jump to

Keyboard shortcuts

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