mirror of
https://github.com/run-llama/LlamaIndexTS.git
synced 2026-07-16 07:14:29 -04:00
feat: elastic search vector store (#1777)
This commit is contained in:
@@ -0,0 +1,6 @@
|
||||
---
|
||||
"@llamaindex/elastic-search": minor
|
||||
"@llamaindex/examples": patch
|
||||
---
|
||||
|
||||
Added support for elastic search vector store
|
||||
@@ -29,6 +29,7 @@
|
||||
"@llamaindex/mistral": "^0.0.14",
|
||||
"@llamaindex/mixedbread": "^0.0.13",
|
||||
"@llamaindex/mongodb": "^0.0.13",
|
||||
"@llamaindex/elastic-search": "^0.0.1",
|
||||
"@llamaindex/node-parser": "^1.0.8",
|
||||
"@llamaindex/ollama": "^0.0.48",
|
||||
"@llamaindex/openai": "^0.1.61",
|
||||
|
||||
@@ -0,0 +1,73 @@
|
||||
import { ElasticSearchVectorStore } from "@llamaindex/elastic-search";
|
||||
import {
|
||||
gemini,
|
||||
GEMINI_EMBEDDING_MODEL,
|
||||
GEMINI_MODEL,
|
||||
GeminiEmbedding,
|
||||
} from "@llamaindex/google";
|
||||
import {
|
||||
Document,
|
||||
Settings,
|
||||
storageContextFromDefaults,
|
||||
VectorStoreIndex,
|
||||
} from "llamaindex";
|
||||
async function main() {
|
||||
Settings.embedModel = new GeminiEmbedding({
|
||||
model: GEMINI_EMBEDDING_MODEL.TEXT_EMBEDDING_004,
|
||||
});
|
||||
Settings.llm = gemini({
|
||||
model: GEMINI_MODEL.GEMINI_PRO_1_5_FLASH,
|
||||
});
|
||||
// Create sample documents
|
||||
const documents = [
|
||||
new Document({
|
||||
text: "Elastic search is a powerful search engine",
|
||||
metadata: {
|
||||
source: "tech_docs",
|
||||
author: "John Doe",
|
||||
},
|
||||
}),
|
||||
new Document({
|
||||
text: "Vector search enables semantic similarity search",
|
||||
metadata: {
|
||||
source: "research_paper",
|
||||
author: "Jane Smith",
|
||||
},
|
||||
}),
|
||||
new Document({
|
||||
text: "Elasticsearch supports various distance metrics for vector search",
|
||||
metadata: {
|
||||
source: "tech_docs",
|
||||
author: "Bob Wilson",
|
||||
},
|
||||
}),
|
||||
];
|
||||
|
||||
// Initialize ElasticSearch Vector Store
|
||||
const vectorStore = new ElasticSearchVectorStore({
|
||||
indexName: "llamaindex-demo",
|
||||
esCloudId: process.env.ES_CLOUD_ID,
|
||||
esApiKey: process.env.ES_API_KEY,
|
||||
});
|
||||
|
||||
// Create storage context with the vector store
|
||||
const storageContext = await storageContextFromDefaults({
|
||||
vectorStore,
|
||||
});
|
||||
|
||||
// Create and store embeddings in ElasticSearch
|
||||
const index = await VectorStoreIndex.fromDocuments(documents, {
|
||||
storageContext,
|
||||
});
|
||||
|
||||
// Query the index
|
||||
const queryEngine = index.asQueryEngine();
|
||||
|
||||
// Simple query
|
||||
const response = await queryEngine.query({
|
||||
query: "What is vector search?",
|
||||
});
|
||||
console.log("Basic Query Response:", response.toString());
|
||||
}
|
||||
|
||||
main().catch(console.error);
|
||||
@@ -0,0 +1,8 @@
|
||||
{
|
||||
"name": "elastic-search-vector-store",
|
||||
"type": "module",
|
||||
"private": true,
|
||||
"scripts": {
|
||||
"start": "npx tsx index.ts"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,51 @@
|
||||
{
|
||||
"name": "@llamaindex/elastic-search",
|
||||
"description": "Elastic Search Storage for LlamaIndex",
|
||||
"version": "0.0.1",
|
||||
"type": "module",
|
||||
"main": "./dist/index.cjs",
|
||||
"module": "./dist/index.js",
|
||||
"exports": {
|
||||
".": {
|
||||
"edge-light": {
|
||||
"types": "./dist/index.edge-light.d.ts",
|
||||
"default": "./dist/index.edge-light.js"
|
||||
},
|
||||
"workerd": {
|
||||
"types": "./dist/index.edge-light.d.ts",
|
||||
"default": "./dist/index.edge-light.js"
|
||||
},
|
||||
"require": {
|
||||
"types": "./dist/index.d.cts",
|
||||
"default": "./dist/index.cjs"
|
||||
},
|
||||
"import": {
|
||||
"types": "./dist/index.d.ts",
|
||||
"default": "./dist/index.js"
|
||||
}
|
||||
}
|
||||
},
|
||||
"files": [
|
||||
"dist"
|
||||
],
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git+https://github.com/run-llama/LlamaIndexTS.git",
|
||||
"directory": "packages/providers/storage/elastic-search"
|
||||
},
|
||||
"scripts": {
|
||||
"build": "bunchee",
|
||||
"dev": "bunchee --watch",
|
||||
"test": "vitest"
|
||||
},
|
||||
"devDependencies": {
|
||||
"bunchee": "6.4.0",
|
||||
"vitest": "^3.0.9",
|
||||
"@llamaindex/openai": "workspace:*"
|
||||
},
|
||||
"dependencies": {
|
||||
"@elastic/elasticsearch": "^8.17.1",
|
||||
"@llamaindex/core": "workspace:*",
|
||||
"@llamaindex/env": "workspace:*"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,324 @@
|
||||
import { Client, type estypes } from "@elastic/elasticsearch";
|
||||
import {
|
||||
MetadataMode,
|
||||
type BaseNode,
|
||||
type StoredValue,
|
||||
} from "@llamaindex/core/schema";
|
||||
import {
|
||||
BaseVectorStore,
|
||||
metadataDictToNode,
|
||||
nodeToMetadata,
|
||||
type MetadataFilters,
|
||||
type VectorStoreQuery,
|
||||
type VectorStoreQueryResult,
|
||||
} from "@llamaindex/core/vector-store";
|
||||
import { getElasticSearchClient } from "./utils";
|
||||
|
||||
type ElasticSearchParams = {
|
||||
indexName: string;
|
||||
esClient?: Client;
|
||||
esUrl?: string;
|
||||
esCloudId?: string;
|
||||
esApiKey?: string;
|
||||
esUsername?: string;
|
||||
esPassword?: string;
|
||||
textField?: string;
|
||||
vectorField?: string;
|
||||
distanceStrategy?: DISTANCE_STARTEGIES;
|
||||
};
|
||||
|
||||
enum DISTANCE_STARTEGIES {
|
||||
COSINE = "cosine",
|
||||
EUCLIDEAN = "euclidean",
|
||||
MANHATTAN = "manhattan",
|
||||
}
|
||||
|
||||
interface ElasticSearchDocument {
|
||||
metadata: Record<string, unknown>;
|
||||
[key: string]: unknown;
|
||||
}
|
||||
|
||||
/**
|
||||
* ElasticSearchVectorStore provides vector storage and similarity search capabilities using Elasticsearch.
|
||||
* It extends BaseVectorStore to implement vector storage operations with Elasticsearch as the backend.
|
||||
*/
|
||||
export class ElasticSearchVectorStore extends BaseVectorStore {
|
||||
storesText = true;
|
||||
private elasticSearchClient: Client;
|
||||
private indexName: string;
|
||||
|
||||
private esUrl?: string | undefined;
|
||||
private esCloudId?: string | undefined;
|
||||
|
||||
private esApiKey?: string | undefined;
|
||||
private esUsername?: string | undefined;
|
||||
private esPassword?: string | undefined;
|
||||
|
||||
private textField: string;
|
||||
private vectorField: string;
|
||||
|
||||
private distanceStrategy: DISTANCE_STARTEGIES;
|
||||
|
||||
/**
|
||||
* Creates a new instance of ElasticSearchVectorStore
|
||||
* @param init - Configuration parameters for Elasticsearch connection and indexing
|
||||
*/
|
||||
constructor(init: ElasticSearchParams) {
|
||||
super();
|
||||
this.indexName = init.indexName;
|
||||
|
||||
this.esUrl = init.esUrl ?? undefined;
|
||||
this.esCloudId = init.esCloudId ?? undefined;
|
||||
|
||||
this.esApiKey = init.esApiKey ?? undefined;
|
||||
this.esUsername = init.esUsername ?? undefined;
|
||||
this.esPassword = init.esPassword ?? undefined;
|
||||
|
||||
this.textField = init.textField ?? "content";
|
||||
this.vectorField = init.vectorField ?? "embedding";
|
||||
|
||||
this.distanceStrategy = init.distanceStrategy ?? DISTANCE_STARTEGIES.COSINE;
|
||||
|
||||
if (!init.esClient) {
|
||||
this.elasticSearchClient = getElasticSearchClient({
|
||||
esUrl: this.esUrl,
|
||||
esCloudId: this.esCloudId,
|
||||
esApiKey: this.esApiKey,
|
||||
esUsername: this.esUsername,
|
||||
esPassword: this.esPassword,
|
||||
});
|
||||
} else {
|
||||
this.elasticSearchClient = init.esClient;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the Elasticsearch client instance
|
||||
* @returns The configured Elasticsearch client
|
||||
*/
|
||||
public client() {
|
||||
return this.elasticSearchClient;
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates an Elasticsearch index if it doesn't exist
|
||||
* @param dimensions - Number of dimensions in the vector embedding
|
||||
* @private
|
||||
*/
|
||||
private async createIndexIfNotExists(dimensions: number) {
|
||||
const indexExists = await this.elasticSearchClient.indices.exists({
|
||||
index: this.indexName,
|
||||
});
|
||||
if (!indexExists) {
|
||||
await this.elasticSearchClient.indices.create({
|
||||
index: this.indexName,
|
||||
body: {
|
||||
mappings: {
|
||||
properties: {
|
||||
[this.textField]: { type: "text" },
|
||||
[this.vectorField]: {
|
||||
type: "dense_vector",
|
||||
dims: dimensions,
|
||||
index: true,
|
||||
similarity: this.distanceStrategy,
|
||||
},
|
||||
metadata: {
|
||||
properties: {
|
||||
document_id: { type: "keyword" },
|
||||
doc_id: { type: "keyword" },
|
||||
ref_doc_id: { type: "keyword" },
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Adds nodes to the vector store
|
||||
* @param nodes - Array of BaseNode objects to store
|
||||
* @returns Array of node IDs that were successfully stored
|
||||
* @throws Error if nodes don't have embeddings
|
||||
*/
|
||||
async add(nodes: BaseNode[]): Promise<string[]> {
|
||||
if (!nodes.length) {
|
||||
return [];
|
||||
}
|
||||
const dimensions = nodes[0]?.getEmbedding()?.length;
|
||||
if (!dimensions) {
|
||||
throw new Error("Embedding is required");
|
||||
}
|
||||
|
||||
await this.createIndexIfNotExists(dimensions);
|
||||
const operations = nodes.flatMap((node) => [
|
||||
{
|
||||
index: {
|
||||
_index: this.indexName,
|
||||
_id: node.id_,
|
||||
},
|
||||
},
|
||||
{
|
||||
[this.vectorField]: node.getEmbedding(),
|
||||
[this.textField]: node.getContent(MetadataMode.NONE),
|
||||
metadata: nodeToMetadata(node, true),
|
||||
},
|
||||
]);
|
||||
|
||||
const results = await this.elasticSearchClient.bulk({
|
||||
operations,
|
||||
refresh: true,
|
||||
});
|
||||
if (results.errors) {
|
||||
const reasons = results.items.map(
|
||||
(result) => result.index?.error?.reason,
|
||||
);
|
||||
|
||||
throw new Error(`Failed to insert documents:\n${reasons.join("\n")}`);
|
||||
}
|
||||
|
||||
return nodes.map((node) => node.id_);
|
||||
}
|
||||
|
||||
/**
|
||||
* Deletes nodes from the vector store by reference document ID
|
||||
* @param refDocId - Reference document ID to delete
|
||||
* @param deleteOptions - Optional deletion parameters
|
||||
*/
|
||||
async delete(refDocId: string, deleteOptions?: object): Promise<void> {
|
||||
await this.elasticSearchClient.deleteByQuery({
|
||||
index: this.indexName,
|
||||
query: {
|
||||
term: {
|
||||
"metadata.ref_doc_id": refDocId,
|
||||
},
|
||||
},
|
||||
refresh: true,
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Converts metadata filters to Elasticsearch query format
|
||||
* @param queryFilters - Metadata filters to convert
|
||||
* @returns Elasticsearch compatible filter object
|
||||
* @private
|
||||
*/
|
||||
private toElasticSearchFilter(queryFilters: MetadataFilters) {
|
||||
if (queryFilters.filters.length === 1) {
|
||||
const filter = queryFilters.filters[0];
|
||||
if (filter) {
|
||||
return {
|
||||
term: {
|
||||
[`metadata.${filter.key}`]: filter.value,
|
||||
},
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
return {
|
||||
bool: {
|
||||
must: queryFilters.filters.map((filter) => ({
|
||||
term: { [`metadata.${filter.key}`]: filter.value },
|
||||
})),
|
||||
},
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
* Normalizes similarity scores to range [0,1]
|
||||
* @param scores - Array of raw similarity scores
|
||||
* @returns Array of normalized similarity scores
|
||||
* @private
|
||||
*/
|
||||
private toLlamaSimilarity(scores: Array<number>): Array<number> {
|
||||
if (!scores.length) {
|
||||
return [];
|
||||
}
|
||||
|
||||
const maxScore = Math.max(...scores);
|
||||
const minScore = Math.min(...scores);
|
||||
if (maxScore === minScore) {
|
||||
return scores.map(() => (maxScore > 0 ? 1 : 0));
|
||||
}
|
||||
|
||||
return scores.map((score) => (score - minScore) / (maxScore - minScore));
|
||||
}
|
||||
|
||||
/**
|
||||
* Performs a vector similarity search query
|
||||
* @param query - Vector store query parameters
|
||||
* @param options - Optional query parameters
|
||||
* @returns Query results containing matching nodes, similarities, and IDs
|
||||
* @throws Error if query embedding is not provided
|
||||
*/
|
||||
async query(
|
||||
query: VectorStoreQuery,
|
||||
options?: object,
|
||||
): Promise<VectorStoreQueryResult> {
|
||||
if (!query.queryEmbedding) {
|
||||
throw new Error("query embedding is not provided");
|
||||
}
|
||||
|
||||
let elasticSearchFilter: Exclude<StoredValue, null>[] = [];
|
||||
|
||||
if (query.filters) {
|
||||
elasticSearchFilter = [this.toElasticSearchFilter(query.filters)];
|
||||
}
|
||||
|
||||
const searchResponse: estypes.SearchResponse<BaseNode> =
|
||||
await this.elasticSearchClient.search({
|
||||
index: this.indexName,
|
||||
size: query.similarityTopK,
|
||||
knn: {
|
||||
field: this.vectorField,
|
||||
query_vector: query.queryEmbedding,
|
||||
k: query.similarityTopK,
|
||||
num_candidates: query.similarityTopK * 10,
|
||||
filter: elasticSearchFilter,
|
||||
},
|
||||
});
|
||||
|
||||
return this.getVectorSearchQueryResultFromResponse(searchResponse);
|
||||
}
|
||||
|
||||
/**
|
||||
* Processes Elasticsearch response into VectorStoreQueryResult format
|
||||
* @param res - Elasticsearch search response
|
||||
* @returns Formatted query results
|
||||
* @private
|
||||
*/
|
||||
private getVectorSearchQueryResultFromResponse(
|
||||
res: estypes.SearchResponse,
|
||||
): VectorStoreQueryResult {
|
||||
const hits: estypes.SearchHit[] = res.hits.hits;
|
||||
|
||||
const topKNodes: BaseNode[] = [];
|
||||
const topKIDs: string[] = [];
|
||||
const topKScores: number[] = [];
|
||||
|
||||
for (const hit of hits) {
|
||||
const source = hit._source as ElasticSearchDocument;
|
||||
const metadata = source?.metadata ?? {};
|
||||
const text = (source?.[this.textField] as string) ?? "";
|
||||
const embedding = (source?.[this.vectorField] as number[]) ?? [];
|
||||
|
||||
const nodeId = hit._id ?? "";
|
||||
const score = hit._score ?? 0;
|
||||
|
||||
const node = metadataDictToNode(metadata);
|
||||
node.setContent(text);
|
||||
node.embedding = embedding;
|
||||
|
||||
topKNodes.push(node);
|
||||
topKIDs.push(nodeId);
|
||||
topKScores.push(score);
|
||||
}
|
||||
|
||||
return {
|
||||
nodes: topKNodes,
|
||||
similarities: this.toLlamaSimilarity(topKScores),
|
||||
ids: topKIDs,
|
||||
};
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1 @@
|
||||
export * from "./ElasticSearchVector";
|
||||
@@ -0,0 +1,40 @@
|
||||
import { Client, type ClientOptions } from "@elastic/elasticsearch";
|
||||
|
||||
export function getElasticSearchClient({
|
||||
esUrl,
|
||||
esCloudId,
|
||||
esApiKey,
|
||||
esUsername,
|
||||
esPassword,
|
||||
}: {
|
||||
esUrl?: string | undefined;
|
||||
esCloudId?: string | undefined;
|
||||
esApiKey?: string | undefined;
|
||||
esUsername?: string | undefined;
|
||||
esPassword?: string | undefined;
|
||||
}): Client {
|
||||
const clientOptions: ClientOptions = {};
|
||||
|
||||
if (esUrl && esCloudId) {
|
||||
throw new Error("Both esUrl and esCloudId cannot be provided");
|
||||
}
|
||||
|
||||
if (esUrl) {
|
||||
clientOptions.node = esUrl;
|
||||
} else if (esCloudId) {
|
||||
clientOptions.cloud = { id: esCloudId };
|
||||
} else {
|
||||
throw new Error("Either elasticsearch url or cloud id must be provided");
|
||||
}
|
||||
|
||||
if (esApiKey) {
|
||||
clientOptions.auth = { apiKey: esApiKey };
|
||||
} else if (esUsername && esPassword) {
|
||||
clientOptions.auth = {
|
||||
username: esUsername,
|
||||
password: esPassword,
|
||||
};
|
||||
}
|
||||
|
||||
return new Client(clientOptions);
|
||||
}
|
||||
@@ -0,0 +1,165 @@
|
||||
import type { Client } from "@elastic/elasticsearch";
|
||||
import { Settings } from "@llamaindex/core/global";
|
||||
import {
|
||||
Document,
|
||||
NodeRelationship,
|
||||
ObjectType,
|
||||
} from "@llamaindex/core/schema";
|
||||
import { VectorStoreQueryMode } from "@llamaindex/core/vector-store";
|
||||
import { OpenAIEmbedding } from "@llamaindex/openai";
|
||||
import { afterAll, beforeAll, describe, expect, it } from "vitest";
|
||||
import { ElasticSearchVectorStore } from "../src";
|
||||
import { getElasticSearchClient } from "../src/utils";
|
||||
|
||||
const ELASTICSEARCH_URL = process.env.ELASTICSEARCH_URL;
|
||||
const ELASTICSEARCH_CLOUD_ID = process.env.ELASTICSEARCH_CLOUD_ID;
|
||||
const ELASTICSEARCH_API_KEY = process.env.ELASTICSEARCH_API_KEY;
|
||||
const ELASTICSEARCH_USERNAME = process.env.ELASTICSEARCH_USERNAME;
|
||||
const ELASTICSEARCH_PASSWORD = process.env.ELASTICSEARCH_PASSWORD;
|
||||
|
||||
async function isElasticSearchAvailable(): Promise<boolean> {
|
||||
let elasticSearchClient: Client | undefined;
|
||||
|
||||
try {
|
||||
elasticSearchClient = getElasticSearchClient({
|
||||
esCloudId: ELASTICSEARCH_CLOUD_ID,
|
||||
esApiKey: ELASTICSEARCH_API_KEY,
|
||||
esUsername: ELASTICSEARCH_USERNAME,
|
||||
esPassword: ELASTICSEARCH_PASSWORD,
|
||||
});
|
||||
|
||||
await elasticSearchClient.info();
|
||||
return true;
|
||||
} catch (error) {
|
||||
return false;
|
||||
} finally {
|
||||
if (elasticSearchClient) {
|
||||
await elasticSearchClient.close();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
describe("ElasticSearchVectorStore", async () => {
|
||||
if (!(await isElasticSearchAvailable())) {
|
||||
describe.skip(
|
||||
"Elastic search vector store test skipped ( Service not available )",
|
||||
);
|
||||
return;
|
||||
}
|
||||
|
||||
let vectorStore: ElasticSearchVectorStore;
|
||||
let esClient: Client;
|
||||
|
||||
beforeAll(async () => {
|
||||
Settings.embedModel = new OpenAIEmbedding({
|
||||
model: "text-embedding-3-small",
|
||||
});
|
||||
|
||||
esClient = getElasticSearchClient({
|
||||
esCloudId: ELASTICSEARCH_CLOUD_ID,
|
||||
esApiKey: ELASTICSEARCH_API_KEY,
|
||||
esUsername: ELASTICSEARCH_USERNAME,
|
||||
esPassword: ELASTICSEARCH_PASSWORD,
|
||||
});
|
||||
|
||||
vectorStore = new ElasticSearchVectorStore({
|
||||
esClient,
|
||||
indexName: "llama-index-test",
|
||||
});
|
||||
});
|
||||
|
||||
afterAll(async () => {
|
||||
// await esClient.indices.delete({ index: "llama-index-test" });
|
||||
await esClient.close();
|
||||
});
|
||||
|
||||
describe("initialization", () => {
|
||||
it("should initialize with esClient", () => {
|
||||
const vectorStore = new ElasticSearchVectorStore({
|
||||
esClient,
|
||||
indexName: "llama-index-test",
|
||||
});
|
||||
|
||||
expect(vectorStore).toBeDefined();
|
||||
expect(vectorStore).toBeInstanceOf(ElasticSearchVectorStore);
|
||||
});
|
||||
|
||||
it("should initialize with esUrl", () => {
|
||||
const vectorStore = new ElasticSearchVectorStore({
|
||||
esUrl: ELASTICSEARCH_URL!,
|
||||
indexName: "llama-index-test",
|
||||
});
|
||||
|
||||
expect(vectorStore).toBeDefined();
|
||||
expect(vectorStore).toBeInstanceOf(ElasticSearchVectorStore);
|
||||
});
|
||||
|
||||
it("should initialize with esCloudId", () => {
|
||||
const vectorStore = new ElasticSearchVectorStore({
|
||||
esCloudId: ELASTICSEARCH_CLOUD_ID!,
|
||||
indexName: "llama-index-test",
|
||||
});
|
||||
|
||||
expect(vectorStore).toBeDefined();
|
||||
expect(vectorStore).toBeInstanceOf(ElasticSearchVectorStore);
|
||||
});
|
||||
});
|
||||
|
||||
describe("elastic search operations", () => {
|
||||
it("should add document to vector store", async () => {
|
||||
const nodes = [
|
||||
new Document({ text: "doc1", id_: "id1", embedding: [0.1, 0.2, 0.3] }),
|
||||
new Document({ text: "doc2", id_: "id2", embedding: [0.4, 0.5, 0.6] }),
|
||||
];
|
||||
|
||||
const ids = await vectorStore.add(nodes);
|
||||
|
||||
expect(ids).toEqual(["id1", "id2"]);
|
||||
|
||||
const result = await vectorStore.query({
|
||||
mode: VectorStoreQueryMode.DEFAULT,
|
||||
similarityTopK: 1,
|
||||
queryEmbedding: [0.1, 0.2, 0.3],
|
||||
});
|
||||
|
||||
expect(result.nodes).toEqual([nodes[0]]);
|
||||
expect(result.ids).toEqual(["id1"]);
|
||||
expect(result.similarities).toEqual([1]);
|
||||
});
|
||||
|
||||
it("should delete nodes, async ", async () => {
|
||||
const nodes = [
|
||||
new Document({
|
||||
text: "doc1",
|
||||
id_: "id1",
|
||||
embedding: [0.1, 0.2, 0.3],
|
||||
}),
|
||||
new Document({
|
||||
text: "doc2",
|
||||
id_: "id2",
|
||||
embedding: [0.4, 0.5, 0.6],
|
||||
relationships: {
|
||||
[NodeRelationship.SOURCE]: {
|
||||
nodeId: "id1",
|
||||
nodeType: ObjectType.DOCUMENT,
|
||||
metadata: { ref_doc_id: "id1" },
|
||||
},
|
||||
},
|
||||
}),
|
||||
];
|
||||
|
||||
await vectorStore.add(nodes);
|
||||
|
||||
await vectorStore.delete(nodes[0]?.id_ ?? "");
|
||||
|
||||
const result = await vectorStore.query({
|
||||
mode: VectorStoreQueryMode.DEFAULT,
|
||||
similarityTopK: 1,
|
||||
queryEmbedding: [0.4, 0.5, 0.6],
|
||||
});
|
||||
|
||||
expect(result.nodes).toEqual([nodes[0]]);
|
||||
expect(result.ids).toEqual(["id1"]);
|
||||
});
|
||||
});
|
||||
});
|
||||
@@ -0,0 +1,19 @@
|
||||
{
|
||||
"extends": "../../../../tsconfig.json",
|
||||
"compilerOptions": {
|
||||
"target": "ESNext",
|
||||
"module": "ESNext",
|
||||
"moduleResolution": "bundler",
|
||||
"outDir": "./lib",
|
||||
"tsBuildInfoFile": "./lib/.tsbuildinfo"
|
||||
},
|
||||
"include": ["./src", "./tests"],
|
||||
"references": [
|
||||
{
|
||||
"path": "../../../core/tsconfig.json"
|
||||
},
|
||||
{
|
||||
"path": "../../../env/tsconfig.json"
|
||||
}
|
||||
]
|
||||
}
|
||||
Generated
+358
@@ -618,6 +618,9 @@ importers:
|
||||
'@llamaindex/deepseek':
|
||||
specifier: ^0.0.5
|
||||
version: link:../packages/providers/deepseek
|
||||
'@llamaindex/elastic-search':
|
||||
specifier: ^0.0.1
|
||||
version: link:../packages/providers/storage/elastic-search
|
||||
'@llamaindex/env':
|
||||
specifier: ^0.1.29
|
||||
version: link:../packages/env
|
||||
@@ -779,6 +782,8 @@ importers:
|
||||
|
||||
examples/vector-store/azure: {}
|
||||
|
||||
examples/vector-store/elastic-search: {}
|
||||
|
||||
examples/vector-store/pg: {}
|
||||
|
||||
packages/autotool:
|
||||
@@ -1463,6 +1468,28 @@ importers:
|
||||
specifier: 6.4.0
|
||||
version: 6.4.0(typescript@5.7.3)
|
||||
|
||||
packages/providers/storage/elastic-search:
|
||||
dependencies:
|
||||
'@elastic/elasticsearch':
|
||||
specifier: ^8.17.1
|
||||
version: 8.17.1
|
||||
'@llamaindex/core':
|
||||
specifier: workspace:*
|
||||
version: link:../../../core
|
||||
'@llamaindex/env':
|
||||
specifier: workspace:*
|
||||
version: link:../../../env
|
||||
devDependencies:
|
||||
'@llamaindex/openai':
|
||||
specifier: workspace:*
|
||||
version: link:../../openai
|
||||
bunchee:
|
||||
specifier: 6.4.0
|
||||
version: 6.4.0(typescript@5.7.3)
|
||||
vitest:
|
||||
specifier: ^3.0.9
|
||||
version: 3.0.9(@edge-runtime/vm@4.0.4)(@types/debug@4.1.12)(@types/node@22.13.5)(happy-dom@15.11.7)(jiti@2.4.2)(lightningcss@1.29.1)(msw@2.7.0(@types/node@22.13.5)(typescript@5.7.3))(terser@5.38.2)(tsx@4.19.3)(yaml@2.7.0)
|
||||
|
||||
packages/providers/storage/firestore:
|
||||
dependencies:
|
||||
'@google-cloud/firestore':
|
||||
@@ -2649,6 +2676,14 @@ packages:
|
||||
resolution: {integrity: sha512-LqPw+yaSPpCNnVZl5XoHQAySEzlnZiC9gReUuQHMh9GI03KKqwpVqWkIK1UfK116Yww7f2WZuAgnY/nhHwTsJA==}
|
||||
engines: {node: '>=16'}
|
||||
|
||||
'@elastic/elasticsearch@8.17.1':
|
||||
resolution: {integrity: sha512-EaDP4/jfNu0nhnHZjxk9bL9ofKWKX9QUdEJ8QsGa+/KMPBEwD+HMyYXH4FSRlg7YONI0UbdO/mMZobvcEnMFBA==}
|
||||
engines: {node: '>=18'}
|
||||
|
||||
'@elastic/transport@8.9.4':
|
||||
resolution: {integrity: sha512-y6kjy5s0MQE3MQx9ItmvQ8th7GlGcZfzZ7ZDvI8bUhaKua2dJk01k9ia/bdJ4dnPpWpOyFTRgkgBZS31ZTLpcg==}
|
||||
engines: {node: '>=18'}
|
||||
|
||||
'@emnapi/runtime@1.3.1':
|
||||
resolution: {integrity: sha512-kEBmG8KyqtxJZv+ygbEim+KCGtIq1fC22Ms3S4ziXmYKm8uyoLX0MHONVKwp+9opg390VaKRNt4a7A9NwmpNhw==}
|
||||
|
||||
@@ -5569,6 +5604,12 @@ packages:
|
||||
'@types/caseless@0.12.5':
|
||||
resolution: {integrity: sha512-hWtVTC2q7hc7xZ/RLbxapMvDMgUnDvKvMOpKal4DrMyfGBUfB1oKaZlIRr6mJL+If3bAP6sV/QneGzF6tJjZDg==}
|
||||
|
||||
'@types/command-line-args@5.2.3':
|
||||
resolution: {integrity: sha512-uv0aG6R0Y8WHZLTamZwtfsDLVRnOa+n+n5rEvFWL5Na5gZ8V2Teab/duDPFzIIIhs9qizDpcavCusCLJZu62Kw==}
|
||||
|
||||
'@types/command-line-usage@5.0.4':
|
||||
resolution: {integrity: sha512-BwR5KP3Es/CSht0xqBcUXS3qCAUVXwpRKsV2+arxeb65atasuXG9LykC9Ab10Cw3s2raH92ZqOeILaQbsB2ACg==}
|
||||
|
||||
'@types/cookie@0.6.0':
|
||||
resolution: {integrity: sha512-4Kh9a6B2bQciAhf7FSuMRRkUWecJgJu9nPnx3yzpsfXX/c50REIqpHY4C82bXP90qrLtXtkDxTZosYO3UpOwlA==}
|
||||
|
||||
@@ -5653,6 +5694,9 @@ packages:
|
||||
'@types/node@18.19.76':
|
||||
resolution: {integrity: sha512-yvR7Q9LdPz2vGpmpJX5LolrgRdWvB67MJKDPSgIIzpFbaf9a1j/f5DnLp5VDyHGMR0QZHlTr1afsD87QCXFHKw==}
|
||||
|
||||
'@types/node@20.17.25':
|
||||
resolution: {integrity: sha512-bT+r2haIlplJUYtlZrEanFHdPIZTeiMeh/fSOEbOOfWf9uTn+lg8g0KU6Q3iMgjd9FLuuMAgfCNSkjUbxL6E3Q==}
|
||||
|
||||
'@types/node@22.13.5':
|
||||
resolution: {integrity: sha512-+lTU0PxZXn0Dr1NBtC7Y8cR21AJr87dLLU953CWA6pMxxv/UDc7jYAY90upcrie1nRcD6XNG5HOYEDtgW5TxAg==}
|
||||
|
||||
@@ -5807,6 +5851,9 @@ packages:
|
||||
'@vitest/expect@2.1.5':
|
||||
resolution: {integrity: sha512-nZSBTW1XIdpZvEJyoP/Sy8fUg0b8od7ZpGDkTUcfJ7wz/VoZAFzFfLyxVxGFhUjJzhYqSbIpfMtl/+k/dpWa3Q==}
|
||||
|
||||
'@vitest/expect@3.0.9':
|
||||
resolution: {integrity: sha512-5eCqRItYgIML7NNVgJj6TVCmdzE7ZVgJhruW0ziSQV4V7PvLkDL1bBkBdcTs/VuIz0IxPb5da1IDSqc1TR9eig==}
|
||||
|
||||
'@vitest/mocker@2.1.0':
|
||||
resolution: {integrity: sha512-ZxENovUqhzl+QiOFpagiHUNUuZ1qPd5yYTCYHomGIZOFArzn4mgX2oxZmiAItJWAaXHG6bbpb/DpSPhlk5DgtA==}
|
||||
peerDependencies:
|
||||
@@ -5830,6 +5877,17 @@ packages:
|
||||
vite:
|
||||
optional: true
|
||||
|
||||
'@vitest/mocker@3.0.9':
|
||||
resolution: {integrity: sha512-ryERPIBOnvevAkTq+L1lD+DTFBRcjueL9lOUfXsLfwP92h4e+Heb+PjiqS3/OURWPtywfafK0kj++yDFjWUmrA==}
|
||||
peerDependencies:
|
||||
msw: ^2.4.9
|
||||
vite: ^5.0.0 || ^6.0.0
|
||||
peerDependenciesMeta:
|
||||
msw:
|
||||
optional: true
|
||||
vite:
|
||||
optional: true
|
||||
|
||||
'@vitest/pretty-format@2.1.0':
|
||||
resolution: {integrity: sha512-7sxf2F3DNYatgmzXXcTh6cq+/fxwB47RIQqZJFoSH883wnVAoccSRT6g+dTKemUBo8Q5N4OYYj1EBXLuRKvp3Q==}
|
||||
|
||||
@@ -5839,30 +5897,45 @@ packages:
|
||||
'@vitest/pretty-format@2.1.9':
|
||||
resolution: {integrity: sha512-KhRIdGV2U9HOUzxfiHmY8IFHTdqtOhIzCpd8WRdJiE7D/HUcZVD0EgQCVjm+Q9gkUXWgBvMmTtZgIG48wq7sOQ==}
|
||||
|
||||
'@vitest/pretty-format@3.0.9':
|
||||
resolution: {integrity: sha512-OW9F8t2J3AwFEwENg3yMyKWweF7oRJlMyHOMIhO5F3n0+cgQAJZBjNgrF8dLwFTEXl5jUqBLXd9QyyKv8zEcmA==}
|
||||
|
||||
'@vitest/runner@2.1.0':
|
||||
resolution: {integrity: sha512-D9+ZiB8MbMt7qWDRJc4CRNNUlne/8E1X7dcKhZVAbcOKG58MGGYVDqAq19xlhNfMFZsW0bpVKgztBwks38Ko0w==}
|
||||
|
||||
'@vitest/runner@2.1.5':
|
||||
resolution: {integrity: sha512-pKHKy3uaUdh7X6p1pxOkgkVAFW7r2I818vHDthYLvUyjRfkKOU6P45PztOch4DZarWQne+VOaIMwA/erSSpB9g==}
|
||||
|
||||
'@vitest/runner@3.0.9':
|
||||
resolution: {integrity: sha512-NX9oUXgF9HPfJSwl8tUZCMP1oGx2+Sf+ru6d05QjzQz4OwWg0psEzwY6VexP2tTHWdOkhKHUIZH+fS6nA7jfOw==}
|
||||
|
||||
'@vitest/snapshot@2.1.0':
|
||||
resolution: {integrity: sha512-x69CygGMzt9VCO283K2/FYQ+nBrOj66OTKpsPykjCR4Ac3lLV+m85hj9reaIGmjBSsKzVvbxWmjWE3kF5ha3uQ==}
|
||||
|
||||
'@vitest/snapshot@2.1.5':
|
||||
resolution: {integrity: sha512-zmYw47mhfdfnYbuhkQvkkzYroXUumrwWDGlMjpdUr4jBd3HZiV2w7CQHj+z7AAS4VOtWxI4Zt4bWt4/sKcoIjg==}
|
||||
|
||||
'@vitest/snapshot@3.0.9':
|
||||
resolution: {integrity: sha512-AiLUiuZ0FuA+/8i19mTYd+re5jqjEc2jZbgJ2up0VY0Ddyyxg/uUtBDpIFAy4uzKaQxOW8gMgBdAJJ2ydhu39A==}
|
||||
|
||||
'@vitest/spy@2.1.0':
|
||||
resolution: {integrity: sha512-IXX5NkbdgTYTog3F14i2LgnBc+20YmkXMx0IWai84mcxySUDRgm0ihbOfR4L0EVRBDFG85GjmQQEZNNKVVpkZw==}
|
||||
|
||||
'@vitest/spy@2.1.5':
|
||||
resolution: {integrity: sha512-aWZF3P0r3w6DiYTVskOYuhBc7EMc3jvn1TkBg8ttylFFRqNN2XGD7V5a4aQdk6QiUzZQ4klNBSpCLJgWNdIiNw==}
|
||||
|
||||
'@vitest/spy@3.0.9':
|
||||
resolution: {integrity: sha512-/CcK2UDl0aQ2wtkp3YVWldrpLRNCfVcIOFGlVGKO4R5eajsH393Z1yiXLVQ7vWsj26JOEjeZI0x5sm5P4OGUNQ==}
|
||||
|
||||
'@vitest/utils@2.1.0':
|
||||
resolution: {integrity: sha512-rreyfVe0PuNqJfKYUwfPDfi6rrp0VSu0Wgvp5WBqJonP+4NvXHk48X6oBam1Lj47Hy6jbJtnMj3OcRdrkTP0tA==}
|
||||
|
||||
'@vitest/utils@2.1.5':
|
||||
resolution: {integrity: sha512-yfj6Yrp0Vesw2cwJbP+cl04OC+IHFsuQsrsJBL9pyGeQXE56v1UAOQco+SR55Vf1nQzfV0QJg1Qum7AaWUwwYg==}
|
||||
|
||||
'@vitest/utils@3.0.9':
|
||||
resolution: {integrity: sha512-ilHM5fHhZ89MCp5aAaM9uhfl1c2JdxVxl3McqsdVyVNN6JffnEen8UMCdRTzOhGXNQGo5GNL9QugHrz727Wnng==}
|
||||
|
||||
'@vladfrangu/async_event_emitter@2.4.6':
|
||||
resolution: {integrity: sha512-RaI5qZo6D2CVS6sTHFKg1v5Ohq/+Bo2LZ5gzUEwZ/WkHhwtGTCB/sVLw8ijOkAUxasZ+WshN/Rzj4ywsABJ5ZA==}
|
||||
engines: {node: '>=v14.0.0', npm: '>=7.0.0'}
|
||||
@@ -6237,6 +6310,10 @@ packages:
|
||||
resolution: {integrity: sha512-KMReFUr0B4t+D+OBkjR3KYqvocp2XaSzO55UcB6mgQMd3KbcE+mWTyvVV7D/zsdEbNnV6acZUutkiHQXvTr1Rw==}
|
||||
engines: {node: '>= 8'}
|
||||
|
||||
apache-arrow@18.1.0:
|
||||
resolution: {integrity: sha512-v/ShMp57iBnBp4lDgV8Jx3d3Q5/Hac25FWmQ98eMahUiHPXcvwIMKJD0hBIgclm/FCG+LwPkAKtkRO1O/W0YGg==}
|
||||
hasBin: true
|
||||
|
||||
app-module-path@2.2.0:
|
||||
resolution: {integrity: sha512-gkco+qxENJV+8vFcDiiFhuoSvRXb2a/QPqpSoWhVz829VNJfOTnELbBmPmNKFxf3xdNnw4DWCkzkDaavcX/1YQ==}
|
||||
|
||||
@@ -6269,6 +6346,14 @@ packages:
|
||||
resolution: {integrity: sha512-COROpnaoap1E2F000S62r6A60uHZnmlvomhfyT2DlTcrY1OrBKn2UhH7qn5wTC9zMvD0AY7csdPSNwKP+7WiQw==}
|
||||
engines: {node: '>= 0.4'}
|
||||
|
||||
array-back@3.1.0:
|
||||
resolution: {integrity: sha512-TkuxA4UCOvxuDK6NZYXCalszEzj+TLszyASooky+i742l9TqsOdYCMJJupxRic61hwquNtppB3hgcuq9SVSH1Q==}
|
||||
engines: {node: '>=6'}
|
||||
|
||||
array-back@6.2.2:
|
||||
resolution: {integrity: sha512-gUAZ7HPyb4SJczXAMUXMGAvI976JoK3qEx9v1FTmeYuJj0IBiaKttG1ydtGKdkfqWkIkouke7nG8ufGy77+Cvw==}
|
||||
engines: {node: '>=12.17'}
|
||||
|
||||
array-buffer-byte-length@1.0.2:
|
||||
resolution: {integrity: sha512-LHE+8BuR7RYGDKvnrmcuSq3tDcKv9OFEXQt/HpbZhY7V6h0zlUXutnAD82GiFx9rdieCMjkvtcsPqBwgUl1Iiw==}
|
||||
engines: {node: '>= 0.4'}
|
||||
@@ -6622,6 +6707,10 @@ packages:
|
||||
resolution: {integrity: sha512-mCuXncKXk5iCLhfhwTc0izo0gtEmpz5CtG2y8GiOINBlMVS6v8TMRc5TaLWKS6692m9+dVVfzgeVxR5UxWHTYw==}
|
||||
engines: {node: '>=12'}
|
||||
|
||||
chalk-template@0.4.0:
|
||||
resolution: {integrity: sha512-/ghrgmhfY8RaSdeo43hNXxpoHAtxdbskUHjPpfqUWGttFgycUhYPGx3YZBCnUCvOa7Doivn1IZec3DEGFoMgLg==}
|
||||
engines: {node: '>=12'}
|
||||
|
||||
chalk@4.1.2:
|
||||
resolution: {integrity: sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==}
|
||||
engines: {node: '>=10'}
|
||||
@@ -6810,6 +6899,14 @@ packages:
|
||||
comma-separated-tokens@2.0.3:
|
||||
resolution: {integrity: sha512-Fu4hJdvzeylCfQPp9SGWidpzrMs7tTrlu6Vb8XGaRGck8QSNZJJp538Wrb60Lax4fPwR64ViY468OIUTbRlGZg==}
|
||||
|
||||
command-line-args@5.2.1:
|
||||
resolution: {integrity: sha512-H4UfQhZyakIjC74I9d34fGYDwk3XpSr17QhEd0Q3I9Xq1CETHo4Hcuo87WyWHpAF1aSLjLRf5lD9ZGX2qStUvg==}
|
||||
engines: {node: '>=4.0.0'}
|
||||
|
||||
command-line-usage@7.0.3:
|
||||
resolution: {integrity: sha512-PqMLy5+YGwhMh1wS04mVG44oqDsgyLRSKJBdOo1bnYhMKBW65gZF1dRp2OZRhiTjgUHljy99qkO7bsctLaw35Q==}
|
||||
engines: {node: '>=12.20.0'}
|
||||
|
||||
commander@12.1.0:
|
||||
resolution: {integrity: sha512-Vw8qHK3bZM9y/P10u3Vib8o/DdkvA2OtPtZvD871QKjy74Wj1WSKFILMPRPSdUSx5RFK1arlJzEtA4PkFgnbuA==}
|
||||
engines: {node: '>=18'}
|
||||
@@ -7683,6 +7780,10 @@ packages:
|
||||
resolution: {integrity: sha512-KlggCilbbvgETk/WEq9NG894U8yu4erIW0SjMm1sMPm2xihCHeNoybpzGoxEzHRthwF3XrKOgHYtfqgJzpCH2w==}
|
||||
engines: {node: '>=18.0.0'}
|
||||
|
||||
find-replace@3.0.0:
|
||||
resolution: {integrity: sha512-6Tb2myMioCAgv5kfvP5/PkZZ/ntTpVK39fHY7WkWBgvbeE+VHd/tZuZ4mrC+bxh4cfOZeYKVPaJIZtZXV7GNCQ==}
|
||||
engines: {node: '>=4.0.0'}
|
||||
|
||||
find-up@4.1.0:
|
||||
resolution: {integrity: sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw==}
|
||||
engines: {node: '>=8'}
|
||||
@@ -7702,6 +7803,9 @@ packages:
|
||||
flatbuffers@1.12.0:
|
||||
resolution: {integrity: sha512-c7CZADjRcl6j0PlvFy0ZqXQ67qSEZfrVPynmnL+2zPc+NtMvrF8Y0QceMo7QqnSPc7+uWjUIAbvCQ5WIKlMVdQ==}
|
||||
|
||||
flatbuffers@24.12.23:
|
||||
resolution: {integrity: sha512-dLVCAISd5mhls514keQzmEG6QHmUUsNuWsb4tFafIUwvvgDjXhtfAYSKOzt5SWOy+qByV5pbsDZ+Vb7HUOBEdA==}
|
||||
|
||||
flatbuffers@25.2.10:
|
||||
resolution: {integrity: sha512-7JlN9ZvLDG1McO3kbX0k4v+SUAg48L1rIwEvN6ZQl/eCtgJz9UylTMzE9wrmYrcorgxm3CX/3T/w5VAub99UUw==}
|
||||
|
||||
@@ -8242,6 +8346,10 @@ packages:
|
||||
hookable@5.5.3:
|
||||
resolution: {integrity: sha512-Yc+BQe8SvoXH1643Qez1zqLRmbA5rCL+sSmk6TVos0LWVfNIB7PGncdlId77WzLGSIB5KaWgTaNTs2lNVEI6VQ==}
|
||||
|
||||
hpagent@1.2.0:
|
||||
resolution: {integrity: sha512-A91dYTeIB6NoXG+PxTQpCCDDnfHsW9kc06Lvpu1TEe9gnd6ZFeiBoRO9JvzEv6xK7EX97/dUE8g/vBMTqTS3CA==}
|
||||
engines: {node: '>=14'}
|
||||
|
||||
html-encoding-sniffer@3.0.0:
|
||||
resolution: {integrity: sha512-oWv4T4yJ52iKrufjnyZPkrN0CH3QnrUqdB6In1g5Fe1mia8GmF36gnfNySxoZtxD5+NmYw1EElVXiBk93UeskA==}
|
||||
engines: {node: '>=12'}
|
||||
@@ -8681,6 +8789,10 @@ packages:
|
||||
json-bigint@1.0.0:
|
||||
resolution: {integrity: sha512-SiPv/8VpZuWbvLSMtTDU8hEfrZWg/mH/nV/b4o0CYbSxu1UIQPLdwKOCIyLQX+VIPO5vrLX3i8qtqFyhdPSUSQ==}
|
||||
|
||||
json-bignum@0.0.3:
|
||||
resolution: {integrity: sha512-2WHyXj3OfHSgNyuzDbSxI1w2jgw5gkWSWhS7Qg4bWXx1nLk3jnbwfUeS0PSba3IzpTUWdHxBieELUzXRjQB2zg==}
|
||||
engines: {node: '>=0.8'}
|
||||
|
||||
json-buffer@3.0.1:
|
||||
resolution: {integrity: sha512-4bV5BfR2mqfQTJm+V5tPPdf+ZpuhiIvTuAB5g8kcrXOZpTT/QwwVRWBywX1ozr6lEuPdbHxwaJlm9G6mI2sfSQ==}
|
||||
|
||||
@@ -11082,6 +11194,9 @@ packages:
|
||||
secure-json-parse@2.7.0:
|
||||
resolution: {integrity: sha512-6aU+Rwsezw7VR8/nyvKTx8QpWH9FrcYiXXlqC4z5d5XQBDRqtbfsRjnwGyqbi3gddNtWHuEk9OANUotL26qKUw==}
|
||||
|
||||
secure-json-parse@3.0.2:
|
||||
resolution: {integrity: sha512-H6nS2o8bWfpFEV6U38sOSjS7bTbdgbCGU9wEM6W14P5H0QOsz94KCusifV44GpHDTu2nqZbuDNhTzu+mjDSw1w==}
|
||||
|
||||
seek-bzip@2.0.0:
|
||||
resolution: {integrity: sha512-SMguiTnYrhpLdk3PwfzHeotrcwi8bNV4iemL9tx9poR/yeaMYwB9VzR1w7b57DuWpuqR8n6oZboi0hj3AxZxQg==}
|
||||
hasBin: true
|
||||
@@ -11547,6 +11662,10 @@ packages:
|
||||
tabbable@6.2.0:
|
||||
resolution: {integrity: sha512-Cat63mxsVJlzYvN51JmVXIgNoUokrIaT2zLclCXjRd8boZ0004U4KCs/sToJ75C6sdlByWxpYnb5Boif1VSFew==}
|
||||
|
||||
table-layout@4.1.1:
|
||||
resolution: {integrity: sha512-iK5/YhZxq5GO5z8wb0bY1317uDF3Zjpha0QFFLA8/trAoiLbQD0HUbMesEaxyzUgDxi2QlcbM8IvqOlEjgoXBA==}
|
||||
engines: {node: '>=12.17'}
|
||||
|
||||
tailwind-merge@2.6.0:
|
||||
resolution: {integrity: sha512-P+Vu1qXfzediirmHOC3xKGAYeZtPcV9g76X+xg2FD4tYgR71ewMA35Y3sCz3zhiN/dwefRpJX0yBcgwi1fXNQA==}
|
||||
|
||||
@@ -11655,6 +11774,10 @@ packages:
|
||||
resolution: {integrity: sha512-weEDEq7Z5eTHPDh4xjX789+fHfF+P8boiFB+0vbWzpbnbsEr/GRaohi/uMKxg8RZMXnl1ItAi/IUHWMsjDV7kQ==}
|
||||
engines: {node: '>=14.0.0'}
|
||||
|
||||
tinyrainbow@2.0.0:
|
||||
resolution: {integrity: sha512-op4nsTR47R6p0vMUUoYl/a+ljLFVtlfaXkLQmqfLR1qHma1h/ysYk4hEXZ880bf2CYgTskvTa/e196Vd5dDQXw==}
|
||||
engines: {node: '>=14.0.0'}
|
||||
|
||||
tinyspy@3.0.2:
|
||||
resolution: {integrity: sha512-n1cw8k1k0x4pgA2+9XrOkFydTerNcJ1zWCO5Nn9scWHTD+5tp8dghT2x1uduQePZTZgd3Tupf+x9BxJjeJi77Q==}
|
||||
engines: {node: '>=14.0.0'}
|
||||
@@ -11886,6 +12009,14 @@ packages:
|
||||
engines: {node: '>=14.17'}
|
||||
hasBin: true
|
||||
|
||||
typical@4.0.0:
|
||||
resolution: {integrity: sha512-VAH4IvQ7BDFYglMd7BPRDfLgxZZX4O4TFcRDA6EN5X7erNJJq+McIEp8np9aVtxrCJ6qx4GTYVfOWNjcqwZgRw==}
|
||||
engines: {node: '>=8'}
|
||||
|
||||
typical@7.3.0:
|
||||
resolution: {integrity: sha512-ya4mg/30vm+DOWfBg4YK3j2WD6TWtRkCbasOJr40CseYENzCUby/7rIvXA99JGsQHeNxLbnXdyLLxKSv3tauFw==}
|
||||
engines: {node: '>=12.17'}
|
||||
|
||||
uc.micro@2.1.0:
|
||||
resolution: {integrity: sha512-ARDJmphmdvUk6Glw7y9DQ2bFkKBHwQHLi2lsaH6PPmz/Ka9sFOBsBluozhDltWmnv9u/cF6Rt87znRTPV+yp/A==}
|
||||
|
||||
@@ -12112,6 +12243,11 @@ packages:
|
||||
engines: {node: ^18.0.0 || >=20.0.0}
|
||||
hasBin: true
|
||||
|
||||
vite-node@3.0.9:
|
||||
resolution: {integrity: sha512-w3Gdx7jDcuT9cNn9jExXgOyKmf5UOTb6WMHz8LGAm54eS1Elf5OuBhCxl6zJxGhEeIkgsE1WbHuoL0mj/UXqXg==}
|
||||
engines: {node: ^18.0.0 || ^20.0.0 || >=22.0.0}
|
||||
hasBin: true
|
||||
|
||||
vite-plugin-wasm@3.4.1:
|
||||
resolution: {integrity: sha512-ja3nSo2UCkVeitltJGkS3pfQHAanHv/DqGatdI39ja6McgABlpsZ5hVgl6wuR8Qx5etY3T5qgDQhOWzc5RReZA==}
|
||||
peerDependencies:
|
||||
@@ -12238,6 +12374,34 @@ packages:
|
||||
jsdom:
|
||||
optional: true
|
||||
|
||||
vitest@3.0.9:
|
||||
resolution: {integrity: sha512-BbcFDqNyBlfSpATmTtXOAOj71RNKDDvjBM/uPfnxxVGrG+FSH2RQIwgeEngTaTkuU/h0ScFvf+tRcKfYXzBybQ==}
|
||||
engines: {node: ^18.0.0 || ^20.0.0 || >=22.0.0}
|
||||
hasBin: true
|
||||
peerDependencies:
|
||||
'@edge-runtime/vm': '*'
|
||||
'@types/debug': ^4.1.12
|
||||
'@types/node': ^18.0.0 || ^20.0.0 || >=22.0.0
|
||||
'@vitest/browser': 3.0.9
|
||||
'@vitest/ui': 3.0.9
|
||||
happy-dom: '*'
|
||||
jsdom: '*'
|
||||
peerDependenciesMeta:
|
||||
'@edge-runtime/vm':
|
||||
optional: true
|
||||
'@types/debug':
|
||||
optional: true
|
||||
'@types/node':
|
||||
optional: true
|
||||
'@vitest/browser':
|
||||
optional: true
|
||||
'@vitest/ui':
|
||||
optional: true
|
||||
happy-dom:
|
||||
optional: true
|
||||
jsdom:
|
||||
optional: true
|
||||
|
||||
voyageai@0.0.3-1:
|
||||
resolution: {integrity: sha512-R3jN/xnILWoMBL3jPY61Ydm1JbpK3J+VmXBoHvlNg1Xz8h0xdX7sEffXeSu+sAEKQaPyWXVQDmM/jpBhPXw58g==}
|
||||
|
||||
@@ -12406,6 +12570,10 @@ packages:
|
||||
wordwrap@1.0.0:
|
||||
resolution: {integrity: sha512-gvVzJFlPycKc5dZN4yPkP8w7Dc37BtP1yczEneOb4uq34pXZcvrtRTmWV8W+Ume+XCxKgbjM+nevkyFPMybd4Q==}
|
||||
|
||||
wordwrapjs@5.1.0:
|
||||
resolution: {integrity: sha512-JNjcULU2e4KJwUNv6CHgI46UvDGitb6dGryHajXTDiLgg1/RiGoPSDw4kZfYnwGtEXf2ZMeIewDQgFGzkCB2Sg==}
|
||||
engines: {node: '>=12.17'}
|
||||
|
||||
workerd@1.20241230.0:
|
||||
resolution: {integrity: sha512-EgixXP0JGXGq6J9lz17TKIZtfNDUvJNG+cl9paPMfZuYWT920fFpBx+K04YmnbQRLnglsivF1GT9pxh1yrlWhg==}
|
||||
engines: {node: '>=16'}
|
||||
@@ -13908,6 +14076,26 @@ snapshots:
|
||||
dependencies:
|
||||
'@edge-runtime/primitives': 5.1.1
|
||||
|
||||
'@elastic/elasticsearch@8.17.1':
|
||||
dependencies:
|
||||
'@elastic/transport': 8.9.4
|
||||
apache-arrow: 18.1.0
|
||||
tslib: 2.8.1
|
||||
transitivePeerDependencies:
|
||||
- supports-color
|
||||
|
||||
'@elastic/transport@8.9.4':
|
||||
dependencies:
|
||||
'@opentelemetry/api': 1.9.0
|
||||
debug: 4.4.0
|
||||
hpagent: 1.2.0
|
||||
ms: 2.1.3
|
||||
secure-json-parse: 3.0.2
|
||||
tslib: 2.8.1
|
||||
undici: 6.21.1
|
||||
transitivePeerDependencies:
|
||||
- supports-color
|
||||
|
||||
'@emnapi/runtime@1.3.1':
|
||||
dependencies:
|
||||
tslib: 2.8.1
|
||||
@@ -16875,6 +17063,10 @@ snapshots:
|
||||
|
||||
'@types/caseless@0.12.5': {}
|
||||
|
||||
'@types/command-line-args@5.2.3': {}
|
||||
|
||||
'@types/command-line-usage@5.0.4': {}
|
||||
|
||||
'@types/cookie@0.6.0': {}
|
||||
|
||||
'@types/debug@4.1.12':
|
||||
@@ -16960,6 +17152,10 @@ snapshots:
|
||||
dependencies:
|
||||
undici-types: 5.26.5
|
||||
|
||||
'@types/node@20.17.25':
|
||||
dependencies:
|
||||
undici-types: 6.19.8
|
||||
|
||||
'@types/node@22.13.5':
|
||||
dependencies:
|
||||
undici-types: 6.20.0
|
||||
@@ -17217,6 +17413,13 @@ snapshots:
|
||||
chai: 5.1.2
|
||||
tinyrainbow: 1.2.0
|
||||
|
||||
'@vitest/expect@3.0.9':
|
||||
dependencies:
|
||||
'@vitest/spy': 3.0.9
|
||||
'@vitest/utils': 3.0.9
|
||||
chai: 5.2.0
|
||||
tinyrainbow: 2.0.0
|
||||
|
||||
'@vitest/mocker@2.1.0(@vitest/spy@2.1.0)(msw@2.7.0(@types/node@22.13.5)(typescript@5.7.3))(vite@5.4.14(@types/node@22.13.5)(lightningcss@1.29.1)(terser@5.38.2))':
|
||||
dependencies:
|
||||
'@vitest/spy': 2.1.0
|
||||
@@ -17244,6 +17447,15 @@ snapshots:
|
||||
msw: 2.7.0(@types/node@22.9.0)(typescript@5.7.3)
|
||||
vite: 5.4.14(@types/node@22.9.0)(lightningcss@1.29.1)(terser@5.38.2)
|
||||
|
||||
'@vitest/mocker@3.0.9(msw@2.7.0(@types/node@22.13.5)(typescript@5.7.3))(vite@6.1.0(@types/node@22.13.5)(jiti@2.4.2)(lightningcss@1.29.1)(terser@5.38.2)(tsx@4.19.3)(yaml@2.7.0))':
|
||||
dependencies:
|
||||
'@vitest/spy': 3.0.9
|
||||
estree-walker: 3.0.3
|
||||
magic-string: 0.30.17
|
||||
optionalDependencies:
|
||||
msw: 2.7.0(@types/node@22.13.5)(typescript@5.7.3)
|
||||
vite: 6.1.0(@types/node@22.13.5)(jiti@2.4.2)(lightningcss@1.29.1)(terser@5.38.2)(tsx@4.19.3)(yaml@2.7.0)
|
||||
|
||||
'@vitest/pretty-format@2.1.0':
|
||||
dependencies:
|
||||
tinyrainbow: 1.2.0
|
||||
@@ -17256,6 +17468,10 @@ snapshots:
|
||||
dependencies:
|
||||
tinyrainbow: 1.2.0
|
||||
|
||||
'@vitest/pretty-format@3.0.9':
|
||||
dependencies:
|
||||
tinyrainbow: 2.0.0
|
||||
|
||||
'@vitest/runner@2.1.0':
|
||||
dependencies:
|
||||
'@vitest/utils': 2.1.0
|
||||
@@ -17266,6 +17482,11 @@ snapshots:
|
||||
'@vitest/utils': 2.1.5
|
||||
pathe: 1.1.2
|
||||
|
||||
'@vitest/runner@3.0.9':
|
||||
dependencies:
|
||||
'@vitest/utils': 3.0.9
|
||||
pathe: 2.0.3
|
||||
|
||||
'@vitest/snapshot@2.1.0':
|
||||
dependencies:
|
||||
'@vitest/pretty-format': 2.1.0
|
||||
@@ -17278,6 +17499,12 @@ snapshots:
|
||||
magic-string: 0.30.17
|
||||
pathe: 1.1.2
|
||||
|
||||
'@vitest/snapshot@3.0.9':
|
||||
dependencies:
|
||||
'@vitest/pretty-format': 3.0.9
|
||||
magic-string: 0.30.17
|
||||
pathe: 2.0.3
|
||||
|
||||
'@vitest/spy@2.1.0':
|
||||
dependencies:
|
||||
tinyspy: 3.0.2
|
||||
@@ -17286,6 +17513,10 @@ snapshots:
|
||||
dependencies:
|
||||
tinyspy: 3.0.2
|
||||
|
||||
'@vitest/spy@3.0.9':
|
||||
dependencies:
|
||||
tinyspy: 3.0.2
|
||||
|
||||
'@vitest/utils@2.1.0':
|
||||
dependencies:
|
||||
'@vitest/pretty-format': 2.1.0
|
||||
@@ -17298,6 +17529,12 @@ snapshots:
|
||||
loupe: 3.1.3
|
||||
tinyrainbow: 1.2.0
|
||||
|
||||
'@vitest/utils@3.0.9':
|
||||
dependencies:
|
||||
'@vitest/pretty-format': 3.0.9
|
||||
loupe: 3.1.3
|
||||
tinyrainbow: 2.0.0
|
||||
|
||||
'@vladfrangu/async_event_emitter@2.4.6': {}
|
||||
|
||||
'@vue/compiler-core@3.5.13':
|
||||
@@ -17734,6 +17971,18 @@ snapshots:
|
||||
picomatch: 2.3.1
|
||||
optional: true
|
||||
|
||||
apache-arrow@18.1.0:
|
||||
dependencies:
|
||||
'@swc/helpers': 0.5.15
|
||||
'@types/command-line-args': 5.2.3
|
||||
'@types/command-line-usage': 5.0.4
|
||||
'@types/node': 20.17.25
|
||||
command-line-args: 5.2.1
|
||||
command-line-usage: 7.0.3
|
||||
flatbuffers: 24.12.23
|
||||
json-bignum: 0.0.3
|
||||
tslib: 2.8.1
|
||||
|
||||
app-module-path@2.2.0: {}
|
||||
|
||||
apparatus@0.0.10:
|
||||
@@ -17763,6 +18012,10 @@ snapshots:
|
||||
|
||||
aria-query@5.3.2: {}
|
||||
|
||||
array-back@3.1.0: {}
|
||||
|
||||
array-back@6.2.2: {}
|
||||
|
||||
array-buffer-byte-length@1.0.2:
|
||||
dependencies:
|
||||
call-bound: 1.0.3
|
||||
@@ -18204,6 +18457,10 @@ snapshots:
|
||||
loupe: 3.1.3
|
||||
pathval: 2.0.0
|
||||
|
||||
chalk-template@0.4.0:
|
||||
dependencies:
|
||||
chalk: 4.1.2
|
||||
|
||||
chalk@4.1.2:
|
||||
dependencies:
|
||||
ansi-styles: 4.3.0
|
||||
@@ -18402,6 +18659,20 @@ snapshots:
|
||||
|
||||
comma-separated-tokens@2.0.3: {}
|
||||
|
||||
command-line-args@5.2.1:
|
||||
dependencies:
|
||||
array-back: 3.1.0
|
||||
find-replace: 3.0.0
|
||||
lodash.camelcase: 4.3.0
|
||||
typical: 4.0.0
|
||||
|
||||
command-line-usage@7.0.3:
|
||||
dependencies:
|
||||
array-back: 6.2.2
|
||||
chalk-template: 0.4.0
|
||||
table-layout: 4.1.1
|
||||
typical: 7.3.0
|
||||
|
||||
commander@12.1.0: {}
|
||||
|
||||
commander@13.0.0: {}
|
||||
@@ -19674,6 +19945,10 @@ snapshots:
|
||||
- bare-buffer
|
||||
- supports-color
|
||||
|
||||
find-replace@3.0.0:
|
||||
dependencies:
|
||||
array-back: 3.1.0
|
||||
|
||||
find-up@4.1.0:
|
||||
dependencies:
|
||||
locate-path: 5.0.0
|
||||
@@ -19695,6 +19970,8 @@ snapshots:
|
||||
|
||||
flatbuffers@1.12.0: {}
|
||||
|
||||
flatbuffers@24.12.23: {}
|
||||
|
||||
flatbuffers@25.2.10: {}
|
||||
|
||||
flatted@3.3.2: {}
|
||||
@@ -20548,6 +20825,8 @@ snapshots:
|
||||
|
||||
hookable@5.5.3: {}
|
||||
|
||||
hpagent@1.2.0: {}
|
||||
|
||||
html-encoding-sniffer@3.0.0:
|
||||
dependencies:
|
||||
whatwg-encoding: 2.0.0
|
||||
@@ -20972,6 +21251,8 @@ snapshots:
|
||||
dependencies:
|
||||
bignumber.js: 9.1.2
|
||||
|
||||
json-bignum@0.0.3: {}
|
||||
|
||||
json-buffer@3.0.1: {}
|
||||
|
||||
json-parse-even-better-errors@2.3.1: {}
|
||||
@@ -24181,6 +24462,8 @@ snapshots:
|
||||
|
||||
secure-json-parse@2.7.0: {}
|
||||
|
||||
secure-json-parse@3.0.2: {}
|
||||
|
||||
seek-bzip@2.0.0:
|
||||
dependencies:
|
||||
commander: 6.2.1
|
||||
@@ -24711,6 +24994,11 @@ snapshots:
|
||||
|
||||
tabbable@6.2.0: {}
|
||||
|
||||
table-layout@4.1.1:
|
||||
dependencies:
|
||||
array-back: 6.2.2
|
||||
wordwrapjs: 5.1.0
|
||||
|
||||
tailwind-merge@2.6.0: {}
|
||||
|
||||
tailwind-merge@3.0.2: {}
|
||||
@@ -24851,6 +25139,8 @@ snapshots:
|
||||
|
||||
tinyrainbow@1.2.0: {}
|
||||
|
||||
tinyrainbow@2.0.0: {}
|
||||
|
||||
tinyspy@3.0.2: {}
|
||||
|
||||
tippy.js@6.3.7:
|
||||
@@ -25099,6 +25389,10 @@ snapshots:
|
||||
|
||||
typescript@5.7.3: {}
|
||||
|
||||
typical@4.0.0: {}
|
||||
|
||||
typical@7.3.0: {}
|
||||
|
||||
uc.micro@2.1.0: {}
|
||||
|
||||
ufo@1.5.4: {}
|
||||
@@ -25417,6 +25711,27 @@ snapshots:
|
||||
- supports-color
|
||||
- terser
|
||||
|
||||
vite-node@3.0.9(@types/node@22.13.5)(jiti@2.4.2)(lightningcss@1.29.1)(terser@5.38.2)(tsx@4.19.3)(yaml@2.7.0):
|
||||
dependencies:
|
||||
cac: 6.7.14
|
||||
debug: 4.4.0
|
||||
es-module-lexer: 1.6.0
|
||||
pathe: 2.0.3
|
||||
vite: 6.1.0(@types/node@22.13.5)(jiti@2.4.2)(lightningcss@1.29.1)(terser@5.38.2)(tsx@4.19.3)(yaml@2.7.0)
|
||||
transitivePeerDependencies:
|
||||
- '@types/node'
|
||||
- jiti
|
||||
- less
|
||||
- lightningcss
|
||||
- sass
|
||||
- sass-embedded
|
||||
- stylus
|
||||
- sugarss
|
||||
- supports-color
|
||||
- terser
|
||||
- tsx
|
||||
- yaml
|
||||
|
||||
vite-plugin-wasm@3.4.1(vite@5.4.14(@types/node@22.13.5)(lightningcss@1.29.1)(terser@5.38.2)):
|
||||
dependencies:
|
||||
vite: 5.4.14(@types/node@22.13.5)(lightningcss@1.29.1)(terser@5.38.2)
|
||||
@@ -25567,6 +25882,47 @@ snapshots:
|
||||
- supports-color
|
||||
- terser
|
||||
|
||||
vitest@3.0.9(@edge-runtime/vm@4.0.4)(@types/debug@4.1.12)(@types/node@22.13.5)(happy-dom@15.11.7)(jiti@2.4.2)(lightningcss@1.29.1)(msw@2.7.0(@types/node@22.13.5)(typescript@5.7.3))(terser@5.38.2)(tsx@4.19.3)(yaml@2.7.0):
|
||||
dependencies:
|
||||
'@vitest/expect': 3.0.9
|
||||
'@vitest/mocker': 3.0.9(msw@2.7.0(@types/node@22.13.5)(typescript@5.7.3))(vite@6.1.0(@types/node@22.13.5)(jiti@2.4.2)(lightningcss@1.29.1)(terser@5.38.2)(tsx@4.19.3)(yaml@2.7.0))
|
||||
'@vitest/pretty-format': 3.0.9
|
||||
'@vitest/runner': 3.0.9
|
||||
'@vitest/snapshot': 3.0.9
|
||||
'@vitest/spy': 3.0.9
|
||||
'@vitest/utils': 3.0.9
|
||||
chai: 5.2.0
|
||||
debug: 4.4.0
|
||||
expect-type: 1.1.0
|
||||
magic-string: 0.30.17
|
||||
pathe: 2.0.3
|
||||
std-env: 3.8.0
|
||||
tinybench: 2.9.0
|
||||
tinyexec: 0.3.2
|
||||
tinypool: 1.0.2
|
||||
tinyrainbow: 2.0.0
|
||||
vite: 6.1.0(@types/node@22.13.5)(jiti@2.4.2)(lightningcss@1.29.1)(terser@5.38.2)(tsx@4.19.3)(yaml@2.7.0)
|
||||
vite-node: 3.0.9(@types/node@22.13.5)(jiti@2.4.2)(lightningcss@1.29.1)(terser@5.38.2)(tsx@4.19.3)(yaml@2.7.0)
|
||||
why-is-node-running: 2.3.0
|
||||
optionalDependencies:
|
||||
'@edge-runtime/vm': 4.0.4
|
||||
'@types/debug': 4.1.12
|
||||
'@types/node': 22.13.5
|
||||
happy-dom: 15.11.7
|
||||
transitivePeerDependencies:
|
||||
- jiti
|
||||
- less
|
||||
- lightningcss
|
||||
- msw
|
||||
- sass
|
||||
- sass-embedded
|
||||
- stylus
|
||||
- sugarss
|
||||
- supports-color
|
||||
- terser
|
||||
- tsx
|
||||
- yaml
|
||||
|
||||
voyageai@0.0.3-1:
|
||||
dependencies:
|
||||
form-data: 4.0.0
|
||||
@@ -25838,6 +26194,8 @@ snapshots:
|
||||
|
||||
wordwrap@1.0.0: {}
|
||||
|
||||
wordwrapjs@5.1.0: {}
|
||||
|
||||
workerd@1.20241230.0:
|
||||
optionalDependencies:
|
||||
'@cloudflare/workerd-darwin-64': 1.20241230.0
|
||||
|
||||
@@ -143,6 +143,9 @@
|
||||
{
|
||||
"path": "./packages/providers/storage/chroma/tsconfig.json"
|
||||
},
|
||||
{
|
||||
"path": "./packages/providers/storage/elastic-search/tsconfig.json"
|
||||
},
|
||||
{
|
||||
"path": "./packages/providers/storage/mongodb/tsconfig.json"
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user