Skip to content

Commit

Permalink
Improvement[Doc] Improve api doc in of PineconeVectorStore (#25605)
Browse files Browse the repository at this point in the history
Complete missing arguments in api doc of `PineconeVectorStore`.
  • Loading branch information
ZhangShenao authored Aug 21, 2024
1 parent e7d6b25 commit 34d0417
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion libs/partners/pinecone/langchain_pinecone/vectorstores.py
Original file line number Diff line number Diff line change
Expand Up @@ -249,6 +249,7 @@ def add_texts(
namespace: Optional pinecone namespace to add the texts to.
batch_size: Batch size to use when adding the texts to the vectorstore.
embedding_chunk_size: Chunk size to use when embedding the texts.
async_req: Whether runs asynchronously.
id_prefix: Optional string to use as an ID prefix when upserting vectors.
Returns:
Expand Down Expand Up @@ -427,6 +428,9 @@ def max_marginal_relevance_search_by_vector(
of diversity among the results with 0 corresponding
to maximum diversity and 1 to minimum diversity.
Defaults to 0.5.
filter: Dictionary of argument(s) to filter on metadata
namespace: Namespace to search in. Default will search in '' namespace.
Returns:
List of Documents selected by maximal marginal relevance.
"""
Expand Down Expand Up @@ -475,6 +479,9 @@ def max_marginal_relevance_search(
of diversity among the results with 0 corresponding
to maximum diversity and 1 to minimum diversity.
Defaults to 0.5.
filter: Dictionary of argument(s) to filter on metadata
namespace: Namespace to search in. Default will search in '' namespace.
Returns:
List of Documents selected by maximal marginal relevance.
"""
Expand All @@ -496,6 +503,7 @@ def get_pinecone_index(
Args:
index_name: Name of the index to use.
pool_threads: Number of threads to use for index upsert.
pinecone_api_key: The api_key of Pinecone.
Returns:
Pinecone Index instance."""
_pinecone_api_key = pinecone_api_key or os.environ.get("PINECONE_API_KEY") or ""
Expand Down Expand Up @@ -541,7 +549,7 @@ def from_texts(
) -> PineconeVectorStore:
"""Construct Pinecone wrapper from raw documents.
This is a user friendly interface that:
This is a user-friendly interface that:
1. Embeds documents.
2. Adds the documents to a provided Pinecone index
Expand Down Expand Up @@ -606,7 +614,9 @@ def delete(
"""Delete by vector IDs or filter.
Args:
ids: List of ids to delete.
delete_all: Whether delete all vectors in the index.
filter: Dictionary of conditions to filter vectors to delete.
namespace: Namespace to search in. Default will search in '' namespace.
"""

if namespace is None:
Expand Down

0 comments on commit 34d0417

Please sign in to comment.