framework, such as FastAPI.LangChain supports async operation on vector stores. All the methods might be called using their async counterparts, with the prefix a, meaning async.Qdrant is a vector store, which supports all the async operations, thus it will be used in this walkthrough.pip install qdrant-clientfrom langchain.vectorstores import QdrantCreate a vector store asynchronously‚Äãdb = await Qdrant.afrom_documents(documents, embeddings, "http://localhost:6333")Similarity search‚Äãquery = "What did the president say about Ketanji Brown Jackson"docs = await db.asimilarity_search(query)print(docs[0].page_content)    Tonight. I call on the Senate to: Pass the Freedom to Vote Act. Pass the John Lewis Voting Rights Act. And while you‚Äôre at it, pass the Disclose Act so Americans can know who is funding our elections.    Tonight, I‚Äôd like to honor someone who has dedicated his life to serve this country: Justice Stephen Breyer‚Äîan Army veteran, Constitutional scholar, and retiring Justice of the United States Supreme Court. Justice Breyer, thank you for your service.    One of the most serious constitutional responsibilities a President has is nominating someone to serve on the United States Supreme Court.    And I did that 4 days ago, when I nominated Circuit Court of Appeals Judge Ketanji Brown Jackson. One of our nation‚Äôs top legal minds, who will continue Justice Breyer‚Äôs legacy of excellence.Similarity search by vector‚Äãembedding_vector = embeddings.embed_query(query)docs = await db.asimilarity_search_by_vector(embedding_vector)Maximum marginal relevance search (MMR)‚ÄãMaximal marginal relevance optimizes for similarity to query and diversity among selected documents. It is also supported in async API.query = "What did the president say about Ketanji Brown Jackson"found_docs = await qdrant.amax_marginal_relevance_search(query, k=2, fetch_k=10)for i, doc in enumerate(found_docs):    print(f"{i + 1}.", doc.page_content, "\n")1. Tonight. I call on the
Head to Integrations for documentation on built-in integrations with 3rd-party vector stores.
Head to Integrations for documentation on built-in integrations with 3rd-party vector stores. ->: framework, such as FastAPI.LangChain supports async operation on vector stores. All the methods might be called using their async counterparts, with the prefix a, meaning async.Qdrant is a vector store, which supports all the async operations, thus it will be used in this walkthrough.pip install qdrant-clientfrom langchain.vectorstores import QdrantCreate a vector store asynchronously‚Äãdb = await Qdrant.afrom_documents(documents, embeddings, "http://localhost:6333")Similarity search‚Äãquery = "What did the president say about Ketanji Brown Jackson"docs = await db.asimilarity_search(query)print(docs[0].page_content)    Tonight. I call on the Senate to: Pass the Freedom to Vote Act. Pass the John Lewis Voting Rights Act. And while you‚Äôre at it, pass the Disclose Act so Americans can know who is funding our elections.    Tonight, I‚Äôd like to honor someone who has dedicated his life to serve this country: Justice Stephen Breyer‚Äîan Army veteran, Constitutional scholar, and retiring Justice of the United States Supreme Court. Justice Breyer, thank you for your service.    One of the most serious constitutional responsibilities a President has is nominating someone to serve on the United States Supreme Court.    And I did that 4 days ago, when I nominated Circuit Court of Appeals Judge Ketanji Brown Jackson. One of our nation‚Äôs top legal minds, who will continue Justice Breyer‚Äôs legacy of excellence.Similarity search by vector‚Äãembedding_vector = embeddings.embed_query(query)docs = await db.asimilarity_search_by_vector(embedding_vector)Maximum marginal relevance search (MMR)‚ÄãMaximal marginal relevance optimizes for similarity to query and diversity among selected documents. It is also supported in async API.query = "What did the president say about Ketanji Brown Jackson"found_docs = await qdrant.amax_marginal_relevance_search(query, k=2, fetch_k=10)for i, doc in enumerate(found_docs):    print(f"{i + 1}.", doc.page_content, "\n")1. Tonight. I call on the