mirror of
https://github.com/hwchase17/langchain.git
synced 2025-06-03 21:54:04 +00:00
qdrant[patch]: Make path optional in from_existing_collection() (#21875)
## Description The `path` param is used to specify the local persistence directory, which isn't required if using Qdrant server. This is a breaking but necessary change.
This commit is contained in:
parent
b57aa89f34
commit
80560419b0
@ -1353,8 +1353,8 @@ class Qdrant(VectorStore):
|
|||||||
def from_existing_collection(
|
def from_existing_collection(
|
||||||
cls: Type[Qdrant],
|
cls: Type[Qdrant],
|
||||||
embedding: Embeddings,
|
embedding: Embeddings,
|
||||||
path: str,
|
path: Optional[str] = None,
|
||||||
collection_name: str,
|
collection_name: Optional[str] = None,
|
||||||
location: Optional[str] = None,
|
location: Optional[str] = None,
|
||||||
url: Optional[str] = None,
|
url: Optional[str] = None,
|
||||||
port: Optional[int] = 6333,
|
port: Optional[int] = 6333,
|
||||||
@ -1376,6 +1376,10 @@ class Qdrant(VectorStore):
|
|||||||
This method will return the instance of the store without inserting any new
|
This method will return the instance of the store without inserting any new
|
||||||
embeddings
|
embeddings
|
||||||
"""
|
"""
|
||||||
|
|
||||||
|
if collection_name is None:
|
||||||
|
raise ValueError("Must specify collection_name. Received None.")
|
||||||
|
|
||||||
client, async_client = cls._generate_clients(
|
client, async_client = cls._generate_clients(
|
||||||
location=location,
|
location=location,
|
||||||
url=url,
|
url=url,
|
||||||
|
Loading…
Reference in New Issue
Block a user