Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug Report]: The auth add cmd should use default values when user doesn't specify them #567

Closed
3 of 4 tasks
jianzhangbjz opened this issue Jul 20, 2023 · 0 comments · Fixed by #655
Closed
3 of 4 tasks

Comments

@jianzhangbjz
Copy link
Contributor

Checklist

  • I've searched for similar issues and couldn't find anything matching
  • I've included steps to reproduce the behavior

Affected Components

  • K8sGPT (CLI)
  • K8sGPT Operator

K8sGPT Version

k8sgpt: 0.3.7 (1bc0f42), built at: unknown

Kubernetes Version

v1.27.0

Host OS and its Version

Mac OS 12.6.6

Steps to reproduce

  1. auth add
MacBook-Pro:k8sgpt jianzhang$ ./bin/k8sgpt auth add 
Error: Backend AI cannot be empty and accepted values are 'openai, localai, azureopenai, noopai, cohere'

Expected behaviour

As the help info shows, the backend and model have the default values, so auth add should use them when user doesn't specify them.

MacBook-Pro:k8sgpt jianzhang$ ./bin/k8sgpt auth add --help
The add command allows to configure a new backend AI provider

Usage:
  k8sgpt auth add [flags]

Flags:
  -b, --backend string                     Backend AI provider (default "openai")
  -u, --baseurl http://localhost:8080/v1   URL AI provider, (e.g http://localhost:8080/v1)
  -e, --engine string                      Azure AI deployment name
  -h, --help                               help for add
  -m, --model string                       Backend AI model (default "gpt-3.5-turbo")
  -p, --password string                    Backend AI password

Global Flags:
      --config string        Default config file (/Users/jianzhang/Library/Application Support/k8sgpt/k8sgpt.yaml)
      --kubeconfig string    Path to a kubeconfig. Only required if out-of-cluster.
      --kubecontext string   Kubernetes context to use. Only required if out-of-cluster.

Actual behaviour

[cloud-user@preserve-olm-env2 bin]$ ./k8sgpt auth add -p xxx
Error: Backend AI cannot be empty and accepted values are 'openai, localai, azureopenai, noopai'

Additional Information

No response

jianzhangbjz added a commit to jianzhangbjz/k8sgpt that referenced this issue Jul 21, 2023
The `auth add` cmd should use `backend` and `model` default values when user doesn't specify them

Closes: k8sgpt-ai#567

Signed-off-by: Jian Zhang <jiazha@redhat.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
Development

Successfully merging a pull request may close this issue.

1 participant