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]: Fail Fast when add auth #1170

Open
3 of 4 tasks
gyliu513 opened this issue Jun 26, 2024 · 2 comments
Open
3 of 4 tasks

[Bug]: Fail Fast when add auth #1170

gyliu513 opened this issue Jun 26, 2024 · 2 comments

Comments

@gyliu513
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

v0.3.37

Kubernetes Version

v1.21

Host OS and its Version

No response

Steps to reproduce

  1. add openai auth with an invalid api key
  2. run k8sgpt with --explain to trigger AI backend
  3. got error due to openai api key is not right

Expected behaviour

Can k8sgpt report errors when adding an invalid auth?

Actual behaviour

No error with invalid auth, and customer will got errors when running k8sgpt explain.

Additional Information

No response

@matthisholleville
Copy link
Contributor

Hello! Do you have any ideas or suggestions for implementation? I think it would be useful to have an extra parameter (e.g., k8sgpt auth add .... --check), but it seems that not all providers (including OpenAI) offer a route to test if an API key is valid without opening a client, etc.

@gyliu513
Copy link
Contributor Author

@matthisholleville yes, I have same thinking as you, how about just call a simple generate API with prompt as hello world for different vendor platforms?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Proposed
Development

No branches or pull requests

2 participants