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

community: OllamaEmbeddings - Pass headers to post request #16880

Merged
merged 7 commits into from
Mar 29, 2024

Conversation

shahrin014
Copy link
Contributor

Feature

  • Set additional headers in constructor
  • Headers will be sent in post request

This feature is useful if deploying Ollama on a cloud service such as hugging face, which requires authentication tokens to be passed in the request header.

Tests

  • Test if header is passed
  • Test if header is not passed

Similar to #15881

Copy link

vercel bot commented Feb 1, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

1 Ignored Deployment
Name Status Preview Comments Updated (UTC)
langchain ⬜️ Ignored (Inspect) Visit Preview Mar 29, 2024 6:37pm

@dosubot dosubot bot added size:M This PR changes 30-99 lines, ignoring generated files. Ɑ: embeddings Related to text embedding models module 🤖:improvement Medium size change to existing code to handle new use-cases labels Feb 1, 2024
@dosubot dosubot bot added the lgtm PR looks good. Use to confirm that a PR is ready for merging. label Feb 13, 2024
@baskaryan baskaryan enabled auto-merge (squash) March 29, 2024 18:36
@baskaryan baskaryan merged commit f51e6a3 into langchain-ai:master Mar 29, 2024
59 checks passed
gkorland pushed a commit to FalkorDB/langchain that referenced this pull request Mar 30, 2024
…ngchain-ai#16880)

## Feature
- Set additional headers in constructor
- Headers will be sent in post request

This feature is useful if deploying Ollama on a cloud service such as
hugging face, which requires authentication tokens to be passed in the
request header.

## Tests
- Test if header is passed
- Test if header is not passed

Similar to langchain-ai#15881

---------

Co-authored-by: Bagatur <baskaryan@gmail.com>
hinthornw pushed a commit that referenced this pull request Apr 26, 2024
…6880)

## Feature
- Set additional headers in constructor
- Headers will be sent in post request

This feature is useful if deploying Ollama on a cloud service such as
hugging face, which requires authentication tokens to be passed in the
request header.

## Tests
- Test if header is passed
- Test if header is not passed

Similar to #15881

---------

Co-authored-by: Bagatur <baskaryan@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Ɑ: embeddings Related to text embedding models module 🤖:improvement Medium size change to existing code to handle new use-cases lgtm PR looks good. Use to confirm that a PR is ready for merging. size:M This PR changes 30-99 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants