langchain/libs/community/langchain_community/embeddings
Miroslav 04e2611fea
Added additional headers for HuggingFaceInferenceAPIEmbeddings endpoint. (#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 <massimiliano.pronesti@gmail.com>
Co-authored-by: Harrison Chase <hw.chase.17@gmail.com>
2024-05-07 14:17:53 -04:00
..
__init__.py community: add SambaNova embeddings integration (#21227) 2024-05-06 13:29:59 -07:00
aleph_alpha.py community[minor]: import fix (#20995) 2024-04-29 10:32:50 -04:00
anyscale.py community[minor]: Add Anyscale embedding support (#17605) 2024-03-29 00:53:53 +00:00
awa.py
azure_openai.py (all): update removal in deprecation warnings from 0.2 to 0.3 (#21265) 2024-05-03 14:29:36 -04:00
baichuan.py
baidu_qianfan_endpoint.py
bedrock.py community[minor]: import fix (#20995) 2024-04-29 10:32:50 -04:00
bookend.py
clarifai.py
cloudflare_workersai.py
cohere.py (all): update removal in deprecation warnings from 0.2 to 0.3 (#21265) 2024-05-03 14:29:36 -04:00
dashscope.py
databricks.py community[patch]: docstrings update (#20301) 2024-04-11 16:23:27 -04:00
deepinfra.py
edenai.py
elasticsearch.py
embaas.py
ernie.py
fake.py
fastembed.py community[patch]: support fastembed v1 and v2 (#19125) 2024-03-15 18:33:51 -07:00
gigachat.py community[minor]: Added GigaChat Embeddings support + updated previous GigaChat integration (#19516) 2024-03-25 16:08:37 -07:00
google_palm.py
gpt4all.py
gradient_ai.py
huggingface_hub.py
huggingface.py Added additional headers for HuggingFaceInferenceAPIEmbeddings endpoint. (#21282) 2024-05-07 14:17:53 -04:00
infinity_local.py community[patch]: docstrings update (#20301) 2024-04-11 16:23:27 -04:00
infinity.py docs: community docstring updates (#21040) 2024-04-29 17:40:23 -04:00
itrex.py community[minor]: Add ITREX optimized Embeddings (#18474) 2024-03-27 07:22:06 +00:00
javelin_ai_gateway.py community[patch]: docstrings update (#20301) 2024-04-11 16:23:27 -04:00
jina.py
johnsnowlabs.py
laser.py
llamacpp.py community[minor]: import fix (#20995) 2024-04-29 10:32:50 -04:00
llamafile.py
llm_rails.py
localai.py
minimax.py
mlflow_gateway.py community[patch]: docstrings update (#20301) 2024-04-11 16:23:27 -04:00
mlflow.py
modelscope_hub.py
mosaicml.py
nemo.py mark NemoEmbeddings as deprecated (#21239) 2024-05-06 19:44:58 +00:00
nlpcloud.py
oci_generative_ai.py community[minor]: import fix (#20995) 2024-04-29 10:32:50 -04:00
octoai_embeddings.py
ollama.py community[patch]: OllamaEmbeddings - Pass headers to post request (#16880) 2024-03-29 18:44:52 +00:00
openai.py (all): update removal in deprecation warnings from 0.2 to 0.3 (#21265) 2024-05-03 14:29:36 -04:00
openvino.py community[minor]: import fix (#20995) 2024-04-29 10:32:50 -04:00
optimum_intel.py community: fix tqdm import (#20263) 2024-04-25 19:44:53 +00:00
oracleai.py community[minor]: Oraclevs integration (#21123) 2024-05-04 03:15:35 +00:00
premai.py docs: community docstring updates (#21040) 2024-04-29 17:40:23 -04:00
sagemaker_endpoint.py community[patch]: Add explicit error message to Bedrock error output. (#17328) 2024-03-29 03:07:33 +00:00
sambanova.py community: add SambaNova embeddings integration (#21227) 2024-05-06 13:29:59 -07:00
self_hosted_hugging_face.py
self_hosted.py
sentence_transformer.py
solar.py (all): update removal in deprecation warnings from 0.2 to 0.3 (#21265) 2024-05-03 14:29:36 -04:00
spacy_embeddings.py
sparkllm.py docs: community docstring updates (#21040) 2024-04-29 17:40:23 -04:00
tensorflow_hub.py
text2vec.py Update text2vec.py (#19657) 2024-03-27 13:13:30 -04:00
titan_takeoff.py docs: community docstring updates (#21040) 2024-04-29 17:40:23 -04:00
vertexai.py (all): update removal in deprecation warnings from 0.2 to 0.3 (#21265) 2024-05-03 14:29:36 -04:00
volcengine.py
voyageai.py (all): update removal in deprecation warnings from 0.2 to 0.3 (#21265) 2024-05-03 14:29:36 -04:00
xinference.py
yandex.py community[patch]: YandexGPT API add ability to disable request logging (#20670) 2024-04-19 21:40:37 -04:00