Skip to content

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

@dcarrier

Description

@dcarrier

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.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!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions