File tree Expand file tree Collapse file tree 2 files changed +3
-18
lines changed Expand file tree Collapse file tree 2 files changed +3
-18
lines changed Original file line number Diff line number Diff line change 33from typing import Any , List
44
55import requests
6- from langchain_core ._api .deprecation import deprecated
76from langchain_core .embeddings import Embeddings
87from 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
Original file line number Diff line number Diff 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
1515def 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
2720def 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 )
You can’t perform that action at this time.
0 commit comments