Inference API plugin for python SDK
Installation
The plugin is distributed separately from the core python sdk.
pip install pinecone-client
pip install pinecone-plugin-inference
Usage
Interact with Pinecone's Inference APIs, e.g. create embeddings (currently in preview).
Models currently supported:
multilingual-e5-large
Generate embeddings
The following example highlights how to use an embedding model to generate embeddings for a list of documents and a
user query, with the ultimate goal of retrieving similar documents from a Pinecone index.
from pinecone import Pinecone
pc = Pinecone(api_key="<>")
model = "multilingual-e5-large"
text = [
"Turkey is a classic meat to eat at American Thanksgiving.",
"Many people enjoy the beautiful mosques in Turkey.",
]
textembeddings = pc.inference.embed(
model=model,
inputs=text,
parameters={"input
|