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
Added additional headers for HuggingFaceInferenceAPIEmbeddings endpoint. #21282
Merged
ccurme
merged 4 commits into
langchain-ai:master
from
mirkenstein:feature/HuggingFaceInferenceAPIEmbeddings_headers
May 7, 2024
Merged
Added additional headers for HuggingFaceInferenceAPIEmbeddings endpoint. #21282
ccurme
merged 4 commits into
langchain-ai:master
from
mirkenstein:feature/HuggingFaceInferenceAPIEmbeddings_headers
May 7, 2024
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
dosubot
bot
added
the
size:XS
This PR changes 0-9 lines, ignoring generated files.
label
May 3, 2024
The latest updates on your projects. Learn more about Vercel for Git ↗︎ 1 Ignored Deployment
|
dosubot
bot
added
the
🤖:improvement
Medium size change to existing code to handle new use-cases
label
May 3, 2024
mspronesti
reviewed
May 4, 2024
Tested the suggestion locally with python 3.8.19 Co-authored-by: Massimiliano Pronesti <[email protected]>
hwchase17
approved these changes
May 6, 2024
dosubot
bot
added
the
lgtm
PR looks good. Use to confirm that a PR is ready for merging.
label
May 6, 2024
dglogo
pushed a commit
to dglogo/langchain
that referenced
this pull request
May 8, 2024
…nt. (langchain-ai#21282) Thank you for contributing to LangChain! - [ ] **HuggingFaceInferenceAPIEmbeddings**: "Additional Headers" - Where: langchain, community, embeddings. huggingface.py. - Community: add additional headers when needed by custom HuggingFace TEI embedding endpoints. HuggingFaceInferenceAPIEmbeddings" - [ ] **PR message**: ***Delete this entire checklist*** and replace with - **Description:** Adding the `additional_headers` to be passed to requests library if needed - **Dependencies:** none - [ ] **Add tests and docs**: If you're adding a new integration, please include 1. Tested with locally available TEI endpoints with and without `additional_headers` 2. Example Usage ```python embeddings=HuggingFaceInferenceAPIEmbeddings( api_key=MY_CUSTOM_API_KEY, api_url=MY_CUSTOM_TEI_URL, additional_headers={ "Content-Type": "application/json" } ) ``` Additional guidelines: - Make sure optional dependencies are imported within a function. - Please do not add dependencies to pyproject.toml files (even optional ones) unless they are required for unit tests. - Most PRs should not touch more than one package. - Changes should be backwards compatible. - If you are adding something to community, do not re-import it in langchain. If no one reviews your PR within a few days, please @-mention one of baskaryan, efriis, eyurtsev, hwchase17. --------- Co-authored-by: Massimiliano Pronesti <[email protected]> Co-authored-by: Harrison Chase <[email protected]>
kyle-cassidy
pushed a commit
to kyle-cassidy/langchain
that referenced
this pull request
May 10, 2024
…nt. (langchain-ai#21282) Thank you for contributing to LangChain! - [ ] **HuggingFaceInferenceAPIEmbeddings**: "Additional Headers" - Where: langchain, community, embeddings. huggingface.py. - Community: add additional headers when needed by custom HuggingFace TEI embedding endpoints. HuggingFaceInferenceAPIEmbeddings" - [ ] **PR message**: ***Delete this entire checklist*** and replace with - **Description:** Adding the `additional_headers` to be passed to requests library if needed - **Dependencies:** none - [ ] **Add tests and docs**: If you're adding a new integration, please include 1. Tested with locally available TEI endpoints with and without `additional_headers` 2. Example Usage ```python embeddings=HuggingFaceInferenceAPIEmbeddings( api_key=MY_CUSTOM_API_KEY, api_url=MY_CUSTOM_TEI_URL, additional_headers={ "Content-Type": "application/json" } ) ``` Additional guidelines: - Make sure optional dependencies are imported within a function. - Please do not add dependencies to pyproject.toml files (even optional ones) unless they are required for unit tests. - Most PRs should not touch more than one package. - Changes should be backwards compatible. - If you are adding something to community, do not re-import it in langchain. If no one reviews your PR within a few days, please @-mention one of baskaryan, efriis, eyurtsev, hwchase17. --------- Co-authored-by: Massimiliano Pronesti <[email protected]> Co-authored-by: Harrison Chase <[email protected]>
3 tasks
kyle-cassidy
pushed a commit
to kyle-cassidy/langchain
that referenced
this pull request
May 16, 2024
…nt. (langchain-ai#21282) Thank you for contributing to LangChain! - [ ] **HuggingFaceInferenceAPIEmbeddings**: "Additional Headers" - Where: langchain, community, embeddings. huggingface.py. - Community: add additional headers when needed by custom HuggingFace TEI embedding endpoints. HuggingFaceInferenceAPIEmbeddings" - [ ] **PR message**: ***Delete this entire checklist*** and replace with - **Description:** Adding the `additional_headers` to be passed to requests library if needed - **Dependencies:** none - [ ] **Add tests and docs**: If you're adding a new integration, please include 1. Tested with locally available TEI endpoints with and without `additional_headers` 2. Example Usage ```python embeddings=HuggingFaceInferenceAPIEmbeddings( api_key=MY_CUSTOM_API_KEY, api_url=MY_CUSTOM_TEI_URL, additional_headers={ "Content-Type": "application/json" } ) ``` Additional guidelines: - Make sure optional dependencies are imported within a function. - Please do not add dependencies to pyproject.toml files (even optional ones) unless they are required for unit tests. - Most PRs should not touch more than one package. - Changes should be backwards compatible. - If you are adding something to community, do not re-import it in langchain. If no one reviews your PR within a few days, please @-mention one of baskaryan, efriis, eyurtsev, hwchase17. --------- Co-authored-by: Massimiliano Pronesti <[email protected]> Co-authored-by: Harrison Chase <[email protected]>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
🤖: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:XS
This PR changes 0-9 lines, ignoring generated files.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Thank you for contributing to LangChain!
HuggingFaceInferenceAPIEmbeddings: "Additional Headers"
PR message: Delete this entire checklist and replace with
additional_headers
to be passed to requests library if neededAdd tests and docs: If you're adding a new integration, please include
additional_headers
Additional guidelines:
If no one reviews your PR within a few days, please @-mention one of baskaryan, efriis, eyurtsev, hwchase17.