Skip to content

Commit

Permalink
fix text embedder tests
Browse files Browse the repository at this point in the history
  • Loading branch information
ZanSara committed Jan 16, 2024
1 parent a0ce770 commit 314a293
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions integrations/cohere/tests/test_text_embedder.py
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand All @@ -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",
Expand All @@ -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"
Expand All @@ -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",
Expand All @@ -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",
Expand All @@ -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",
Expand Down

0 comments on commit 314a293

Please sign in to comment.