Documentation
¶
Index ¶
Constants ¶
View Source
const ( GITHUB = "github" DRONE = "drone" )
Variables ¶
View Source
var ( Version string = "" Commit string = "" )
View Source
var CompletionCmd = &cobra.Command{ Use: "completion [bash|zsh|fish|powershell]", Short: "Generate completion script", Long: `Generate shell completion scripts for CodeGPT CLI. To load completions: Bash: $ source <(codegpt completion bash) # Or save it to a file and source it: $ codegpt completion bash > ~/.codegpt-completion.bash $ echo 'source ~/.codegpt-completion.bash' >> ~/.bashrc Zsh: $ source <(codegpt completion zsh) # Or save it to a file in your $fpath: $ codegpt completion zsh > "${fpath[1]}/_codegpt" Fish: $ codegpt completion fish > ~/.config/fish/completions/codegpt.fish PowerShell: PS> codegpt completion powershell > codegpt.ps1 PS> . ./codegpt.ps1`, DisableFlagsInUseLine: true, ValidArgs: []string{"bash", "zsh", "fish", "powershell"}, Args: cobra.MatchAll(cobra.ExactArgs(1), cobra.OnlyValidArgs), Run: func(cmd *cobra.Command, args []string) { switch args[0] { case "bash": _ = cmd.Root().GenBashCompletion(os.Stdout) case "zsh": _ = cmd.Root().GenZshCompletion(os.Stdout) case "fish": _ = cmd.Root().GenFishCompletion(os.Stdout, true) case "powershell": _ = cmd.Root().GenPowerShellCompletionWithDesc(os.Stdout) } }, }
Functions ¶
func NewAnthropic ¶ added in v0.15.0
NewAnthropic creates a new instance of the anthropic.Client using configuration values retrieved from Viper. The configuration values include the API key, model, maximum tokens, temperature, and top_p.
Parameters:
- ctx: The context for the client.
Returns:
- A pointer to an anthropic.Client instance.
- An error if the client could not be created.
Types ¶
This section is empty.
Source Files
¶
Click to show internal directories.
Click to hide internal directories.