forked from Archives/langchain
I before E (#6015)
This commit is contained in:
parent
a7227ee01b
commit
614cff89bc
@ -1,4 +1,5 @@
|
||||
"""Milvus Retriever"""
|
||||
import warnings
|
||||
from typing import Any, Dict, List, Optional
|
||||
|
||||
from langchain.embeddings.base import Embeddings
|
||||
@ -8,7 +9,7 @@ from langchain.vectorstores.milvus import Milvus
|
||||
# TODO: Update to MilvusClient + Hybrid Search when available
|
||||
|
||||
|
||||
class MilvusRetreiver(BaseRetriever):
|
||||
class MilvusRetriever(BaseRetriever):
|
||||
def __init__(
|
||||
self,
|
||||
embedding_function: Embeddings,
|
||||
@ -41,3 +42,12 @@ class MilvusRetreiver(BaseRetriever):
|
||||
|
||||
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)
|
||||
|
@ -1,4 +1,5 @@
|
||||
"""Zilliz Retriever"""
|
||||
import warnings
|
||||
from typing import Any, Dict, List, Optional
|
||||
|
||||
from langchain.embeddings.base import Embeddings
|
||||
@ -8,7 +9,7 @@ from langchain.vectorstores.zilliz import Zilliz
|
||||
# TODO: Update to ZillizClient + Hybrid Search when available
|
||||
|
||||
|
||||
class ZillizRetreiver(BaseRetriever):
|
||||
class ZillizRetriever(BaseRetriever):
|
||||
def __init__(
|
||||
self,
|
||||
embedding_function: Embeddings,
|
||||
@ -41,3 +42,12 @@ class ZillizRetreiver(BaseRetriever):
|
||||
|
||||
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)
|
||||
|
Loading…
Reference in New Issue
Block a user