Skip to content

Commit

Permalink
partners: deprecate existing clova embeddings
Browse files Browse the repository at this point in the history
  • Loading branch information
hyper-clova committed Aug 5, 2024
1 parent 1edd4b4 commit 79919e3
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
6 changes: 6 additions & 0 deletions libs/community/langchain_community/embeddings/clova.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,14 @@
from langchain_core.embeddings import Embeddings
from langchain_core.pydantic_v1 import BaseModel, Extra, SecretStr, root_validator
from langchain_core.utils import convert_to_secret_str, get_from_dict_or_env
from langchain_core._api.deprecation import deprecated


@deprecated(
since="0.2.12",
removal="0.3.0",
alternative_import="langchain_community.ClovaXEmbeddings"
)
class ClovaEmbeddings(BaseModel, Embeddings):
"""
Clova's embedding service.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
from langchain_community.embeddings import ClovaXEmbeddings


def test_langchain_naver_embedding_documents() -> None:
def test_embedding_documents() -> None:
"""Test cohere embeddings."""
documents = ["foo bar"]
embedding = ClovaXEmbeddings()
Expand All @@ -11,7 +11,7 @@ def test_langchain_naver_embedding_documents() -> None:
assert len(output[0]) > 0


def test_langchain_naver_embedding_query() -> None:
def test_embedding_query() -> None:
"""Test cohere embeddings."""
document = "foo bar"
embedding = ClovaXEmbeddings()
Expand Down

0 comments on commit 79919e3

Please sign in to comment.