Skip to content

Commit 1cae238

Browse files
committed
Edit tests to remove region since it's not used anymore
1 parent 1189926 commit 1cae238

File tree

2 files changed

+3
-18
lines changed

2 files changed

+3
-18
lines changed

libs/community/langchain_community/embeddings/ovhcloud.py

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
from typing import Any, List
44

55
import requests
6-
from langchain_core._api.deprecation import deprecated
76
from langchain_core.embeddings import Embeddings
87
from pydantic import BaseModel, ConfigDict
98

@@ -21,13 +20,6 @@ class OVHCloudEmbeddings(BaseModel, Embeddings):
2120
""" OVHcloud AI Endpoints model name for embeddings generation"""
2221
model_name: str = ""
2322

24-
@deprecated(
25-
since="0.4.2",
26-
removal="1.0",
27-
)
28-
""" OVHcloud AI Endpoints region (deprecated, kept for backward compatibility)"""
29-
region: str = "kepler"
30-
3123
""" OVHcloud AI Endpoints base URL"""
3224
base_url: str = "https://oai.endpoints.kepler.ai.cloud.ovh.net/v1"
3325

libs/community/tests/unit_tests/embeddings/test_ovhcloud.py

Lines changed: 3 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -7,25 +7,18 @@ def test_ovhcloud_correct_instantiation() -> None:
77
llm = OVHCloudEmbeddings(model_name="multilingual-e5-base", access_token="token")
88
assert isinstance(llm, OVHCloudEmbeddings)
99
llm = OVHCloudEmbeddings(
10-
model_name="multilingual-e5-base", region="kepler", access_token="token"
10+
model_name="multilingual-e5-base", access_token="token"
1111
)
1212
assert isinstance(llm, OVHCloudEmbeddings)
1313

1414

1515
def test_ovhcloud_empty_model_name_should_raise_error() -> None:
1616
with pytest.raises(ValueError):
17-
OVHCloudEmbeddings(model_name="", region="kepler", access_token="token")
18-
19-
20-
def test_ovhcloud_empty_region_should_raise_error() -> None:
21-
with pytest.raises(ValueError):
22-
OVHCloudEmbeddings(
23-
model_name="multilingual-e5-base", region="", access_token="token"
24-
)
17+
OVHCloudEmbeddings(model_name="", access_token="token")
2518

2619

2720
def test_ovhcloud_empty_access_token_should_raise_error() -> None:
2821
with pytest.raises(ValueError):
2922
OVHCloudEmbeddings(
30-
model_name="multilingual-e5-base", region="kepler", access_token=""
23+
model_name="multilingual-e5-base", access_token=""
3124
)

0 commit comments

Comments
 (0)