Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

I before E #6015

Merged
merged 1 commit into from
Jun 11, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 11 additions & 1 deletion langchain/retrievers/milvus.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Milvus Retriever"""
import warnings
from typing import Any, Dict, List, Optional

from langchain.embeddings.base import Embeddings
Expand All @@ -8,7 +9,7 @@
# TODO: Update to MilvusClient + Hybrid Search when available


class MilvusRetreiver(BaseRetriever):
class MilvusRetriever(BaseRetriever):
def __init__(
self,
embedding_function: Embeddings,
Expand Down Expand Up @@ -41,3 +42,12 @@ def get_relevant_documents(self, query: str) -> List[Document]:

async def aget_relevant_documents(self, query: str) -> List[Document]:
raise NotImplementedError


def MilvusRetreiver(*args: Any, **kwargs: Any) -> MilvusRetriever:
warnings.warn(
"MilvusRetreiver will be deprecated in the future. "
"Please use MilvusRetriever ('i' before 'e') instead.",
DeprecationWarning,
)
return MilvusRetriever(*args, **kwargs)
12 changes: 11 additions & 1 deletion langchain/retrievers/zilliz.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Zilliz Retriever"""
import warnings
from typing import Any, Dict, List, Optional

from langchain.embeddings.base import Embeddings
Expand All @@ -8,7 +9,7 @@
# TODO: Update to ZillizClient + Hybrid Search when available


class ZillizRetreiver(BaseRetriever):
class ZillizRetriever(BaseRetriever):
def __init__(
self,
embedding_function: Embeddings,
Expand Down Expand Up @@ -41,3 +42,12 @@ def get_relevant_documents(self, query: str) -> List[Document]:

async def aget_relevant_documents(self, query: str) -> List[Document]:
raise NotImplementedError


def ZillizRetreiver(*args: Any, **kwargs: Any) -> ZillizRetriever:
warnings.warn(
"ZillizRetreiver will be deprecated in the future. "
"Please use ZillizRetriever ('i' before 'e') instead.",
DeprecationWarning,
)
return ZillizRetriever(*args, **kwargs)