langchain/tests/integration_tests/embeddings
Yoann Poupart c1807d8408
encoding_kwargs for InstructEmbeddings (#5450)
# What does this PR do?

Bring support of `encode_kwargs` for ` HuggingFaceInstructEmbeddings`,
change the docstring example and add a test to illustrate with
`normalize_embeddings`.

Fixes #3605
(Similar to #3914)

Use case:
```python
from langchain.embeddings import HuggingFaceInstructEmbeddings

model_name = "hkunlp/instructor-large"
model_kwargs = {'device': 'cpu'}
encode_kwargs = {'normalize_embeddings': True}
hf = HuggingFaceInstructEmbeddings(
    model_name=model_name,
    model_kwargs=model_kwargs,
    encode_kwargs=encode_kwargs
)
```
2023-05-30 11:57:04 -07:00
..
__init__.py
test_cohere.py
test_elasticsearch.py Add ElasticsearchEmbeddings class for generating embeddings using Elasticsearch models (#3401) 2023-05-23 14:50:33 -07:00
test_google_palm.py Add ChatModel, LLM, and Embeddings for Google's PaLM APIs (#3575) 2023-05-01 15:23:16 -07:00
test_huggingface_hub.py
test_huggingface.py encoding_kwargs for InstructEmbeddings (#5450) 2023-05-30 11:57:04 -07:00
test_jina.py Harrison/jina (#2043) 2023-03-28 08:16:17 -07:00
test_llamacpp.py Harrison/llama (#2314) 2023-04-02 14:57:45 -07:00
test_modelscope_hub.py Harrison/modelscope (#5156) 2023-05-24 08:06:45 -07:00
test_mosaicml.py Add MosaicML inference endpoints (#4607) 2023-05-23 15:59:08 -07:00
test_openai.py openai embeddings (#3488) 2023-04-24 22:19:47 -07:00
test_self_hosted.py Harrison/self hosted runhouse (#1154) 2023-02-19 09:53:45 -08:00
test_sentence_transformer.py Add Sentence Transformers Embeddings (#3409) 2023-04-23 18:25:20 -07:00
test_tensorflow_hub.py
test_vertexai.py Add pagination for Vertex AI embeddings (#5325) 2023-05-29 06:57:41 -07:00