mirror of
https://github.com/hwchase17/langchain.git
synced 2025-05-30 11:39:03 +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(
|
||||
cls: Type[Qdrant],
|
||||
embedding: Embeddings,
|
||||
path: str,
|
||||
collection_name: str,
|
||||
path: Optional[str] = None,
|
||||
collection_name: Optional[str] = None,
|
||||
location: Optional[str] = None,
|
||||
url: Optional[str] = None,
|
||||
port: Optional[int] = 6333,
|
||||
@ -1376,6 +1376,10 @@ class Qdrant(VectorStore):
|
||||
This method will return the instance of the store without inserting any new
|
||||
embeddings
|
||||
"""
|
||||
|
||||
if collection_name is None:
|
||||
raise ValueError("Must specify collection_name. Received None.")
|
||||
|
||||
client, async_client = cls._generate_clients(
|
||||
location=location,
|
||||
url=url,
|
||||
|
Loading…
Reference in New Issue
Block a user