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 if the input data cannot be parsed to form a valid model.

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 | None [Optional] (alias 'api_key')#

Pinecone API key.

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

Constraints:
  • type = string

  • writeOnly = True

  • format = password

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]