PineconeEmbeddings#

class langchain_pinecone.embeddings.PineconeEmbeddings[source]#

Bases: BaseModel, Embeddings

PineconeEmbeddings embedding model.

Example

from langchain_pinecone import PineconeEmbeddings

model = PineconeEmbeddings(model="multilingual-e5-large")

Create a new model by parsing and validating input data from keyword arguments.

Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.

self is explicitly positional-only to allow self as a field name.

param batch_size: int | None = None#

Batch size for embedding documents.

param dimension: int | None = None#
param document_params: Dict [Optional]#

Parameters for embedding document

param model: str [Required]#

Model to use for example โ€˜multilingual-e5-largeโ€™.

param pinecone_api_key: SecretStr [Optional] (alias 'api_key')#

Pinecone API key.

If not provided, will look for the PINECONE_API_KEY environment variable.

param query_params: Dict [Optional]#

Parameters for embedding query.

param show_progress_bar: bool = False#
async aembed_documents(texts: List[str]) โ†’ List[List[float]][source]#

Asynchronous Embed search docs.

Parameters:

texts (List[str]) โ€“ List of text to embed.

Returns:

List of embeddings.

Return type:

List[List[float]]

async aembed_query(text: str) โ†’ List[float][source]#

Asynchronously embed query text.

Parameters:

text (str)

Return type:

List[float]

embed_documents(texts: List[str]) โ†’ List[List[float]][source]#

Embed search docs.

Parameters:

texts (List[str])

Return type:

List[List[float]]

embed_query(text: str) โ†’ List[float][source]#

Embed query text.

Parameters:

text (str)

Return type:

List[float]