mirror of
https://github.com/hwchase17/langchain.git
synced 2025-08-31 18:38:48 +00:00
Bug-Fix[Community] Fix FastEmbedEmbeddings
(#26764)
#26759 - Fix https://github.com/langchain-ai/langchain/issues/26759 - Change `model` param from private to public, which may not be initiated. - Add test case
This commit is contained in:
@@ -80,3 +80,11 @@ async def test_fastembed_async_embedding_query(
|
||||
embedding = FastEmbedEmbeddings(model_name=model_name, max_length=max_length) # type: ignore[call-arg]
|
||||
output = await embedding.aembed_query(document)
|
||||
assert len(output) == 384
|
||||
|
||||
|
||||
def test_fastembed_embedding_query_with_default_params() -> None:
|
||||
"""Test fastembed embeddings for query with default model params"""
|
||||
document = "foo bar"
|
||||
embedding = FastEmbedEmbeddings() # type: ignore[call-arg]
|
||||
output = embedding.embed_query(document)
|
||||
assert len(output) == 384
|
||||
|
Reference in New Issue
Block a user