pinecone-plugin-inference


Namepinecone-plugin-inference JSON
Version 3.1.0 PyPI version JSON
download
home_pagehttps://www.pinecone.io
SummaryEmbeddings plugin for Pinecone SDK
upload_time2024-12-10 17:04:57
maintainerNone
docs_urlNone
authorPinecone Systems, Inc.
requires_python<4.0,>=3.8
licenseApache-2.0
keywords
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # 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:
- [multilingual-e5-large](https://arxiv.org/pdf/2402.05672)

## 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.

```python
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>>
```

            

Raw data

            {
    "_id": null,
    "home_page": "https://www.pinecone.io",
    "name": "pinecone-plugin-inference",
    "maintainer": null,
    "docs_url": null,
    "requires_python": "<4.0,>=3.8",
    "maintainer_email": null,
    "keywords": null,
    "author": "Pinecone Systems, Inc.",
    "author_email": "support@pinecone.io",
    "download_url": "https://files.pythonhosted.org/packages/3a/82/09f6fb3c9d3b005c5b110d323a98f848f57babb1394ebea9f72e26f68242/pinecone_plugin_inference-3.1.0.tar.gz",
    "platform": null,
    "description": "# Inference API plugin for python SDK\n\n## Installation\n\nThe plugin is distributed separately from the core python sdk.\n\n```\n# Install the base python SDK, version 4.1.1 or higher\npip install pinecone-client\n\n# And also the plugin functionality\npip install pinecone-plugin-inference\n```\n\n## Usage\n\nInteract with Pinecone's Inference APIs, e.g. create embeddings (currently in preview).\n\nModels currently supported:\n- [multilingual-e5-large](https://arxiv.org/pdf/2402.05672)\n\n## Generate embeddings\nThe following example highlights how to use an embedding model to generate embeddings for a list of documents and a \nuser query, with the ultimate goal of retrieving similar documents from a Pinecone index.\n\n```python\nfrom pinecone import Pinecone\n\npc = Pinecone(api_key=\"<<PINECONE_API_KEY>>\")\nmodel = \"multilingual-e5-large\"\n\n# Embed documents\ntext = [\n    \"Turkey is a classic meat to eat at American Thanksgiving.\",\n    \"Many people enjoy the beautiful mosques in Turkey.\",\n]\ntext_embeddings = pc.inference.embed(\n    model=model,\n    inputs=text,\n    parameters={\"input_type\": \"passage\", \"truncate\": \"END\"},\n)\n\n# <<Upsert documents into Pinecone index>>\n\n# Embed query\nquery = [\"How should I prepare my turkey?\"]\nquery_embeddings = pc.inference.embed(\n    model=model,\n    inputs=query,\n    parameters={\"input_type\": \"query\", \"truncate\": \"END\"},\n)\n\n# <<Send query to Pinecone index to retrieve similar documents>>\n```\n",
    "bugtrack_url": null,
    "license": "Apache-2.0",
    "summary": "Embeddings plugin for Pinecone SDK",
    "version": "3.1.0",
    "project_urls": {
        "Documentation": "https://pinecone.io/docs",
        "Homepage": "https://www.pinecone.io"
    },
    "split_keywords": [],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "89454ae4e38439919584c2d34b6bef5d0ef8d068030871dd4da911d174840ee6",
                "md5": "3bb61b5a006b0f8d9b6c78c82655c5f7",
                "sha256": "96e861527bd41e90d58b7e76abd4e713d9af28f63e76a51864dfb9cf7180e3df"
            },
            "downloads": -1,
            "filename": "pinecone_plugin_inference-3.1.0-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "3bb61b5a006b0f8d9b6c78c82655c5f7",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": "<4.0,>=3.8",
            "size": 87477,
            "upload_time": "2024-12-10T17:04:55",
            "upload_time_iso_8601": "2024-12-10T17:04:55.457684Z",
            "url": "https://files.pythonhosted.org/packages/89/45/4ae4e38439919584c2d34b6bef5d0ef8d068030871dd4da911d174840ee6/pinecone_plugin_inference-3.1.0-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "3a8209f6fb3c9d3b005c5b110d323a98f848f57babb1394ebea9f72e26f68242",
                "md5": "df917a8edd8bf5858898d4b0604dcac8",
                "sha256": "eff826178e1fe448577be2ff3d8dbb072befbbdc2d888e214624523a1c37cd8d"
            },
            "downloads": -1,
            "filename": "pinecone_plugin_inference-3.1.0.tar.gz",
            "has_sig": false,
            "md5_digest": "df917a8edd8bf5858898d4b0604dcac8",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": "<4.0,>=3.8",
            "size": 49315,
            "upload_time": "2024-12-10T17:04:57",
            "upload_time_iso_8601": "2024-12-10T17:04:57.792949Z",
            "url": "https://files.pythonhosted.org/packages/3a/82/09f6fb3c9d3b005c5b110d323a98f848f57babb1394ebea9f72e26f68242/pinecone_plugin_inference-3.1.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-12-10 17:04:57",
    "github": false,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "lcname": "pinecone-plugin-inference"
}
        
Elapsed time: 4.15866s