@vectorstores/azure 0.1.4 → 0.1.6
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/dist/index.cjs +7 -7
- package/dist/index.d.cts +2 -3
- package/dist/index.d.ts +2 -3
- package/dist/index.edge-light.d.ts +2 -3
- package/dist/index.edge-light.js +8 -8
- package/dist/index.js +8 -8
- package/dist/storage.cjs +1 -1
- package/dist/storage.edge-light.js +1 -1
- package/dist/storage.js +1 -1
- package/package.json +3 -3
package/dist/index.cjs
CHANGED
|
@@ -365,11 +365,10 @@ const vectorStore = new AzureAISearchVectorStore({
|
|
|
365
365
|
const documents = await new SimpleDirectoryReader().loadData(
|
|
366
366
|
"data/paul_graham/",
|
|
367
367
|
);
|
|
368
|
-
const storageContext = await storageContextFromDefaults({ vectorStore });
|
|
369
368
|
|
|
370
|
-
// Create index from documents with the specified
|
|
369
|
+
// Create index from documents with the specified vector store
|
|
371
370
|
const index = await VectorStoreIndex.fromDocuments(documents, {
|
|
372
|
-
|
|
371
|
+
vectorStore,
|
|
373
372
|
docStoreStrategy: DocStoreStrategy.UPSERTS,
|
|
374
373
|
});
|
|
375
374
|
|
|
@@ -1108,13 +1107,14 @@ console.log({ response });
|
|
|
1108
1107
|
// Define base AzureQueryResultSearch object based on query mode
|
|
1109
1108
|
let azureQueryResultSearch = new AzureQueryResultSearchDefault(query, this.#fieldMapping, odataFilter, this._searchClient);
|
|
1110
1109
|
switch(query.mode){
|
|
1111
|
-
case
|
|
1110
|
+
case "sparse":
|
|
1111
|
+
case "bm25":
|
|
1112
1112
|
azureQueryResultSearch = new AzureQueryResultSearchSparse(query, this.#fieldMapping, odataFilter, this._searchClient);
|
|
1113
1113
|
break;
|
|
1114
|
-
case
|
|
1114
|
+
case "hybrid":
|
|
1115
1115
|
azureQueryResultSearch = new AzureQueryResultSearchHybrid(query, this.#fieldMapping, odataFilter, this._searchClient);
|
|
1116
1116
|
break;
|
|
1117
|
-
case
|
|
1117
|
+
case "semantic_hybrid":
|
|
1118
1118
|
azureQueryResultSearch = new AzureQueryResultSearchSemanticHybrid(query, this.#fieldMapping, odataFilter, this._searchClient);
|
|
1119
1119
|
break;
|
|
1120
1120
|
}
|
|
@@ -1133,7 +1133,7 @@ console.log({ response });
|
|
|
1133
1133
|
}
|
|
1134
1134
|
}
|
|
1135
1135
|
|
|
1136
|
-
var version = "0.1.
|
|
1136
|
+
var version = "0.1.6";
|
|
1137
1137
|
var pkg = {
|
|
1138
1138
|
version: version};
|
|
1139
1139
|
|
package/dist/index.d.cts
CHANGED
|
@@ -247,11 +247,10 @@ const vectorStore = new AzureAISearchVectorStore({
|
|
|
247
247
|
const documents = await new SimpleDirectoryReader().loadData(
|
|
248
248
|
"data/paul_graham/",
|
|
249
249
|
);
|
|
250
|
-
const storageContext = await storageContextFromDefaults({ vectorStore });
|
|
251
250
|
|
|
252
|
-
// Create index from documents with the specified
|
|
251
|
+
// Create index from documents with the specified vector store
|
|
253
252
|
const index = await VectorStoreIndex.fromDocuments(documents, {
|
|
254
|
-
|
|
253
|
+
vectorStore,
|
|
255
254
|
docStoreStrategy: DocStoreStrategy.UPSERTS,
|
|
256
255
|
});
|
|
257
256
|
|
package/dist/index.d.ts
CHANGED
|
@@ -247,11 +247,10 @@ const vectorStore = new AzureAISearchVectorStore({
|
|
|
247
247
|
const documents = await new SimpleDirectoryReader().loadData(
|
|
248
248
|
"data/paul_graham/",
|
|
249
249
|
);
|
|
250
|
-
const storageContext = await storageContextFromDefaults({ vectorStore });
|
|
251
250
|
|
|
252
|
-
// Create index from documents with the specified
|
|
251
|
+
// Create index from documents with the specified vector store
|
|
253
252
|
const index = await VectorStoreIndex.fromDocuments(documents, {
|
|
254
|
-
|
|
253
|
+
vectorStore,
|
|
255
254
|
docStoreStrategy: DocStoreStrategy.UPSERTS,
|
|
256
255
|
});
|
|
257
256
|
|
|
@@ -247,11 +247,10 @@ const vectorStore = new AzureAISearchVectorStore({
|
|
|
247
247
|
const documents = await new SimpleDirectoryReader().loadData(
|
|
248
248
|
"data/paul_graham/",
|
|
249
249
|
);
|
|
250
|
-
const storageContext = await storageContextFromDefaults({ vectorStore });
|
|
251
250
|
|
|
252
|
-
// Create index from documents with the specified
|
|
251
|
+
// Create index from documents with the specified vector store
|
|
253
252
|
const index = await VectorStoreIndex.fromDocuments(documents, {
|
|
254
|
-
|
|
253
|
+
vectorStore,
|
|
255
254
|
docStoreStrategy: DocStoreStrategy.UPSERTS,
|
|
256
255
|
});
|
|
257
256
|
|
package/dist/index.edge-light.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Document, metadataDictToNode, BaseVectorStore, MetadataMode, nodeToMetadata, FilterOperator, FilterCondition
|
|
1
|
+
import { Document, metadataDictToNode, BaseVectorStore, MetadataMode, nodeToMetadata, FilterOperator, FilterCondition } from '@vectorstores/core';
|
|
2
2
|
export * from './storage.edge-light.js';
|
|
3
3
|
import { DefaultAzureCredential, ManagedIdentityCredential } from '@azure/identity';
|
|
4
4
|
import { KnownVectorSearchAlgorithmKind, KnownAnalyzerNames, KnownSearchFieldDataType, KnownVectorSearchAlgorithmMetric, KnownVectorSearchCompressionKind, SearchClient, SearchIndexClient, AzureKeyCredential, IndexDocumentsBatch } from '@azure/search-documents';
|
|
@@ -363,11 +363,10 @@ const vectorStore = new AzureAISearchVectorStore({
|
|
|
363
363
|
const documents = await new SimpleDirectoryReader().loadData(
|
|
364
364
|
"data/paul_graham/",
|
|
365
365
|
);
|
|
366
|
-
const storageContext = await storageContextFromDefaults({ vectorStore });
|
|
367
366
|
|
|
368
|
-
// Create index from documents with the specified
|
|
367
|
+
// Create index from documents with the specified vector store
|
|
369
368
|
const index = await VectorStoreIndex.fromDocuments(documents, {
|
|
370
|
-
|
|
369
|
+
vectorStore,
|
|
371
370
|
docStoreStrategy: DocStoreStrategy.UPSERTS,
|
|
372
371
|
});
|
|
373
372
|
|
|
@@ -1106,13 +1105,14 @@ console.log({ response });
|
|
|
1106
1105
|
// Define base AzureQueryResultSearch object based on query mode
|
|
1107
1106
|
let azureQueryResultSearch = new AzureQueryResultSearchDefault(query, this.#fieldMapping, odataFilter, this._searchClient);
|
|
1108
1107
|
switch(query.mode){
|
|
1109
|
-
case
|
|
1108
|
+
case "sparse":
|
|
1109
|
+
case "bm25":
|
|
1110
1110
|
azureQueryResultSearch = new AzureQueryResultSearchSparse(query, this.#fieldMapping, odataFilter, this._searchClient);
|
|
1111
1111
|
break;
|
|
1112
|
-
case
|
|
1112
|
+
case "hybrid":
|
|
1113
1113
|
azureQueryResultSearch = new AzureQueryResultSearchHybrid(query, this.#fieldMapping, odataFilter, this._searchClient);
|
|
1114
1114
|
break;
|
|
1115
|
-
case
|
|
1115
|
+
case "semantic_hybrid":
|
|
1116
1116
|
azureQueryResultSearch = new AzureQueryResultSearchSemanticHybrid(query, this.#fieldMapping, odataFilter, this._searchClient);
|
|
1117
1117
|
break;
|
|
1118
1118
|
}
|
|
@@ -1131,7 +1131,7 @@ console.log({ response });
|
|
|
1131
1131
|
}
|
|
1132
1132
|
}
|
|
1133
1133
|
|
|
1134
|
-
var version = "0.1.
|
|
1134
|
+
var version = "0.1.6";
|
|
1135
1135
|
var pkg = {
|
|
1136
1136
|
version: version};
|
|
1137
1137
|
|
package/dist/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Document, metadataDictToNode, BaseVectorStore, MetadataMode, nodeToMetadata, FilterOperator, FilterCondition
|
|
1
|
+
import { Document, metadataDictToNode, BaseVectorStore, MetadataMode, nodeToMetadata, FilterOperator, FilterCondition } from '@vectorstores/core';
|
|
2
2
|
export * from './storage.js';
|
|
3
3
|
import { DefaultAzureCredential, ManagedIdentityCredential } from '@azure/identity';
|
|
4
4
|
import { KnownVectorSearchAlgorithmKind, KnownAnalyzerNames, KnownSearchFieldDataType, KnownVectorSearchAlgorithmMetric, KnownVectorSearchCompressionKind, SearchClient, SearchIndexClient, AzureKeyCredential, IndexDocumentsBatch } from '@azure/search-documents';
|
|
@@ -363,11 +363,10 @@ const vectorStore = new AzureAISearchVectorStore({
|
|
|
363
363
|
const documents = await new SimpleDirectoryReader().loadData(
|
|
364
364
|
"data/paul_graham/",
|
|
365
365
|
);
|
|
366
|
-
const storageContext = await storageContextFromDefaults({ vectorStore });
|
|
367
366
|
|
|
368
|
-
// Create index from documents with the specified
|
|
367
|
+
// Create index from documents with the specified vector store
|
|
369
368
|
const index = await VectorStoreIndex.fromDocuments(documents, {
|
|
370
|
-
|
|
369
|
+
vectorStore,
|
|
371
370
|
docStoreStrategy: DocStoreStrategy.UPSERTS,
|
|
372
371
|
});
|
|
373
372
|
|
|
@@ -1106,13 +1105,14 @@ console.log({ response });
|
|
|
1106
1105
|
// Define base AzureQueryResultSearch object based on query mode
|
|
1107
1106
|
let azureQueryResultSearch = new AzureQueryResultSearchDefault(query, this.#fieldMapping, odataFilter, this._searchClient);
|
|
1108
1107
|
switch(query.mode){
|
|
1109
|
-
case
|
|
1108
|
+
case "sparse":
|
|
1109
|
+
case "bm25":
|
|
1110
1110
|
azureQueryResultSearch = new AzureQueryResultSearchSparse(query, this.#fieldMapping, odataFilter, this._searchClient);
|
|
1111
1111
|
break;
|
|
1112
|
-
case
|
|
1112
|
+
case "hybrid":
|
|
1113
1113
|
azureQueryResultSearch = new AzureQueryResultSearchHybrid(query, this.#fieldMapping, odataFilter, this._searchClient);
|
|
1114
1114
|
break;
|
|
1115
|
-
case
|
|
1115
|
+
case "semantic_hybrid":
|
|
1116
1116
|
azureQueryResultSearch = new AzureQueryResultSearchSemanticHybrid(query, this.#fieldMapping, odataFilter, this._searchClient);
|
|
1117
1117
|
break;
|
|
1118
1118
|
}
|
|
@@ -1131,7 +1131,7 @@ console.log({ response });
|
|
|
1131
1131
|
}
|
|
1132
1132
|
}
|
|
1133
1133
|
|
|
1134
|
-
var version = "0.1.
|
|
1134
|
+
var version = "0.1.6";
|
|
1135
1135
|
var pkg = {
|
|
1136
1136
|
version: version};
|
|
1137
1137
|
|
package/dist/storage.cjs
CHANGED
package/dist/storage.js
CHANGED
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vectorstores/azure",
|
|
3
3
|
"description": "Azure Storage for vectorstores",
|
|
4
|
-
"version": "0.1.
|
|
4
|
+
"version": "0.1.6",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.cjs",
|
|
7
7
|
"module": "./dist/index.js",
|
|
@@ -55,11 +55,11 @@
|
|
|
55
55
|
"@types/node": "^24.0.13",
|
|
56
56
|
"dotenv": "^17.2.0",
|
|
57
57
|
"vitest": "^2.1.5",
|
|
58
|
-
"@vectorstores/core": "0.1.
|
|
58
|
+
"@vectorstores/core": "0.1.6",
|
|
59
59
|
"@vectorstores/env": "0.1.0"
|
|
60
60
|
},
|
|
61
61
|
"peerDependencies": {
|
|
62
|
-
"@vectorstores/core": "0.1.
|
|
62
|
+
"@vectorstores/core": "0.1.6",
|
|
63
63
|
"@vectorstores/env": "0.1.0"
|
|
64
64
|
},
|
|
65
65
|
"dependencies": {
|