id stringlengths 14 15 | text stringlengths 13 2.7k | source stringlengths 60 181 |
|---|---|---|
9c034f0b58ba-2 | max_marginal_relevance_search_by_vector(...)
Return docs selected using the maximal marginal relevance.
search(query, search_type, **kwargs)
Return docs most similar to query using specified search type.
similarity_search(query[, k])
Run similarity search using Clarifai.
similarity_search_by_vector(embedding[, k])
Retu... | https://api.python.langchain.com/en/latest/vectorstores/langchain_community.vectorstores.clarifai.Clarifai.html |
9c034f0b58ba-3 | Returns
List of IDs of the added texts.
Return type
List[str]
async aadd_texts(texts: Iterable[str], metadatas: Optional[List[dict]] = None, **kwargs: Any) → List[str]¶
Run more texts through the embeddings and add to the vectorstore.
add_documents(documents: List[Document], **kwargs: Any) → List[str]¶
Run more documen... | https://api.python.langchain.com/en/latest/vectorstores/langchain_community.vectorstores.clarifai.Clarifai.html |
9c034f0b58ba-4 | False otherwise, None if not implemented.
Return type
Optional[bool]
async classmethod afrom_documents(documents: List[Document], embedding: Embeddings, **kwargs: Any) → VST¶
Return VectorStore initialized from documents and embeddings.
async classmethod afrom_texts(texts: List[str], embedding: Embeddings, metadatas: O... | https://api.python.langchain.com/en/latest/vectorstores/langchain_community.vectorstores.clarifai.Clarifai.html |
9c034f0b58ba-5 | lambda_mult: Diversity of results returned by MMR;
1 for minimum diversity and 0 for maximum. (Default: 0.5)
filter: Filter by document metadata
Returns
Retriever class for VectorStore.
Return type
VectorStoreRetriever
Examples:
# Retrieve more documents with higher diversity
# Useful if your dataset has many similar d... | https://api.python.langchain.com/en/latest/vectorstores/langchain_community.vectorstores.clarifai.Clarifai.html |
9c034f0b58ba-6 | Return docs most similar to embedding vector.
async asimilarity_search_with_relevance_scores(query: str, k: int = 4, **kwargs: Any) → List[Tuple[Document, float]]¶
Return docs and relevance scores in the range [0, 1], asynchronously.
0 is dissimilar, 1 is most similar.
Parameters
query – input text
k – Number of Docume... | https://api.python.langchain.com/en/latest/vectorstores/langchain_community.vectorstores.clarifai.Clarifai.html |
9c034f0b58ba-7 | number_of_docs (Optional[int]) – Number of documents to return
None. (during vector search. Defaults to) –
Returns
Clarifai vectorstore.
Return type
Clarifai
classmethod from_texts(texts: List[str], embedding: Optional[Embeddings] = None, metadatas: Optional[List[dict]] = None, user_id: Optional[str] = None, app_id: O... | https://api.python.langchain.com/en/latest/vectorstores/langchain_community.vectorstores.clarifai.Clarifai.html |
9c034f0b58ba-8 | Defaults to 0.5.
Returns
List of Documents selected by maximal marginal relevance.
max_marginal_relevance_search_by_vector(embedding: List[float], k: int = 4, fetch_k: int = 20, lambda_mult: float = 0.5, **kwargs: Any) → List[Document]¶
Return docs selected using the maximal marginal relevance.
Maximal marginal relevan... | https://api.python.langchain.com/en/latest/vectorstores/langchain_community.vectorstores.clarifai.Clarifai.html |
9c034f0b58ba-9 | Returns
List of Documents most similar to the query vector.
similarity_search_with_relevance_scores(query: str, k: int = 4, **kwargs: Any) → List[Tuple[Document, float]]¶
Return docs and relevance scores in the range [0, 1].
0 is dissimilar, 1 is most similar.
Parameters
query – input text
k – Number of Documents to re... | https://api.python.langchain.com/en/latest/vectorstores/langchain_community.vectorstores.clarifai.Clarifai.html |
65f300eed030-0 | langchain_community.vectorstores.tencentvectordb.IndexParams¶
class langchain_community.vectorstores.tencentvectordb.IndexParams(dimension: int, shard: int = 1, replicas: int = 2, index_type: str = 'HNSW', metric_type: str = 'L2', params: Optional[Dict] = None)[source]¶
Tencent vector DB Index params.
See the following... | https://api.python.langchain.com/en/latest/vectorstores/langchain_community.vectorstores.tencentvectordb.IndexParams.html |
98194144bf43-0 | langchain_community.vectorstores.starrocks.StarRocksSettings¶
class langchain_community.vectorstores.starrocks.StarRocksSettings[source]¶
Bases: BaseSettings
StarRocks client configuration.
Attribute:
StarRocks_host (str)An URL to connect to MyScale backend.Defaults to ‘localhost’.
StarRocks_port (int) : URL port to co... | https://api.python.langchain.com/en/latest/vectorstores/langchain_community.vectorstores.starrocks.StarRocksSettings.html |
98194144bf43-1 | Creates a new model setting __dict__ and __fields_set__ from trusted or pre-validated data.
Default values are respected, but no other validation is performed.
Behaves as if Config.extra = ‘allow’ was set since it adds all passed values
copy(*, include: Optional[Union[AbstractSetIntStr, MappingIntStrAny]] = None, exclu... | https://api.python.langchain.com/en/latest/vectorstores/langchain_community.vectorstores.starrocks.StarRocksSettings.html |
98194144bf43-2 | classmethod from_orm(obj: Any) → Model¶
json(*, include: Optional[Union[AbstractSetIntStr, MappingIntStrAny]] = None, exclude: Optional[Union[AbstractSetIntStr, MappingIntStrAny]] = None, by_alias: bool = False, skip_defaults: Optional[bool] = None, exclude_unset: bool = False, exclude_defaults: bool = False, exclude_n... | https://api.python.langchain.com/en/latest/vectorstores/langchain_community.vectorstores.starrocks.StarRocksSettings.html |
db8cb257b803-0 | langchain_community.vectorstores.vald.Vald¶
class langchain_community.vectorstores.vald.Vald(embedding: Embeddings, host: str = 'localhost', port: int = 8080, grpc_options: Tuple = (('grpc.keepalive_time_ms', 10000), ('grpc.keepalive_timeout_ms', 10000)), grpc_use_secure: bool = False, grpc_credentials: Optional[Any] =... | https://api.python.langchain.com/en/latest/vectorstores/langchain_community.vectorstores.vald.Vald.html |
db8cb257b803-1 | afrom_texts(texts, embedding[, metadatas])
Return VectorStore initialized from texts and embeddings.
amax_marginal_relevance_search(query[, k, ...])
Return docs selected using the maximal marginal relevance.
amax_marginal_relevance_search_by_vector(...)
Return docs selected using the maximal marginal relevance.
as_retr... | https://api.python.langchain.com/en/latest/vectorstores/langchain_community.vectorstores.vald.Vald.html |
db8cb257b803-2 | Return docs most similar to query.
similarity_search_by_vector(embedding[, k, ...])
Return docs most similar to embedding vector.
similarity_search_with_relevance_scores(query)
Return docs and relevance scores in the range [0, 1].
similarity_search_with_score(query[, k, ...])
Run similarity search with distance.
simila... | https://api.python.langchain.com/en/latest/vectorstores/langchain_community.vectorstores.vald.Vald.html |
db8cb257b803-3 | Returns
List of IDs of the added texts.
Return type
List[str]
add_texts(texts: Iterable[str], metadatas: Optional[List[dict]] = None, grpc_metadata: Optional[Any] = None, skip_strict_exist_check: bool = False, **kwargs: Any) → List[str][source]¶
Parameters
skip_strict_exist_check – Deprecated. This is not used basicall... | https://api.python.langchain.com/en/latest/vectorstores/langchain_community.vectorstores.vald.Vald.html |
db8cb257b803-4 | as_retriever(**kwargs: Any) → VectorStoreRetriever¶
Return VectorStoreRetriever initialized from this VectorStore.
Parameters
search_type (Optional[str]) – Defines the type of search that
the Retriever should perform.
Can be “similarity” (default), “mmr”, or
“similarity_score_threshold”.
search_kwargs (Optional[Dict]) ... | https://api.python.langchain.com/en/latest/vectorstores/langchain_community.vectorstores.vald.Vald.html |
db8cb257b803-5 | docsearch.as_retriever(search_kwargs={'k': 1})
# Use a filter to only retrieve documents from a specific paper
docsearch.as_retriever(
search_kwargs={'filter': {'paper_title':'GPT-4 Technical Report'}}
)
async asearch(query: str, search_type: str, **kwargs: Any) → List[Document]¶
Return docs most similar to query u... | https://api.python.langchain.com/en/latest/vectorstores/langchain_community.vectorstores.vald.Vald.html |
db8cb257b803-6 | Parameters
skip_strict_exist_check – Deprecated. This is not used basically.
classmethod from_documents(documents: List[Document], embedding: Embeddings, **kwargs: Any) → VST¶
Return VectorStore initialized from documents and embeddings.
classmethod from_texts(texts: List[str], embedding: Embeddings, metadatas: Optiona... | https://api.python.langchain.com/en/latest/vectorstores/langchain_community.vectorstores.vald.Vald.html |
db8cb257b803-7 | Defaults to 0.5.
Returns
List of Documents selected by maximal marginal relevance.
max_marginal_relevance_search_by_vector(embedding: List[float], k: int = 4, fetch_k: int = 20, lambda_mult: float = 0.5, radius: float = - 1.0, epsilon: float = 0.01, timeout: int = 3000000000, grpc_metadata: Optional[Any] = None, **kwar... | https://api.python.langchain.com/en/latest/vectorstores/langchain_community.vectorstores.vald.Vald.html |
db8cb257b803-8 | Return docs most similar to query.
similarity_search_by_vector(embedding: List[float], k: int = 4, radius: float = - 1.0, epsilon: float = 0.01, timeout: int = 3000000000, grpc_metadata: Optional[Any] = None, **kwargs: Any) → List[Document][source]¶
Return docs most similar to embedding vector.
Parameters
embedding – E... | https://api.python.langchain.com/en/latest/vectorstores/langchain_community.vectorstores.vald.Vald.html |
db8cb257b803-9 | Run similarity search with distance.
similarity_search_with_score_by_vector(embedding: List[float], k: int = 4, radius: float = - 1.0, epsilon: float = 0.01, timeout: int = 3000000000, grpc_metadata: Optional[Any] = None, **kwargs: Any) → List[Tuple[Document, float]][source]¶ | https://api.python.langchain.com/en/latest/vectorstores/langchain_community.vectorstores.vald.Vald.html |
57c94f58d32d-0 | langchain_community.vectorstores.supabase.SupabaseVectorStore¶
class langchain_community.vectorstores.supabase.SupabaseVectorStore(client: supabase.client.Client, embedding: Embeddings, table_name: str, chunk_size: int = 500, query_name: Union[str, None] = None)[source]¶
Supabase Postgres vector store.
It assumes you h... | https://api.python.langchain.com/en/latest/vectorstores/langchain_community.vectorstores.supabase.SupabaseVectorStore.html |
57c94f58d32d-1 | from supabase.client import create_client
embeddings = OpenAIEmbeddings()
supabase_client = create_client("my_supabase_url", "my_supabase_key")
vector_store = SupabaseVectorStore(
client=supabase_client,
embedding=embeddings,
table_name="documents",
query_name="match_documents",
)
Initialize with supaba... | https://api.python.langchain.com/en/latest/vectorstores/langchain_community.vectorstores.supabase.SupabaseVectorStore.html |
57c94f58d32d-2 | asearch(query, search_type, **kwargs)
Return docs most similar to query using specified search type.
asimilarity_search(query[, k])
Return docs most similar to query.
asimilarity_search_by_vector(embedding[, k])
Return docs most similar to embedding vector.
asimilarity_search_with_relevance_scores(query)
Return docs an... | https://api.python.langchain.com/en/latest/vectorstores/langchain_community.vectorstores.supabase.SupabaseVectorStore.html |
57c94f58d32d-3 | similarity_search_with_score(*args, **kwargs)
Run similarity search with distance.
__init__(client: supabase.client.Client, embedding: Embeddings, table_name: str, chunk_size: int = 500, query_name: Union[str, None] = None) → None[source]¶
Initialize with supabase client.
async aadd_documents(documents: List[Document],... | https://api.python.langchain.com/en/latest/vectorstores/langchain_community.vectorstores.supabase.SupabaseVectorStore.html |
57c94f58d32d-4 | Returns
List of ids from adding the texts into the vectorstore.
add_vectors(vectors: List[List[float]], documents: List[Document], ids: List[str]) → List[str][source]¶
async adelete(ids: Optional[List[str]] = None, **kwargs: Any) → Optional[bool]¶
Delete by vector ID or other criteria.
Parameters
ids – List of ids to d... | https://api.python.langchain.com/en/latest/vectorstores/langchain_community.vectorstores.supabase.SupabaseVectorStore.html |
57c94f58d32d-5 | the Retriever should perform.
Can be “similarity” (default), “mmr”, or
“similarity_score_threshold”.
search_kwargs (Optional[Dict]) – Keyword arguments to pass to the
search function. Can include things like:
k: Amount of documents to return (Default: 4)
score_threshold: Minimum relevance threshold
for similarity_score... | https://api.python.langchain.com/en/latest/vectorstores/langchain_community.vectorstores.supabase.SupabaseVectorStore.html |
57c94f58d32d-6 | search_kwargs={'filter': {'paper_title':'GPT-4 Technical Report'}}
)
async asearch(query: str, search_type: str, **kwargs: Any) → List[Document]¶
Return docs most similar to query using specified search type.
async asimilarity_search(query: str, k: int = 4, **kwargs: Any) → List[Document]¶
Return docs most similar to q... | https://api.python.langchain.com/en/latest/vectorstores/langchain_community.vectorstores.supabase.SupabaseVectorStore.html |
57c94f58d32d-7 | Return VectorStore initialized from documents and embeddings.
classmethod from_texts(texts: List[str], embedding: Embeddings, metadatas: Optional[List[dict]] = None, client: Optional[supabase.client.Client] = None, table_name: Optional[str] = 'documents', query_name: Union[str, None] = 'match_documents', chunk_size: in... | https://api.python.langchain.com/en/latest/vectorstores/langchain_community.vectorstores.supabase.SupabaseVectorStore.html |
57c94f58d32d-8 | content text,
metadata jsonb,
embedding vector(1536),
similarity float)
LANGUAGE plpgsql
AS $$
# variable_conflict use_column
BEGINRETURN query
SELECT
id,
content,
metadata,
embedding,
1 -(docstore.embedding <=> query_embedding) AS similarity
FROMdocstore
ORDER BYdocstore.embedding <=> query_embedding
LIMIT match_count... | https://api.python.langchain.com/en/latest/vectorstores/langchain_community.vectorstores.supabase.SupabaseVectorStore.html |
57c94f58d32d-9 | Return docs most similar to embedding vector.
Parameters
embedding – Embedding to look up documents similar to.
k – Number of Documents to return. Defaults to 4.
Returns
List of Documents most similar to the query vector.
similarity_search_by_vector_returning_embeddings(query: List[float], k: int, filter: Optional[Dict... | https://api.python.langchain.com/en/latest/vectorstores/langchain_community.vectorstores.supabase.SupabaseVectorStore.html |
42d2938c08cb-0 | langchain_community.vectorstores.pgembedding.CollectionStore¶
class langchain_community.vectorstores.pgembedding.CollectionStore(**kwargs)[source]¶
Collection store.
A simple constructor that allows initialization from kwargs.
Sets attributes on the constructed instance using the names and
values in kwargs.
Only keys t... | https://api.python.langchain.com/en/latest/vectorstores/langchain_community.vectorstores.pgembedding.CollectionStore.html |
40311eaf18f1-0 | langchain_community.vectorstores.neo4j_vector.remove_lucene_chars¶
langchain_community.vectorstores.neo4j_vector.remove_lucene_chars(text: str) → str[source]¶
Remove Lucene special characters | https://api.python.langchain.com/en/latest/vectorstores/langchain_community.vectorstores.neo4j_vector.remove_lucene_chars.html |
906c56d8fe44-0 | langchain_community.vectorstores.baiducloud_vector_search.BESVectorStore¶
class langchain_community.vectorstores.baiducloud_vector_search.BESVectorStore(index_name: str, bes_url: str, user: Optional[str] = None, password: Optional[str] = None, embedding: Optional[Embeddings] = None, **kwargs: Optional[dict])[source]¶
B... | https://api.python.langchain.com/en/latest/vectorstores/langchain_community.vectorstores.baiducloud_vector_search.BESVectorStore.html |
906c56d8fe44-1 | adelete([ids])
Delete by vector ID or other criteria.
afrom_documents(documents, embedding, **kwargs)
Return VectorStore initialized from documents and embeddings.
afrom_texts(texts, embedding[, metadatas])
Return VectorStore initialized from texts and embeddings.
amax_marginal_relevance_search(query[, k, ...])
Return ... | https://api.python.langchain.com/en/latest/vectorstores/langchain_community.vectorstores.baiducloud_vector_search.BESVectorStore.html |
906c56d8fe44-2 | Return docs most similar to query using specified search type.
similarity_search(query[, k, filter])
Return documents most similar to query.
similarity_search_by_vector(embedding[, k])
Return docs most similar to embedding vector.
similarity_search_with_relevance_scores(query)
Return docs and relevance scores in the ra... | https://api.python.langchain.com/en/latest/vectorstores/langchain_community.vectorstores.baiducloud_vector_search.BESVectorStore.html |
906c56d8fe44-3 | Run more texts through the embeddings and add to the vectorstore.
Parameters
texts – Iterable of strings to add to the vectorstore.
metadatas – Optional list of metadatas associated with the texts.
Returns
List of ids from adding the texts into the vectorstore.
async adelete(ids: Optional[List[str]] = None, **kwargs: A... | https://api.python.langchain.com/en/latest/vectorstores/langchain_community.vectorstores.baiducloud_vector_search.BESVectorStore.html |
906c56d8fe44-4 | Parameters
search_type (Optional[str]) – Defines the type of search that
the Retriever should perform.
Can be “similarity” (default), “mmr”, or
“similarity_score_threshold”.
search_kwargs (Optional[Dict]) – Keyword arguments to pass to the
search function. Can include things like:
k: Amount of documents to return (Defa... | https://api.python.langchain.com/en/latest/vectorstores/langchain_community.vectorstores.baiducloud_vector_search.BESVectorStore.html |
906c56d8fe44-5 | docsearch.as_retriever(
search_kwargs={'filter': {'paper_title':'GPT-4 Technical Report'}}
)
async asearch(query: str, search_type: str, **kwargs: Any) → List[Document]¶
Return docs most similar to query using specified search type.
async asimilarity_search(query: str, k: int = 4, **kwargs: Any) → List[Document]¶
R... | https://api.python.langchain.com/en/latest/vectorstores/langchain_community.vectorstores.baiducloud_vector_search.BESVectorStore.html |
906c56d8fe44-6 | Delete documents from the index.
Parameters
ids – List of ids of documents to delete
classmethod from_documents(documents: List[Document], embedding: Optional[Embeddings] = None, **kwargs: Any) → BESVectorStore[source]¶
Construct BESVectorStore wrapper from documents.
Parameters
documents – List of documents to add to ... | https://api.python.langchain.com/en/latest/vectorstores/langchain_community.vectorstores.baiducloud_vector_search.BESVectorStore.html |
906c56d8fe44-7 | to maximum diversity and 1 to minimum diversity.
Defaults to 0.5.
Returns
List of Documents selected by maximal marginal relevance.
max_marginal_relevance_search_by_vector(embedding: List[float], k: int = 4, fetch_k: int = 20, lambda_mult: float = 0.5, **kwargs: Any) → List[Document]¶
Return docs selected using the max... | https://api.python.langchain.com/en/latest/vectorstores/langchain_community.vectorstores.baiducloud_vector_search.BESVectorStore.html |
906c56d8fe44-8 | Return docs most similar to embedding vector.
Parameters
embedding – Embedding to look up documents similar to.
k – Number of Documents to return. Defaults to 4.
Returns
List of Documents most similar to the query vector.
similarity_search_with_relevance_scores(query: str, k: int = 4, **kwargs: Any) → List[Tuple[Docume... | https://api.python.langchain.com/en/latest/vectorstores/langchain_community.vectorstores.baiducloud_vector_search.BESVectorStore.html |
dbab832274de-0 | langchain_community.vectorstores.neo4j_vector.Neo4jVector¶
class langchain_community.vectorstores.neo4j_vector.Neo4jVector(embedding: Embeddings, *, search_type: SearchType = SearchType.VECTOR, username: Optional[str] = None, password: Optional[str] = None, url: Optional[str] = None, keyword_index_name: Optional[str] =... | https://api.python.langchain.com/en/latest/vectorstores/langchain_community.vectorstores.neo4j_vector.Neo4jVector.html |
dbab832274de-1 | embedding=embeddings,
documents=docs,
url=url
username=username,
password=password,
)
Attributes
embeddings
Access the query embedding object if available.
Methods
__init__(embedding, *[, search_type, ...])
aadd_documents(documents, **kwargs)
Run more documents through the embeddings and add to the vect... | https://api.python.langchain.com/en/latest/vectorstores/langchain_community.vectorstores.neo4j_vector.Neo4jVector.html |
dbab832274de-2 | Return docs most similar to embedding vector.
asimilarity_search_with_relevance_scores(query)
Return docs and relevance scores in the range [0, 1], asynchronously.
asimilarity_search_with_score(*args, **kwargs)
Run similarity search with distance asynchronously.
create_new_index()
This method constructs a Cypher query ... | https://api.python.langchain.com/en/latest/vectorstores/langchain_community.vectorstores.neo4j_vector.Neo4jVector.html |
dbab832274de-3 | Check if the vector index exists in the Neo4j database and returns its embedding dimension.
search(query, search_type, **kwargs)
Return docs most similar to query using specified search type.
similarity_search(query[, k])
Run similarity search with Neo4jVector.
similarity_search_by_vector(embedding[, k])
Return docs mo... | https://api.python.langchain.com/en/latest/vectorstores/langchain_community.vectorstores.neo4j_vector.Neo4jVector.html |
dbab832274de-4 | (List[Document] (documents) – Documents to add to the vectorstore.
Returns
List of IDs of the added texts.
Return type
List[str]
async aadd_texts(texts: Iterable[str], metadatas: Optional[List[dict]] = None, **kwargs: Any) → List[str]¶
Run more texts through the embeddings and add to the vectorstore.
add_documents(docu... | https://api.python.langchain.com/en/latest/vectorstores/langchain_community.vectorstores.neo4j_vector.Neo4jVector.html |
dbab832274de-5 | Delete by vector ID or other criteria.
Parameters
ids – List of ids to delete.
**kwargs – Other keyword arguments that subclasses might use.
Returns
True if deletion is successful,
False otherwise, None if not implemented.
Return type
Optional[bool]
async classmethod afrom_documents(documents: List[Document], embedding... | https://api.python.langchain.com/en/latest/vectorstores/langchain_community.vectorstores.neo4j_vector.Neo4jVector.html |
dbab832274de-6 | score_threshold: Minimum relevance threshold
for similarity_score_threshold
fetch_k: Amount of documents to pass to MMR algorithm (Default: 20)
lambda_mult: Diversity of results returned by MMR;
1 for minimum diversity and 0 for maximum. (Default: 0.5)
filter: Filter by document metadata
Returns
Retriever class for Vec... | https://api.python.langchain.com/en/latest/vectorstores/langchain_community.vectorstores.neo4j_vector.Neo4jVector.html |
dbab832274de-7 | Return docs most similar to query.
async asimilarity_search_by_vector(embedding: List[float], k: int = 4, **kwargs: Any) → List[Document]¶
Return docs most similar to embedding vector.
async asimilarity_search_with_relevance_scores(query: str, k: int = 4, **kwargs: Any) → List[Tuple[Document, float]]¶
Return docs and r... | https://api.python.langchain.com/en/latest/vectorstores/langchain_community.vectorstores.neo4j_vector.Neo4jVector.html |
dbab832274de-8 | False otherwise, None if not implemented.
Return type
Optional[bool]
classmethod from_documents(documents: List[Document], embedding: Embeddings, distance_strategy: DistanceStrategy = DistanceStrategy.COSINE, ids: Optional[List[str]] = None, **kwargs: Any) → Neo4jVector[source]¶
Return Neo4jVector initialized from docu... | https://api.python.langchain.com/en/latest/vectorstores/langchain_community.vectorstores.neo4j_vector.Neo4jVector.html |
dbab832274de-9 | Initialize and return a Neo4jVector instance from an existing graph.
This method initializes a Neo4jVector instance using the provided
parameters and the existing graph. It validates the existence of
the indices and creates new ones if they don’t exist.
Returns:
Neo4jVector: An instance of Neo4jVector initialized with ... | https://api.python.langchain.com/en/latest/vectorstores/langchain_community.vectorstores.neo4j_vector.Neo4jVector.html |
dbab832274de-10 | and password and optional database parameters.
max_marginal_relevance_search(query: str, k: int = 4, fetch_k: int = 20, lambda_mult: float = 0.5, **kwargs: Any) → List[Document]¶
Return docs selected using the maximal marginal relevance.
Maximal marginal relevance optimizes for similarity to query AND diversity
among s... | https://api.python.langchain.com/en/latest/vectorstores/langchain_community.vectorstores.neo4j_vector.Neo4jVector.html |
dbab832274de-11 | This method sends a Cypher query to the connected Neo4j database
and returns the results as a list of dictionaries.
Parameters
query (str) – The Cypher query to execute.
params (dict, optional) – Dictionary of query parameters. Defaults to {}.
Returns
List of dictionaries containing the query results.
Return type
List[... | https://api.python.langchain.com/en/latest/vectorstores/langchain_community.vectorstores.neo4j_vector.Neo4jVector.html |
dbab832274de-12 | Return docs most similar to embedding vector.
Parameters
embedding – Embedding to look up documents similar to.
k – Number of Documents to return. Defaults to 4.
Returns
List of Documents most similar to the query vector.
similarity_search_with_relevance_scores(query: str, k: int = 4, **kwargs: Any) → List[Tuple[Docume... | https://api.python.langchain.com/en/latest/vectorstores/langchain_community.vectorstores.neo4j_vector.Neo4jVector.html |
dbab832274de-13 | as a list of tuples, each containing a Document object and
its similarity score.
Parameters
embedding (List[float]) – The embedding vector to compare against.
k (int, optional) – The number of top similar documents to retrieve.
Returns
A list of tuples, each containinga Document object and its similarity score.
Return ... | https://api.python.langchain.com/en/latest/vectorstores/langchain_community.vectorstores.neo4j_vector.Neo4jVector.html |
62b7084e23d3-0 | langchain_community.vectorstores.tiledb.get_documents_array_uri_from_group¶
langchain_community.vectorstores.tiledb.get_documents_array_uri_from_group(group: Any) → str[source]¶ | https://api.python.langchain.com/en/latest/vectorstores/langchain_community.vectorstores.tiledb.get_documents_array_uri_from_group.html |
2ed316d83300-0 | langchain_community.vectorstores.redis.schema.RedisDistanceMetric¶
class langchain_community.vectorstores.redis.schema.RedisDistanceMetric(value, names=None, *, module=None, qualname=None, type=None, start=1, boundary=None)[source]¶
Distance metrics for Redis vector fields.
l2 = 'L2'¶
cosine = 'COSINE'¶
ip = 'IP'¶ | https://api.python.langchain.com/en/latest/vectorstores/langchain_community.vectorstores.redis.schema.RedisDistanceMetric.html |
b270d1de19e5-0 | langchain_community.vectorstores.redis.schema.RedisModel¶
class langchain_community.vectorstores.redis.schema.RedisModel[source]¶
Bases: BaseModel
Schema for Redis index.
Create a new model by parsing and validating input data from keyword arguments.
Raises ValidationError if the input data cannot be parsed to form a v... | https://api.python.langchain.com/en/latest/vectorstores/langchain_community.vectorstores.redis.schema.RedisModel.html |
b270d1de19e5-1 | Behaves as if Config.extra = ‘allow’ was set since it adds all passed values
copy(*, include: Optional[Union[AbstractSetIntStr, MappingIntStrAny]] = None, exclude: Optional[Union[AbstractSetIntStr, MappingIntStrAny]] = None, update: Optional[DictStrAny] = None, deep: bool = False) → Model¶
Duplicate a model, optionally... | https://api.python.langchain.com/en/latest/vectorstores/langchain_community.vectorstores.redis.schema.RedisModel.html |
b270d1de19e5-2 | get_fields() → List[RedisField][source]¶
json(*, include: Optional[Union[AbstractSetIntStr, MappingIntStrAny]] = None, exclude: Optional[Union[AbstractSetIntStr, MappingIntStrAny]] = None, by_alias: bool = False, skip_defaults: Optional[bool] = None, exclude_unset: bool = False, exclude_defaults: bool = False, exclude_... | https://api.python.langchain.com/en/latest/vectorstores/langchain_community.vectorstores.redis.schema.RedisModel.html |
b270d1de19e5-3 | property is_empty: bool¶
property metadata_keys: List[str]¶
property vector_dtype: numpy.dtype¶ | https://api.python.langchain.com/en/latest/vectorstores/langchain_community.vectorstores.redis.schema.RedisModel.html |
0729a6c76622-0 | langchain_community.vectorstores.azure_cosmos_db.CosmosDBSimilarityType¶
class langchain_community.vectorstores.azure_cosmos_db.CosmosDBSimilarityType(value, names=None, *, module=None, qualname=None, type=None, start=1, boundary=None)[source]¶
Cosmos DB Similarity Type as enumerator.
COS = 'COS'¶
CosineSimilarity
IP =... | https://api.python.langchain.com/en/latest/vectorstores/langchain_community.vectorstores.azure_cosmos_db.CosmosDBSimilarityType.html |
40e14f7c01f1-0 | langchain_community.vectorstores.sklearn.ParquetSerializer¶
class langchain_community.vectorstores.sklearn.ParquetSerializer(persist_path: str)[source]¶
Serializes data in Apache Parquet format using the pyarrow package.
Methods
__init__(persist_path)
extension()
The file extension suggested by this serializer (without... | https://api.python.langchain.com/en/latest/vectorstores/langchain_community.vectorstores.sklearn.ParquetSerializer.html |
ba2b5f4ae847-0 | langchain_community.vectorstores.bageldb.Bagel¶
class langchain_community.vectorstores.bageldb.Bagel(cluster_name: str = 'langchain', client_settings: Optional[bagel.config.Settings] = None, embedding_function: Optional[Embeddings] = None, cluster_metadata: Optional[Dict] = None, client: Optional[bagel.Client] = None, ... | https://api.python.langchain.com/en/latest/vectorstores/langchain_community.vectorstores.bageldb.Bagel.html |
ba2b5f4ae847-1 | Return docs selected using the maximal marginal relevance.
amax_marginal_relevance_search_by_vector(...)
Return docs selected using the maximal marginal relevance.
as_retriever(**kwargs)
Return VectorStoreRetriever initialized from this VectorStore.
asearch(query, search_type, **kwargs)
Return docs most similar to quer... | https://api.python.langchain.com/en/latest/vectorstores/langchain_community.vectorstores.bageldb.Bagel.html |
ba2b5f4ae847-2 | Return docs most similar to embedding vector.
similarity_search_by_vector_with_relevance_scores(...)
Return docs most similar to embedding vector and similarity score.
similarity_search_with_relevance_scores(query)
Return docs and relevance scores in the range [0, 1].
similarity_search_with_score(query[, k, where])
Run... | https://api.python.langchain.com/en/latest/vectorstores/langchain_community.vectorstores.bageldb.Bagel.html |
ba2b5f4ae847-3 | Returns
List of IDs of the added texts.
Return type
List[str]
add_texts(texts: Iterable[str], metadatas: Optional[List[dict]] = None, ids: Optional[List[str]] = None, embeddings: Optional[List[List[float]]] = None, **kwargs: Any) → List[str][source]¶
Add texts along with their corresponding embeddings and optional
meta... | https://api.python.langchain.com/en/latest/vectorstores/langchain_community.vectorstores.bageldb.Bagel.html |
ba2b5f4ae847-4 | Return docs selected using the maximal marginal relevance.
async amax_marginal_relevance_search_by_vector(embedding: List[float], k: int = 4, fetch_k: int = 20, lambda_mult: float = 0.5, **kwargs: Any) → List[Document]¶
Return docs selected using the maximal marginal relevance.
as_retriever(**kwargs: Any) → VectorStore... | https://api.python.langchain.com/en/latest/vectorstores/langchain_community.vectorstores.bageldb.Bagel.html |
ba2b5f4ae847-5 | search_kwargs={'k': 5, 'fetch_k': 50}
)
# Only retrieve documents that have a relevance score
# Above a certain threshold
docsearch.as_retriever(
search_type="similarity_score_threshold",
search_kwargs={'score_threshold': 0.8}
)
# Only get the single most similar document from the dataset
docsearch.as_retriever... | https://api.python.langchain.com/en/latest/vectorstores/langchain_community.vectorstores.bageldb.Bagel.html |
ba2b5f4ae847-6 | Returns
List of Tuples of (doc, similarity_score)
async asimilarity_search_with_score(*args: Any, **kwargs: Any) → List[Tuple[Document, float]]¶
Run similarity search with distance asynchronously.
delete(ids: Optional[List[str]] = None, **kwargs: Any) → None[source]¶
Delete by IDs.
Parameters
ids – List of ids to delet... | https://api.python.langchain.com/en/latest/vectorstores/langchain_community.vectorstores.bageldb.Bagel.html |
ba2b5f4ae847-7 | Returns
Bagel vectorstore.
Return type
Bagel
classmethod from_texts(texts: List[str], embedding: Optional[Embeddings] = None, metadatas: Optional[List[dict]] = None, ids: Optional[List[str]] = None, cluster_name: str = 'langchain', client_settings: Optional[bagel.config.Settings] = None, cluster_metadata: Optional[Dict... | https://api.python.langchain.com/en/latest/vectorstores/langchain_community.vectorstores.bageldb.Bagel.html |
ba2b5f4ae847-8 | Return docs selected using the maximal marginal relevance.
Maximal marginal relevance optimizes for similarity to query AND diversity
among selected documents.
Parameters
query – Text to look up documents similar to.
k – Number of Documents to return. Defaults to 4.
fetch_k – Number of Documents to fetch to pass to MMR... | https://api.python.langchain.com/en/latest/vectorstores/langchain_community.vectorstores.bageldb.Bagel.html |
ba2b5f4ae847-9 | Run a similarity search with BagelDB.
Parameters
query (str) – The query text to search for similar documents/texts.
k (int) – The number of results to return.
where (Optional[Dict[str, str]]) – Metadata filters to narrow down.
Returns
List of documents objects representing
the documents most similar to the query text.... | https://api.python.langchain.com/en/latest/vectorstores/langchain_community.vectorstores.bageldb.Bagel.html |
ba2b5f4ae847-10 | Run a similarity search with BagelDB and return documents with their
corresponding similarity scores.
Parameters
query (str) – The query text to search for similar documents.
k (int) – The number of results to return.
where (Optional[Dict[str, str]]) – Filter using metadata.
Returns
List of tuples, each containing a
Do... | https://api.python.langchain.com/en/latest/vectorstores/langchain_community.vectorstores.bageldb.Bagel.html |
06a7b48a1638-0 | langchain_community.vectorstores.mongodb_atlas.MongoDBAtlasVectorSearch¶
class langchain_community.vectorstores.mongodb_atlas.MongoDBAtlasVectorSearch(collection: Collection[MongoDBDocumentType], embedding: Embeddings, *, index_name: str = 'default', text_key: str = 'text', embedding_key: str = 'embedding', relevance_s... | https://api.python.langchain.com/en/latest/vectorstores/langchain_community.vectorstores.mongodb_atlas.MongoDBAtlasVectorSearch.html |
06a7b48a1638-1 | Run more texts through the embeddings and add to the vectorstore.
add_documents(documents, **kwargs)
Run more documents through the embeddings and add to the vectorstore.
add_texts(texts[, metadatas])
Run more texts through the embeddings and add to the vectorstore.
adelete([ids])
Delete by vector ID or other criteria.... | https://api.python.langchain.com/en/latest/vectorstores/langchain_community.vectorstores.mongodb_atlas.MongoDBAtlasVectorSearch.html |
06a7b48a1638-2 | from_texts(texts, embedding[, metadatas, ...])
Construct a MongoDB Atlas Vector Search vector store from raw documents.
max_marginal_relevance_search(query[, k, ...])
Return documents selected using the maximal marginal relevance.
max_marginal_relevance_search_by_vector(...)
Return docs selected using the maximal margi... | https://api.python.langchain.com/en/latest/vectorstores/langchain_community.vectorstores.mongodb_atlas.MongoDBAtlasVectorSearch.html |
06a7b48a1638-3 | Run more documents through the embeddings and add to the vectorstore.
Parameters
(List[Document] (documents) – Documents to add to the vectorstore.
Returns
List of IDs of the added texts.
Return type
List[str]
async aadd_texts(texts: Iterable[str], metadatas: Optional[List[dict]] = None, **kwargs: Any) → List[str]¶
Run... | https://api.python.langchain.com/en/latest/vectorstores/langchain_community.vectorstores.mongodb_atlas.MongoDBAtlasVectorSearch.html |
06a7b48a1638-4 | Return VectorStore initialized from documents and embeddings.
async classmethod afrom_texts(texts: List[str], embedding: Embeddings, metadatas: Optional[List[dict]] = None, **kwargs: Any) → VST¶
Return VectorStore initialized from texts and embeddings.
async amax_marginal_relevance_search(query: str, k: int = 4, fetch_... | https://api.python.langchain.com/en/latest/vectorstores/langchain_community.vectorstores.mongodb_atlas.MongoDBAtlasVectorSearch.html |
06a7b48a1638-5 | Return type
VectorStoreRetriever
Examples:
# Retrieve more documents with higher diversity
# Useful if your dataset has many similar documents
docsearch.as_retriever(
search_type="mmr",
search_kwargs={'k': 6, 'lambda_mult': 0.25}
)
# Fetch more documents for the MMR algorithm to consider
# But only return the t... | https://api.python.langchain.com/en/latest/vectorstores/langchain_community.vectorstores.mongodb_atlas.MongoDBAtlasVectorSearch.html |
06a7b48a1638-6 | Return docs and relevance scores in the range [0, 1], asynchronously.
0 is dissimilar, 1 is most similar.
Parameters
query – input text
k – Number of Documents to return. Defaults to 4.
**kwargs – kwargs to be passed to similarity search. Should include:
score_threshold: Optional, a floating point value between 0 to 1 ... | https://api.python.langchain.com/en/latest/vectorstores/langchain_community.vectorstores.mongodb_atlas.MongoDBAtlasVectorSearch.html |
06a7b48a1638-7 | Return VectorStore initialized from documents and embeddings.
classmethod from_texts(texts: List[str], embedding: Embeddings, metadatas: Optional[List[Dict]] = None, collection: Optional[Collection[MongoDBDocumentType]] = None, **kwargs: Any) → MongoDBAtlasVectorSearch[source]¶
Construct a MongoDB Atlas Vector Search v... | https://api.python.langchain.com/en/latest/vectorstores/langchain_community.vectorstores.mongodb_atlas.MongoDBAtlasVectorSearch.html |
06a7b48a1638-8 | Returns
List of documents selected by maximal marginal relevance.
max_marginal_relevance_search_by_vector(embedding: List[float], k: int = 4, fetch_k: int = 20, lambda_mult: float = 0.5, **kwargs: Any) → List[Document]¶
Return docs selected using the maximal marginal relevance.
Maximal marginal relevance optimizes for ... | https://api.python.langchain.com/en/latest/vectorstores/langchain_community.vectorstores.mongodb_atlas.MongoDBAtlasVectorSearch.html |
06a7b48a1638-9 | k – (Optional) number of documents to return. Defaults to 4.
pre_filter – (Optional) dictionary of argument(s) to prefilter document
fields on.
post_filter_pipeline – (Optional) Pipeline of MongoDB aggregation stages
following the knnBeta vector search.
Returns
List of documents most similar to the query and their scor... | https://api.python.langchain.com/en/latest/vectorstores/langchain_community.vectorstores.mongodb_atlas.MongoDBAtlasVectorSearch.html |
06a7b48a1638-10 | validate functionality, and to gather feedback from a small closed group of
early access users. It is not recommended for production deployments as we
may introduce breaking changes.
For more: https://www.mongodb.com/docs/atlas/atlas-search/knn-beta
Parameters
query – Text to look up documents similar to.
k – (Optional... | https://api.python.langchain.com/en/latest/vectorstores/langchain_community.vectorstores.mongodb_atlas.MongoDBAtlasVectorSearch.html |
ea8bf3344593-0 | langchain_community.vectorstores.starrocks.get_named_result¶
langchain_community.vectorstores.starrocks.get_named_result(connection: Any, query: str) → List[dict[str, Any]][source]¶
Get a named result from a query.
:param connection: The connection to the database
:param query: The query to execute
Returns
The result o... | https://api.python.langchain.com/en/latest/vectorstores/langchain_community.vectorstores.starrocks.get_named_result.html |
369b8304a286-0 | langchain_community.vectorstores.atlas.AtlasDB¶
class langchain_community.vectorstores.atlas.AtlasDB(name: str, embedding_function: Optional[Embeddings] = None, api_key: Optional[str] = None, description: str = 'A description for your project', is_public: bool = True, reset_project_if_exists: bool = False)[source]¶
Atl... | https://api.python.langchain.com/en/latest/vectorstores/langchain_community.vectorstores.atlas.AtlasDB.html |
369b8304a286-1 | add_documents(documents, **kwargs)
Run more documents through the embeddings and add to the vectorstore.
add_texts(texts[, metadatas, ids, refresh])
Run more texts through the embeddings and add to the vectorstore.
adelete([ids])
Delete by vector ID or other criteria.
afrom_documents(documents, embedding, **kwargs)
Ret... | https://api.python.langchain.com/en/latest/vectorstores/langchain_community.vectorstores.atlas.AtlasDB.html |
369b8304a286-2 | Create an AtlasDB vectorstore from a raw documents.
max_marginal_relevance_search(query[, k, ...])
Return docs selected using the maximal marginal relevance.
max_marginal_relevance_search_by_vector(...)
Return docs selected using the maximal marginal relevance.
search(query, search_type, **kwargs)
Return docs most simi... | https://api.python.langchain.com/en/latest/vectorstores/langchain_community.vectorstores.atlas.AtlasDB.html |
369b8304a286-3 | Run more documents through the embeddings and add to the vectorstore.
Parameters
(List[Document] (documents) – Documents to add to the vectorstore.
Returns
List of IDs of the added texts.
Return type
List[str]
async aadd_texts(texts: Iterable[str], metadatas: Optional[List[dict]] = None, **kwargs: Any) → List[str]¶
Run... | https://api.python.langchain.com/en/latest/vectorstores/langchain_community.vectorstores.atlas.AtlasDB.html |
369b8304a286-4 | True if deletion is successful,
False otherwise, None if not implemented.
Return type
Optional[bool]
async classmethod afrom_documents(documents: List[Document], embedding: Embeddings, **kwargs: Any) → VST¶
Return VectorStore initialized from documents and embeddings.
async classmethod afrom_texts(texts: List[str], emb... | https://api.python.langchain.com/en/latest/vectorstores/langchain_community.vectorstores.atlas.AtlasDB.html |
369b8304a286-5 | lambda_mult: Diversity of results returned by MMR;
1 for minimum diversity and 0 for maximum. (Default: 0.5)
filter: Filter by document metadata
Returns
Retriever class for VectorStore.
Return type
VectorStoreRetriever
Examples:
# Retrieve more documents with higher diversity
# Useful if your dataset has many similar d... | https://api.python.langchain.com/en/latest/vectorstores/langchain_community.vectorstores.atlas.AtlasDB.html |
369b8304a286-6 | Return docs most similar to embedding vector.
async asimilarity_search_with_relevance_scores(query: str, k: int = 4, **kwargs: Any) → List[Tuple[Document, float]]¶
Return docs and relevance scores in the range [0, 1], asynchronously.
0 is dissimilar, 1 is most similar.
Parameters
query – input text
k – Number of Docume... | https://api.python.langchain.com/en/latest/vectorstores/langchain_community.vectorstores.atlas.AtlasDB.html |
369b8304a286-7 | False otherwise, None if not implemented.
Return type
Optional[bool]
classmethod from_documents(documents: List[Document], embedding: Optional[Embeddings] = None, ids: Optional[List[str]] = None, name: Optional[str] = None, api_key: Optional[str] = None, persist_directory: Optional[str] = None, description: str = 'A de... | https://api.python.langchain.com/en/latest/vectorstores/langchain_community.vectorstores.atlas.AtlasDB.html |
369b8304a286-8 | Returns
Nomic’s neural database and finest rhizomatic instrument
Return type
AtlasDB
classmethod from_texts(texts: List[str], embedding: Optional[Embeddings] = None, metadatas: Optional[List[dict]] = None, ids: Optional[List[str]] = None, name: Optional[str] = None, api_key: Optional[str] = None, description: str = 'A ... | https://api.python.langchain.com/en/latest/vectorstores/langchain_community.vectorstores.atlas.AtlasDB.html |
369b8304a286-9 | Return docs selected using the maximal marginal relevance.
Maximal marginal relevance optimizes for similarity to query AND diversity
among selected documents.
Parameters
query – Text to look up documents similar to.
k – Number of Documents to return. Defaults to 4.
fetch_k – Number of Documents to fetch to pass to MMR... | https://api.python.langchain.com/en/latest/vectorstores/langchain_community.vectorstores.atlas.AtlasDB.html |
369b8304a286-10 | Parameters
query (str) – Query text to search for.
k (int) – Number of results to return. Defaults to 4.
Returns
List of documents most similar to the query text.
Return type
List[Document]
similarity_search_by_vector(embedding: List[float], k: int = 4, **kwargs: Any) → List[Document]¶
Return docs most similar to embed... | https://api.python.langchain.com/en/latest/vectorstores/langchain_community.vectorstores.atlas.AtlasDB.html |
5e4d2d404ca7-0 | langchain_community.vectorstores.redis.schema.RedisField¶
class langchain_community.vectorstores.redis.schema.RedisField[source]¶
Bases: BaseModel
Base class for Redis fields.
Create a new model by parsing and validating input data from keyword arguments.
Raises ValidationError if the input data cannot be parsed to for... | https://api.python.langchain.com/en/latest/vectorstores/langchain_community.vectorstores.redis.schema.RedisField.html |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.