@@ -247,17 +247,18 @@ class LangchainEmbeddingsWrapper(BaseRagasEmbeddings):
247247 """
248248 Wrapper for any embeddings from langchain.
249249
250- .. deprecated::
251- LangchainEmbeddingsWrapper is deprecated and will be removed in a future version.
252- Use the modern embedding providers directly with embedding_factory() instead:
253-
254- # Instead of:
255- # embedder = LangchainEmbeddingsWrapper(langchain_embeddings)
256-
257- # Use:
258- # embedder = embedding_factory("openai", model="text-embedding-3-small", client=openai_client)
259- # embedder = embedding_factory("huggingface", model="sentence-transformers/all-MiniLM-L6-v2")
260- # embedder = embedding_factory("google", client=vertex_client)
250+ # TODO: Revisit deprecation warning
251+ # .. deprecated::
252+ # LangchainEmbeddingsWrapper is deprecated and will be removed in a future version.
253+ # Use the modern embedding providers directly with embedding_factory() instead:
254+ #
255+ # # Instead of:
256+ # # embedder = LangchainEmbeddingsWrapper(langchain_embeddings)
257+ #
258+ # # Use:
259+ # # embedder = embedding_factory("openai", model="text-embedding-3-small", client=openai_client)
260+ # # embedder = embedding_factory("huggingface", model="sentence-transformers/all-MiniLM-L6-v2")
261+ # # embedder = embedding_factory("google", client=vertex_client)
261262 """
262263
263264 def __init__ (
@@ -266,16 +267,15 @@ def __init__(
266267 run_config : t .Optional [RunConfig ] = None ,
267268 cache : t .Optional [CacheInterface ] = None ,
268269 ):
269- import warnings
270-
271- warnings .warn (
272- "LangchainEmbeddingsWrapper is deprecated and will be removed in a future version. "
273- "Use the modern embedding providers instead: "
274- "embedding_factory('openai', model='text-embedding-3-small', client=openai_client) "
275- "or from ragas.embeddings import OpenAIEmbeddings, GoogleEmbeddings, HuggingFaceEmbeddings" ,
276- DeprecationWarning ,
277- stacklevel = 2 ,
278- )
270+ # TODO: Revisit deprecation warning
271+ # warnings.warn(
272+ # "LangchainEmbeddingsWrapper is deprecated and will be removed in a future version. "
273+ # "Use the modern embedding providers instead: "
274+ # "embedding_factory('openai', model='text-embedding-3-small', client=openai_client) "
275+ # "or from ragas.embeddings import OpenAIEmbeddings, GoogleEmbeddings, HuggingFaceEmbeddings",
276+ # DeprecationWarning,
277+ # stacklevel=2,
278+ # )
279279 super ().__init__ (cache = cache )
280280 self .embeddings = embeddings
281281 if run_config is None :
@@ -513,17 +513,18 @@ class LlamaIndexEmbeddingsWrapper(BaseRagasEmbeddings):
513513 """
514514 Wrapper for any embeddings from llama-index.
515515
516- .. deprecated::
517- LlamaIndexEmbeddingsWrapper is deprecated and will be removed in a future version.
518- Use the modern embedding providers directly with embedding_factory() instead:
519-
520- # Instead of:
521- # embedder = LlamaIndexEmbeddingsWrapper(llama_index_embeddings)
522-
523- # Use:
524- # embedder = embedding_factory("openai", model="text-embedding-3-small", client=openai_client)
525- # embedder = embedding_factory("huggingface", model="sentence-transformers/all-MiniLM-L6-v2")
526- # embedder = embedding_factory("google", client=vertex_client)
516+ # TODO: Revisit deprecation warning
517+ # .. deprecated::
518+ # LlamaIndexEmbeddingsWrapper is deprecated and will be removed in a future version.
519+ # Use the modern embedding providers directly with embedding_factory() instead:
520+ #
521+ # # Instead of:
522+ # # embedder = LlamaIndexEmbeddingsWrapper(llama_index_embeddings)
523+ #
524+ # # Use:
525+ # # embedder = embedding_factory("openai", model="text-embedding-3-small", client=openai_client)
526+ # # embedder = embedding_factory("huggingface", model="sentence-transformers/all-MiniLM-L6-v2")
527+ # # embedder = embedding_factory("google", client=vertex_client)
527528
528529 This class provides a wrapper for llama-index embeddings, allowing them to be used
529530 within the Ragas framework. It supports both synchronous and asynchronous embedding
@@ -557,16 +558,15 @@ def __init__(
557558 run_config : t .Optional [RunConfig ] = None ,
558559 cache : t .Optional [CacheInterface ] = None ,
559560 ):
560- import warnings
561-
562- warnings .warn (
563- "LlamaIndexEmbeddingsWrapper is deprecated and will be removed in a future version. "
564- "Use the modern embedding providers instead: "
565- "embedding_factory('openai', model='text-embedding-3-small', client=openai_client) "
566- "or from ragas.embeddings import OpenAIEmbeddings, GoogleEmbeddings, HuggingFaceEmbeddings" ,
567- DeprecationWarning ,
568- stacklevel = 2 ,
569- )
561+ # TODO: Revisit deprecation warning
562+ # warnings.warn(
563+ # "LlamaIndexEmbeddingsWrapper is deprecated and will be removed in a future version. "
564+ # "Use the modern embedding providers instead: "
565+ # "embedding_factory('openai', model='text-embedding-3-small', client=openai_client) "
566+ # "or from ragas.embeddings import OpenAIEmbeddings, GoogleEmbeddings, HuggingFaceEmbeddings",
567+ # DeprecationWarning,
568+ # stacklevel=2,
569+ # )
570570 super ().__init__ (cache = cache )
571571 self .embeddings = embeddings
572572 if run_config is None :
0 commit comments