k8sgpt-ai / docs

Documentation for K8sGPT
https://docs.k8sgpt.ai/
Apache License 2.0
34 stars 48 forks source link

[Question]: Ollama remove v1 prefix from Baseurl #118

Open dcarrier opened 3 months ago

dcarrier commented 3 months ago

Checklist

Affected Components

K8sGPT Version

v0.3.40

Kubernetes Version

v1.29.3

Host OS and its Version

MacOS Sequoia 15.0

Steps to reproduce

  1. Setup Ollama as referenced in documentation: https://github.com/k8sgpt-ai/docs/blob/main/docs/reference/providers/backend.md?plain=1#L212-L231
  2. Make Ollama the default: k8sgpt auth default -p ollama
  3. Add broken pod to kubernetes cluster: kubectl run nginx --image=nginz
  4. Run k8sgpt analyze --explain
  5. Note the following error: Error: failed while calling AI provider ollama: unmarshal: invalid character 'p' after top-level value

Expected behaviour

Following the documentation for setting up Ollama results in a properly functioning backend.

Actual behaviour

It appears that by using the referenced baseurl with the v1 prefix results in the aforentioned error.

Additional Information

When I completely remove the baseurl during Ollama backend setup the above example works perfectly. I believe that it is more robust to rely on the default baseurl in the backend implementations and drop the flag from the documentation. Curious what others think!