You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
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
)
```
1 year ago
..
__init__.py FAISS and embedding support (#48) 2 years ago
test_cohere.py Issam9/cohere embeddings (#105) 2 years ago
test_elasticsearch.py Add ElasticsearchEmbeddings class for generating embeddings using Elasticsearch models (#3401) 1 year ago
test_google_palm.py Add ChatModel, LLM, and Embeddings for Google's PaLM APIs (#3575) 1 year ago
test_huggingface.py `encoding_kwargs` for InstructEmbeddings (#5450) 1 year ago
test_huggingface_hub.py nits (#210) 2 years ago
test_jina.py Harrison/jina (#2043) 1 year ago
test_llamacpp.py Harrison/llama (#2314) 1 year ago
test_modelscope_hub.py Harrison/modelscope (#5156) 1 year ago
test_mosaicml.py Add MosaicML inference endpoints (#4607) 1 year ago
test_openai.py openai embeddings (#3488) 1 year ago
test_self_hosted.py Harrison/self hosted runhouse (#1154) 2 years ago
test_sentence_transformer.py Add Sentence Transformers Embeddings (#3409) 1 year ago
test_tensorflow_hub.py Harrison/tf embeddings (#817) 2 years ago
test_vertexai.py Add pagination for Vertex AI embeddings (#5325) 1 year ago