From c673f5c03a06431be821df9e620df0f8196e0c78 Mon Sep 17 00:00:00 2001 From: prezakhani <13303554+Pouyanpi@users.noreply.github.com> Date: Thu, 9 Jan 2025 15:07:24 +0100 Subject: [PATCH] test: add test for additional params in FastEmbed --- tests/test_embeddings_fastembed.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/tests/test_embeddings_fastembed.py b/tests/test_embeddings_fastembed.py index aaaba76c9..0840f23b3 100644 --- a/tests/test_embeddings_fastembed.py +++ b/tests/test_embeddings_fastembed.py @@ -26,6 +26,13 @@ def test_sync_embeddings(): assert len(result[0]) == 384 +def test_aditional_params_with_fastembed(): + model = FastEmbedEmbeddingModel("all-MiniLM-L6-v2", max_length=512, lazy_load=True) + result = model.encode(["test"]) + + assert len(result[0]) == 384 + + @pytest.mark.asyncio async def test_async_embeddings(): model = FastEmbedEmbeddingModel("all-MiniLM-L6-v2")