Files
langchain/tests/integration_tests
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
..
2023-05-10 11:08:29 -07:00
2023-05-22 07:31:48 -07:00
2023-05-24 15:51:12 -07:00
2023-05-24 21:06:03 +00:00
2023-05-24 10:02:09 -07:00
2023-05-25 19:19:22 -07:00
2022-10-24 14:51:15 -07:00