-
Notifications
You must be signed in to change notification settings - Fork 15.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
30 additions
and
0 deletions.
There are no files selected for viewing
30 changes: 30 additions & 0 deletions
30
libs/partners/huggingface/tests/integration_tests/test_embeddings_standard.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
"""Test HuggingFace embeddings.""" | ||
|
||
from typing import Type | ||
|
||
from langchain_standard_tests.integration_tests import EmbeddingsIntegrationTests | ||
|
||
from langchain_huggingface.embeddings import ( | ||
HuggingFaceEmbeddings, | ||
HuggingFaceEndpointEmbeddings, | ||
) | ||
|
||
|
||
class TestHuggingFaceEmbeddings(EmbeddingsIntegrationTests): | ||
@property | ||
def embeddings_class(self) -> Type[HuggingFaceEmbeddings]: | ||
return HuggingFaceEmbeddings | ||
|
||
@property | ||
def embedding_model_params(self) -> dict: | ||
return {"model_name": "sentence-transformers/all-mpnet-base-v2"} | ||
|
||
|
||
class TestHuggingFaceEndpointEmbeddings(EmbeddingsIntegrationTests): | ||
@property | ||
def embeddings_class(self) -> Type[HuggingFaceEndpointEmbeddings]: | ||
return HuggingFaceEndpointEmbeddings | ||
|
||
@property | ||
def embedding_model_params(self) -> dict: | ||
return {"model": "sentence-transformers/all-mpnet-base-v2"} |