From 30df53e3c2508606b61e895b9e321fea183ce245 Mon Sep 17 00:00:00 2001 From: Emanuel Ferreira Date: Mon, 1 Apr 2024 07:44:54 -0300 Subject: [PATCH 1/9] wip --- examples/cloud/query.ts | 25 ++++-- packages/core/src/cloud/LlamaCloudIndex.ts | 93 ++++++++++++++++++++++ 2 files changed, 113 insertions(+), 5 deletions(-) diff --git a/examples/cloud/query.ts b/examples/cloud/query.ts index 7c356d1aeb..3166a189f4 100644 --- a/examples/cloud/query.ts +++ b/examples/cloud/query.ts @@ -1,18 +1,33 @@ +import fs from "node:fs/promises"; + import { stdin as input, stdout as output } from "node:process"; + import readline from "node:readline/promises"; -import { LlamaCloudIndex } from "llamaindex"; +import { Document, LlamaCloudIndex } from "llamaindex"; async function main() { - const index = new LlamaCloudIndex({ - name: "test", - projectName: "default", - baseUrl: process.env.LLAMA_CLOUD_BASE_URL, + const path = "node_modules/llamaindex/examples/abramov.txt"; + + const essay = await fs.readFile(path, "utf-8"); + + // Create Document object with essay + const document = new Document({ text: essay, id_: path }); + + const index = await LlamaCloudIndex.fromDocuments({ + documents: [document], + name: "earlier", + projectName: "01-06-2024", apiKey: process.env.LLAMA_CLOUD_API_KEY, + verbose: true, }); + + console.log({ index }); + const queryEngine = index.asQueryEngine({ denseSimilarityTopK: 5, }); + const rl = readline.createInterface({ input, output }); while (true) { diff --git a/packages/core/src/cloud/LlamaCloudIndex.ts b/packages/core/src/cloud/LlamaCloudIndex.ts index 5a5154d08e..174d40269f 100644 --- a/packages/core/src/cloud/LlamaCloudIndex.ts +++ b/packages/core/src/cloud/LlamaCloudIndex.ts @@ -1,11 +1,20 @@ +import { PlatformApi } from "@llamaindex/cloud"; +import type { Document } from "../Node.js"; import type { BaseRetriever } from "../Retriever.js"; import { RetrieverQueryEngine } from "../engines/query/RetrieverQueryEngine.js"; +import type { TransformComponent } from "../ingestion/types.js"; import type { BaseNodePostprocessor } from "../postprocessors/types.js"; import type { BaseSynthesizer } from "../synthesizers/types.js"; import type { BaseQueryEngine } from "../types.js"; import type { CloudRetrieveParams } from "./LlamaCloudRetriever.js"; import { LlamaCloudRetriever } from "./LlamaCloudRetriever.js"; +import { getPipelineCreate } from "./config.js"; import type { CloudConstructorParams } from "./types.js"; +import { getAppBaseUrl, getClient } from "./utils.js"; + +import { OpenAIEmbedding } from "../embeddings/OpenAIEmbedding.js"; + +const defaultTransformations: TransformComponent[] = [new OpenAIEmbedding()]; export class LlamaCloudIndex { params: CloudConstructorParams; @@ -14,6 +23,90 @@ export class LlamaCloudIndex { this.params = params; } + static async fromDocuments( + params: { + documents: Document[]; + transformations?: TransformComponent[]; + verbose?: boolean; + } & CloudConstructorParams, + ): Promise { + const appUrl = getAppBaseUrl(params.baseUrl); + + const client = await getClient({ ...params, baseUrl: appUrl }); + + const pipelineCreateParams = await getPipelineCreate({ + pipelineName: params.name, + pipelineType: "MANAGED", + inputNodes: params.documents, + transformations: params.transformations ?? defaultTransformations, + }); + + const project = await client.project.upsertProject({ + name: params.name, + }); + + if (!project.id) { + throw new Error("Project ID should be defined"); + } + + const pipeline = await client.project.upsertPipelineForProject( + project.id, + pipelineCreateParams, + ); + + if (!pipeline.id) { + throw new Error("Pipeline ID must be defined"); + } + + if (params.verbose) { + console.log(`Created pipeline ${pipeline.id} with name ${params.name}`); + } + + let isDone = false; + + const execution = await client.pipeline.runManagedPipelineIngestion( + pipeline.id, + ); + + const ingestionId = execution.id; + + if (!ingestionId) { + throw new Error("Ingestion ID must be defined"); + } + + while (!isDone) { + const pipelineStatus = await client.pipeline.getManagedIngestionExecution( + pipeline.id, + ingestionId, + ); + + if (pipelineStatus.status === PlatformApi.StatusEnum.Success) { + isDone = true; + + if (params.verbose) { + console.info("Ingestion completed"); + } + + break; + } else if (pipelineStatus.status === PlatformApi.StatusEnum.Error) { + throw new Error("Ingestion failed"); + } else { + await new Promise((resolve) => setTimeout(resolve, 1000)); + if (params.verbose) { + process.stdout.write("."); + } + } + } + + if (params.verbose) { + console.info( + `Ingestion completed, find your index at ${appUrl}/project/${project.id}/deploy/${pipeline.id}`, + ); + } + + return new LlamaCloudIndex({ ...params }); + } + asRetriever(params: CloudRetrieveParams = {}): BaseRetriever { return new LlamaCloudRetriever({ ...this.params, ...params }); } From 372c9dd8c766831b0855395e195e62f685363bff Mon Sep 17 00:00:00 2001 From: Emanuel Ferreira Date: Mon, 1 Apr 2024 10:35:49 -0300 Subject: [PATCH 2/9] merge w/main --- examples/cloud/query.ts | 5 +- packages/core/src/TextSplitter.ts | 5 +- packages/core/src/cloud/LlamaCloudIndex.ts | 62 +++++++++++++++++++++- packages/core/src/cloud/config.ts | 17 +++--- 4 files changed, 74 insertions(+), 15 deletions(-) diff --git a/examples/cloud/query.ts b/examples/cloud/query.ts index 3166a189f4..8913f4c83f 100644 --- a/examples/cloud/query.ts +++ b/examples/cloud/query.ts @@ -12,18 +12,17 @@ async function main() { const essay = await fs.readFile(path, "utf-8"); // Create Document object with essay - const document = new Document({ text: essay, id_: path }); + const document = new Document({ text: essay, id_: "file_abramov.txt" }); const index = await LlamaCloudIndex.fromDocuments({ documents: [document], name: "earlier", projectName: "01-06-2024", apiKey: process.env.LLAMA_CLOUD_API_KEY, + baseUrl: process.env.LLAMA_CLOUD_BASE_URL, verbose: true, }); - console.log({ index }); - const queryEngine = index.asQueryEngine({ denseSimilarityTopK: 5, }); diff --git a/packages/core/src/TextSplitter.ts b/packages/core/src/TextSplitter.ts index 3bd6c4fc84..c8594237f5 100644 --- a/packages/core/src/TextSplitter.ts +++ b/packages/core/src/TextSplitter.ts @@ -66,8 +66,9 @@ export const defaultParagraphSeparator = EOL + EOL + EOL; * One of the advantages of SentenceSplitter is that even in the fixed length chunks it will try to keep sentences together. */ export class SentenceSplitter { - private chunkSize: number; - private chunkOverlap: number; + public chunkSize: number; + public chunkOverlap: number; + private tokenizer: any; private tokenizerDecoder: any; private paragraphSeparator: string; diff --git a/packages/core/src/cloud/LlamaCloudIndex.ts b/packages/core/src/cloud/LlamaCloudIndex.ts index 174d40269f..48a085d50d 100644 --- a/packages/core/src/cloud/LlamaCloudIndex.ts +++ b/packages/core/src/cloud/LlamaCloudIndex.ts @@ -13,8 +13,12 @@ import type { CloudConstructorParams } from "./types.js"; import { getAppBaseUrl, getClient } from "./utils.js"; import { OpenAIEmbedding } from "../embeddings/OpenAIEmbedding.js"; +import { SimpleNodeParser } from "../nodeParsers/SimpleNodeParser.js"; -const defaultTransformations: TransformComponent[] = [new OpenAIEmbedding()]; +const defaultTransformations: TransformComponent[] = [ + new OpenAIEmbedding(), + new SimpleNodeParser(), +]; export class LlamaCloudIndex { params: CloudConstructorParams; @@ -42,7 +46,7 @@ export class LlamaCloudIndex { }); const project = await client.project.upsertProject({ - name: params.name, + name: params.projectName ?? "default", }); if (!project.id) { @@ -62,8 +66,62 @@ export class LlamaCloudIndex { console.log(`Created pipeline ${pipeline.id} with name ${params.name}`); } + const executionsIds: { + exectionId: string; + dataSourceId: string; + }[] = []; + + for (const dataSource of pipeline.dataSources) { + const dataSourceExection = + await client.dataSource.createDataSourceExecution(dataSource.id); + + if (!dataSourceExection.id) { + throw new Error("Data Source Execution ID must be defined"); + } + + executionsIds.push({ + exectionId: dataSourceExection.id, + dataSourceId: dataSource.id, + }); + } + let isDone = false; + while (!isDone) { + const statuses = []; + + for await (const execution of executionsIds) { + const dataSourceExecution = + await client.dataSource.getDataSourceExecution( + execution.dataSourceId, + execution.exectionId, + ); + + statuses.push(dataSourceExecution.status); + + if ( + statuses.every((status) => status === PlatformApi.StatusEnum.Success) + ) { + isDone = true; + if (params.verbose) { + console.info("Data Source Execution completed"); + } + break; + } else if ( + statuses.some((status) => status === PlatformApi.StatusEnum.Error) + ) { + throw new Error("Data Source Execution failed"); + } else { + await new Promise((resolve) => setTimeout(resolve, 1000)); + if (params.verbose) { + process.stdout.write("."); + } + } + } + } + + isDone = false; + const execution = await client.pipeline.runManagedPipelineIngestion( pipeline.id, ); diff --git a/packages/core/src/cloud/config.ts b/packages/core/src/cloud/config.ts index c646f3620d..b77c6b4341 100644 --- a/packages/core/src/cloud/config.ts +++ b/packages/core/src/cloud/config.ts @@ -18,11 +18,11 @@ function getTransformationConfig( return { configurableTransformationType: "SENTENCE_AWARE_NODE_PARSER", component: { - // TODO: API returns 422 if these parameters are included - // chunkSize: transformation.textSplitter.chunkSize, // TODO: set to public in SentenceSplitter - // chunkOverlap: transformation.textSplitter.chunkOverlap, // TODO: set to public in SentenceSplitter - // includeMetadata: transformation.includeMetadata, - // includePrevNextRel: transformation.includePrevNextRel, + // TODO: API doesnt accept camelCase + chunk_size: transformation.textSplitter.chunkSize, // TODO: set to public in SentenceSplitter + chunk_overlap: transformation.textSplitter.chunkOverlap, // TODO: set to public in SentenceSplitter + include_metadata: transformation.includeMetadata, + include_prev_next_rel: transformation.includePrevNextRel, }, }; } @@ -30,9 +30,10 @@ function getTransformationConfig( return { configurableTransformationType: "OPENAI_EMBEDDING", component: { - modelName: transformation.model, - apiKey: transformation.apiKey, - embedBatchSize: transformation.embedBatchSize, + // TODO: API doesnt accept camelCase + model: transformation.model, + api_key: transformation.apiKey, + embed_batch_size: transformation.embedBatchSize, dimensions: transformation.dimensions, }, }; From 89c9f6f49680a7b1044995e822c21ea5478e8f0a Mon Sep 17 00:00:00 2001 From: Emanuel Ferreira Date: Mon, 1 Apr 2024 10:38:36 -0300 Subject: [PATCH 3/9] merge w/main --- packages/core/src/cloud/LlamaCloudIndex.ts | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/packages/core/src/cloud/LlamaCloudIndex.ts b/packages/core/src/cloud/LlamaCloudIndex.ts index 48a085d50d..69af77a79f 100644 --- a/packages/core/src/cloud/LlamaCloudIndex.ts +++ b/packages/core/src/cloud/LlamaCloudIndex.ts @@ -15,11 +15,6 @@ import { getAppBaseUrl, getClient } from "./utils.js"; import { OpenAIEmbedding } from "../embeddings/OpenAIEmbedding.js"; import { SimpleNodeParser } from "../nodeParsers/SimpleNodeParser.js"; -const defaultTransformations: TransformComponent[] = [ - new OpenAIEmbedding(), - new SimpleNodeParser(), -]; - export class LlamaCloudIndex { params: CloudConstructorParams; @@ -34,6 +29,11 @@ export class LlamaCloudIndex { verbose?: boolean; } & CloudConstructorParams, ): Promise { + const defaultTransformations: TransformComponent[] = [ + new OpenAIEmbedding(), + new SimpleNodeParser(), + ]; + const appUrl = getAppBaseUrl(params.baseUrl); const client = await getClient({ ...params, baseUrl: appUrl }); From 715591f04a2bfac735262b785b1a8225a58d883a Mon Sep 17 00:00:00 2001 From: Emanuel Ferreira Date: Mon, 1 Apr 2024 11:08:13 -0300 Subject: [PATCH 4/9] bump llamacloud to 0.0.5 --- packages/core/package.json | 2 +- packages/core/src/cloud/LlamaCloudIndex.ts | 5 +- packages/core/src/cloud/config.ts | 4 +- pnpm-lock.yaml | 268 ++++++++++++++++++--- 4 files changed, 244 insertions(+), 35 deletions(-) diff --git a/packages/core/package.json b/packages/core/package.json index 1261452d19..4f5de999e3 100644 --- a/packages/core/package.json +++ b/packages/core/package.json @@ -9,7 +9,7 @@ "@aws-crypto/sha256-js": "^5.2.0", "@datastax/astra-db-ts": "^0.1.4", "@grpc/grpc-js": "^1.10.2", - "@llamaindex/cloud": "0.0.4", + "@llamaindex/cloud": "0.0.5", "@llamaindex/env": "workspace:*", "@mistralai/mistralai": "^0.0.10", "@notionhq/client": "^2.2.14", diff --git a/packages/core/src/cloud/LlamaCloudIndex.ts b/packages/core/src/cloud/LlamaCloudIndex.ts index 69af77a79f..94c0d03c70 100644 --- a/packages/core/src/cloud/LlamaCloudIndex.ts +++ b/packages/core/src/cloud/LlamaCloudIndex.ts @@ -12,6 +12,7 @@ import { getPipelineCreate } from "./config.js"; import type { CloudConstructorParams } from "./types.js"; import { getAppBaseUrl, getClient } from "./utils.js"; +import { getEnv } from "@llamaindex/env"; import { OpenAIEmbedding } from "../embeddings/OpenAIEmbedding.js"; import { SimpleNodeParser } from "../nodeParsers/SimpleNodeParser.js"; @@ -30,7 +31,9 @@ export class LlamaCloudIndex { } & CloudConstructorParams, ): Promise { const defaultTransformations: TransformComponent[] = [ - new OpenAIEmbedding(), + new OpenAIEmbedding({ + apiKey: getEnv("OPENAI_API_KEY"), + }), new SimpleNodeParser(), ]; diff --git a/packages/core/src/cloud/config.ts b/packages/core/src/cloud/config.ts index b77c6b4341..10f9331110 100644 --- a/packages/core/src/cloud/config.ts +++ b/packages/core/src/cloud/config.ts @@ -72,10 +72,12 @@ export async function getPipelineCreate( inputNodes = [], } = params; + const dataSources = inputNodes.map(getDataSourceConfig); + return { name: pipelineName, configuredTransformations: transformations.map(getTransformationConfig), - dataSources: inputNodes.map(getDataSourceConfig), + dataSources, dataSinks: [], pipelineType, }; diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 4b69ec290f..36e48ce88e 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -53,7 +53,7 @@ importers: version: link:../../packages/env '@mdx-js/react': specifier: ^3.0.0 - version: 3.0.0(@types/react@18.2.66)(react@18.2.0) + version: 3.0.0(@types/react@18.2.73)(react@18.2.0) clsx: specifier: ^2.1.0 version: 2.1.0 @@ -65,7 +65,7 @@ importers: version: 2.3.1(react@18.2.0) raw-loader: specifier: ^4.0.2 - version: 4.0.2(webpack@5.90.3) + version: 4.0.2(webpack@5.91.0) react: specifier: ^18.2.0 version: 18.2.0 @@ -78,10 +78,10 @@ importers: version: 3.2.0(react-dom@18.2.0)(react@18.2.0) '@docusaurus/preset-classic': specifier: ^3.2.0 - version: 3.2.0(@algolia/client-search@4.22.1)(@types/react@18.2.66)(eslint@8.56.0)(react-dom@18.2.0)(react@18.2.0)(search-insights@2.13.0)(typescript@5.4.3) + version: 3.2.0(@algolia/client-search@4.23.2)(@types/react@18.2.73)(eslint@8.56.0)(react-dom@18.2.0)(react@18.2.0)(search-insights@2.13.0)(typescript@5.4.3) '@docusaurus/theme-classic': specifier: ^3.2.0 - version: 3.2.0(@types/react@18.2.66)(eslint@8.56.0)(react-dom@18.2.0)(react@18.2.0)(typescript@5.4.3) + version: 3.2.0(@types/react@18.2.73)(eslint@8.56.0)(react-dom@18.2.0)(react@18.2.0)(typescript@5.4.3) '@docusaurus/types': specifier: ^3.2.0 version: 3.2.0(react-dom@18.2.0)(react@18.2.0) @@ -181,8 +181,8 @@ importers: specifier: ^1.10.2 version: 1.10.2 '@llamaindex/cloud': - specifier: 0.0.4 - version: 0.0.4 + specifier: 0.0.5 + version: 0.0.5 '@llamaindex/env': specifier: workspace:* version: link:../env @@ -570,47 +570,47 @@ packages: resolution: {integrity: sha512-1Yjs2SvM8TflER/OD3cOjhWWOZb58A2t7wpE2S9XfBYTiIl+XFhQG2bjy4Pu1I+EAlCNUzRDYDdFwFYUKvXcIA==} engines: {node: '>=0.10.0'} - /@algolia/autocomplete-core@1.9.3(@algolia/client-search@4.22.1)(algoliasearch@4.22.1)(search-insights@2.13.0): + /@algolia/autocomplete-core@1.9.3(@algolia/client-search@4.23.2)(algoliasearch@4.22.1)(search-insights@2.13.0): resolution: {integrity: sha512-009HdfugtGCdC4JdXUbVJClA0q0zh24yyePn+KUGk3rP7j8FEe/m5Yo/z65gn6nP/cM39PxpzqKrL7A6fP6PPw==} dependencies: - '@algolia/autocomplete-plugin-algolia-insights': 1.9.3(@algolia/client-search@4.22.1)(algoliasearch@4.22.1)(search-insights@2.13.0) - '@algolia/autocomplete-shared': 1.9.3(@algolia/client-search@4.22.1)(algoliasearch@4.22.1) + '@algolia/autocomplete-plugin-algolia-insights': 1.9.3(@algolia/client-search@4.23.2)(algoliasearch@4.22.1)(search-insights@2.13.0) + '@algolia/autocomplete-shared': 1.9.3(@algolia/client-search@4.23.2)(algoliasearch@4.22.1) transitivePeerDependencies: - '@algolia/client-search' - algoliasearch - search-insights dev: true - /@algolia/autocomplete-plugin-algolia-insights@1.9.3(@algolia/client-search@4.22.1)(algoliasearch@4.22.1)(search-insights@2.13.0): + /@algolia/autocomplete-plugin-algolia-insights@1.9.3(@algolia/client-search@4.23.2)(algoliasearch@4.22.1)(search-insights@2.13.0): resolution: {integrity: sha512-a/yTUkcO/Vyy+JffmAnTWbr4/90cLzw+CC3bRbhnULr/EM0fGNvM13oQQ14f2moLMcVDyAx/leczLlAOovhSZg==} peerDependencies: search-insights: '>= 1 < 3' dependencies: - '@algolia/autocomplete-shared': 1.9.3(@algolia/client-search@4.22.1)(algoliasearch@4.22.1) + '@algolia/autocomplete-shared': 1.9.3(@algolia/client-search@4.23.2)(algoliasearch@4.22.1) search-insights: 2.13.0 transitivePeerDependencies: - '@algolia/client-search' - algoliasearch dev: true - /@algolia/autocomplete-preset-algolia@1.9.3(@algolia/client-search@4.22.1)(algoliasearch@4.22.1): + /@algolia/autocomplete-preset-algolia@1.9.3(@algolia/client-search@4.23.2)(algoliasearch@4.22.1): resolution: {integrity: sha512-d4qlt6YmrLMYy95n5TB52wtNDr6EgAIPH81dvvvW8UmuWRgxEtY0NJiPwl/h95JtG2vmRM804M0DSwMCNZlzRA==} peerDependencies: '@algolia/client-search': '>= 4.9.1 < 6' algoliasearch: '>= 4.9.1 < 6' dependencies: - '@algolia/autocomplete-shared': 1.9.3(@algolia/client-search@4.22.1)(algoliasearch@4.22.1) - '@algolia/client-search': 4.22.1 + '@algolia/autocomplete-shared': 1.9.3(@algolia/client-search@4.23.2)(algoliasearch@4.22.1) + '@algolia/client-search': 4.23.2 algoliasearch: 4.22.1 dev: true - /@algolia/autocomplete-shared@1.9.3(@algolia/client-search@4.22.1)(algoliasearch@4.22.1): + /@algolia/autocomplete-shared@1.9.3(@algolia/client-search@4.23.2)(algoliasearch@4.22.1): resolution: {integrity: sha512-Wnm9E4Ye6Rl6sTTqjoymD+l8DjSTHsHboVRYrKgEt8Q7UHm9nYbqhN/i0fhUYA3OAEH7WA8x3jfpnmJm3rKvaQ==} peerDependencies: '@algolia/client-search': '>= 4.9.1 < 6' algoliasearch: '>= 4.9.1 < 6' dependencies: - '@algolia/client-search': 4.22.1 + '@algolia/client-search': 4.23.2 algoliasearch: 4.22.1 dev: true @@ -624,6 +624,10 @@ packages: resolution: {integrity: sha512-TJMBKqZNKYB9TptRRjSUtevJeQVXRmg6rk9qgFKWvOy8jhCPdyNZV1nB3SKGufzvTVbomAukFR8guu/8NRKBTA==} dev: true + /@algolia/cache-common@4.23.2: + resolution: {integrity: sha512-OUK/6mqr6CQWxzl/QY0/mwhlGvS6fMtvEPyn/7AHUx96NjqDA4X4+Ju7aXFQKh+m3jW9VPB0B9xvEQgyAnRPNw==} + dev: true + /@algolia/cache-in-memory@4.22.1: resolution: {integrity: sha512-ve+6Ac2LhwpufuWavM/aHjLoNz/Z/sYSgNIXsinGofWOysPilQZPUetqLj8vbvi+DHZZaYSEP9H5SRVXnpsNNw==} dependencies: @@ -654,6 +658,13 @@ packages: '@algolia/transporter': 4.22.1 dev: true + /@algolia/client-common@4.23.2: + resolution: {integrity: sha512-Q2K1FRJBern8kIfZ0EqPvUr3V29ICxCm/q42zInV+VJRjldAD9oTsMGwqUQ26GFMdFYmqkEfCbY4VGAiQhh22g==} + dependencies: + '@algolia/requester-common': 4.23.2 + '@algolia/transporter': 4.23.2 + dev: true + /@algolia/client-personalization@4.22.1: resolution: {integrity: sha512-sl+/klQJ93+4yaqZ7ezOttMQ/nczly/3GmgZXJ1xmoewP5jmdP/X/nV5U7EHHH3hCUEHeN7X1nsIhGPVt9E1cQ==} dependencies: @@ -670,6 +681,14 @@ packages: '@algolia/transporter': 4.22.1 dev: true + /@algolia/client-search@4.23.2: + resolution: {integrity: sha512-CxSB29OVGSE7l/iyoHvamMonzq7Ev8lnk/OkzleODZ1iBcCs3JC/XgTIKzN/4RSTrJ9QybsnlrN/bYCGufo7qw==} + dependencies: + '@algolia/client-common': 4.23.2 + '@algolia/requester-common': 4.23.2 + '@algolia/transporter': 4.23.2 + dev: true + /@algolia/events@4.0.1: resolution: {integrity: sha512-FQzvOCgoFXAbf5Y6mYozw2aj5KCJoA3m4heImceldzPSMbdyS4atVjJzXKMsfX3wnZTFYwkkt8/z8UesLHlSBQ==} dev: true @@ -678,6 +697,10 @@ packages: resolution: {integrity: sha512-OnTFymd2odHSO39r4DSWRFETkBufnY2iGUZNrMXpIhF5cmFE8pGoINNPzwg02QLBlGSaLqdKy0bM8S0GyqPLBg==} dev: true + /@algolia/logger-common@4.23.2: + resolution: {integrity: sha512-jGM49Q7626cXZ7qRAWXn0jDlzvoA1FvN4rKTi1g0hxKsTTSReyYk0i1ADWjChDPl3Q+nSDhJuosM2bBUAay7xw==} + dev: true + /@algolia/logger-console@4.22.1: resolution: {integrity: sha512-O99rcqpVPKN1RlpgD6H3khUWylU24OXlzkavUAMy6QZd1776QAcauE3oP8CmD43nbaTjBexZj2nGsBH9Tc0FVA==} dependencies: @@ -694,6 +717,10 @@ packages: resolution: {integrity: sha512-dgvhSAtg2MJnR+BxrIFqlLtkLlVVhas9HgYKMk2Uxiy5m6/8HZBL40JVAMb2LovoPFs9I/EWIoFVjOrFwzn5Qg==} dev: true + /@algolia/requester-common@4.23.2: + resolution: {integrity: sha512-3EfpBS0Hri0lGDB5H/BocLt7Vkop0bTTLVUBB844HH6tVycwShmsV6bDR7yXbQvFP1uNpgePRD3cdBCjeHmk6Q==} + dev: true + /@algolia/requester-node-http@4.22.1: resolution: {integrity: sha512-JfmZ3MVFQkAU+zug8H3s8rZ6h0ahHZL/SpMaSasTCGYR5EEJsCc8SI5UZ6raPN2tjxa5bxS13BRpGSBUens7EA==} dependencies: @@ -708,6 +735,14 @@ packages: '@algolia/requester-common': 4.22.1 dev: true + /@algolia/transporter@4.23.2: + resolution: {integrity: sha512-GY3aGKBy+8AK4vZh8sfkatDciDVKad5rTY2S10Aefyjh7e7UGBP4zigf42qVXwU8VOPwi7l/L7OACGMOFcjB0Q==} + dependencies: + '@algolia/cache-common': 4.23.2 + '@algolia/logger-common': 4.23.2 + '@algolia/requester-common': 4.23.2 + dev: true + /@ampproject/remapping@2.2.1: resolution: {integrity: sha512-lFMjJTrFL3j7L9yBxwYfCq2k6qqwHyzuUl/XBnif78PWTJYyL/dfowQHWE3sp6U6ZzqWiiIZnpTMO96zhkjwtg==} engines: {node: '>=6.0.0'} @@ -2200,7 +2235,7 @@ packages: resolution: {integrity: sha512-SPiDHaWKQZpwR2siD0KQUwlStvIAnEyK6tAE2h2Wuoq8ue9skzhlyVQ1ddzOxX6khULnAALDiR/isSF3bnuciA==} dev: true - /@docsearch/react@3.5.2(@algolia/client-search@4.22.1)(@types/react@18.2.66)(react-dom@18.2.0)(react@18.2.0)(search-insights@2.13.0): + /@docsearch/react@3.5.2(@algolia/client-search@4.23.2)(@types/react@18.2.73)(react-dom@18.2.0)(react@18.2.0)(search-insights@2.13.0): resolution: {integrity: sha512-9Ahcrs5z2jq/DcAvYtvlqEBHImbm4YJI8M9y0x6Tqg598P40HTEkX7hsMcIuThI+hTFxRGZ9hll0Wygm2yEjng==} peerDependencies: '@types/react': '>= 16.8.0 < 19.0.0' @@ -2217,10 +2252,10 @@ packages: search-insights: optional: true dependencies: - '@algolia/autocomplete-core': 1.9.3(@algolia/client-search@4.22.1)(algoliasearch@4.22.1)(search-insights@2.13.0) - '@algolia/autocomplete-preset-algolia': 1.9.3(@algolia/client-search@4.22.1)(algoliasearch@4.22.1) + '@algolia/autocomplete-core': 1.9.3(@algolia/client-search@4.23.2)(algoliasearch@4.22.1)(search-insights@2.13.0) + '@algolia/autocomplete-preset-algolia': 1.9.3(@algolia/client-search@4.23.2)(algoliasearch@4.22.1) '@docsearch/css': 3.5.2 - '@types/react': 18.2.66 + '@types/react': 18.2.73 algoliasearch: 4.22.1 react: 18.2.0 react-dom: 18.2.0(react@18.2.0) @@ -2702,7 +2737,7 @@ packages: - webpack-cli dev: true - /@docusaurus/preset-classic@3.2.0(@algolia/client-search@4.22.1)(@types/react@18.2.66)(eslint@8.56.0)(react-dom@18.2.0)(react@18.2.0)(search-insights@2.13.0)(typescript@5.4.3): + /@docusaurus/preset-classic@3.2.0(@algolia/client-search@4.23.2)(@types/react@18.2.73)(eslint@8.56.0)(react-dom@18.2.0)(react@18.2.0)(search-insights@2.13.0)(typescript@5.4.3): resolution: {integrity: sha512-t7tXyk8kUgT7hUqEOgSJnPs+Foem9ucuan/a9QVYaVFCDjp92Sb2FpCY8bVasAokYCjodYe2LfpAoSCj5YDYWg==} engines: {node: '>=18.0'} peerDependencies: @@ -2718,9 +2753,9 @@ packages: '@docusaurus/plugin-google-gtag': 3.2.0(eslint@8.56.0)(react-dom@18.2.0)(react@18.2.0)(typescript@5.4.3) '@docusaurus/plugin-google-tag-manager': 3.2.0(eslint@8.56.0)(react-dom@18.2.0)(react@18.2.0)(typescript@5.4.3) '@docusaurus/plugin-sitemap': 3.2.0(eslint@8.56.0)(react-dom@18.2.0)(react@18.2.0)(typescript@5.4.3) - '@docusaurus/theme-classic': 3.2.0(@types/react@18.2.66)(eslint@8.56.0)(react-dom@18.2.0)(react@18.2.0)(typescript@5.4.3) + '@docusaurus/theme-classic': 3.2.0(@types/react@18.2.73)(eslint@8.56.0)(react-dom@18.2.0)(react@18.2.0)(typescript@5.4.3) '@docusaurus/theme-common': 3.2.0(@docusaurus/types@3.2.0)(eslint@8.56.0)(react-dom@18.2.0)(react@18.2.0)(typescript@5.4.3) - '@docusaurus/theme-search-algolia': 3.2.0(@algolia/client-search@4.22.1)(@docusaurus/types@3.2.0)(@types/react@18.2.66)(eslint@8.56.0)(react-dom@18.2.0)(react@18.2.0)(search-insights@2.13.0)(typescript@5.4.3) + '@docusaurus/theme-search-algolia': 3.2.0(@algolia/client-search@4.23.2)(@docusaurus/types@3.2.0)(@types/react@18.2.73)(eslint@8.56.0)(react-dom@18.2.0)(react@18.2.0)(search-insights@2.13.0)(typescript@5.4.3) '@docusaurus/types': 3.2.0(react-dom@18.2.0)(react@18.2.0) react: 18.2.0 react-dom: 18.2.0(react@18.2.0) @@ -2751,7 +2786,7 @@ packages: peerDependencies: react: '*' dependencies: - '@types/react': 18.2.66 + '@types/react': 18.2.73 prop-types: 15.8.1 react: 18.2.0 @@ -2768,7 +2803,7 @@ packages: - supports-color dev: false - /@docusaurus/theme-classic@3.2.0(@types/react@18.2.66)(eslint@8.56.0)(react-dom@18.2.0)(react@18.2.0)(typescript@5.4.3): + /@docusaurus/theme-classic@3.2.0(@types/react@18.2.73)(eslint@8.56.0)(react-dom@18.2.0)(react@18.2.0)(typescript@5.4.3): resolution: {integrity: sha512-4oSO5BQOJ5ja7WYdL6jK1n4J96tp+VJHamdwao6Ea252sA3W3vvR0otTflG4p4XVjNZH6hlPQoi5lKW0HeRgfQ==} engines: {node: '>=18.0'} peerDependencies: @@ -2787,7 +2822,7 @@ packages: '@docusaurus/utils': 3.2.0(@docusaurus/types@3.2.0) '@docusaurus/utils-common': 3.2.0(@docusaurus/types@3.2.0) '@docusaurus/utils-validation': 3.2.0(@docusaurus/types@3.2.0) - '@mdx-js/react': 3.0.0(@types/react@18.2.66)(react@18.2.0) + '@mdx-js/react': 3.0.0(@types/react@18.2.73)(react@18.2.0) clsx: 2.1.0 copy-text-to-clipboard: 3.2.0 infima: 0.2.0-alpha.43 @@ -2866,14 +2901,14 @@ packages: - webpack-cli dev: true - /@docusaurus/theme-search-algolia@3.2.0(@algolia/client-search@4.22.1)(@docusaurus/types@3.2.0)(@types/react@18.2.66)(eslint@8.56.0)(react-dom@18.2.0)(react@18.2.0)(search-insights@2.13.0)(typescript@5.4.3): + /@docusaurus/theme-search-algolia@3.2.0(@algolia/client-search@4.23.2)(@docusaurus/types@3.2.0)(@types/react@18.2.73)(eslint@8.56.0)(react-dom@18.2.0)(react@18.2.0)(search-insights@2.13.0)(typescript@5.4.3): resolution: {integrity: sha512-PgvF4qHoqJp8+GfqClUbTF/zYNOsz4De251IuzXon7+7FAXwvb2qmYtA2nEwyMbB7faKOz33Pxzv+y+153KS/g==} engines: {node: '>=18.0'} peerDependencies: react: ^18.0.0 react-dom: ^18.0.0 dependencies: - '@docsearch/react': 3.5.2(@algolia/client-search@4.22.1)(@types/react@18.2.66)(react-dom@18.2.0)(react@18.2.0)(search-insights@2.13.0) + '@docsearch/react': 3.5.2(@algolia/client-search@4.23.2)(@types/react@18.2.73)(react-dom@18.2.0)(react@18.2.0)(search-insights@2.13.0) '@docusaurus/core': 3.2.0(@docusaurus/types@3.2.0)(eslint@8.56.0)(react-dom@18.2.0)(react@18.2.0)(typescript@5.4.3) '@docusaurus/logger': 3.2.0 '@docusaurus/plugin-content-docs': 3.2.0(eslint@8.56.0)(react-dom@18.2.0)(react@18.2.0)(typescript@5.4.3) @@ -3437,6 +3472,20 @@ packages: qs: 6.11.2 dev: false + /@llamaindex/cloud@0.0.5: + resolution: {integrity: sha512-8HBSiAZkmX1RvpEM2czEVKqMUCKk7uvMSiDpMGWlEj3MUKBYCh+r8E2TtVhZfU4TunEI7nJRMcVBfXDyFz6Lpw==} + peerDependencies: + node-fetch: ^3.3.2 + peerDependenciesMeta: + node-fetch: + optional: true + dependencies: + '@types/qs': 6.9.12 + form-data: 4.0.0 + js-base64: 3.7.7 + qs: 6.12.0 + dev: false + /@manypkg/find-root@1.1.0: resolution: {integrity: sha512-mki5uBvhHzO8kYYix/WRy2WX8S3B5wdVSc9D6KcU5lQNglP2yt58/VfLuAK49glRXChosY8ap2oJ1qgma3GUVA==} dependencies: @@ -3486,14 +3535,14 @@ packages: transitivePeerDependencies: - supports-color - /@mdx-js/react@3.0.0(@types/react@18.2.66)(react@18.2.0): + /@mdx-js/react@3.0.0(@types/react@18.2.73)(react@18.2.0): resolution: {integrity: sha512-nDctevR9KyYFyV+m+/+S4cpzCWHqj+iHDHq3QrsWezcC+B17uZdIWgCguESUkwFhM3n/56KxWVE3V6EokrmONQ==} peerDependencies: '@types/react': '>=16' react: '>=16' dependencies: '@types/mdx': 2.0.10 - '@types/react': 18.2.66 + '@types/react': 18.2.73 react: 18.2.0 /@mistralai/mistralai@0.0.10: @@ -4584,6 +4633,9 @@ packages: /@types/prop-types@15.7.11: resolution: {integrity: sha512-ga8y9v9uyeiLdpKddhxYQkxNDrfvuPrlFb0N1qnZZByvcElJaXthF1UhvCh9TLWJBEHeNtdnbysW7Y6Uq8CVng==} + /@types/prop-types@15.7.12: + resolution: {integrity: sha512-5zvhXYtRNRluoE/jAp4GVsSduVUzNWKkOZrCDBWYtE7biZywwdC2AcEzg+cSMLFRfVgeAFqpfNabiPjxFddV1Q==} + /@types/qs@6.9.12: resolution: {integrity: sha512-bZcOkJ6uWrL0Qb2NAWKa7TBU+mJHPzhx9jjLL1KHF+XpzEcR7EXHvjbHlGtR/IsP1vyPrehuS6XqkmaePy//mg==} @@ -4634,6 +4686,12 @@ packages: '@types/scheduler': 0.16.8 csstype: 3.1.3 + /@types/react@18.2.73: + resolution: {integrity: sha512-XcGdod0Jjv84HOC7N5ziY3x+qL0AfmubvKOZ9hJjJ2yd5EE+KYjWhdOjt387e9HPheHkdggF9atTifMRtyAaRA==} + dependencies: + '@types/prop-types': 15.7.12 + csstype: 3.1.3 + /@types/responselike@1.0.3: resolution: {integrity: sha512-H/+L+UkTV33uf49PH5pCAUBVPNj2nDBXTN+qS1dOwyyg24l3CcicicCA7ca+HMvJBZcFgl5r8e+RR6elsb4Lyw==} dependencies: @@ -5733,6 +5791,17 @@ packages: get-intrinsic: 1.2.2 set-function-length: 1.1.1 + /call-bind@1.0.7: + resolution: {integrity: sha512-GHTSNSYICQ7scH7sZ+M2rFopRoLh8t2bLSW6BbgrtLsahOIB5iyAVJf9GjWK3cYTDaMj4XdBpM1cA6pIS0Kv2w==} + engines: {node: '>= 0.4'} + dependencies: + es-define-property: 1.0.0 + es-errors: 1.3.0 + function-bind: 1.1.2 + get-intrinsic: 1.2.4 + set-function-length: 1.2.2 + dev: false + /callsites@3.1.0: resolution: {integrity: sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ==} engines: {node: '>=6'} @@ -6670,6 +6739,15 @@ packages: gopd: 1.0.1 has-property-descriptors: 1.0.1 + /define-data-property@1.1.4: + resolution: {integrity: sha512-rBMvIzlpA8v6E+SJZoo++HAYqsLrkg7MSfIinMPFhmkorw7X+dOXVJQs+QT69zGkzMyfDnIMN2Wid1+NbL3T+A==} + engines: {node: '>= 0.4'} + dependencies: + es-define-property: 1.0.0 + es-errors: 1.3.0 + gopd: 1.0.1 + dev: false + /define-lazy-prop@2.0.0: resolution: {integrity: sha512-Ds09qNh8yw3khSjiJjiUInaGX9xlqZDY7JVryGxdxV7NPeuqQfplOpQ66yJFZut3jLa5zOwkXw1g9EI2uKh4Og==} engines: {node: '>=8'} @@ -7233,6 +7311,18 @@ packages: unbox-primitive: 1.0.2 which-typed-array: 1.1.13 + /es-define-property@1.0.0: + resolution: {integrity: sha512-jxayLKShrEqqzJ0eumQbVhTYQM27CfT1T35+gCgDFoL82JLsXqTJ76zv6A0YLOgEnLUMvLzsDsGIrl8NFpT2gQ==} + engines: {node: '>= 0.4'} + dependencies: + get-intrinsic: 1.2.4 + dev: false + + /es-errors@1.3.0: + resolution: {integrity: sha512-Zf5H2Kxt2xjTvbJvP2ZWLEICxA6j+hAmMzIlypy4xcBg1vKVnx89Wy0GbS+kf5cwCVFFzdCFh2XSCFNULS6csw==} + engines: {node: '>= 0.4'} + dev: false + /es-iterator-helpers@1.0.15: resolution: {integrity: sha512-GhoY8uYqd6iwUl2kgjTm4CZAf6oo5mHK7BPqx3rKgx893YSsy0LGHV6gfqqQvZt/8xM8xeOnfXBCfqclMKkJ5g==} dependencies: @@ -7255,6 +7345,10 @@ packages: /es-module-lexer@1.4.1: resolution: {integrity: sha512-cXLGjP0c4T3flZJKQSuziYoq7MlT+rnvfZjfp7h+I7K9BNX54kP9nyWvdbwjQ4u1iWbOL4u96fgeZLToQlZC7w==} + /es-module-lexer@1.5.0: + resolution: {integrity: sha512-pqrTKmwEIgafsYZAGw9kszYzmagcE/n4dbgwGWLEXg7J4QFJVQRBld8j3Q3GNez79jzxZshq0bcT962QHOghjw==} + dev: false + /es-set-tostringtag@2.0.1: resolution: {integrity: sha512-g3OMbtlwY3QewlqAiMLI47KywjWZoEytKr8pf6iTC8uJq5bIAH52Z9pnQ8pVL6whrCto53JZDuUIsifGeLorTg==} engines: {node: '>= 0.4'} @@ -8418,6 +8512,17 @@ packages: has-symbols: 1.0.3 hasown: 2.0.0 + /get-intrinsic@1.2.4: + resolution: {integrity: sha512-5uYhsJH8VJBTv7oslg4BznJYhDoRI6waYCxMmCdnTrcCrHA/fCFKoTFz2JKKE0HdDFUF7/oQuhzumXJK7paBRQ==} + engines: {node: '>= 0.4'} + dependencies: + es-errors: 1.3.0 + function-bind: 1.1.2 + has-proto: 1.0.1 + has-symbols: 1.0.3 + hasown: 2.0.0 + dev: false + /get-own-enumerable-property-symbols@3.0.2: resolution: {integrity: sha512-I0UBV/XOz1XkIJHEUDMZAbzCThU/H8DxmSfmdGcKPnVhu2VfFqr34jr9777IyaTYvxjedWhqVIilEDsCdP5G6g==} @@ -8682,6 +8787,12 @@ packages: dependencies: get-intrinsic: 1.2.2 + /has-property-descriptors@1.0.2: + resolution: {integrity: sha512-55JNKuIW+vq4Ke1BjOTjM2YctQIvCT7GFzHwmfZPGo5wnrgkid0YQtnAleFSqumZm4az3n2BS+erby5ipJdgrg==} + dependencies: + es-define-property: 1.0.0 + dev: false + /has-proto@1.0.1: resolution: {integrity: sha512-7qE+iP+O+bgF9clE5+UoBFzE65mlBiVj3tKCrlNQ0Ogwm0BjpT/gK4SlLYDMybDh5I3TCTKnPPa0oMG7JDYrhg==} engines: {node: '>= 0.4'} @@ -12565,6 +12676,13 @@ packages: side-channel: 1.0.4 dev: false + /qs@6.12.0: + resolution: {integrity: sha512-trVZiI6RMOkO476zLGaBIzszOdFPnCCXHPG9kn0yuS1uz6xdVxPfZdB3vUig9pxPFDM9BRAgz/YUIVQ1/vuiUg==} + engines: {node: '>=0.6'} + dependencies: + side-channel: 1.0.6 + dev: false + /queue-microtask@1.2.3: resolution: {integrity: sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A==} @@ -12650,7 +12768,7 @@ packages: iconv-lite: 0.4.24 unpipe: 1.0.0 - /raw-loader@4.0.2(webpack@5.90.3): + /raw-loader@4.0.2(webpack@5.91.0): resolution: {integrity: sha512-ZnScIV3ag9A4wPX/ZayxL/jZH+euYb6FcUinPcgiQW0+UBtEv0O6Q3lGd3cqJ+GHH+rksEv3Pj99oxJ3u3VIKA==} engines: {node: '>= 10.13.0'} peerDependencies: @@ -12658,7 +12776,7 @@ packages: dependencies: loader-utils: 2.0.4 schema-utils: 3.3.0 - webpack: 5.90.3 + webpack: 5.91.0 dev: false /rc@1.2.8: @@ -13493,6 +13611,18 @@ packages: gopd: 1.0.1 has-property-descriptors: 1.0.1 + /set-function-length@1.2.2: + resolution: {integrity: sha512-pgRc4hJ4/sNjWCSS9AmnS40x3bNMDTknHgL5UaMBTMyJnU90EgWh1Rz+MC9eFu4BuN/UwZjKQuY/1v3rM7HMfg==} + engines: {node: '>= 0.4'} + dependencies: + define-data-property: 1.1.4 + es-errors: 1.3.0 + function-bind: 1.1.2 + get-intrinsic: 1.2.4 + gopd: 1.0.1 + has-property-descriptors: 1.0.2 + dev: false + /set-function-name@2.0.1: resolution: {integrity: sha512-tMNCiqYVkXIZgc2Hnoy2IvC/f8ezc5koaRFkCjrpWzGpCd3qbZXPzVy9MAZzK1ch/X0jvSkojys3oqJN0qCmdA==} engines: {node: '>= 0.4'} @@ -13585,6 +13715,16 @@ packages: get-intrinsic: 1.2.2 object-inspect: 1.13.1 + /side-channel@1.0.6: + resolution: {integrity: sha512-fDW/EZ6Q9RiO8eFG8Hj+7u/oW+XrPTIChwCOM2+th2A6OblDtYYIpve9m+KvI9Z4C9qSEXlaGR6bTEYHReuglA==} + engines: {node: '>= 0.4'} + dependencies: + call-bind: 1.0.7 + es-errors: 1.3.0 + get-intrinsic: 1.2.4 + object-inspect: 1.13.1 + dev: false + /siginfo@2.0.0: resolution: {integrity: sha512-ybx0WO1/8bSBLEWXZvEd7gMW3Sn3JFlW3TvX1nREbDLRNQNaeNN8WK0meBwPdAaOI7TtRRRJn/Es1zhrrCHu7g==} dev: true @@ -14239,6 +14379,30 @@ packages: terser: 5.27.0 webpack: 5.90.3 + /terser-webpack-plugin@5.3.10(webpack@5.91.0): + resolution: {integrity: sha512-BKFPWlPDndPs+NGGCr1U59t0XScL5317Y0UReNrHaw9/FwhPENlq6bfgs+4yPfyP51vqC1bQ4rp1EfXW5ZSH9w==} + engines: {node: '>= 10.13.0'} + peerDependencies: + '@swc/core': '*' + esbuild: '*' + uglify-js: '*' + webpack: ^5.1.0 + peerDependenciesMeta: + '@swc/core': + optional: true + esbuild: + optional: true + uglify-js: + optional: true + dependencies: + '@jridgewell/trace-mapping': 0.3.22 + jest-worker: 27.5.1 + schema-utils: 3.3.0 + serialize-javascript: 6.0.2 + terser: 5.27.0 + webpack: 5.91.0 + dev: false + /terser@5.27.0: resolution: {integrity: sha512-bi1HRwVRskAjheeYl291n3JC4GgO/Ty4z1nVs5AAsmonJulGxpSektecnNedrwK9C7vpvVtcX3cw00VSLt7U2A==} engines: {node: '>=10'} @@ -15263,6 +15427,46 @@ packages: - esbuild - uglify-js + /webpack@5.91.0: + resolution: {integrity: sha512-rzVwlLeBWHJbmgTC/8TvAcu5vpJNII+MelQpylD4jNERPwpBJOE2lEcko1zJX3QJeLjTTAnQxn/OJ8bjDzVQaw==} + engines: {node: '>=10.13.0'} + hasBin: true + peerDependencies: + webpack-cli: '*' + peerDependenciesMeta: + webpack-cli: + optional: true + dependencies: + '@types/eslint-scope': 3.7.7 + '@types/estree': 1.0.5 + '@webassemblyjs/ast': 1.12.1 + '@webassemblyjs/wasm-edit': 1.12.1 + '@webassemblyjs/wasm-parser': 1.12.1 + acorn: 8.11.3 + acorn-import-assertions: 1.9.0(acorn@8.11.3) + browserslist: 4.23.0 + chrome-trace-event: 1.0.3 + enhanced-resolve: 5.16.0 + es-module-lexer: 1.5.0 + eslint-scope: 5.1.1 + events: 3.3.0 + glob-to-regexp: 0.4.1 + graceful-fs: 4.2.11 + json-parse-even-better-errors: 2.3.1 + loader-runner: 4.3.0 + mime-types: 2.1.35 + neo-async: 2.6.2 + schema-utils: 3.3.0 + tapable: 2.2.1 + terser-webpack-plugin: 5.3.10(webpack@5.91.0) + watchpack: 2.4.1 + webpack-sources: 3.2.3 + transitivePeerDependencies: + - '@swc/core' + - esbuild + - uglify-js + dev: false + /webpackbar@5.0.2(webpack@5.90.3): resolution: {integrity: sha512-BmFJo7veBDgQzfWXl/wwYXr/VFus0614qZ8i9znqcl9fnEdiVkdbi0TedLQ6xAK92HZHDJ0QmyQ0fmuZPAgCYQ==} engines: {node: '>=12'} From f50c37cca759dba3affc704d4ad0036ec56888e6 Mon Sep 17 00:00:00 2001 From: Emanuel Ferreira Date: Mon, 1 Apr 2024 11:40:31 -0300 Subject: [PATCH 5/9] wip --- examples/cloud/query.ts | 4 ++-- packages/edge/package.json | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/examples/cloud/query.ts b/examples/cloud/query.ts index 8913f4c83f..034cd481ec 100644 --- a/examples/cloud/query.ts +++ b/examples/cloud/query.ts @@ -16,8 +16,8 @@ async function main() { const index = await LlamaCloudIndex.fromDocuments({ documents: [document], - name: "earlier", - projectName: "01-06-2024", + name: "test", + projectName: "default", apiKey: process.env.LLAMA_CLOUD_API_KEY, baseUrl: process.env.LLAMA_CLOUD_BASE_URL, verbose: true, diff --git a/packages/edge/package.json b/packages/edge/package.json index 8edf4ba89d..2a849d88fe 100644 --- a/packages/edge/package.json +++ b/packages/edge/package.json @@ -8,7 +8,7 @@ "@aws-crypto/sha256-js": "^5.2.0", "@datastax/astra-db-ts": "^0.1.4", "@grpc/grpc-js": "^1.10.2", - "@llamaindex/cloud": "0.0.4", + "@llamaindex/cloud": "0.0.5", "@llamaindex/env": "workspace:*", "@mistralai/mistralai": "^0.0.10", "@notionhq/client": "^2.2.14", From f8c1077f79b2f15e04cafaab6996f0a210d311e7 Mon Sep 17 00:00:00 2001 From: Emanuel Ferreira Date: Mon, 1 Apr 2024 11:45:08 -0300 Subject: [PATCH 6/9] chore: lock file --- pnpm-lock.yaml | 135 +++++++++++++++++++++---------------------------- 1 file changed, 57 insertions(+), 78 deletions(-) diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 36e48ce88e..533afdeadb 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -326,8 +326,8 @@ importers: specifier: ^1.10.2 version: 1.10.3 '@llamaindex/cloud': - specifier: 0.0.4 - version: 0.0.4 + specifier: 0.0.5 + version: 0.0.5 '@llamaindex/env': specifier: workspace:* version: link:../env @@ -3458,20 +3458,6 @@ packages: /@leichtgewicht/ip-codec@2.0.4: resolution: {integrity: sha512-Hcv+nVC0kZnQ3tD9GVu5xSMR4VVYOteQIr/hwFPVEvPdlXqgGEuRjiheChHgdM+JyqdgNcmzZOX/tnl0JOiI7A==} - /@llamaindex/cloud@0.0.4: - resolution: {integrity: sha512-ufu8sASmttGQZBrDVt5XHF+Lf7ZFImMe/bCwqfoGiywJUchc88igxhP0xF5iUpthyQr2/0nAhH117owj5+GF3A==} - peerDependencies: - node-fetch: ^3.3.2 - peerDependenciesMeta: - node-fetch: - optional: true - dependencies: - '@types/qs': 6.9.12 - form-data: 4.0.0 - js-base64: 3.7.7 - qs: 6.11.2 - dev: false - /@llamaindex/cloud@0.0.5: resolution: {integrity: sha512-8HBSiAZkmX1RvpEM2czEVKqMUCKk7uvMSiDpMGWlEj3MUKBYCh+r8E2TtVhZfU4TunEI7nJRMcVBfXDyFz6Lpw==} peerDependencies: @@ -5289,7 +5275,7 @@ packages: /array-buffer-byte-length@1.0.0: resolution: {integrity: sha512-LPuwb2P+NrQw3XhxGc36+XSvuBPopovXYTR9Ew++Du9Yb/bx5AzBfrIsBoj0EZUifjQU+sHL21sseZ3jerWO/A==} dependencies: - call-bind: 1.0.5 + call-bind: 1.0.7 is-array-buffer: 3.0.2 /array-flatten@1.1.1: @@ -5376,10 +5362,10 @@ packages: engines: {node: '>= 0.4'} dependencies: array-buffer-byte-length: 1.0.0 - call-bind: 1.0.5 + call-bind: 1.0.7 define-properties: 1.2.1 es-abstract: 1.22.3 - get-intrinsic: 1.2.2 + get-intrinsic: 1.2.4 is-array-buffer: 3.0.2 is-shared-array-buffer: 1.0.2 @@ -5800,7 +5786,6 @@ packages: function-bind: 1.1.2 get-intrinsic: 1.2.4 set-function-length: 1.2.2 - dev: false /callsites@3.1.0: resolution: {integrity: sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ==} @@ -6735,7 +6720,7 @@ packages: resolution: {integrity: sha512-E7uGkTzkk1d0ByLeSc6ZsFS79Axg+m1P/VsgYsxHgiuc3tFSj+MjMIwe90FC4lOAZzNBdY7kkO2P2wKdsQ1vgQ==} engines: {node: '>= 0.4'} dependencies: - get-intrinsic: 1.2.2 + get-intrinsic: 1.2.4 gopd: 1.0.1 has-property-descriptors: 1.0.1 @@ -6746,7 +6731,6 @@ packages: es-define-property: 1.0.0 es-errors: 1.3.0 gopd: 1.0.1 - dev: false /define-lazy-prop@2.0.0: resolution: {integrity: sha512-Ds09qNh8yw3khSjiJjiUInaGX9xlqZDY7JVryGxdxV7NPeuqQfplOpQ66yJFZut3jLa5zOwkXw1g9EI2uKh4Og==} @@ -7274,11 +7258,11 @@ packages: array-buffer-byte-length: 1.0.0 arraybuffer.prototype.slice: 1.0.2 available-typed-arrays: 1.0.5 - call-bind: 1.0.5 + call-bind: 1.0.7 es-set-tostringtag: 2.0.2 es-to-primitive: 1.2.1 function.prototype.name: 1.1.6 - get-intrinsic: 1.2.2 + get-intrinsic: 1.2.4 get-symbol-description: 1.0.0 globalthis: 1.0.3 gopd: 1.0.1 @@ -7316,12 +7300,10 @@ packages: engines: {node: '>= 0.4'} dependencies: get-intrinsic: 1.2.4 - dev: false /es-errors@1.3.0: resolution: {integrity: sha512-Zf5H2Kxt2xjTvbJvP2ZWLEICxA6j+hAmMzIlypy4xcBg1vKVnx89Wy0GbS+kf5cwCVFFzdCFh2XSCFNULS6csw==} engines: {node: '>= 0.4'} - dev: false /es-iterator-helpers@1.0.15: resolution: {integrity: sha512-GhoY8uYqd6iwUl2kgjTm4CZAf6oo5mHK7BPqx3rKgx893YSsy0LGHV6gfqqQvZt/8xM8xeOnfXBCfqclMKkJ5g==} @@ -7353,7 +7335,7 @@ packages: resolution: {integrity: sha512-g3OMbtlwY3QewlqAiMLI47KywjWZoEytKr8pf6iTC8uJq5bIAH52Z9pnQ8pVL6whrCto53JZDuUIsifGeLorTg==} engines: {node: '>= 0.4'} dependencies: - get-intrinsic: 1.2.2 + get-intrinsic: 1.2.4 has: 1.0.3 has-tostringtag: 1.0.0 dev: false @@ -7362,7 +7344,7 @@ packages: resolution: {integrity: sha512-BuDyupZt65P9D2D2vA/zqcI3G5xRsklm5N3xCwuiy+/vKy8i0ifdsQP1sLgO4tZDSCaQUSnmC48khknGMV3D2Q==} engines: {node: '>= 0.4'} dependencies: - get-intrinsic: 1.2.2 + get-intrinsic: 1.2.4 has-tostringtag: 1.0.0 hasown: 2.0.0 @@ -8453,7 +8435,7 @@ packages: resolution: {integrity: sha512-uN7m/BzVKQnCUF/iW8jYea67v++2u7m5UgENbHRtdDVclOUP+FMPlCNdmk0h/ysGyo2tavMJEDqJAkJdRa1vMA==} engines: {node: '>= 0.4'} dependencies: - call-bind: 1.0.5 + call-bind: 1.0.7 define-properties: 1.2.0 es-abstract: 1.21.2 functions-have-names: 1.2.3 @@ -8463,7 +8445,7 @@ packages: resolution: {integrity: sha512-Z5kx79swU5P27WEayXM1tBi5Ze/lbIyiNgU3qyXUOf9b2rgXYyF9Dy9Cx+IQv/Lc8WCG6L82zwUPpSS9hGehIg==} engines: {node: '>= 0.4'} dependencies: - call-bind: 1.0.5 + call-bind: 1.0.7 define-properties: 1.2.1 es-abstract: 1.22.3 functions-have-names: 1.2.3 @@ -8521,7 +8503,6 @@ packages: has-proto: 1.0.1 has-symbols: 1.0.3 hasown: 2.0.0 - dev: false /get-own-enumerable-property-symbols@3.0.2: resolution: {integrity: sha512-I0UBV/XOz1XkIJHEUDMZAbzCThU/H8DxmSfmdGcKPnVhu2VfFqr34jr9777IyaTYvxjedWhqVIilEDsCdP5G6g==} @@ -8551,8 +8532,8 @@ packages: resolution: {integrity: sha512-2EmdH1YvIQiZpltCNgkuiUnyukzxM/R6NDJX31Ke3BG1Nq5b0S2PhX59UKi9vZpPDQVdqn+1IcaAwnzTT5vCjw==} engines: {node: '>= 0.4'} dependencies: - call-bind: 1.0.5 - get-intrinsic: 1.2.2 + call-bind: 1.0.7 + get-intrinsic: 1.2.4 /get-tsconfig@4.7.2: resolution: {integrity: sha512-wuMsz4leaj5hbGgg4IvDU0bqJagpftG5l5cXIAvo8uZrqn0NJqwtfupTN00VnkQJPcIRrxYrm1Ue24btpCha2A==} @@ -8683,7 +8664,7 @@ packages: /gopd@1.0.1: resolution: {integrity: sha512-d65bNlIadxvpb/A2abVdlqKqV563juRnZ1Wtk6s1sIR8uNsXR70xqIzVqxVf1eTqDunwT2MkczEeaezCKTZhwA==} dependencies: - get-intrinsic: 1.2.2 + get-intrinsic: 1.2.4 /got@11.8.6: resolution: {integrity: sha512-6tfZ91bOr7bOXnK7PRDCGBLa1H4U080YHNaAQ2KsMGlLEzRbk44nsZF2E1IeRc3vtJHPVbKCYgdFbaGO2ljd8g==} @@ -8785,13 +8766,12 @@ packages: /has-property-descriptors@1.0.1: resolution: {integrity: sha512-VsX8eaIewvas0xnvinAe9bw4WfIeODpGYikiWYLH+dma0Jw6KHYqWiWfhQlgOVK8D6PvjubK5Uc4P0iIhIcNVg==} dependencies: - get-intrinsic: 1.2.2 + get-intrinsic: 1.2.4 /has-property-descriptors@1.0.2: resolution: {integrity: sha512-55JNKuIW+vq4Ke1BjOTjM2YctQIvCT7GFzHwmfZPGo5wnrgkid0YQtnAleFSqumZm4az3n2BS+erby5ipJdgrg==} dependencies: es-define-property: 1.0.0 - dev: false /has-proto@1.0.1: resolution: {integrity: sha512-7qE+iP+O+bgF9clE5+UoBFzE65mlBiVj3tKCrlNQ0Ogwm0BjpT/gK4SlLYDMybDh5I3TCTKnPPa0oMG7JDYrhg==} @@ -9235,16 +9215,16 @@ packages: dependencies: get-intrinsic: 1.2.2 has: 1.0.3 - side-channel: 1.0.4 + side-channel: 1.0.6 dev: false /internal-slot@1.0.6: resolution: {integrity: sha512-Xj6dv+PsbtwyPpEflsejS+oIZxmMlV44zAhG479uYu89MsjcYOhCFnNyKrkJrihbsiasQyY0afoCl/9BLR65bg==} engines: {node: '>= 0.4'} dependencies: - get-intrinsic: 1.2.2 + get-intrinsic: 1.2.4 hasown: 2.0.0 - side-channel: 1.0.4 + side-channel: 1.0.6 /interpret@1.4.0: resolution: {integrity: sha512-agE4QfB2Lkp9uICn7BAqoscw4SZP9kTE2hxiFI3jBPmXJfdqiahTbUuKGsMoN2GtqL9AxhYioAcVvgsb1HvRbA==} @@ -9275,8 +9255,8 @@ packages: /is-array-buffer@3.0.2: resolution: {integrity: sha512-y+FyyR/w8vfIRq4eQcM1EYgSTnmHXPqaF+IgzgraytCFq5Xh8lllDVmAZolPJiZttZLeFSINPYMaEJ7/vWUa1w==} dependencies: - call-bind: 1.0.5 - get-intrinsic: 1.2.2 + call-bind: 1.0.7 + get-intrinsic: 1.2.4 is-typed-array: 1.1.12 /is-arrayish@0.2.1: @@ -9308,7 +9288,7 @@ packages: resolution: {integrity: sha512-gDYaKHJmnj4aWxyj6YHyXVpdQawtVLHU5cb+eztPGczf6cjuTdwve5ZIEfgXqH4e57An1D1AKf8CZ3kYrQRqYA==} engines: {node: '>= 0.4'} dependencies: - call-bind: 1.0.5 + call-bind: 1.0.7 has-tostringtag: 1.0.0 /is-buffer@1.1.6: @@ -9361,7 +9341,7 @@ packages: /is-finalizationregistry@1.0.2: resolution: {integrity: sha512-0by5vtUJs8iFQb5TYUHHPudOR+qXYIMKtiUzvLIZITZUjknFmziyBJuLhVRc+Ds0dREFlskDNJKYIdIzu/9pfw==} dependencies: - call-bind: 1.0.5 + call-bind: 1.0.7 dev: false /is-fullwidth-code-point@3.0.0: @@ -9478,7 +9458,7 @@ packages: resolution: {integrity: sha512-kvRdxDsxZjhzUX07ZnLydzS1TU/TJlTUHHY4YLL87e37oUA49DfkLqgy+VjFocowy29cKvcSiu+kIv728jTTVg==} engines: {node: '>= 0.4'} dependencies: - call-bind: 1.0.5 + call-bind: 1.0.7 has-tostringtag: 1.0.0 /is-regexp@1.0.0: @@ -9500,7 +9480,7 @@ packages: /is-shared-array-buffer@1.0.2: resolution: {integrity: sha512-sqN2UDu1/0y6uvXyStCOzyhAjCSlHceFoMKJW8W9EU9cvic/QdsZ0kEU93HEy3IUEFZIiH/3w+AH/UQbPHNdhA==} dependencies: - call-bind: 1.0.5 + call-bind: 1.0.7 /is-stream@1.1.0: resolution: {integrity: sha512-uQPm8kcs47jx38atAcWTVxyltQYoPT68y9aWYdV6yWXSyW8mzSat0TL6CiWdZeCdF3KrAvpVtnHbTv4RN+rqdQ==} @@ -9565,13 +9545,13 @@ packages: /is-weakref@1.0.2: resolution: {integrity: sha512-qctsuLZmIQ0+vSSMfoVvyFe2+GSEvnmZ2ezTup1SBse9+twCCeial6EEi3Nc2KFcf6+qz2FBPnjXsk8xhKSaPQ==} dependencies: - call-bind: 1.0.5 + call-bind: 1.0.7 /is-weakset@2.0.2: resolution: {integrity: sha512-t2yVvttHkQktwnNNmBQ98AhENLdPUTDTE21uPqAQ0ARwQfGeQKRVS0NNurH7bTf7RrvcVn1OOge45CnBeHCSmg==} dependencies: - call-bind: 1.0.5 - get-intrinsic: 1.2.2 + call-bind: 1.0.7 + get-intrinsic: 1.2.4 dev: false /is-windows@1.0.2: @@ -9618,7 +9598,7 @@ packages: resolution: {integrity: sha512-DR33HMMr8EzwuRL8Y9D3u2BMj8+RqSE850jfGu59kS7tbmPLzGkZmVSfyCFSDxuZiEY6Rzt3T2NA/qU+NwVj1w==} dependencies: define-properties: 1.2.1 - get-intrinsic: 1.2.2 + get-intrinsic: 1.2.4 has-symbols: 1.0.3 reflect.getprototypeof: 1.0.4 set-function-name: 2.0.1 @@ -11295,7 +11275,7 @@ packages: resolution: {integrity: sha512-byy+U7gp+FVwmyzKPYhW2h5l3crpmGsxl7X2s8y43IgxvG4g3QZ6CffDtsNQy1WsmZpQbO+ybo0AlW7TY6DcBQ==} engines: {node: '>= 0.4'} dependencies: - call-bind: 1.0.5 + call-bind: 1.0.7 define-properties: 1.2.1 has-symbols: 1.0.3 object-keys: 1.1.1 @@ -12667,7 +12647,7 @@ packages: resolution: {integrity: sha512-MvjoMCJwEarSbUYk5O+nmoSzSutSsTwF85zcHPQ9OrlFoZOYIjaqBAJIqIXjptyD5vThxGq52Xu/MaJzRkIk4Q==} engines: {node: '>=0.6'} dependencies: - side-channel: 1.0.4 + side-channel: 1.0.6 /qs@6.11.2: resolution: {integrity: sha512-tDNIz22aBzCDxLtVH++VnTfzxlfeK5CbqohpSqpJgj1Wg/cQbStNAz3NuqCs5vV+pjBsK4x4pN9HlVh7rcYRiA==} @@ -13046,10 +13026,10 @@ packages: resolution: {integrity: sha512-ECkTw8TmJwW60lOTR+ZkODISW6RQ8+2CL3COqtiJKLd6MmB45hN51HprHFziKLGkAuTGQhBb91V8cy+KHlaCjw==} engines: {node: '>= 0.4'} dependencies: - call-bind: 1.0.5 + call-bind: 1.0.7 define-properties: 1.2.1 es-abstract: 1.22.3 - get-intrinsic: 1.2.2 + get-intrinsic: 1.2.4 globalthis: 1.0.3 which-builtin-type: 1.1.3 dev: false @@ -13084,7 +13064,7 @@ packages: resolution: {integrity: sha512-sy6TXMN+hnP/wMy+ISxg3krXx7BAtWVO4UouuCN/ziM9UEne0euamVNafDfvC83bRNr95y0V5iijeDQFUNpvrg==} engines: {node: '>= 0.4'} dependencies: - call-bind: 1.0.5 + call-bind: 1.0.7 define-properties: 1.2.1 set-function-name: 2.0.1 @@ -13399,8 +13379,8 @@ packages: resolution: {integrity: sha512-ZdQ0Jeb9Ofti4hbt5lX3T2JcAamT9hfzYU1MNB+z/jaEbB6wfFfPIR/zEORmZqobkCCJhSjodobH6WHNmJ97dg==} engines: {node: '>=0.4'} dependencies: - call-bind: 1.0.5 - get-intrinsic: 1.2.2 + call-bind: 1.0.7 + get-intrinsic: 1.2.4 has-symbols: 1.0.3 isarray: 2.0.5 @@ -13413,8 +13393,8 @@ packages: /safe-regex-test@1.0.0: resolution: {integrity: sha512-JBUUzyOgEwXQY1NuPtvcj/qcBDbDmEvWufhlnXZIm75DEHp+afM1r1ujJpJsV/gSM4t59tpDyPi1sd6ZaPFfsA==} dependencies: - call-bind: 1.0.5 - get-intrinsic: 1.2.2 + call-bind: 1.0.7 + get-intrinsic: 1.2.4 is-regex: 1.1.4 dev: false @@ -13422,8 +13402,8 @@ packages: resolution: {integrity: sha512-83S9w6eFq12BBIJYvjMux6/dkirb8+4zJRA9cxNBVb7Wq5fJBW+Xze48WqR8pxua7bDuAaaAxtVVd4Idjp1dBQ==} engines: {node: '>= 0.4'} dependencies: - call-bind: 1.0.5 - get-intrinsic: 1.2.2 + call-bind: 1.0.7 + get-intrinsic: 1.2.4 is-regex: 1.1.4 /safe-stable-stringify@2.4.3: @@ -13607,7 +13587,7 @@ packages: engines: {node: '>= 0.4'} dependencies: define-data-property: 1.1.1 - get-intrinsic: 1.2.2 + get-intrinsic: 1.2.4 gopd: 1.0.1 has-property-descriptors: 1.0.1 @@ -13621,7 +13601,6 @@ packages: get-intrinsic: 1.2.4 gopd: 1.0.1 has-property-descriptors: 1.0.2 - dev: false /set-function-name@2.0.1: resolution: {integrity: sha512-tMNCiqYVkXIZgc2Hnoy2IvC/f8ezc5koaRFkCjrpWzGpCd3qbZXPzVy9MAZzK1ch/X0jvSkojys3oqJN0qCmdA==} @@ -13714,6 +13693,7 @@ packages: call-bind: 1.0.5 get-intrinsic: 1.2.2 object-inspect: 1.13.1 + dev: false /side-channel@1.0.6: resolution: {integrity: sha512-fDW/EZ6Q9RiO8eFG8Hj+7u/oW+XrPTIChwCOM2+th2A6OblDtYYIpve9m+KvI9Z4C9qSEXlaGR6bTEYHReuglA==} @@ -13723,7 +13703,6 @@ packages: es-errors: 1.3.0 get-intrinsic: 1.2.4 object-inspect: 1.13.1 - dev: false /siginfo@2.0.0: resolution: {integrity: sha512-ybx0WO1/8bSBLEWXZvEd7gMW3Sn3JFlW3TvX1nREbDLRNQNaeNN8WK0meBwPdAaOI7TtRRRJn/Es1zhrrCHu7g==} @@ -14067,7 +14046,7 @@ packages: internal-slot: 1.0.6 regexp.prototype.flags: 1.5.1 set-function-name: 2.0.1 - side-channel: 1.0.4 + side-channel: 1.0.6 dev: false /string.prototype.matchall@4.0.8: @@ -14087,7 +14066,7 @@ packages: resolution: {integrity: sha512-p6TmeT1T3411M8Cgg9wBTMRtY2q9+PNy9EV1i2lIXUN/btt763oIfxwN3RR8VU6wHX8j/1CFy0L+YuThm6bgOg==} engines: {node: '>= 0.4'} dependencies: - call-bind: 1.0.5 + call-bind: 1.0.7 define-properties: 1.2.0 es-abstract: 1.21.2 dev: false @@ -14096,14 +14075,14 @@ packages: resolution: {integrity: sha512-lfjY4HcixfQXOfaqCvcBuOIapyaroTXhbkfJN3gcB1OtyupngWK4sEET9Knd0cXd28kTUqu/kHoV4HKSJdnjiQ==} engines: {node: '>= 0.4'} dependencies: - call-bind: 1.0.5 + call-bind: 1.0.7 define-properties: 1.2.1 es-abstract: 1.22.3 /string.prototype.trimend@1.0.6: resolution: {integrity: sha512-JySq+4mrPf9EsDBEDYMOb/lM7XQLulwg5R/m1r0PXEFqrV0qHvl58sdTilSXtKOflCsK2E8jxf+GKC0T07RWwQ==} dependencies: - call-bind: 1.0.5 + call-bind: 1.0.7 define-properties: 1.2.0 es-abstract: 1.21.2 dev: false @@ -14111,14 +14090,14 @@ packages: /string.prototype.trimend@1.0.7: resolution: {integrity: sha512-Ni79DqeB72ZFq1uH/L6zJ+DKZTkOtPIHovb3YZHQViE+HDouuU4mBrLOLDn5Dde3RF8qw5qVETEjhu9locMLvA==} dependencies: - call-bind: 1.0.5 + call-bind: 1.0.7 define-properties: 1.2.1 es-abstract: 1.22.3 /string.prototype.trimstart@1.0.6: resolution: {integrity: sha512-omqjMDaY92pbn5HOX7f9IccLA+U1tA9GvtU4JrodiXFfYB7jPzzHpRzpglLAjtUV6bB557zwClJezTqnAiYnQA==} dependencies: - call-bind: 1.0.5 + call-bind: 1.0.7 define-properties: 1.2.0 es-abstract: 1.21.2 dev: false @@ -14126,7 +14105,7 @@ packages: /string.prototype.trimstart@1.0.7: resolution: {integrity: sha512-NGhtDFu3jCEm7B4Fy0DpLewdJQOZcQ0rGbwQ/+stjnrp2i+rlKeCvos9hOIeCmqwratM47OBxY7uFZzjxHXmrg==} dependencies: - call-bind: 1.0.5 + call-bind: 1.0.7 define-properties: 1.2.1 es-abstract: 1.22.3 @@ -14790,15 +14769,15 @@ packages: resolution: {integrity: sha512-Y8KTSIglk9OZEr8zywiIHG/kmQ7KWyjseXs1CbSo8vC42w7hg2HgYTxSWwP0+is7bWDc1H+Fo026CpHFwm8tkw==} engines: {node: '>= 0.4'} dependencies: - call-bind: 1.0.5 - get-intrinsic: 1.2.2 + call-bind: 1.0.7 + get-intrinsic: 1.2.4 is-typed-array: 1.1.12 /typed-array-byte-length@1.0.0: resolution: {integrity: sha512-Or/+kvLxNpeQ9DtSydonMxCx+9ZXOswtwJn17SNLvhptaXYDJvkFFP5zbfU/uLmvnBJlI4yrnXRxpdWH/M5tNA==} engines: {node: '>= 0.4'} dependencies: - call-bind: 1.0.5 + call-bind: 1.0.7 for-each: 0.3.3 has-proto: 1.0.1 is-typed-array: 1.1.12 @@ -14808,7 +14787,7 @@ packages: engines: {node: '>= 0.4'} dependencies: available-typed-arrays: 1.0.5 - call-bind: 1.0.5 + call-bind: 1.0.7 for-each: 0.3.3 has-proto: 1.0.1 is-typed-array: 1.1.12 @@ -14816,7 +14795,7 @@ packages: /typed-array-length@1.0.4: resolution: {integrity: sha512-KjZypGq+I/H7HI5HlOoGHkWUUGq+Q0TPhQurLbyrVrvnKTBgzLhIJ7j6J/XTQOi0d1RjyZ0wdas8bKs2p0x3Ng==} dependencies: - call-bind: 1.0.5 + call-bind: 1.0.7 for-each: 0.3.3 is-typed-array: 1.1.12 @@ -14886,7 +14865,7 @@ packages: /unbox-primitive@1.0.2: resolution: {integrity: sha512-61pPlCD9h51VoreyJ0BReideM3MDKMKnh6+V9L08331ipq6Q8OFXZYiqP6n/tbHx4s5I9uRhcye6BrbkizkBDw==} dependencies: - call-bind: 1.0.5 + call-bind: 1.0.7 has-bigints: 1.0.2 has-symbols: 1.0.3 which-boxed-primitive: 1.0.2 @@ -15563,7 +15542,7 @@ packages: engines: {node: '>= 0.4'} dependencies: available-typed-arrays: 1.0.5 - call-bind: 1.0.5 + call-bind: 1.0.7 for-each: 0.3.3 gopd: 1.0.1 has-tostringtag: 1.0.0 @@ -15574,7 +15553,7 @@ packages: engines: {node: '>= 0.4'} dependencies: available-typed-arrays: 1.0.5 - call-bind: 1.0.5 + call-bind: 1.0.7 for-each: 0.3.3 gopd: 1.0.1 has-tostringtag: 1.0.0 From 2da5dc7392f043e5be65b87a191aaa0f94f3e977 Mon Sep 17 00:00:00 2001 From: Emanuel Ferreira Date: Tue, 2 Apr 2024 11:55:59 -0300 Subject: [PATCH 7/9] chore: update example --- examples/cloud/create_index.ts | 44 ++++++++++++++++++++++++++++++++++ examples/cloud/query.ts | 20 +++------------- 2 files changed, 47 insertions(+), 17 deletions(-) create mode 100644 examples/cloud/create_index.ts diff --git a/examples/cloud/create_index.ts b/examples/cloud/create_index.ts new file mode 100644 index 0000000000..17162b877b --- /dev/null +++ b/examples/cloud/create_index.ts @@ -0,0 +1,44 @@ +import fs from "node:fs/promises"; + +import { stdin as input, stdout as output } from "node:process"; + +import readline from "node:readline/promises"; + +import { Document, LlamaCloudIndex } from "llamaindex"; + +async function main() { + const path = "node_modules/llamaindex/examples/abramov.txt"; + + const essay = await fs.readFile(path, "utf-8"); + + // Create Document object with essay + const document = new Document({ text: essay, id_: path }); + + const index = await LlamaCloudIndex.fromDocuments({ + documents: [document], + name: "test", + projectName: "default", + apiKey: process.env.LLAMA_CLOUD_API_KEY, + baseUrl: process.env.LLAMA_CLOUD_BASE_URL, + }); + + const queryEngine = index.asQueryEngine({ + denseSimilarityTopK: 5, + }); + + const rl = readline.createInterface({ input, output }); + + while (true) { + const query = await rl.question("Query: "); + const stream = await queryEngine.query({ + query, + stream: true, + }); + console.log(); + for await (const chunk of stream) { + process.stdout.write(chunk.response); + } + } +} + +main().catch(console.error); diff --git a/examples/cloud/query.ts b/examples/cloud/query.ts index 034cd481ec..7c356d1aeb 100644 --- a/examples/cloud/query.ts +++ b/examples/cloud/query.ts @@ -1,32 +1,18 @@ -import fs from "node:fs/promises"; - import { stdin as input, stdout as output } from "node:process"; - import readline from "node:readline/promises"; -import { Document, LlamaCloudIndex } from "llamaindex"; +import { LlamaCloudIndex } from "llamaindex"; async function main() { - const path = "node_modules/llamaindex/examples/abramov.txt"; - - const essay = await fs.readFile(path, "utf-8"); - - // Create Document object with essay - const document = new Document({ text: essay, id_: "file_abramov.txt" }); - - const index = await LlamaCloudIndex.fromDocuments({ - documents: [document], + const index = new LlamaCloudIndex({ name: "test", projectName: "default", - apiKey: process.env.LLAMA_CLOUD_API_KEY, baseUrl: process.env.LLAMA_CLOUD_BASE_URL, - verbose: true, + apiKey: process.env.LLAMA_CLOUD_API_KEY, }); - const queryEngine = index.asQueryEngine({ denseSimilarityTopK: 5, }); - const rl = readline.createInterface({ input, output }); while (true) { From 643d090c6248a4fb64854c97cd40956da7eeffd1 Mon Sep 17 00:00:00 2001 From: Emanuel Ferreira Date: Tue, 2 Apr 2024 12:12:58 -0300 Subject: [PATCH 8/9] chore: rename example name --- examples/cloud/{create_index.ts => from_documents.ts} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename examples/cloud/{create_index.ts => from_documents.ts} (100%) diff --git a/examples/cloud/create_index.ts b/examples/cloud/from_documents.ts similarity index 100% rename from examples/cloud/create_index.ts rename to examples/cloud/from_documents.ts From 39387f5c69d86f57d939f078db58c7fddf66a3c1 Mon Sep 17 00:00:00 2001 From: Emanuel Ferreira Date: Tue, 2 Apr 2024 13:59:19 -0300 Subject: [PATCH 9/9] chore: changeset --- .changeset/warm-ligers-hammer.md | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 .changeset/warm-ligers-hammer.md diff --git a/.changeset/warm-ligers-hammer.md b/.changeset/warm-ligers-hammer.md new file mode 100644 index 0000000000..fda0a5ee3b --- /dev/null +++ b/.changeset/warm-ligers-hammer.md @@ -0,0 +1,5 @@ +--- +"llamaindex": patch +--- + +feat: llamacloud index from documents