@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 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 storage context
369
+ // Create index from documents with the specified vector store
371
370
  const index = await VectorStoreIndex.fromDocuments(documents, {
372
- storageContext,
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 core.VectorStoreQueryMode.SPARSE:
1110
+ case "sparse":
1111
+ case "bm25":
1112
1112
  azureQueryResultSearch = new AzureQueryResultSearchSparse(query, this.#fieldMapping, odataFilter, this._searchClient);
1113
1113
  break;
1114
- case core.VectorStoreQueryMode.HYBRID:
1114
+ case "hybrid":
1115
1115
  azureQueryResultSearch = new AzureQueryResultSearchHybrid(query, this.#fieldMapping, odataFilter, this._searchClient);
1116
1116
  break;
1117
- case core.VectorStoreQueryMode.SEMANTIC_HYBRID:
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.4";
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 storage context
251
+ // Create index from documents with the specified vector store
253
252
  const index = await VectorStoreIndex.fromDocuments(documents, {
254
- storageContext,
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 storage context
251
+ // Create index from documents with the specified vector store
253
252
  const index = await VectorStoreIndex.fromDocuments(documents, {
254
- storageContext,
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 storage context
251
+ // Create index from documents with the specified vector store
253
252
  const index = await VectorStoreIndex.fromDocuments(documents, {
254
- storageContext,
253
+ vectorStore,
255
254
  docStoreStrategy: DocStoreStrategy.UPSERTS,
256
255
  });
257
256
 
@@ -1,4 +1,4 @@
1
- import { Document, metadataDictToNode, BaseVectorStore, MetadataMode, nodeToMetadata, FilterOperator, FilterCondition, VectorStoreQueryMode } from '@vectorstores/core';
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 storage context
367
+ // Create index from documents with the specified vector store
369
368
  const index = await VectorStoreIndex.fromDocuments(documents, {
370
- storageContext,
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 VectorStoreQueryMode.SPARSE:
1108
+ case "sparse":
1109
+ case "bm25":
1110
1110
  azureQueryResultSearch = new AzureQueryResultSearchSparse(query, this.#fieldMapping, odataFilter, this._searchClient);
1111
1111
  break;
1112
- case VectorStoreQueryMode.HYBRID:
1112
+ case "hybrid":
1113
1113
  azureQueryResultSearch = new AzureQueryResultSearchHybrid(query, this.#fieldMapping, odataFilter, this._searchClient);
1114
1114
  break;
1115
- case VectorStoreQueryMode.SEMANTIC_HYBRID:
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.4";
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, VectorStoreQueryMode } from '@vectorstores/core';
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 storage context
367
+ // Create index from documents with the specified vector store
369
368
  const index = await VectorStoreIndex.fromDocuments(documents, {
370
- storageContext,
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 VectorStoreQueryMode.SPARSE:
1108
+ case "sparse":
1109
+ case "bm25":
1110
1110
  azureQueryResultSearch = new AzureQueryResultSearchSparse(query, this.#fieldMapping, odataFilter, this._searchClient);
1111
1111
  break;
1112
- case VectorStoreQueryMode.HYBRID:
1112
+ case "hybrid":
1113
1113
  azureQueryResultSearch = new AzureQueryResultSearchHybrid(query, this.#fieldMapping, odataFilter, this._searchClient);
1114
1114
  break;
1115
- case VectorStoreQueryMode.SEMANTIC_HYBRID:
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.4";
1134
+ var version = "0.1.6";
1135
1135
  var pkg = {
1136
1136
  version: version};
1137
1137
 
package/dist/storage.cjs CHANGED
@@ -5,7 +5,7 @@ var cosmos = require('@azure/cosmos');
5
5
  var identity = require('@azure/identity');
6
6
  var env = require('@vectorstores/env');
7
7
 
8
- var version = "0.1.4";
8
+ var version = "0.1.6";
9
9
  var pkg = {
10
10
  version: version};
11
11
 
@@ -3,7 +3,7 @@ import { CosmosClient } from '@azure/cosmos';
3
3
  import { DefaultAzureCredential } from '@azure/identity';
4
4
  import { getEnv } from '@vectorstores/env';
5
5
 
6
- var version = "0.1.4";
6
+ var version = "0.1.6";
7
7
  var pkg = {
8
8
  version: version};
9
9
 
package/dist/storage.js CHANGED
@@ -3,7 +3,7 @@ import { CosmosClient } from '@azure/cosmos';
3
3
  import { DefaultAzureCredential } from '@azure/identity';
4
4
  import { getEnv } from '@vectorstores/env';
5
5
 
6
- var version = "0.1.4";
6
+ var version = "0.1.6";
7
7
  var pkg = {
8
8
  version: version};
9
9
 
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",
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.4",
58
+ "@vectorstores/core": "0.1.6",
59
59
  "@vectorstores/env": "0.1.0"
60
60
  },
61
61
  "peerDependencies": {
62
- "@vectorstores/core": "0.1.4",
62
+ "@vectorstores/core": "0.1.6",
63
63
  "@vectorstores/env": "0.1.0"
64
64
  },
65
65
  "dependencies": {