weaviate: Add-deprecation-warning (#29757)

- **Description:** add deprecation warning when using weaviate from
langchain_community
  - **Issue:** NA
  - **Dependencies:** NA
  - **Twitter handle:** NA

---------

Signed-off-by: hsm207 <hsm207@users.noreply.github.com>
Co-authored-by: Chester Curme <chester.curme@gmail.com>
This commit is contained in:
hsm207 2025-02-17 03:42:18 +01:00 committed by GitHub
parent cd198ac9ed
commit 037b129b86
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 12 additions and 0 deletions

View File

@ -3,12 +3,18 @@ from __future__ import annotations
from typing import Any, Dict, List, Optional, cast
from uuid import uuid4
from langchain_core._api import deprecated
from langchain_core.callbacks import CallbackManagerForRetrieverRun
from langchain_core.documents import Document
from langchain_core.retrievers import BaseRetriever
from pydantic import ConfigDict, model_validator
@deprecated(
since="0.3.18",
removal="1.0",
alternative_import="langchain_weaviate.WeaviateVectorStore",
)
class WeaviateHybridSearchRetriever(BaseRetriever):
"""`Weaviate hybrid search` retriever.

View File

@ -15,6 +15,7 @@ from typing import (
from uuid import uuid4
import numpy as np
from langchain_core._api import deprecated
from langchain_core.documents import Document
from langchain_core.embeddings import Embeddings
from langchain_core.vectorstores import VectorStore
@ -65,6 +66,11 @@ def _json_serializable(value: Any) -> Any:
return value
@deprecated(
since="0.3.18",
removal="1.0",
alternative_import="langchain_weaviate.WeaviateVectorStore",
)
class Weaviate(VectorStore):
"""`Weaviate` vector store.