@mastra/pinecone 1.1.1-alpha.0 → 1.1.1-alpha.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +13 -39
- package/dist/docs/SKILL.md +1 -1
- package/dist/docs/assets/SOURCE_MAP.json +1 -1
- package/package.json +3 -3
package/README.md
CHANGED
|
@@ -5,7 +5,7 @@ Vector store implementation for Pinecone, using the official @pinecone-database/
|
|
|
5
5
|
## Installation
|
|
6
6
|
|
|
7
7
|
```bash
|
|
8
|
-
|
|
8
|
+
npm install @mastra/pinecone
|
|
9
9
|
```
|
|
10
10
|
|
|
11
11
|
## Usage
|
|
@@ -19,60 +19,34 @@ const vectorStore = new PineconeVector({
|
|
|
19
19
|
});
|
|
20
20
|
|
|
21
21
|
// Create a new index
|
|
22
|
-
await vectorStore.createIndex({ indexName: 'my-index', dimension:
|
|
22
|
+
await vectorStore.createIndex({ indexName: 'my-index', dimension: 3, metric: 'cosine' });
|
|
23
23
|
|
|
24
24
|
// Add vectors
|
|
25
|
-
const vectors = [
|
|
25
|
+
const vectors = [
|
|
26
|
+
[0.1, 0.2, 0.3],
|
|
27
|
+
[0.3, 0.4, 0.5],
|
|
28
|
+
];
|
|
26
29
|
const metadata = [{ text: 'doc1' }, { text: 'doc2' }];
|
|
27
30
|
const ids = await vectorStore.upsert({ indexName: 'my-index', vectors, metadata });
|
|
28
31
|
|
|
29
32
|
// Query vectors
|
|
30
33
|
const results = await vectorStore.query({
|
|
31
34
|
indexName: 'my-index',
|
|
32
|
-
queryVector: [0.1, 0.2,
|
|
35
|
+
queryVector: [0.1, 0.2, 0.3],
|
|
33
36
|
topK: 10,
|
|
34
37
|
filter: { text: { $eq: 'doc1' } },
|
|
35
38
|
includeVector: false,
|
|
36
39
|
});
|
|
37
40
|
```
|
|
38
41
|
|
|
39
|
-
##
|
|
42
|
+
## Documentation
|
|
40
43
|
|
|
41
|
-
|
|
44
|
+
- [@mastra/pinecone documentation](https://mastra.ai/reference/vectors/pinecone)
|
|
42
45
|
|
|
43
|
-
|
|
44
|
-
- `apiKey`: Your Pinecone API key
|
|
46
|
+
## Changelog
|
|
45
47
|
|
|
46
|
-
|
|
48
|
+
See the [package changelog](https://github.com/mastra-ai/mastra/blob/main/stores/pinecone/CHANGELOG.md) for version history and release notes.
|
|
47
49
|
|
|
48
|
-
|
|
49
|
-
- `cloud`: Cloud provider for new index creation ('aws' | 'gcp' | 'azure', default: 'aws')
|
|
50
|
-
- `region`: Region for new index creation (default: 'us-east-1')
|
|
50
|
+
## Support
|
|
51
51
|
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
- Serverless deployment on AWS (us-east-1)
|
|
55
|
-
- Vector similarity search with cosine, euclidean, and dot product metrics
|
|
56
|
-
- Automatic batching for large upserts (100 vectors per request)
|
|
57
|
-
- Built-in telemetry support
|
|
58
|
-
- Metadata filtering
|
|
59
|
-
- Optional vector inclusion in query results
|
|
60
|
-
- Automatic UUID generation for vectors
|
|
61
|
-
- Built on top of @pinecone-database/pinecone SDK
|
|
62
|
-
|
|
63
|
-
## Methods
|
|
64
|
-
|
|
65
|
-
- `createIndex({indexName, dimension, metric?})`: Create a new index
|
|
66
|
-
- `upsert({indexName, vectors, metadata?, ids?})`: Add or update vectors
|
|
67
|
-
- `query({indexName, queryVector, topK?, filter?, includeVector?})`: Search for similar vectors
|
|
68
|
-
- `updateVector({ indexName, id?, filter?, namespace?, update })`: Update a single vector by ID or metadata filter
|
|
69
|
-
- `deleteVector({ indexName, id })`: Delete a single vector by ID
|
|
70
|
-
- `deleteVectors({ indexName, ids?, filter?, namespace? })`: Delete multiple vectors by IDs or metadata filter
|
|
71
|
-
- `listIndexes()`: List all indexes
|
|
72
|
-
- `describeIndex(indexName)`: Get index statistics
|
|
73
|
-
- `deleteIndex(indexName)`: Delete an index
|
|
74
|
-
|
|
75
|
-
## Related Links
|
|
76
|
-
|
|
77
|
-
- [Pinecone Documentation](https://docs.pinecone.io/)
|
|
78
|
-
- [Pinecone Node.js SDK](https://github.com/pinecone-io/pinecone-ts-client)
|
|
52
|
+
We have an [open community Discord](https://discord.gg/mastra-ai). Come and say hello and let us know if you have any questions or need any help getting things running.
|
package/dist/docs/SKILL.md
CHANGED
|
@@ -3,7 +3,7 @@ name: mastra-pinecone
|
|
|
3
3
|
description: Documentation for @mastra/pinecone. Use when working with @mastra/pinecone APIs, configuration, or implementation.
|
|
4
4
|
metadata:
|
|
5
5
|
package: "@mastra/pinecone"
|
|
6
|
-
version: "1.1.1-alpha.
|
|
6
|
+
version: "1.1.1-alpha.1"
|
|
7
7
|
---
|
|
8
8
|
|
|
9
9
|
## When to use
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mastra/pinecone",
|
|
3
|
-
"version": "1.1.1-alpha.
|
|
3
|
+
"version": "1.1.1-alpha.1",
|
|
4
4
|
"description": "Pinecone vector store provider for Mastra",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -32,10 +32,10 @@
|
|
|
32
32
|
"tsx": "^4.23.1",
|
|
33
33
|
"typescript": "^7.0.2",
|
|
34
34
|
"vitest": "4.1.10",
|
|
35
|
-
"@internal/lint": "0.0.129",
|
|
36
35
|
"@internal/storage-test-utils": "0.0.125",
|
|
36
|
+
"@internal/lint": "0.0.129",
|
|
37
37
|
"@internal/types-builder": "0.0.104",
|
|
38
|
-
"@mastra/core": "1.64.0-alpha.
|
|
38
|
+
"@mastra/core": "1.64.0-alpha.7"
|
|
39
39
|
},
|
|
40
40
|
"peerDependencies": {
|
|
41
41
|
"@mastra/core": ">=1.0.0-0 <2.0.0-0"
|