Registry /
vector-search / pinecone-plugin-inference
Install & Compatibility
Where this runs
tested against v3.1.0 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
muslpy 3.10–3.910 runs
installs and imports cleanly · install 0.0s · import 0.000s · 88.1MB
glibcpy 3.10–3.910 runs
installs and imports cleanly · install 2.4s · import 0.000s · 19MB
80MB installed
● package 80MB
Code
Verified usage
Verified import paths — ran on the pinned version, not inferred.
Pinecone
✓ from pinecone_plugins.inference import Pinecone
✗ from pinecone_plugins import Pinecone
This quickstart demonstrates the general approach to using Pinecone's inference capabilities, which now are integrated directly into the main `pinecone` SDK (v5.0.0+). The `pinecone-plugin-inference` library is no longer necessary. The example initializes the Pinecone client and illustrates where inference operations (like embedding generation) would typically be performed. Users should consult the latest Pinecone Python SDK documentation for the most accurate and up-to-date methods and model availability.
import os
from pinecone import Pinecone
# Ensure PINECONE_API_KEY and PINECONE_ENVIRONMENT (or PINECONE_CLOUD/PINECONE_REGION for serverless) are set as environment variables
api_key = os.environ.get('PINECONE_API_KEY', 'YOUR_API_KEY')
# For serverless indexes, use CloudProvider and region directly with Pinecone(cloud=CloudProvider.AWS, region=AwsRegion.US_EAST_1)
# For older pod-based indexes, use environment=os.environ.get('PINECONE_ENVIRONMENT', 'YOUR_ENVIRONMENT')
# Initialize Pinecone client (inference capabilities are now integrated)
pc = Pinecone(api_key=api_key)
# Example: Generate embeddings using the integrated inference API
documents = [
'The quick brown fox jumps over the lazy dog.',
'Python is a high-level, interpreted programming language.'
]
try:
# As of pinecone SDK v5.0.0+, inference functionality is directly available
# The exact method signature may vary slightly with new versions, always refer to current docs.
# Example with a common embedding model (e.g., 'text-embedding-ada-002' or similar)
# Note: Model availability and exact method names can change.
# Check Pinecone documentation for current available models and usage.
# This is a general example, specific model names and parameters should be checked with current Pinecone docs.
# If using serverless, `cloud` and `region` are passed at Pinecone client initialization.
# This example assumes a method like 'embed_documents' or 'generate_embeddings' exists under 'pc.inference'
# For the most up-to-date quickstart, refer to the Pinecone Python SDK documentation.
print("Attempting to generate embeddings...")
# This part is illustrative; actual method name/parameters might differ slightly.
# The concept is that `pc.inference` will expose embedding generation.
# A more realistic example from current Pinecone SDK (v7.x) for integrated inference:
# from pinecone import Index, PodSpec
# index_name = 'my-integrated-index'
# if index_name not in pc.list_indexes():
# pc.create_index(
# name=index_name,
# dimension=1536, # Example dimension, depends on the embedding model
# metric='cosine',
# spec=PodSpec(environment='gcp-starter') # or ServerlessSpec
# )
# index = pc.Index(index_name)
# result = index.upsert(vectors=[{'id': f'doc{i}', 'values': pc.embed_text(text=doc), 'metadata': {'text': doc}} for i, doc in enumerate(documents)])
# print(f"Upserted documents: {result}")
# Placeholder for direct inference call as per older plugin concept, but now through main SDK:
# The actual method name and arguments depend on the Pinecone SDK version and specific API.
# As of pinecone v7.x, embedding is often done via `index.upsert` with `pc.embed_text` or similar.
# For direct embedding generation without upserting to an index immediately, you'd look for methods exposed on the Pinecone client or a dedicated inference client if one exists.
# Since pinecone-plugin-inference is deprecated, the quickstart should reflect current SDK usage.
print("Please refer to the official Pinecone Python SDK documentation for the latest quickstart on integrated inference and embedding generation.")
print("This plugin is no longer needed for SDK versions 5.0.0+.")
except Exception as e:
print(f"An error occurred: {e}")
print("Ensure your Pinecone API key and environment/cloud configuration are correct and that you are using Pinecone SDK v5.0.0 or higher for integrated inference.")
Debug
Known issues
breakingThe `pinecone-plugin-inference` library is effectively deprecated for users of Pinecone Python SDK v5.0.0 and later. Its functionality for accessing Pinecone's Inference API (e.g., generating embeddings) has been integrated directly into the main `pinecone` SDK. Installing this plugin separately alongside SDK v5.0.0+ is redundant and unnecessary.fixRemove `pinecone-plugin-inference` from your project's dependencies. Ensure you have `pinecone>=5.0.0` installed. Access inference capabilities directly through your `Pinecone` client object (e.g., `pc.embed_text(...)` or via index operations).
affects: pinecone-client < 5.0.0 (plugin was relevant); pinecone >= 5.0.0 (plugin is obsolete)
gotchaWhen using `pinecone-plugin-inference` with older versions of the Pinecone SDK, IDEs might struggle with autocomplete and intellisense for dynamically added functionality. This is because the plugin modifies client classes at runtime, making the new methods less visible to static analysis.fixUpgrade to `pinecone` SDK v5.0.0 or newer and remove the `pinecone-plugin-inference` dependency. The integrated functionality generally offers better IDE support. If sticking to older versions, rely on documentation for method signatures.
affects: pinecone-plugin-inference (all versions) used with older pinecone-client versions (pre-5.0.0)
gotchaThe Pinecone Python SDK package name changed from `pinecone-client` to `pinecone` starting in version 5.1.0. When upgrading or installing, ensure you are using `pip install pinecone` to get the latest versions and integrated features.fixUpdate your `pip install` commands and `requirements.txt` to use `pinecone` instead of `pinecone-client`. For example, `pip install pinecone --upgrade`.
affects: pinecone-client (all versions); pinecone < 5.1.0
Upgrade
Version history
3.1.0latest on PyPI · released Dec 10, 2024
Audit
Dependencies
pinecone-clientrequiredProvided inference capabilities for older Pinecone SDK versions (pre-5.0.0).
pineconerequiredThe main Pinecone SDK, which now includes this plugin's functionality directly (v5.0.0+).