pinecone-plugin-inference-3.1.0
توضیحات
Embeddings plugin for Pinecone SDK
| ویژگی | مقدار |
|---|---|
| سیستم عامل | - |
| نام فایل | pinecone-plugin-inference-3.1.0 |
| نام | pinecone-plugin-inference |
| نسخه کتابخانه | 3.1.0 |
| نگهدارنده | [] |
| ایمیل نگهدارنده | [] |
| نویسنده | Pinecone Systems, Inc. |
| ایمیل نویسنده | support@pinecone.io |
| آدرس صفحه اصلی | https://www.pinecone.io |
| آدرس اینترنتی | https://pypi.org/project/pinecone-plugin-inference/ |
| مجوز | Apache-2.0 |
# 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>>
```
نیازمندی
| مقدار | نام |
|---|---|
| - | pinecone-plugin-interface<0.0.8,>=0.0.7 |
زبان مورد نیاز
| مقدار | نام |
|---|---|
| <4.0,>=3.8 | Python |
نحوه نصب
نصب پکیج whl pinecone-plugin-inference-3.1.0:
pip install pinecone-plugin-inference-3.1.0.whl
نصب پکیج tar.gz pinecone-plugin-inference-3.1.0:
pip install pinecone-plugin-inference-3.1.0.tar.gz