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

Cannot set model #686

Closed
3 of 4 tasks
jeffrey-aguilera opened this issue Sep 27, 2023 · 5 comments
Closed
3 of 4 tasks

Cannot set model #686

jeffrey-aguilera opened this issue Sep 27, 2023 · 5 comments
Assignees
Labels
bug Something isn't working documentation Improvements or additions to documentation

Comments

@jeffrey-aguilera
Copy link

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

0.3.16

Kubernetes Version

v5.0.1

Host OS and its Version

22.04.1-Ubuntu SMP

Steps to reproduce

❯ k8sgpt analyze --explain --with-doc
0% | | (0/57, 0 it/hr) [0s:0s]
Error: failed while calling AI provider openai: error, status code: 400, message: you must provide a model parameter

Expected behaviour

Documentation on how to set the model parameter

Actual behaviour

No response

Additional Information

No response

@AlexsJones
Copy link
Member

Do you have in your shell history what you did for the auth step?
This looks like an issue there.. try something like..

k8sgpt auth add -b openai -m gpt-3.5-turbo 

@AlexsJones AlexsJones added the documentation Improvements or additions to documentation label Sep 29, 2023
@AnaisUrlichs
Copy link
Member

@AlexsJones just ran into the same issue as I thought the model was "optional" -- but it is like this with the backend and model to set in the getting started guide -- will update it in the other part of the docs.
where can I find the different available models so I can add them to the docs?

I think this should throw an error message i.e. when users don't set the --model -- what do you think?

@AlexsJones
Copy link
Member

I agree, it should just work, will take a look at what's gone wrong

@AlexsJones AlexsJones self-assigned this Oct 9, 2023
@AlexsJones AlexsJones added the bug Something isn't working label Oct 9, 2023
@AlexsJones
Copy link
Member

I was able to reproduce this

❯ go run main.go auth add
# command-line-arguments
ld: warning: -bind_at_load is deprecated on macOS
Warning: backend input is empty, will use the default value: openai
Warning: model input is empty, will use the default value: gpt-3.5-turbo
Enter openai Key: openai added to the AI backend provider list

k8sgpt on  fix/auth-model via 🐹 v1.21.1 on ☁️  (eu-west-2) took 5s 
❯ go run main.go analyze --explain --with-doc
# command-line-arguments
ld: warning: -bind_at_load is deprecated on macOS
   0% |                                                                                                    | (0/2, 0 it/hr) [0s:0s]
Error: failed while calling AI provider openai: error, status code: 400, message: you must provide a model parameter
exit status 1

Because the model hasn't been set

❯ cat ~/Library/Application\ Support/k8sgpt/k8sgpt.yaml 
ai:
    providers:
        - name: openai
          model: ""
          password: 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
          temperature: 0.7
    defaultprovider: ""

@AlexsJones
Copy link
Member

Fixed here #702

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working documentation Improvements or additions to documentation
Projects
Status: Done
Development

No branches or pull requests

3 participants