Files
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
..
2022-11-01 21:29:39 -07:00
2022-11-09 13:44:27 -08:00
2022-11-27 13:03:09 -08:00
2023-03-28 08:16:17 -07:00
2023-04-02 14:57:45 -07:00
2023-04-24 22:19:47 -07:00