Skip to main content
Pre-release

This release is a pre-release and may not be stable for production use.

Inference API plugin for python SDK

Installation

The plugin is distributed separately from the core python sdk.

# Install the base python SDK, version 4.1.1 or higher
pip install pinecone-client

# And also the plugin functionality
pip install pinecone-plugin-inference

Usage

Interact with Pinecone's Inference APIs, e.g. create embeddings (currently in preview).

Models currently supported:

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="<<PINECONE_API_KEY>>")
model = "multilingual-e5-large"

# Embed documents
text = [
    "Turkey is a classic meat to eat at American Thanksgiving.",
    "Many people enjoy the beautiful mosques in Turkey.",
]
text_embeddings = pc.inference.embed(
    model=model,
    inputs=text,
    parameters={"input_type": "passage", "truncate": "END"},
)

# <<Upsert documents into Pinecone index>>

# Embed query
query = ["How should I prepare my turkey?"]
query_embeddings = pc.inference.embed(
    model=model,
    inputs=query,
    parameters={"input_type": "query", "truncate": "END"},
)

# <<Send query to Pinecone index to retrieve similar documents>>

Metadata

Release files for pinecone-plugin-inference 2.0.0.dev20241112200340

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for pinecone-plugin-inference 2.0.0.dev20241112200340
File Size Uploaded Provenance Actions
pinecone_plugin_inference-2.0.0.dev20241112200340.tar.gz 48.5 kB Without provenance Details for pinecone_plugin_inference-2.0.0.dev20241112200340.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for pinecone-plugin-inference 2.0.0.dev20241112200340
File Interpreter ABI Platform Actions
pinecone_plugin_inference-2.0.0.dev20241112200340-py3-none-any.whl Python 3 none any Details for pinecone_plugin_inference-2.0.0.dev20241112200340-py3-none-any.whl

Total release size: 133.1 kB

Release files / pinecone_plugin_inference-2.0.0.dev20241112200340.tar.gz

Download URL pinecone_plugin_inference-2.0.0.dev20241112200340.tar.gz
Size 48.5 kB
Tags Source
SHA-256 checksum
How to use checksums
1fa2dccc5f585e61fc58b4d688995d2597ae4503c2764cabb8656de487401710
BLAKE2b-256 checksum
How to use checksums
b346248eb8142d2bb7d8bf3d8a3bc7f2e2ca0aaf9b47978b6ea3946bccc46836
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.8.4 CPython/3.12.7 Linux/6.5.0-1025-azure

Release files / pinecone_plugin_inference-2.0.0.dev20241112200340-py3-none-any.whl

Download URL pinecone_plugin_inference-2.0.0.dev20241112200340-py3-none-any.whl
Size 84.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
d1149289a625e5d197b363d923afb76711edfb8567071fc7c815b1715142361b
BLAKE2b-256 checksum
How to use checksums
ec9a4ce62dd287fd4a9678b9259491cbfe33e3f4e79ad8bac63c461bd82a33e9
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.8.4 CPython/3.12.7 Linux/6.5.0-1025-azure

Security for pinecone-plugin-inference 2.0.0.dev20241112200340

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page