mirror of
https://github.com/hwchase17/langchain.git
synced 2025-06-25 16:13:25 +00:00
mark NemoEmbeddings as deprecated (#21239)
The NemoEmbeddings is deprecated, instead use langchain-nvidia-ai-endpoints NVIDIAEmbeddings interface. cc: @mattf --------- Co-authored-by: Daniel Glogowski <167348611+dglogo@users.noreply.github.com> Co-authored-by: andyjessen <62343929+andyjessen@users.noreply.github.com> Co-authored-by: Chris Germann <88305668+TAAGECH9@users.noreply.github.com> Co-authored-by: gere <gere@kapo.zh.ch> Co-authored-by: Chester Curme <chester.curme@gmail.com>
This commit is contained in:
parent
9e4b24a2d6
commit
a2fdabdad2
@ -6,6 +6,7 @@ from typing import Any, Dict, List, Optional
|
||||
|
||||
import aiohttp
|
||||
import requests
|
||||
from langchain_core._api.deprecation import deprecated
|
||||
from langchain_core.embeddings import Embeddings
|
||||
from langchain_core.pydantic_v1 import BaseModel, root_validator
|
||||
|
||||
@ -41,6 +42,15 @@ def is_endpoint_live(url: str, headers: Optional[dict], payload: Any) -> bool:
|
||||
raise Exception(f"Error querying the endpoint: {e}")
|
||||
|
||||
|
||||
@deprecated(
|
||||
since="0.0.37",
|
||||
removal="0.2.0",
|
||||
message=(
|
||||
"Directly instantiating a NeMoEmbeddings from langchain-community is "
|
||||
"deprecated. Please use langchain-nvidia-ai-endpoints NVIDIAEmbeddings "
|
||||
"interface."
|
||||
),
|
||||
)
|
||||
class NeMoEmbeddings(BaseModel, Embeddings):
|
||||
"""NeMo embedding models."""
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user