Pinecone
ToolJet integrates with Pinecone to utilize its vector database capabilities. This integration enables ToolJet to perform vector operations such as updating, querying, and managing vector embeddings in Pinecone indexes.
Before following this guide, it is assumed that you have already completed the process of Using Marketplace plugins.
Connection
For connecting to Pinecone, the following credential is required:
- API Key: API key for Pinecone can be generated from the Pinecone Console.
![Configuring Pinecone in ToolJet](/img/marketplace/plugins/pinecone/connection.png)
Supported Operations
- Get Index Stats
- List Vector IDs
- Fetch Vectors
- Upsert Vectors
- Update Vector
- Delete Vectors
- Query Vectors
Get Index Stats
This operation retrieves statistics about a specific index in your Pinecone database.
Required Parameter
- Index: The name of the index to get statistics for.
![Get Index Stats Operation](/img/marketplace/plugins/pinecone/get-index-stats.png)
Example Response
{
"namespaces":{
"":{
"recordCount":100
}
},
"dimension":1024,
"indexFullness":0,
"totalRecordCount":100
}
List Vector IDs
This operation retrieves a list of vector IDs from a specified index.
Required Parameter
- Index: The name of the index to list vector IDs from.
Optional Parameters
- Prefix: Filter vector IDs by prefix.
- Limit: Maximum number of vector IDs to return.
- Pagination Token: Token for retrieving the next page of results.
- Namespace: Specific namespace to query within the index.
![List Vector IDs Operation](/img/marketplace/plugins/pinecone/list-vector-ids.png)
Example Response
{
"vectors":[
{"id":"0"},
{"id":"1"},
{"id":"10"},
{"id":"11"},
{"id":"12"},
{"id":"13"},
{"id":"14"},
{"id":"15"},
{"id":"16"},
{"id":"17"}
],
"pagination":{
"next":"eyJza2lwX3Bhc3QiOiIxNyIsInByZWZpeCI6bnVsbH0="
},
"namespace":"",
"usage":{
"readUnits":1
}
}
Fetch Vectors
This operation retrieves specific vectors by their IDs from an index.
Required Parameters
- Index: The name of the index to fetch vectors from.
- IDs: Array of vector IDs to fetch.
Optional Parameters
- Namespace: Specific namespace to fetch vectors from.
![Fetch Vectors Operation](/img/marketplace/plugins/pinecone/fetch-vectors.png)
Example Response
{
"records":{},
"namespace":"",
"usage":{
"readUnits":1
}
}
Upsert Vectors
This operation inserts or updates vectors in an index.
Required Parameters
- Index: The name of the index to upsert vectors into.
- Vectors: Array of vectors to upsert, including IDs and values.
Optional Parameters
- Namespace: Specific namespace to upsert vectors into
![Upsert Vectors Operation](/img/marketplace/plugins/pinecone/upsert-vectors.png)
Example Response
Upsert Successful
Update a Vector
This operation updates a single vector's values or metadata.
Required Parameters
- Index: The name of the index containing the vector.
- ID: ID of the vector to update.
Optional Parameters
- Values: Updated vector values as an array.
- Sparse Vector: Sparse vector representation.
- Metadata: Additional metadata for the vector.
- Namespace: Specific namespace containing the vector.
![Update Vector Operation](/img/marketplace/plugins/pinecone/update-vector.png)
Example Response
Update Successful
Delete Vectors
This operation deletes vectors from an index.
Required Parameters
- Index: The name of the index to delete vectors from.
Optional Parameters
- IDs: Array of vector IDs to delete.
- Delete All: Boolean flag to delete all vectors.
- Namespace: Specific namespace to delete vectors from.
- Filter: Filter condition for selective deletion.
![Delete Vectors Operation](/img/marketplace/plugins/pinecone/delete-vectors.png)
Example Response
Delete Successful
Query Vectors
This operation queries vectors in an index based on similarity.
Required Parameters
- Index: The name of the index to query.
- Vectors: Query vector values.
- Top K: Number of most similar vectors to return.
Optional Parameters
- Namespace: Specific namespace to query.
- Filter: Filter condition for the query.
- Include Values: Boolean to include vector values in results.
- Include Metadata: Boolean to include metadata in results.
- Sparse Vector: Sparse vector for hybrid search.
![Query Vectors Operation](/img/marketplace/plugins/pinecone/query-vectors.png)