generate

package
v0.1.2 Latest Latest
Warning

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

Go to latest
Published: Mar 28, 2023 License: MIT Imports: 7 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

View Source
var GenerateCmd = &cobra.Command{
	Use:   "generate",
	Short: "Generate Key for your chosen backend (opens browser)",
	Long:  `Opens your browser to generate a key for your chosen backend.`,
	Run: func(cmd *cobra.Command, args []string) {

		backendType := viper.GetString("backend_type")
		if backendType == "" {

			backend = "openai"
		}

		if backend != "" {
			backendType = backend
		}
		fmt.Println("")
		color.Green("Opening: https://beta.openai.com/account/api-keys to generate a key for %s", backendType)
		color.Green("Please copy the generated key and run `k8sgpt auth` to add it to your config file")
		fmt.Println("")
		time.Sleep(5 * time.Second)
		openbrowser("https://beta.openai.com/account/api-keys")
	},
}

generateCmd represents the auth command

Functions

This section is empty.

Types

This section is empty.

Jump to

Keyboard shortcuts

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