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

2749 ollama client auth token #3005

Open
wants to merge 10 commits into
base: master
Choose a base branch
from

Conversation

ssbodapati
Copy link

@ssbodapati ssbodapati commented Jan 23, 2025

Pull Request Type

  • [ x] ✨ feat

What is in this change?

  • Ollama auth token support - Added UI field in the LLM Preferences
  • setting OLLAMA_AUTH_TOKEN through update_env , updated env key_map
  • Ollama client constructor uses OLLAMA_AUTH_TOKEN

Additional Information

Developer Validations

  • I ran yarn lint from the root of the repo & committed changes
  • Relevant documentation has been updated
  • I have tested my code functionality
  • Docker build succeeds locally

timothycarambat and others added 4 commits January 24, 2025 14:04
sensible fallback to not break existing installs
re-order of input fields
null-check for API key and header optional insert on request
linting
@ssbodapati
Copy link
Author

@timothycarambat, thank you for reviewing this, the workspace chat fails because there is a dependency conflict with current ollama-js version 5.0, it does not pass headers while creating a completion.

The latest version with header support is 5.10.0, attaching screenshots. Workspace chat after upgrading works as expected.

Pushed the changes.

Ollama 5.0 not passing headers to constructor

Ollama 5.10 passing headers to constructor

@timothycarambat
Copy link
Member

Excellent catch, I had only tested on my local Ollama to make sure current integrations work without a header since that is the normal and majority use case. i hadn't done a full QA yet, so thanks for catching that.

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

Successfully merging this pull request may close these issues.

2 participants