From 314a293819227012375bba2e6a4980595b675b16 Mon Sep 17 00:00:00 2001 From: ZanSara Date: Tue, 16 Jan 2024 18:16:45 +0100 Subject: [PATCH] fix text embedder tests --- integrations/cohere/tests/test_text_embedder.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/integrations/cohere/tests/test_text_embedder.py b/integrations/cohere/tests/test_text_embedder.py index 46f77cb43..7e91b4812 100644 --- a/integrations/cohere/tests/test_text_embedder.py +++ b/integrations/cohere/tests/test_text_embedder.py @@ -19,7 +19,7 @@ def test_init_default(self): embedder = CohereTextEmbedder(api_key="test-api-key") assert embedder.api_key == "test-api-key" - assert embedder.model_name == "embed-english-v2.0" + assert embedder.model == "embed-english-v2.0" assert embedder.input_type == "search_query" assert embedder.api_base_url == COHERE_API_URL assert embedder.truncate == "END" @@ -33,7 +33,7 @@ def test_init_with_parameters(self): """ embedder = CohereTextEmbedder( api_key="test-api-key", - model_name="embed-multilingual-v2.0", + model="embed-multilingual-v2.0", input_type="classification", api_base_url="https://custom-api-base-url.com", truncate="START", @@ -42,7 +42,7 @@ def test_init_with_parameters(self): timeout=60, ) assert embedder.api_key == "test-api-key" - assert embedder.model_name == "embed-multilingual-v2.0" + assert embedder.model == "embed-multilingual-v2.0" assert embedder.input_type == "classification" assert embedder.api_base_url == "https://custom-api-base-url.com" assert embedder.truncate == "START" @@ -59,7 +59,7 @@ def test_to_dict(self): assert component_dict == { "type": "cohere_haystack.embedders.text_embedder.CohereTextEmbedder", "init_parameters": { - "model_name": "embed-english-v2.0", + "model": "embed-english-v2.0", "input_type": "search_query", "api_base_url": COHERE_API_URL, "truncate": "END", @@ -75,7 +75,7 @@ def test_to_dict_with_custom_init_parameters(self): """ embedder_component = CohereTextEmbedder( api_key="test-api-key", - model_name="embed-multilingual-v2.0", + model="embed-multilingual-v2.0", input_type="classification", api_base_url="https://custom-api-base-url.com", truncate="START", @@ -87,7 +87,7 @@ def test_to_dict_with_custom_init_parameters(self): assert component_dict == { "type": "cohere_haystack.embedders.text_embedder.CohereTextEmbedder", "init_parameters": { - "model_name": "embed-multilingual-v2.0", + "model": "embed-multilingual-v2.0", "input_type": "classification", "api_base_url": "https://custom-api-base-url.com", "truncate": "START",