From f6ba9e3a0cbf2b0d7ec4a328361cc51f9cc15e7f Mon Sep 17 00:00:00 2001 From: Mikyo King Date: Fri, 24 May 2024 20:06:50 -0600 Subject: [PATCH 1/4] setup CI --- .github/workflows/typescript-CI.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/typescript-CI.yaml b/.github/workflows/typescript-CI.yaml index 2d624d1e2..3047b5d8e 100644 --- a/.github/workflows/typescript-CI.yaml +++ b/.github/workflows/typescript-CI.yaml @@ -2,7 +2,7 @@ name: Typescript CI on: push: - branches: [main, langchainjs] + branches: [main, llama-index-ts] pull_request: paths: - "js/**" From 787abb3e9411bafa91b927d0b8a7ed8a0cbafdee Mon Sep 17 00:00:00 2001 From: Mikyo King Date: Tue, 28 May 2024 19:13:43 -0600 Subject: [PATCH 2/4] feat(llamaindex.TS): llama-index-ts initial package creation (#497) Co-authored-by: Parker Stafford <52351508+Parker-Stafford@users.noreply.github.com> --- cspell.json | 2 + js/package.json | 6 + .../jest.config.js | 1 + .../package.json | 7 - .../examples/instrumentation.ts | 37 + .../examples/llamaindex-node.ts | 29 + .../jest.config.js | 1 + .../package.json | 11 +- .../src/index.ts | 1 + .../src/instrumentation.ts | 158 ++ .../test/llamaIndex.test.ts | 116 +- .../package.json | 4 - js/pnpm-lock.yaml | 2148 ++++++++++++++++- 13 files changed, 2379 insertions(+), 142 deletions(-) create mode 100644 js/packages/openinference-instrumentation-llama-index/examples/instrumentation.ts create mode 100644 js/packages/openinference-instrumentation-llama-index/examples/llamaindex-node.ts create mode 100644 js/packages/openinference-instrumentation-llama-index/src/instrumentation.ts diff --git a/cspell.json b/cspell.json index 7bea7ec13..f3b3bdee6 100644 --- a/cspell.json +++ b/cspell.json @@ -2,6 +2,7 @@ "version": "0.2", "language": "en", "words": [ + "abramov", "arize", "arizeai", "autouse", @@ -11,6 +12,7 @@ "instrumentator", "Instrumentor", "langchain", + "llamaindex", "llms", "nextjs", "openinference", diff --git a/js/package.json b/js/package.json index 1f0b69500..82499c79c 100644 --- a/js/package.json +++ b/js/package.json @@ -23,7 +23,13 @@ "license": "Apache-2.0", "devDependencies": { "@changesets/cli": "^2.27.1", + "@opentelemetry/exporter-trace-otlp-proto": "^0.50.0", + "@opentelemetry/resources": "^1.20.0", + "@opentelemetry/sdk-trace-base": "^1.24.1", + "@opentelemetry/sdk-trace-node": "^1.24.1", + "@opentelemetry/semantic-conventions": "^1.24.1", "@types/jest": "^29.5.11", + "@types/node": "^20.12.4", "@typescript-eslint/eslint-plugin": "^6.17.0", "@typescript-eslint/parser": "^6.17.0", "eslint": "^8.56.0", diff --git a/js/packages/openinference-instrumentation-langchain/jest.config.js b/js/packages/openinference-instrumentation-langchain/jest.config.js index 2fd4f78cf..e470f44e6 100644 --- a/js/packages/openinference-instrumentation-langchain/jest.config.js +++ b/js/packages/openinference-instrumentation-langchain/jest.config.js @@ -1,4 +1,5 @@ /** @type {import('ts-jest').JestConfigWithTsJest} */ + module.exports = { preset: "ts-jest", testEnvironment: "node", diff --git a/js/packages/openinference-instrumentation-langchain/package.json b/js/packages/openinference-instrumentation-langchain/package.json index e5e350b4c..7e50c8282 100644 --- a/js/packages/openinference-instrumentation-langchain/package.json +++ b/js/packages/openinference-instrumentation-langchain/package.json @@ -34,13 +34,6 @@ "devDependencies": { "@langchain/core": "^0.1.57", "@langchain/openai": "^0.0.25", - "@opentelemetry/exporter-trace-otlp-proto": "^0.50.0", - "@opentelemetry/resources": "^1.19.0", - "@opentelemetry/sdk-trace-base": "^1.19.0", - "@opentelemetry/sdk-trace-node": "^1.19.0", - "@opentelemetry/semantic-conventions": "^1.19.0", - "@types/jest": "^29.5.11", - "@types/node": "^20.12.4", "dotenv": "^16.4.5", "jest": "^29.7.0", "langchain": "^0.1.30", diff --git a/js/packages/openinference-instrumentation-llama-index/examples/instrumentation.ts b/js/packages/openinference-instrumentation-llama-index/examples/instrumentation.ts new file mode 100644 index 000000000..cb9c09c8a --- /dev/null +++ b/js/packages/openinference-instrumentation-llama-index/examples/instrumentation.ts @@ -0,0 +1,37 @@ +import { LlamaIndexInstrumentation } from "../src/index"; +import { ConsoleSpanExporter } from "@opentelemetry/sdk-trace-base"; +import { + NodeTracerProvider, + SimpleSpanProcessor, +} from "@opentelemetry/sdk-trace-node"; +import { Resource } from "@opentelemetry/resources"; +import { OTLPTraceExporter } from "@opentelemetry/exporter-trace-otlp-proto"; +import { SEMRESATTRS_SERVICE_NAME } from "@opentelemetry/semantic-conventions"; +import { diag, DiagConsoleLogger, DiagLogLevel } from "@opentelemetry/api"; +import { registerInstrumentations } from "@opentelemetry/instrumentation"; +// For troubleshooting, set the log level to DiagLogLevel.DEBUG +diag.setLogger(new DiagConsoleLogger(), DiagLogLevel.DEBUG); + +const provider = new NodeTracerProvider({ + resource: new Resource({ + [SEMRESATTRS_SERVICE_NAME]: "llama-index-service", + }), +}); + +provider.addSpanProcessor(new SimpleSpanProcessor(new ConsoleSpanExporter())); +provider.addSpanProcessor( + new SimpleSpanProcessor( + new OTLPTraceExporter({ + url: "http://localhost:6006/v1/traces", + }), + ), +); + +registerInstrumentations({ + instrumentations: [new LlamaIndexInstrumentation()], +}); + +provider.register(); + +// eslint-disable-next-line no-console +console.log("👀 OpenInference initialized"); diff --git a/js/packages/openinference-instrumentation-llama-index/examples/llamaindex-node.ts b/js/packages/openinference-instrumentation-llama-index/examples/llamaindex-node.ts new file mode 100644 index 000000000..4943ea832 --- /dev/null +++ b/js/packages/openinference-instrumentation-llama-index/examples/llamaindex-node.ts @@ -0,0 +1,29 @@ +import "./instrumentation"; +import fs from "fs/promises"; +import { Document, VectorStoreIndex } from "llamaindex"; + +async function main() { + // Load essay from abramov.txt in Node + const essay = await fs.readFile( + "node_modules/llamaindex/examples/abramov.txt", + "utf-8", + ); + + // Create Document object with essay + const document = new Document({ text: essay }); + + // Split text and create embeddings. Store them in a VectorStoreIndex + const index = await VectorStoreIndex.fromDocuments([document]); + + // Query the index + const queryEngine = index.asQueryEngine(); + const response = await queryEngine.query({ + query: "What did the author do in college?", + }); + + // Output response + // eslint-disable-next-line no-console + console.log(response.toString()); +} + +main(); diff --git a/js/packages/openinference-instrumentation-llama-index/jest.config.js b/js/packages/openinference-instrumentation-llama-index/jest.config.js index 2fd4f78cf..e470f44e6 100644 --- a/js/packages/openinference-instrumentation-llama-index/jest.config.js +++ b/js/packages/openinference-instrumentation-llama-index/jest.config.js @@ -1,4 +1,5 @@ /** @type {import('ts-jest').JestConfigWithTsJest} */ + module.exports = { preset: "ts-jest", testEnvironment: "node", diff --git a/js/packages/openinference-instrumentation-llama-index/package.json b/js/packages/openinference-instrumentation-llama-index/package.json index a52b5cc34..3ef330a8b 100644 --- a/js/packages/openinference-instrumentation-llama-index/package.json +++ b/js/packages/openinference-instrumentation-llama-index/package.json @@ -11,14 +11,19 @@ "prebuild": "rimraf dist & pnpm run version:update", "build": "tsc --build tsconfig.json tsconfig.esm.json tsconfig.esnext.json", "version:update": "../../scripts/version-update.js", - "type:check": "tsc --noEmit" + "type:check": "tsc --noEmit", + "test": "jest" }, "keywords": [], "author": "oss-devs@arize.com", "license": "Apache-2.0", "dependencies": { + "@arizeai/openinference-semantic-conventions": "workspace:*", "@opentelemetry/api": "^1.7.0", - "@opentelemetry/instrumentation": "^0.46.0", - "@arizeai/openinference-semantic-conventions": "workspace:*" + "@opentelemetry/core": "^1.23.0", + "@opentelemetry/instrumentation": "^0.46.0" + }, + "devDependencies": { + "llamaindex": "^0.3.14" } } diff --git a/js/packages/openinference-instrumentation-llama-index/src/index.ts b/js/packages/openinference-instrumentation-llama-index/src/index.ts index e69de29bb..d2e29c758 100644 --- a/js/packages/openinference-instrumentation-llama-index/src/index.ts +++ b/js/packages/openinference-instrumentation-llama-index/src/index.ts @@ -0,0 +1 @@ +export * from "./instrumentation"; diff --git a/js/packages/openinference-instrumentation-llama-index/src/instrumentation.ts b/js/packages/openinference-instrumentation-llama-index/src/instrumentation.ts new file mode 100644 index 000000000..ccee4ce07 --- /dev/null +++ b/js/packages/openinference-instrumentation-llama-index/src/instrumentation.ts @@ -0,0 +1,158 @@ +/* eslint-disable @typescript-eslint/no-explicit-any */ +import type * as llamaindex from "llamaindex"; + +import { + InstrumentationBase, + InstrumentationConfig, + InstrumentationModuleDefinition, + InstrumentationNodeModuleDefinition, + safeExecuteInTheMiddle, +} from "@opentelemetry/instrumentation"; +import { VERSION } from "./version"; +import { + Span, + SpanKind, + SpanStatusCode, + context, + diag, + trace, +} from "@opentelemetry/api"; +import { isTracingSuppressed } from "@opentelemetry/core"; + +const MODULE_NAME = "llamaindex"; + +/** + * Flag to check if the LlamaIndex module has been patched + * Note: This is a fallback in case the module is made immutable (e.x. Deno, webpack, etc.) + */ +let _isOpenInferencePatched = false; + +/** + * function to check if instrumentation is enabled / disabled + */ +export function isPatched() { + return _isOpenInferencePatched; +} + +import { + OpenInferenceSpanKind, + SemanticConventions, +} from "@arizeai/openinference-semantic-conventions"; + +/** + * Resolves the execution context for the current span + * If tracing is suppressed, the span is dropped and the current context is returned + * @param span + */ +function getExecContext(span: Span) { + const activeContext = context.active(); + const suppressTracing = isTracingSuppressed(activeContext); + const execContext = suppressTracing + ? trace.setSpan(context.active(), span) + : activeContext; + // Drop the span from the context + if (suppressTracing) { + trace.deleteSpan(activeContext); + } + return execContext; +} +export class LlamaIndexInstrumentation extends InstrumentationBase< + typeof llamaindex +> { + constructor(config?: InstrumentationConfig) { + super( + "@arizeai/openinference-instrumentation-llama-index", + VERSION, + Object.assign({}, config), + ); + } + manuallyInstrument(module: typeof llamaindex) { + diag.debug(`Manually instrumenting ${MODULE_NAME}`); + this.patch(module); + } + + protected init(): InstrumentationModuleDefinition { + const module = new InstrumentationNodeModuleDefinition( + "llamaindex", + [">=0.1.0"], + this.patch.bind(this), + this.unpatch.bind(this), + ); + return module; + } + + private patch(moduleExports: typeof llamaindex, moduleVersion?: string) { + this._diag.debug(`Applying patch for ${MODULE_NAME}@${moduleVersion}`); + if (_isOpenInferencePatched) { + return moduleExports; + } + + // eslint-disable-next-line @typescript-eslint/no-this-alias + const instrumentation: LlamaIndexInstrumentation = this; + + type RetrieverQueryEngineQueryType = + typeof moduleExports.RetrieverQueryEngine.prototype.query; + + this._wrap( + moduleExports.RetrieverQueryEngine.prototype, + "query", + (original: RetrieverQueryEngineQueryType): any => { + return function patchedQuery( + this: unknown, + ...args: Parameters + ) { + const span = instrumentation.tracer.startSpan(`Query`, { + kind: SpanKind.INTERNAL, + attributes: { + [SemanticConventions.OPENINFERENCE_SPAN_KIND]: + OpenInferenceSpanKind.CHAIN, + [SemanticConventions.INPUT_VALUE]: args[0].query, + }, + }); + + const execContext = getExecContext(span); + + const execPromise = safeExecuteInTheMiddle< + ReturnType + >( + () => { + return context.with(execContext, () => { + return original.apply(this, args); + }); + }, + (error) => { + // Push the error to the span + if (error) { + span.recordException(error); + span.setStatus({ + code: SpanStatusCode.ERROR, + message: error.message, + }); + span.end(); + } + }, + ); + const wrappedPromise = execPromise.then((result) => { + span.setAttributes({ + [SemanticConventions.OUTPUT_VALUE]: result.response, + }); + span.end(); + return result; + }); + return context.bind(execContext, wrappedPromise); + }; + }, + ); + + _isOpenInferencePatched = true; + + return moduleExports; + } + + private unpatch(moduleExports: typeof llamaindex, moduleVersion?: string) { + this._diag.debug(`Un-patching ${MODULE_NAME}@${moduleVersion}`); + this._unwrap(moduleExports.RetrieverQueryEngine.prototype, "query"); + + _isOpenInferencePatched = false; + } +} diff --git a/js/packages/openinference-instrumentation-llama-index/test/llamaIndex.test.ts b/js/packages/openinference-instrumentation-llama-index/test/llamaIndex.test.ts index d17b3a81e..4719e10c9 100644 --- a/js/packages/openinference-instrumentation-llama-index/test/llamaIndex.test.ts +++ b/js/packages/openinference-instrumentation-llama-index/test/llamaIndex.test.ts @@ -1,8 +1,118 @@ -/** - * Dummy test for scaffolding package, remove when real tests are added - */ +import { + InMemorySpanExporter, + SimpleSpanProcessor, +} from "@opentelemetry/sdk-trace-base"; +import { LlamaIndexInstrumentation, isPatched } from "../src/index"; +import { NodeTracerProvider } from "@opentelemetry/sdk-trace-node"; +import * as llamaindex from "llamaindex"; + +const { Document, VectorStoreIndex } = llamaindex; + +const DUMMY_RESPONSE = "lorem ipsum"; + +const tracerProvider = new NodeTracerProvider(); +tracerProvider.register(); + +const instrumentation = new LlamaIndexInstrumentation(); +instrumentation.disable(); describe("llamaIndex", () => { it("should pass", () => { expect(true).toBe(true); }); }); + +describe("LlamaIndexInstrumentation", () => { + const memoryExporter = new InMemorySpanExporter(); + const spanProcessor = new SimpleSpanProcessor(memoryExporter); + instrumentation.setTracerProvider(tracerProvider); + + tracerProvider.addSpanProcessor(spanProcessor); + // @ts-expect-error the moduleExports property is private. This is needed to make the test work with auto-mocking + instrumentation._modules[0].moduleExports = llamaindex; + + let openAISpy: jest.SpyInstance; + let openAITextEmbedSpy: jest.SpyInstance; + let openAIQueryEmbedSpy: jest.SpyInstance; + beforeAll(() => { + instrumentation.enable(); + + // Setup the OPENAI_API_KEY + process.env["OPENAI_API_KEY"] = "fake-api-key"; + }); + afterAll(() => { + instrumentation.disable(); + // Delete the OPENAI_API_KEY + delete process.env["OPENAI_API_KEY"]; + }); + beforeEach(() => { + memoryExporter.reset(); + + // Use OpenAI and mock out the calls + const response: llamaindex.ChatResponse = + { + message: { + content: DUMMY_RESPONSE, + role: "assistant", + }, + raw: null, + }; + // Mock out the chat completions endpoint + openAISpy = jest + .spyOn(llamaindex.OpenAI.prototype, "chat") + .mockImplementation(() => { + return Promise.resolve(response); + }); + + // Mock out the embeddings response to size 1536 (ada-2) + const fakeEmbedding = Array(1536).fill(0); + // Mock out the embeddings endpoint + openAITextEmbedSpy = jest + .spyOn(llamaindex.OpenAIEmbedding.prototype, "getTextEmbeddings") + .mockImplementation(() => { + return Promise.resolve([fakeEmbedding]); + }); + + openAIQueryEmbedSpy = jest + .spyOn(llamaindex.OpenAIEmbedding.prototype, "getQueryEmbedding") + .mockImplementation(() => { + return Promise.resolve(fakeEmbedding); + }); + }); + afterEach(() => { + jest.clearAllMocks(); + openAISpy.mockRestore(); + openAIQueryEmbedSpy.mockRestore(); + openAITextEmbedSpy.mockRestore(); + }); + it("is patched", () => { + expect(isPatched()).toBe(true); + }); + it("should create a span for query engines", async () => { + // Create Document object with essay + const document = new Document({ text: "lorem ipsum" }); + + // Split text and create embeddings. Store them in a VectorStoreIndex + const index = await VectorStoreIndex.fromDocuments([document]); + + // Query the index + const queryEngine = index.asQueryEngine(); + const response = await queryEngine.query({ + query: "What did the author do in college?", + }); + + // Verify that the OpenAI chat method was called once during synthesis + expect(openAISpy).toHaveBeenCalledTimes(1); + expect(openAIQueryEmbedSpy).toHaveBeenCalledTimes(1); + expect(openAITextEmbedSpy).toHaveBeenCalledTimes(1); + + // Output response + expect(response.response).toEqual(DUMMY_RESPONSE); + + const spans = memoryExporter.getFinishedSpans(); + expect(spans.length).toBeGreaterThan(0); + + // Expect a span for the query engine + const queryEngineSpan = spans.find((span) => span.name.includes("Query")); + expect(queryEngineSpan).toBeDefined(); + }); +}); diff --git a/js/packages/openinference-instrumentation-openai/package.json b/js/packages/openinference-instrumentation-openai/package.json index f8a638489..121962077 100644 --- a/js/packages/openinference-instrumentation-openai/package.json +++ b/js/packages/openinference-instrumentation-openai/package.json @@ -32,10 +32,6 @@ "author": "oss-devs@arize.com", "license": "Apache-2.0", "devDependencies": { - "@opentelemetry/resources": "^1.19.0", - "@opentelemetry/sdk-trace-base": "^1.19.0", - "@opentelemetry/sdk-trace-node": "^1.19.0", - "@opentelemetry/semantic-conventions": "^1.19.0", "openai": "^4.24.1" } } diff --git a/js/pnpm-lock.yaml b/js/pnpm-lock.yaml index 271b0c735..3a10f1469 100644 --- a/js/pnpm-lock.yaml +++ b/js/pnpm-lock.yaml @@ -11,9 +11,27 @@ importers: '@changesets/cli': specifier: ^2.27.1 version: 2.27.1 + '@opentelemetry/exporter-trace-otlp-proto': + specifier: ^0.50.0 + version: 0.50.0(@opentelemetry/api@1.7.0) + '@opentelemetry/resources': + specifier: ^1.20.0 + version: 1.23.0(@opentelemetry/api@1.7.0) + '@opentelemetry/sdk-trace-base': + specifier: ^1.24.1 + version: 1.24.1(@opentelemetry/api@1.7.0) + '@opentelemetry/sdk-trace-node': + specifier: ^1.24.1 + version: 1.24.1(@opentelemetry/api@1.7.0) + '@opentelemetry/semantic-conventions': + specifier: ^1.24.1 + version: 1.24.1 '@types/jest': specifier: ^29.5.11 version: 29.5.11 + '@types/node': + specifier: ^20.12.4 + version: 20.12.12 '@typescript-eslint/eslint-plugin': specifier: ^6.17.0 version: 6.17.0(@typescript-eslint/parser@6.17.0)(eslint@8.56.0)(typescript@5.3.3) @@ -25,7 +43,7 @@ importers: version: 8.56.0 jest: specifier: ^29.7.0 - version: 29.7.0(@types/node@20.12.4) + version: 29.7.0(@types/node@20.12.12) prettier: specifier: ^3.1.1 version: 3.1.1 @@ -60,33 +78,12 @@ importers: '@langchain/openai': specifier: ^0.0.25 version: 0.0.25 - '@opentelemetry/exporter-trace-otlp-proto': - specifier: ^0.50.0 - version: 0.50.0(@opentelemetry/api@1.7.0) - '@opentelemetry/resources': - specifier: ^1.19.0 - version: 1.19.0(@opentelemetry/api@1.7.0) - '@opentelemetry/sdk-trace-base': - specifier: ^1.19.0 - version: 1.19.0(@opentelemetry/api@1.7.0) - '@opentelemetry/sdk-trace-node': - specifier: ^1.19.0 - version: 1.19.0(@opentelemetry/api@1.7.0) - '@opentelemetry/semantic-conventions': - specifier: ^1.19.0 - version: 1.23.0 - '@types/jest': - specifier: ^29.5.11 - version: 29.5.11 - '@types/node': - specifier: ^20.12.4 - version: 20.12.4 dotenv: specifier: ^16.4.5 version: 16.4.5 jest: specifier: ^29.7.0 - version: 29.7.0(@types/node@20.12.4) + version: 29.7.0(@types/node@20.12.12) langchain: specifier: ^0.1.30 version: 0.1.30 @@ -102,9 +99,16 @@ importers: '@opentelemetry/api': specifier: ^1.7.0 version: 1.7.0 + '@opentelemetry/core': + specifier: ^1.23.0 + version: 1.23.0(@opentelemetry/api@1.7.0) '@opentelemetry/instrumentation': specifier: ^0.46.0 version: 0.46.0(@opentelemetry/api@1.7.0) + devDependencies: + llamaindex: + specifier: ^0.3.14 + version: 0.3.14(@notionhq/client@2.2.15)(typescript@5.3.3) packages/openinference-instrumentation-openai: dependencies: @@ -121,18 +125,6 @@ importers: specifier: ^0.46.0 version: 0.46.0(@opentelemetry/api@1.7.0) devDependencies: - '@opentelemetry/resources': - specifier: ^1.19.0 - version: 1.19.0(@opentelemetry/api@1.7.0) - '@opentelemetry/sdk-trace-base': - specifier: ^1.19.0 - version: 1.19.0(@opentelemetry/api@1.7.0) - '@opentelemetry/sdk-trace-node': - specifier: ^1.19.0 - version: 1.19.0(@opentelemetry/api@1.7.0) - '@opentelemetry/semantic-conventions': - specifier: ^1.19.0 - version: 1.19.0 openai: specifier: ^4.24.1 version: 4.24.1 @@ -154,6 +146,21 @@ packages: '@jridgewell/trace-mapping': 0.3.20 dev: true + /@anthropic-ai/sdk@0.20.9: + resolution: {integrity: sha512-Lq74+DhiEQO6F9/gdVOLmHx57pX45ebK2Q/zH14xYe1157a7QeUVknRqIp0Jz5gQI01o7NKbuv9Dag2uQsLjDg==} + dependencies: + '@types/node': 18.19.3 + '@types/node-fetch': 2.6.9 + abort-controller: 3.0.0 + agentkeepalive: 4.5.0 + form-data-encoder: 1.7.2 + formdata-node: 4.4.1 + node-fetch: 2.7.0(encoding@0.1.13) + web-streams-polyfill: 3.2.1 + transitivePeerDependencies: + - encoding + dev: true + /@anthropic-ai/sdk@0.9.1: resolution: {integrity: sha512-wa1meQ2WSfoY8Uor3EdrJq0jTiZJoKoSii2ZVWRY1oN4Tlr5s59pADg9T79FTbPe1/se5c3pBeZgJL63wmuoBA==} dependencies: @@ -164,12 +171,37 @@ packages: digest-fetch: 1.3.0 form-data-encoder: 1.7.2 formdata-node: 4.4.1 - node-fetch: 2.7.0 + node-fetch: 2.7.0(encoding@0.1.13) web-streams-polyfill: 3.2.1 transitivePeerDependencies: - encoding dev: true + /@aws-crypto/sha256-js@5.2.0: + resolution: {integrity: sha512-FFQQyu7edu4ufvIZ+OadFpHHOt+eSTBaYaki44c+akjg7qZg9oOQeLlk77F6tSYqjDAFClrHJk9tMf0HdVyOvA==} + engines: {node: '>=16.0.0'} + dependencies: + '@aws-crypto/util': 5.2.0 + '@aws-sdk/types': 3.577.0 + tslib: 2.6.2 + dev: true + + /@aws-crypto/util@5.2.0: + resolution: {integrity: sha512-4RkU9EsI6ZpBve5fseQlGNUWKMa1RLPQ1dnjnQoe07ldfIzcsGb5hC5W0Dm7u423KWzawlrpbjXBrXCEv9zazQ==} + dependencies: + '@aws-sdk/types': 3.577.0 + '@smithy/util-utf8': 2.3.0 + tslib: 2.6.2 + dev: true + + /@aws-sdk/types@3.577.0: + resolution: {integrity: sha512-FT2JZES3wBKN/alfmhlo+3ZOq/XJ0C7QOZcDNrpKjB0kqYoKjhVKZ/Hx6ArR0czkKfHzBBEs6y40ebIHx2nSmA==} + engines: {node: '>=16.0.0'} + dependencies: + '@smithy/types': 3.0.0 + tslib: 2.6.2 + dev: true + /@babel/code-frame@7.23.5: resolution: {integrity: sha512-CgH3s1a96LipHCmSUmYFPwY7MNx8C3avkq7i4Wl3cfa662ldtUe4VM1TPXX70pfmrlWTb6jLqTYrZyT2ZTJBgA==} engines: {node: '>=6.9.0'} @@ -689,6 +721,30 @@ packages: prettier: 2.8.8 dev: true + /@colors/colors@1.6.0: + resolution: {integrity: sha512-Ir+AOibqzrIsL6ajt3Rz3LskB7OiMVHqltZmspbW/TJuTVuyOMirVqAkjfY6JISiLHgyNqicAC8AyHHGzNd/dA==} + engines: {node: '>=0.1.90'} + dev: true + + /@dabh/diagnostics@2.0.3: + resolution: {integrity: sha512-hrlQOIi7hAfzsMqlGSFyVucrx38O+j6wiGOf//H2ecvIEqYN4ADBSS2iLMh5UFyDunCNniUIPk/q3riFv45xRA==} + dependencies: + colorspace: 1.1.4 + enabled: 2.0.0 + kuler: 2.0.0 + dev: true + + /@datastax/astra-db-ts@1.2.0: + resolution: {integrity: sha512-2gdA9WfolBlUudxgIEYQctQ/XLlUZNS2Qd3EftcFbWCsnpUB6/A0uihTdO4i5BZsTUqbQqWEw8oARfuP7uue/Q==} + engines: {node: '>=14.0.0'} + dependencies: + bson-objectid: 2.0.4 + fetch-h2: 3.0.2 + object-hash: 3.0.0 + typed-emitter: 2.1.0 + uuidv7: 0.6.3 + dev: true + /@eslint-community/eslint-utils@4.4.0(eslint@8.56.0): resolution: {integrity: sha512-1/sA4dwrzBAyeUoQ6oxahHKmrZvsnLCg4RfxW3ZFGGmQkSNQPFNLV9CUEFQP1x9EYXHTo5p6xdhZM1Ne9p/AfA==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} @@ -726,6 +782,61 @@ packages: engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} dev: true + /@fastify/busboy@2.1.1: + resolution: {integrity: sha512-vBZP4NlzfOlerQTnba4aqZoMhE/a9HY7HRqoOPaETQcSQuWEIyZMHGfVu6w9wGtGK5fED5qRs2DteVCjOH60sA==} + engines: {node: '>=14'} + dev: true + + /@google-cloud/vertexai@1.2.0: + resolution: {integrity: sha512-EH0dnoMRIBQzJEEOUWN03eWPSdLBFdsZA/am3eU+qYrnNyY9okUueOajZd79U48KwgFbqoFrCA9yHQ30DgfD8Q==} + engines: {node: '>=18.0.0'} + dependencies: + google-auth-library: 9.10.0 + transitivePeerDependencies: + - encoding + - supports-color + dev: true + + /@google/generative-ai@0.11.4: + resolution: {integrity: sha512-hlw+E9Prv9aUIQISRnLSXi4rukFqKe5WhxPvzBccTvIvXjw2BHMFOJWSC/Gq7WE0W+L/qRHGmYxopmx9qjrB9w==} + engines: {node: '>=18.0.0'} + dev: true + + /@grpc/grpc-js@1.10.8: + resolution: {integrity: sha512-vYVqYzHicDqyKB+NQhAc54I1QWCBLCrYG6unqOIcBTHx+7x8C9lcoLj3KVJXs2VB4lUbpWY+Kk9NipcbXYWmvg==} + engines: {node: '>=12.10.0'} + dependencies: + '@grpc/proto-loader': 0.7.13 + '@js-sdsl/ordered-map': 4.4.2 + dev: true + + /@grpc/proto-loader@0.7.13: + resolution: {integrity: sha512-AiXO/bfe9bmxBjxxtYxFAXGZvMaN5s8kO+jBHAJCON8rJoB5YS/D6X7ZNc6XQkuHNmyl4CYaMI1fJ/Gn27RGGw==} + engines: {node: '>=6'} + hasBin: true + dependencies: + lodash.camelcase: 4.3.0 + long: 5.2.3 + protobufjs: 7.2.6 + yargs: 17.7.2 + dev: true + + /@huggingface/inference@2.7.0: + resolution: {integrity: sha512-u7Fn637Q3f7nUB1tajM4CgzhvoFQkOQr5W5Fm+2wT9ETgGoLBh25BLlYPTJRjAd2WY01s71v0lqAwNvHHCc3mg==} + engines: {node: '>=18'} + dependencies: + '@huggingface/tasks': 0.10.8 + dev: true + + /@huggingface/jinja@0.2.2: + resolution: {integrity: sha512-/KPde26khDUIPkTGU82jdtTW9UAuvUTumCAbFs/7giR0SxsvZC4hru51PBvpijH6BVkHcROcvZM/lpy5h1jRRA==} + engines: {node: '>=18'} + dev: true + + /@huggingface/tasks@0.10.8: + resolution: {integrity: sha512-oIp9912FwByyyyxkB/CIiW203QxPeYzBG7dydLmqZdcW0ma0if1uklGumqkJ6y/rJlv7AR/jJ9wbee0Wl5YZTw==} + dev: true + /@humanwhocodes/config-array@0.11.13: resolution: {integrity: sha512-JSBDMiDKSzQVngfRjOdFXgFfklaXI4K9nLF49Auh21lmBWRLIK3+xTErTWD4KU54pb6coM6ESE7Awz/FNU3zgQ==} engines: {node: '>=10.10.0'} @@ -779,7 +890,7 @@ packages: engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} dependencies: '@jest/types': 29.6.3 - '@types/node': 20.12.4 + '@types/node': 20.12.12 chalk: 4.1.2 jest-message-util: 29.7.0 jest-util: 29.7.0 @@ -800,14 +911,14 @@ packages: '@jest/test-result': 29.7.0 '@jest/transform': 29.7.0 '@jest/types': 29.6.3 - '@types/node': 20.12.4 + '@types/node': 20.12.12 ansi-escapes: 4.3.2 chalk: 4.1.2 ci-info: 3.9.0 exit: 0.1.2 graceful-fs: 4.2.11 jest-changed-files: 29.7.0 - jest-config: 29.7.0(@types/node@20.12.4) + jest-config: 29.7.0(@types/node@20.12.12) jest-haste-map: 29.7.0 jest-message-util: 29.7.0 jest-regex-util: 29.6.3 @@ -835,7 +946,7 @@ packages: dependencies: '@jest/fake-timers': 29.7.0 '@jest/types': 29.6.3 - '@types/node': 20.12.4 + '@types/node': 20.12.12 jest-mock: 29.7.0 dev: true @@ -862,7 +973,7 @@ packages: dependencies: '@jest/types': 29.6.3 '@sinonjs/fake-timers': 10.3.0 - '@types/node': 20.12.4 + '@types/node': 20.12.12 jest-message-util: 29.7.0 jest-mock: 29.7.0 jest-util: 29.7.0 @@ -895,7 +1006,7 @@ packages: '@jest/transform': 29.7.0 '@jest/types': 29.6.3 '@jridgewell/trace-mapping': 0.3.20 - '@types/node': 20.12.4 + '@types/node': 20.12.12 chalk: 4.1.2 collect-v8-coverage: 1.0.2 exit: 0.1.2 @@ -983,7 +1094,7 @@ packages: '@jest/schemas': 29.6.3 '@types/istanbul-lib-coverage': 2.0.6 '@types/istanbul-reports': 3.0.4 - '@types/node': 20.12.4 + '@types/node': 20.12.12 '@types/yargs': 17.0.32 chalk: 4.1.2 dev: true @@ -1018,6 +1129,10 @@ packages: '@jridgewell/sourcemap-codec': 1.4.15 dev: true + /@js-sdsl/ordered-map@4.4.2: + resolution: {integrity: sha512-iUKgm52T8HOE/makSxjqoWhe95ZJA1/G1sYsGev2JDKUSS14KAgg1LHb+Ba+IPow0xflbnSkOsZcO08C7w1gYw==} + dev: true + /@langchain/community@0.0.44: resolution: {integrity: sha512-II9Hz90jJmfWRICtxTg1auQWzFw0npqacWiiOpaxNhzs6rptdf56gyfC48Z6n1ii4R8FfAlfX6YxhOE7lGGKXg==} engines: {node: '>=18'} @@ -1339,6 +1454,37 @@ packages: - encoding dev: true + /@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.15 + form-data: 4.0.0 + js-base64: 3.7.7 + qs: 6.12.1 + dev: true + + /@llamaindex/env@0.1.3(@aws-crypto/sha256-js@5.2.0)(pathe@1.1.2): + resolution: {integrity: sha512-PM9cZ8x6jjdugWG30vBxb9Ju2LFmGY0l0pN7AUXXKULFNytQddx96xHh07pV/juf/WqjhFp75FVAykAlqO/qzQ==} + peerDependencies: + '@aws-crypto/sha256-js': ^5.2.0 + pathe: ^1.1.2 + peerDependenciesMeta: + '@aws-crypto/sha256-js': + optional: true + pathe: + optional: true + dependencies: + '@aws-crypto/sha256-js': 5.2.0 + '@types/lodash': 4.17.4 + '@types/node': 20.12.12 + pathe: 1.1.2 + dev: true + /@manypkg/find-root@1.1.0: resolution: {integrity: sha512-mki5uBvhHzO8kYYix/WRy2WX8S3B5wdVSc9D6KcU5lQNglP2yt58/VfLuAK49glRXChosY8ap2oJ1qgma3GUVA==} dependencies: @@ -1359,6 +1505,20 @@ packages: read-yaml-file: 1.1.0 dev: true + /@mistralai/mistralai@0.2.0: + resolution: {integrity: sha512-mYjE9NovwWdhSXd6KvOgjWUyka2qlxhuohsqhRN4rFtH2MdTDJhAeH3Aqvu3P9q71Xz9oBX2pNWrPVVzkgwZTg==} + dependencies: + node-fetch: 2.7.0(encoding@0.1.13) + transitivePeerDependencies: + - encoding + dev: true + + /@mongodb-js/saslprep@1.1.7: + resolution: {integrity: sha512-dCHW/oEX0KJ4NjDULBo3JiOaK5+6axtpBbS+ao2ZInoAL9/YRQLhXzSNAFz7hP4nzLkIqsfYAK/PDE3+XHny0Q==} + dependencies: + sparse-bitfield: 3.0.3 + dev: true + /@nodelib/fs.scandir@2.1.5: resolution: {integrity: sha512-vq24Bq3ym5HEQm2NKCr3yXDwjc7vTsEThRDnkp2DK9p1uqLR+DHurm/NOTo0KG7HYHU7eppKZj3MyqYuMBf62g==} engines: {node: '>= 8'} @@ -1380,6 +1540,16 @@ packages: fastq: 1.16.0 dev: true + /@notionhq/client@2.2.15: + resolution: {integrity: sha512-XhdSY/4B1D34tSco/GION+23GMjaS9S2zszcqYkMHo8RcWInymF6L1x+Gk7EmHdrSxNFva2WM8orhC4BwQCwgw==} + engines: {node: '>=12'} + dependencies: + '@types/node-fetch': 2.6.9 + node-fetch: 2.7.0(encoding@0.1.13) + transitivePeerDependencies: + - encoding + dev: true + /@opentelemetry/api-logs@0.50.0: resolution: {integrity: sha512-JdZuKrhOYggqOpUljAq4WWNi5nB10PmgoF0y2CvedLGXd0kSawb/UBnWT8gg1ND3bHCNHStAIVT0ELlxJJRqrA==} engines: {node: '>=14'} @@ -1391,33 +1561,33 @@ packages: resolution: {integrity: sha512-AdY5wvN0P2vXBi3b29hxZgSFvdhdxPB9+f0B6s//P9Q8nibRWeA3cHm8UmLpio9ABigkVHJ5NMPk+Mz8VCCyrw==} engines: {node: '>=8.0.0'} - /@opentelemetry/context-async-hooks@1.19.0(@opentelemetry/api@1.7.0): - resolution: {integrity: sha512-0i1ECOc9daKK3rjUgDDXf0GDD5XfCou5lXnt2DALIc2qKoruPPcesobNKE54laSVUWnC3jX26RzuOa31g0V32A==} + /@opentelemetry/context-async-hooks@1.24.1(@opentelemetry/api@1.7.0): + resolution: {integrity: sha512-R5r6DO4kgEOVBxFXhXjwospLQkv+sYxwCfjvoZBe7Zm6KKXAV9kDSJhi/D1BweowdZmO+sdbENLs374gER8hpQ==} engines: {node: '>=14'} peerDependencies: - '@opentelemetry/api': '>=1.0.0 <1.8.0' + '@opentelemetry/api': '>=1.0.0 <1.9.0' dependencies: '@opentelemetry/api': 1.7.0 dev: true - /@opentelemetry/core@1.19.0(@opentelemetry/api@1.7.0): - resolution: {integrity: sha512-w42AukJh3TP8R0IZZOVJVM/kMWu8g+lm4LzT70WtuKqhwq7KVhcDzZZuZinWZa6TtQCl7Smt2wolEYzpHabOgw==} + /@opentelemetry/core@1.23.0(@opentelemetry/api@1.7.0): + resolution: {integrity: sha512-hdQ/a9TMzMQF/BO8Cz1juA43/L5YGtCSiKoOHmrTEf7VMDAZgy8ucpWx3eQTnQ3gBloRcWtzvcrMZABC3PTSKQ==} engines: {node: '>=14'} peerDependencies: - '@opentelemetry/api': '>=1.0.0 <1.8.0' + '@opentelemetry/api': '>=1.0.0 <1.9.0' dependencies: '@opentelemetry/api': 1.7.0 - '@opentelemetry/semantic-conventions': 1.19.0 - dev: true + '@opentelemetry/semantic-conventions': 1.23.0 - /@opentelemetry/core@1.23.0(@opentelemetry/api@1.7.0): - resolution: {integrity: sha512-hdQ/a9TMzMQF/BO8Cz1juA43/L5YGtCSiKoOHmrTEf7VMDAZgy8ucpWx3eQTnQ3gBloRcWtzvcrMZABC3PTSKQ==} + /@opentelemetry/core@1.24.1(@opentelemetry/api@1.7.0): + resolution: {integrity: sha512-wMSGfsdmibI88K9wB498zXY04yThPexo8jvwNNlm542HZB7XrrMRBbAyKJqG8qDRJwIBdBrPMi4V9ZPW/sqrcg==} engines: {node: '>=14'} peerDependencies: '@opentelemetry/api': '>=1.0.0 <1.9.0' dependencies: '@opentelemetry/api': 1.7.0 - '@opentelemetry/semantic-conventions': 1.23.0 + '@opentelemetry/semantic-conventions': 1.24.1 + dev: true /@opentelemetry/exporter-trace-otlp-proto@0.50.0(@opentelemetry/api@1.7.0): resolution: {integrity: sha512-vavD9Ow6yOLiD+ocuS/oeciCsXNdsN41aYUrEljNaLXogvnkfMhJ+JLAhOnRSpzlVtRp7Ciw2BYGdYSebR0OsA==} @@ -1487,46 +1657,46 @@ packages: '@opentelemetry/sdk-trace-base': 1.23.0(@opentelemetry/api@1.7.0) dev: true - /@opentelemetry/propagator-b3@1.19.0(@opentelemetry/api@1.7.0): - resolution: {integrity: sha512-v7y5IBOKBm0vP3yf0DHzlw4L2gL6tZ0KeeMTaxfO5IuomMffDbrGWcvYFp0Dt4LdZctTSK523rVLBB9FBHBciQ==} + /@opentelemetry/propagator-b3@1.24.1(@opentelemetry/api@1.7.0): + resolution: {integrity: sha512-nda97ZwhpZKyUJTXqQuKzNhPMUgMLunbbGWn8kroBwegn+nh6OhtyGkrVQsQLNdVKJl0KeB5z0ZgeWszrYhwFw==} engines: {node: '>=14'} peerDependencies: - '@opentelemetry/api': '>=1.0.0 <1.8.0' + '@opentelemetry/api': '>=1.0.0 <1.9.0' dependencies: '@opentelemetry/api': 1.7.0 - '@opentelemetry/core': 1.19.0(@opentelemetry/api@1.7.0) + '@opentelemetry/core': 1.24.1(@opentelemetry/api@1.7.0) dev: true - /@opentelemetry/propagator-jaeger@1.19.0(@opentelemetry/api@1.7.0): - resolution: {integrity: sha512-dedkOoTzKg+nYoLWCMp0Im+wo+XkTRW6aXhi8VQRtMW/9SNJGOllCJSu8llToLxMDF0+6zu7OCrKkevAof2tew==} + /@opentelemetry/propagator-jaeger@1.24.1(@opentelemetry/api@1.7.0): + resolution: {integrity: sha512-7bRBJn3FG1l195A1m+xXRHvgzAOBsfmRi9uZ5Da18oTh7BLmNDiA8+kpk51FpTsU1PCikPVpRDNPhKVB6lyzZg==} engines: {node: '>=14'} peerDependencies: - '@opentelemetry/api': '>=1.0.0 <1.8.0' + '@opentelemetry/api': '>=1.0.0 <1.9.0' dependencies: '@opentelemetry/api': 1.7.0 - '@opentelemetry/core': 1.19.0(@opentelemetry/api@1.7.0) + '@opentelemetry/core': 1.24.1(@opentelemetry/api@1.7.0) dev: true - /@opentelemetry/resources@1.19.0(@opentelemetry/api@1.7.0): - resolution: {integrity: sha512-RgxvKuuMOf7nctOeOvpDjt2BpZvZGr9Y0vf7eGtY5XYZPkh2p7e2qub1S2IArdBMf9kEbz0SfycqCviOu9isqg==} + /@opentelemetry/resources@1.23.0(@opentelemetry/api@1.7.0): + resolution: {integrity: sha512-iPRLfVfcEQynYGo7e4Di+ti+YQTAY0h5mQEUJcHlU9JOqpb4x965O6PZ+wMcwYVY63G96KtdS86YCM1BF1vQZg==} engines: {node: '>=14'} peerDependencies: - '@opentelemetry/api': '>=1.0.0 <1.8.0' + '@opentelemetry/api': '>=1.0.0 <1.9.0' dependencies: '@opentelemetry/api': 1.7.0 - '@opentelemetry/core': 1.19.0(@opentelemetry/api@1.7.0) - '@opentelemetry/semantic-conventions': 1.19.0 + '@opentelemetry/core': 1.23.0(@opentelemetry/api@1.7.0) + '@opentelemetry/semantic-conventions': 1.23.0 dev: true - /@opentelemetry/resources@1.23.0(@opentelemetry/api@1.7.0): - resolution: {integrity: sha512-iPRLfVfcEQynYGo7e4Di+ti+YQTAY0h5mQEUJcHlU9JOqpb4x965O6PZ+wMcwYVY63G96KtdS86YCM1BF1vQZg==} + /@opentelemetry/resources@1.24.1(@opentelemetry/api@1.7.0): + resolution: {integrity: sha512-cyv0MwAaPF7O86x5hk3NNgenMObeejZFLJJDVuSeSMIsknlsj3oOZzRv3qSzlwYomXsICfBeFFlxwHQte5mGXQ==} engines: {node: '>=14'} peerDependencies: '@opentelemetry/api': '>=1.0.0 <1.9.0' dependencies: '@opentelemetry/api': 1.7.0 - '@opentelemetry/core': 1.23.0(@opentelemetry/api@1.7.0) - '@opentelemetry/semantic-conventions': 1.23.0 + '@opentelemetry/core': 1.24.1(@opentelemetry/api@1.7.0) + '@opentelemetry/semantic-conventions': 1.24.1 dev: true /@opentelemetry/sdk-logs@0.50.0(@opentelemetry/api-logs@0.50.0)(@opentelemetry/api@1.7.0): @@ -1554,18 +1724,6 @@ packages: lodash.merge: 4.6.2 dev: true - /@opentelemetry/sdk-trace-base@1.19.0(@opentelemetry/api@1.7.0): - resolution: {integrity: sha512-+IRvUm+huJn2KqfFW3yW/cjvRwJ8Q7FzYHoUNx5Fr0Lws0LxjMJG1uVB8HDpLwm7mg5XXH2M5MF+0jj5cM8BpQ==} - engines: {node: '>=14'} - peerDependencies: - '@opentelemetry/api': '>=1.0.0 <1.8.0' - dependencies: - '@opentelemetry/api': 1.7.0 - '@opentelemetry/core': 1.19.0(@opentelemetry/api@1.7.0) - '@opentelemetry/resources': 1.19.0(@opentelemetry/api@1.7.0) - '@opentelemetry/semantic-conventions': 1.19.0 - dev: true - /@opentelemetry/sdk-trace-base@1.23.0(@opentelemetry/api@1.7.0): resolution: {integrity: sha512-PzBmZM8hBomUqvCddF/5Olyyviayka44O5nDWq673np3ctnvwMOvNrsUORZjKja1zJbwEuD9niAGbnVrz3jwRQ==} engines: {node: '>=14'} @@ -1578,30 +1736,56 @@ packages: '@opentelemetry/semantic-conventions': 1.23.0 dev: true - /@opentelemetry/sdk-trace-node@1.19.0(@opentelemetry/api@1.7.0): - resolution: {integrity: sha512-TCiEq/cUjM15RFqBRwWomTVbOqzndWL4ILa7ZCu0zbjU1/XY6AgHkgrgAc7vGP6TjRqH4Xryuglol8tcIfbBUQ==} + /@opentelemetry/sdk-trace-base@1.24.1(@opentelemetry/api@1.7.0): + resolution: {integrity: sha512-zz+N423IcySgjihl2NfjBf0qw1RWe11XIAWVrTNOSSI6dtSPJiVom2zipFB2AEEtJWpv0Iz6DY6+TjnyTV5pWg==} engines: {node: '>=14'} peerDependencies: - '@opentelemetry/api': '>=1.0.0 <1.8.0' + '@opentelemetry/api': '>=1.0.0 <1.9.0' dependencies: '@opentelemetry/api': 1.7.0 - '@opentelemetry/context-async-hooks': 1.19.0(@opentelemetry/api@1.7.0) - '@opentelemetry/core': 1.19.0(@opentelemetry/api@1.7.0) - '@opentelemetry/propagator-b3': 1.19.0(@opentelemetry/api@1.7.0) - '@opentelemetry/propagator-jaeger': 1.19.0(@opentelemetry/api@1.7.0) - '@opentelemetry/sdk-trace-base': 1.19.0(@opentelemetry/api@1.7.0) - semver: 7.5.4 + '@opentelemetry/core': 1.24.1(@opentelemetry/api@1.7.0) + '@opentelemetry/resources': 1.24.1(@opentelemetry/api@1.7.0) + '@opentelemetry/semantic-conventions': 1.24.1 dev: true - /@opentelemetry/semantic-conventions@1.19.0: - resolution: {integrity: sha512-14jRpC8f5c0gPSwoZ7SbEJni1PqI+AhAE8m1bMz6v+RPM4OlP1PT2UHBJj5Qh/ALLPjhVU/aZUK3YyjTUqqQVg==} + /@opentelemetry/sdk-trace-node@1.24.1(@opentelemetry/api@1.7.0): + resolution: {integrity: sha512-/FZX8uWaGIAwsDhqI8VvQ+qWtfMNlXjaFYGc+vmxgdRFppCSSIRwrPyIhJO1qx61okyYhoyxVEZAfoiNxrfJCg==} engines: {node: '>=14'} + peerDependencies: + '@opentelemetry/api': '>=1.0.0 <1.9.0' + dependencies: + '@opentelemetry/api': 1.7.0 + '@opentelemetry/context-async-hooks': 1.24.1(@opentelemetry/api@1.7.0) + '@opentelemetry/core': 1.24.1(@opentelemetry/api@1.7.0) + '@opentelemetry/propagator-b3': 1.24.1(@opentelemetry/api@1.7.0) + '@opentelemetry/propagator-jaeger': 1.24.1(@opentelemetry/api@1.7.0) + '@opentelemetry/sdk-trace-base': 1.24.1(@opentelemetry/api@1.7.0) + semver: 7.5.4 dev: true /@opentelemetry/semantic-conventions@1.23.0: resolution: {integrity: sha512-MiqFvfOzfR31t8cc74CTP1OZfz7MbqpAnLCra8NqQoaHJX6ncIRTdYOQYBDQ2uFISDq0WY8Y9dDTWvsgzzBYRg==} engines: {node: '>=14'} + /@opentelemetry/semantic-conventions@1.24.1: + resolution: {integrity: sha512-VkliWlS4/+GHLLW7J/rVBA00uXus1SWvwFvcUDxDwmFxYfg/2VI6ekwdXS28cjI8Qz2ky2BzG8OUHo+WeYIWqw==} + engines: {node: '>=14'} + dev: true + + /@petamoriken/float16@3.8.7: + resolution: {integrity: sha512-/Ri4xDDpe12NT6Ex/DRgHzLlobiQXEW/hmG08w1wj/YU7hLemk97c+zHQFp0iZQ9r7YqgLEXZR2sls4HxBf9NA==} + dev: true + + /@pinecone-database/pinecone@2.2.1: + resolution: {integrity: sha512-8i6oT8EzYLlxi5Th4tJ8Cae+VPyHzlEsiVSxCOEx+EahbzaiWmpQMZSmO/RlXF/dOjOI+pXvqfcFYcF1awtPlw==} + engines: {node: '>=14.0.0'} + dependencies: + '@sinclair/typebox': 0.29.6 + ajv: 8.13.0 + cross-fetch: 3.1.8(encoding@0.1.13) + encoding: 0.1.13 + dev: true + /@pkgjs/parseargs@0.11.0: resolution: {integrity: sha512-+1VkjdD0QBLPodGrJUeqarH8VAIvQODIbwh9XpP5Syisf7YoQgsJKPNFoqqLQlu+VQ/tVSshMR6loPMn8U+dPg==} engines: {node: '>=14'} @@ -1652,10 +1836,35 @@ packages: resolution: {integrity: sha512-Vvn3zZrhQZkkBE8LSuW3em98c0FwgO4nxzv6OdSxPKJIEKY2bGbHn+mhGIPerzI4twdxaP8/0+06HBpwf345Lw==} dev: true + /@qdrant/js-client-rest@1.9.0(typescript@5.3.3): + resolution: {integrity: sha512-YiX/IskbRCoAY2ujyPDI6FBcO0ygAS4pgkGaJ7DcrJFh4SZV2XHs+u0KM7mO72RWJn1eJQFF2PQwxG+401xxJg==} + engines: {node: '>=18.0.0', pnpm: '>=8'} + peerDependencies: + typescript: '>=4.7' + dependencies: + '@qdrant/openapi-typescript-fetch': 1.2.6 + '@sevinf/maybe': 0.5.0 + typescript: 5.3.3 + undici: 5.28.4 + dev: true + + /@qdrant/openapi-typescript-fetch@1.2.6: + resolution: {integrity: sha512-oQG/FejNpItrxRHoyctYvT3rwGZOnK4jr3JdppO/c78ktDvkWiPXPHNsrDf33K9sZdRb6PR7gi4noIapu5q4HA==} + engines: {node: '>=18.0.0', pnpm: '>=8'} + dev: true + + /@sevinf/maybe@0.5.0: + resolution: {integrity: sha512-ARhyoYDnY1LES3vYI0fiG6e9esWfTNcXcO6+MPJJXcnyMV3bim4lnFt45VXouV7y82F4x3YH8nOQ6VztuvUiWg==} + dev: true + /@sinclair/typebox@0.27.8: resolution: {integrity: sha512-+Fj43pSMwJs4KRrH/938Uf+uAELIgVBmQzg/q1YG10djyfA3TnrU8N8XzqCh/okZdszqBQTZf96idMfE5lnwTA==} dev: true + /@sinclair/typebox@0.29.6: + resolution: {integrity: sha512-aX5IFYWlMa7tQ8xZr3b2gtVReCvg7f3LEhjir/JAjX2bJCMVJA5tIPv30wTD4KDfcwMd7DDYY3hFDeGmOgtrZQ==} + dev: true + /@sinonjs/commons@3.0.0: resolution: {integrity: sha512-jXBtWAF4vmdNmZgD5FoKsVLv3rPgDnLgPbU84LIJ3otV44vJlDRokVng5v8NFJdCf/da9legHcKaRuZs4L7faA==} dependencies: @@ -1668,6 +1877,36 @@ packages: '@sinonjs/commons': 3.0.0 dev: true + /@smithy/is-array-buffer@2.2.0: + resolution: {integrity: sha512-GGP3O9QFD24uGeAXYUjwSTXARoqpZykHadOmA8G5vfJPK0/DC67qa//0qvqrJzL1xc8WQWX7/yc7fwudjPHPhA==} + engines: {node: '>=14.0.0'} + dependencies: + tslib: 2.6.2 + dev: true + + /@smithy/types@3.0.0: + resolution: {integrity: sha512-VvWuQk2RKFuOr98gFhjca7fkBS+xLLURT8bUjk5XQoV0ZLm7WPwWPPY3/AwzTLuUBDeoKDCthfe1AsTUWaSEhw==} + engines: {node: '>=16.0.0'} + dependencies: + tslib: 2.6.2 + dev: true + + /@smithy/util-buffer-from@2.2.0: + resolution: {integrity: sha512-IJdWBbTcMQ6DA0gdNhh/BwrLkDR+ADW5Kr1aZmd4k3DIF6ezMV4R2NIAmT08wQJ3yUK82thHWmC/TnK/wpMMIA==} + engines: {node: '>=14.0.0'} + dependencies: + '@smithy/is-array-buffer': 2.2.0 + tslib: 2.6.2 + dev: true + + /@smithy/util-utf8@2.3.0: + resolution: {integrity: sha512-R8Rdn8Hy72KKcebgLiv8jQcQkXoLMOGGv5uI1/k0l+snqkOzQ1R0ChUBCxWMlBsFMekWjq0wRudIweFs7sKT5A==} + engines: {node: '>=14.0.0'} + dependencies: + '@smithy/util-buffer-from': 2.2.0 + tslib: 2.6.2 + dev: true + /@types/babel__core@7.20.5: resolution: {integrity: sha512-qoQprZvz5wQFJwMDqeseRXWv3rqMvhgpbXFfVyWhbx9X47POIA6i/+dXefEmZKoAgOaTdaIgNSMqMIU61yRyzA==} dependencies: @@ -1700,7 +1939,7 @@ packages: /@types/graceful-fs@4.1.9: resolution: {integrity: sha512-olP3sd1qOEe5dXTSaFvQG+02VdRXcdytWLAZsAq1PecU8uqQAhkrnbli7DagjtXKW/Bl7YJbUsa8MPcuc8LHEQ==} dependencies: - '@types/node': 20.12.4 + '@types/node': 20.12.12 dev: true /@types/istanbul-lib-coverage@2.0.6: @@ -1730,6 +1969,20 @@ packages: resolution: {integrity: sha512-5+fP8P8MFNC+AyZCDxrB2pkZFPGzqQWUzpSeuuVLvm8VMcorNYavBqoFcxK8bQz4Qsbn4oUEEem4wDLfcysGHA==} dev: true + /@types/lodash-es@4.17.12: + resolution: {integrity: sha512-0NgftHUcV4v34VhXm8QBSftKVXtbkBG3ViCjs6+eJ5a6y6Mi/jiFGPc1sC7QK+9BFhWrURE3EOggmWaSxL9OzQ==} + dependencies: + '@types/lodash': 4.17.4 + dev: true + + /@types/lodash@4.17.4: + resolution: {integrity: sha512-wYCP26ZLxaT3R39kiN2+HcJ4kTd3U1waI/cY7ivWYqFP6pW3ZNpvi6Wd6PHZx7T/t8z0vlkXMg3QYLa7DZ/IJQ==} + dev: true + + /@types/long@4.0.2: + resolution: {integrity: sha512-MqTGEo5bj5t157U6fA/BiDynNkn0YknVdh48CMPkTSpFTVmvao5UQmm7uEF6xBEo7qIMAlY/JSleYaE6VOdpaA==} + dev: true + /@types/minimist@1.2.5: resolution: {integrity: sha512-hov8bUuiLiyFPGyFPE1lwWhmzYbirOXQNNo40+y3zow8aFVTeyn3VWL0VFFfdNddA8S4Vf0Tc062rzyNr7Paag==} dev: true @@ -1737,7 +1990,7 @@ packages: /@types/node-fetch@2.6.9: resolution: {integrity: sha512-bQVlnMLFJ2d35DkPNjEPmd9ueO/rh5EiaZt2bhqiSarPjZIuIV6bPQVqcrEyvNo+AfTrRGVazle1tl597w3gfA==} dependencies: - '@types/node': 20.12.4 + '@types/node': 20.12.12 form-data: 4.0.0 dev: true @@ -1751,8 +2004,8 @@ packages: undici-types: 5.26.5 dev: true - /@types/node@20.12.4: - resolution: {integrity: sha512-E+Fa9z3wSQpzgYQdYmme5X3OTuejnnTx88A6p6vkkJosR3KBz+HpE3kqNm98VE6cfLFcISx7zW7MsJkH6KwbTw==} + /@types/node@20.12.12: + resolution: {integrity: sha512-eWLDGF/FOSPtAvEqeRAQ4C8LSA7M1I7i0ky1I8U7kD1J5ITyW3AsRhQrKVoWf5pFKZ2kILsEGJhsI9r93PYnOw==} dependencies: undici-types: 5.26.5 dev: true @@ -1761,6 +2014,24 @@ packages: resolution: {integrity: sha512-37i+OaWTh9qeK4LSHPsyRC7NahnGotNuZvjLSgcPzblpHB3rrCJxAOgI5gCdKm7coonsaX1Of0ILiTcnZjbfxA==} dev: true + /@types/papaparse@5.3.14: + resolution: {integrity: sha512-LxJ4iEFcpqc6METwp9f6BV6VVc43m6MfH0VqFosHvrUgfXiFe6ww7R3itkOQ+TCK6Y+Iv/+RnnvtRZnkc5Kc9g==} + dependencies: + '@types/node': 20.12.12 + dev: true + + /@types/pg@8.11.6: + resolution: {integrity: sha512-/2WmmBXHLsfRqzfHW7BNZ8SbYzE8OSk7i3WjFYvfgRHj7S1xj+16Je5fUKv3lVdVzk/zn9TXOqf+avFCFIE0yQ==} + dependencies: + '@types/node': 20.12.12 + pg-protocol: 1.6.1 + pg-types: 4.0.2 + dev: true + + /@types/qs@6.9.15: + resolution: {integrity: sha512-uXHQKES6DQKKCLh441Xv/dwxOq1TVS3JPUMlEqoEglvlhR6Mxnlew/Xq/LRVHpLyk7iK3zODe1qYHIMltO7XGg==} + dev: true + /@types/retry@0.12.0: resolution: {integrity: sha512-wWKOClTTiizcZhXnPY4wikVAwmdYHp8q6DmC+EJUzAMsycb7HB32Kh9RN4+0gExjmPmZSAQjgURXIGATPegAvA==} dev: true @@ -1777,10 +2048,28 @@ packages: resolution: {integrity: sha512-9aEbYZ3TbYMznPdcdr3SmIrLXwC/AKZXQeCf9Pgao5CKb8CyHuEX5jzWPTkvregvhRJHcpRO6BFoGW9ycaOkYw==} dev: true + /@types/tough-cookie@4.0.5: + resolution: {integrity: sha512-/Ad8+nIOV7Rl++6f1BdKxFSMgmoqEoYbHRpPcx3JEfv8VRsQe9Z4mCXeJBzxs7mbHY/XOZZuXlRNfhpVPbs6ZA==} + dev: true + + /@types/triple-beam@1.3.5: + resolution: {integrity: sha512-6WaYesThRMCl19iryMYP7/x2OVgCtbIVflDGFpWnb9irXI3UjYE4AzmYuiUKY1AJstGijoY+MgUszMgRxIYTYw==} + dev: true + /@types/uuid@9.0.8: resolution: {integrity: sha512-jg+97EGIcY9AGHJJRaaPVgetKDsrTgbRjQ5Msgjh/DQKEFl0DtyRr/VCOyD1T2R1MNeWPK/u7JoGhlDZnKBAfA==} dev: true + /@types/webidl-conversions@7.0.3: + resolution: {integrity: sha512-CiJJvcRtIgzadHCYXw7dqEnMNRjhGZlYK05Mj9OyktqV8uVT8fD2BFOB7S1uwBE3Kj2Z+4UyPmFw/Ixgw/LAlA==} + dev: true + + /@types/whatwg-url@11.0.5: + resolution: {integrity: sha512-coYR071JRaHa+xoEvvYqvnIHaVqaYrLPbsufM9BF63HkwI5Lgmy2QR8Q5K/lYDYo5AK82wOvSOS0UsLTpTG7uQ==} + dependencies: + '@types/webidl-conversions': 7.0.3 + dev: true + /@types/yargs-parser@21.0.3: resolution: {integrity: sha512-I4q9QU9MQv4oEOz4tAHJtNz1cwuLxn2F3xcc2iV5WdqLPpUnj30aUuxt1mAxYTG+oe8CZMV/+6rU4S4gRDzqtQ==} dev: true @@ -1927,6 +2216,34 @@ packages: resolution: {integrity: sha512-zuVdFrMJiuCDQUMCzQaD6KL28MjnqqN8XnAqiEq9PNm/hCPTSGfrXCOfwj1ow4LFb/tNymJPwsNbVePc1xFqrQ==} dev: true + /@xenova/transformers@2.17.1: + resolution: {integrity: sha512-zo702tQAFZXhzeD2GCYUNUqeqkoueOdiSbQWa4s0q7ZE4z8WBIwIsMMPGobpgdqjQ2u0Qulo08wuqVEUrBXjkQ==} + dependencies: + '@huggingface/jinja': 0.2.2 + onnxruntime-web: 1.14.0 + sharp: 0.32.6 + optionalDependencies: + onnxruntime-node: 1.14.0 + dev: true + + /@xmldom/xmldom@0.8.10: + resolution: {integrity: sha512-2WALfTl4xo2SkGCYRt6rDTFfk9R1czmBvUQy12gK2KuRKIpWEhcbbzy8EZXtz/jkRqHX8bFEc6FC1HjX4TUWYw==} + engines: {node: '>=10.0.0'} + dev: true + + /@zilliz/milvus2-sdk-node@2.4.2: + resolution: {integrity: sha512-fkPu7XXzfUvHoCnSPVOjqQpWuSnnn9x2NMmmCcIOyRzMeXIsrz4Mf/+M7LUzmT8J9F0Khx65B0rJgCu27YzWQw==} + dependencies: + '@grpc/grpc-js': 1.10.8 + '@grpc/proto-loader': 0.7.13 + '@petamoriken/float16': 3.8.7 + dayjs: 1.11.11 + generic-pool: 3.9.0 + lru-cache: 9.1.2 + protobufjs: 7.2.6 + winston: 3.13.0 + dev: true + /abort-controller@3.0.0: resolution: {integrity: sha512-h8lQ8tacZYnR3vNQTgibj+tODHI5/+l06Au2Pcriv/Gmet0eaj4TwWH41sO9wnHDiQsEj19q0drzdWdeAHtweg==} engines: {node: '>=6.5'} @@ -1955,6 +2272,15 @@ packages: engines: {node: '>=0.4.0'} hasBin: true + /agent-base@7.1.1: + resolution: {integrity: sha512-H0TSyFNDMomMNJQBn8wFV5YC/2eJ+VXECwOadZJT554xP6cODZHPX3H9QMQECxvrgiSOP1pHjy1sMWQVYJOUOA==} + engines: {node: '>= 14'} + dependencies: + debug: 4.3.4 + transitivePeerDependencies: + - supports-color + dev: true + /agentkeepalive@4.5.0: resolution: {integrity: sha512-5GG/5IbQQpC9FpkRGsSvZI5QYeSCzlJHdpBQntCsuTOxhKD8lqKhrleg2Yi7yvMIf82Ycmmqln9U8V9qwEiJew==} engines: {node: '>= 8.0.0'} @@ -1971,6 +2297,19 @@ packages: uri-js: 4.4.1 dev: true + /ajv@8.13.0: + resolution: {integrity: sha512-PRA911Blj99jR5RMeTunVbNXMF6Lp4vZXnk5GQjcnUWUTsrXtekg/pnmFFI2u/I36Y/2bITGS30GZCXei6uNkA==} + dependencies: + fast-deep-equal: 3.1.3 + json-schema-traverse: 1.0.0 + require-from-string: 2.0.2 + uri-js: 4.4.1 + dev: true + + /already@2.2.1: + resolution: {integrity: sha512-qk6RIVMS/R1yTvBzfIL1T76PsIL7DIVCINoLuFw2YXKLpLtsTobqdChMs8m3OhuPS3CEE3+Ra5ibYiqdyogbsQ==} + dev: true + /ansi-colors@4.1.3: resolution: {integrity: sha512-/6w/C21Pm1A7aZitlI5Ni/2J6FFQN8i1Cvz3kHABAAbw93v/NlvKdVOqz7CCWz/3iv/JplRSEEZ83XION15ovw==} engines: {node: '>=6'} @@ -2017,6 +2356,10 @@ packages: engines: {node: '>=12'} dev: true + /any-promise@1.3.0: + resolution: {integrity: sha512-7UvmKalWRt1wgjL1RrGxoSJW/0QZFIegpeGvZG9kjp8vrRu55XTHbwnqq2GpXm9uLbcuhxm3IqX9OB4MZR1b2A==} + dev: true + /anymatch@3.1.3: resolution: {integrity: sha512-KMReFUr0B4t+D+OBkjR3KYqvocp2XaSzO55UcB6mgQMd3KbcE+mWTyvVV7D/zsdEbNnV6acZUutkiHQXvTr1Rw==} engines: {node: '>= 8'} @@ -2075,6 +2418,20 @@ packages: engines: {node: '>=0.10.0'} dev: true + /assemblyai@4.4.3: + resolution: {integrity: sha512-kciFasQyO+fVxwr2PrrMByFoRRSG4FLwUGXiYJOB9WFd2A121r3nqBwOs4rjkPByxSbIOAQqf/OggnUwWbsNDw==} + engines: {node: '>=18'} + dependencies: + ws: 8.17.0 + transitivePeerDependencies: + - bufferutil + - utf-8-validate + dev: true + + /async@3.2.5: + resolution: {integrity: sha512-baNZyqaaLhyLVKm/DlvdW051MSgO6b8eVfIezl9E5PqWxFgzLm/wQntEW4zOytVburDEr0JlALEpdOFwvErLsg==} + dev: true + /asynckit@0.4.0: resolution: {integrity: sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q==} dev: true @@ -2084,6 +2441,20 @@ packages: engines: {node: '>= 0.4'} dev: true + /axios@1.7.2: + resolution: {integrity: sha512-2A8QhOMrbomlDuiLeK9XibIBzuHeRcqqNOHp0Cyp5EoJ1IFDh+XZH3A6BkXtv0K4gFGCI0Y4BM7B1wOEi0Rmgw==} + dependencies: + follow-redirects: 1.15.6 + form-data: 4.0.0 + proxy-from-env: 1.1.0 + transitivePeerDependencies: + - debug + dev: true + + /b4a@1.6.6: + resolution: {integrity: sha512-5Tk1HLk6b6ctmjIkAcU/Ujv/1WqiDl0F0JdRCR80VsOcUlHcu7pWeWRlOqQLHfDEsVx9YH/aif5AG4ehoCtTmg==} + dev: true + /babel-jest@29.7.0(@babel/core@7.23.6): resolution: {integrity: sha512-BrvGY3xZSwEcCzKvKsCi2GgHqDqsYkOP4/by5xCgIwGXQxIEh+8ew3gmrE1y7XRR6LHZIj6yLYnUi/mm2KXKBg==} engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} @@ -2160,11 +2531,49 @@ packages: resolution: {integrity: sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==} dev: true - /base-64@0.1.0: - resolution: {integrity: sha512-Y5gU45svrR5tI2Vt/X9GPd3L0HNIKzGu202EjxrXMpuc2V2CiKgemAbUUsqYmZJvPtCXoUKjNZwBJzsNScUbXA==} + /bare-events@2.2.2: + resolution: {integrity: sha512-h7z00dWdG0PYOQEvChhOSWvOfkIKsdZGkWr083FgN/HyoQuebSew/cgirYqh9SCuy/hRvxc5Vy6Fw8xAmYHLkQ==} + requiresBuild: true dev: true + optional: true - /base64-js@1.5.1: + /bare-fs@2.3.0: + resolution: {integrity: sha512-TNFqa1B4N99pds2a5NYHR15o0ZpdNKbAeKTE/+G6ED/UeOavv8RY3dr/Fu99HW3zU3pXpo2kDNO8Sjsm2esfOw==} + requiresBuild: true + dependencies: + bare-events: 2.2.2 + bare-path: 2.1.3 + bare-stream: 1.0.0 + dev: true + optional: true + + /bare-os@2.3.0: + resolution: {integrity: sha512-oPb8oMM1xZbhRQBngTgpcQ5gXw6kjOaRsSWsIeNyRxGed2w/ARyP7ScBYpWR1qfX2E5rS3gBw6OWcSQo+s+kUg==} + requiresBuild: true + dev: true + optional: true + + /bare-path@2.1.3: + resolution: {integrity: sha512-lh/eITfU8hrj9Ru5quUp0Io1kJWIk1bTjzo7JH1P5dWmQ2EL4hFUlfI8FonAhSlgIfhn63p84CDY/x+PisgcXA==} + requiresBuild: true + dependencies: + bare-os: 2.3.0 + dev: true + optional: true + + /bare-stream@1.0.0: + resolution: {integrity: sha512-KhNUoDL40iP4gFaLSsoGE479t0jHijfYdIcxRn/XtezA2BaUD0NRf/JGRpsMq6dMNM+SrCrB0YSSo/5wBY4rOQ==} + requiresBuild: true + dependencies: + streamx: 2.16.1 + dev: true + optional: true + + /base-64@0.1.0: + resolution: {integrity: sha512-Y5gU45svrR5tI2Vt/X9GPd3L0HNIKzGu202EjxrXMpuc2V2CiKgemAbUUsqYmZJvPtCXoUKjNZwBJzsNScUbXA==} + dev: true + + /base64-js@1.5.1: resolution: {integrity: sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA==} dev: true @@ -2175,6 +2584,10 @@ packages: is-windows: 1.0.2 dev: true + /bignumber.js@9.1.2: + resolution: {integrity: sha512-2/mKyZH9K85bzOEfhXDBFZTGd1CTs+5IHpeFQo9luiBG7hghdC851Pj2WAhb6E3R6b9tZj/XKhbg4fum+Kepug==} + dev: true + /binary-extensions@2.3.0: resolution: {integrity: sha512-Ceh+7ox5qe7LJuLHoY0feh3pHuUDHAcRUeyL2VYghZwfpkNIy/+8Ocg0a3UuSoYzavmylwuLWQOf3hl0jjMMIw==} engines: {node: '>=8'} @@ -2184,6 +2597,18 @@ packages: resolution: {integrity: sha512-nbE1WxOTTrUWIfsfZ4aHGYu5DOuNkbxGokjV6Z2kxfJK3uaAb8zNK1muzOeipoLHZjInT4Br88BHpzevc681xA==} dev: true + /bl@4.1.0: + resolution: {integrity: sha512-1W07cM9gS6DcLperZfFSj+bWLtaPGSOHWhPiGzXmvVJbRLdG82sH/Kn8EtW1VqWVA54AKf2h5k5BbnIbwF3h6w==} + dependencies: + buffer: 5.7.1 + inherits: 2.0.4 + readable-stream: 3.6.2 + dev: true + + /bluebird@3.4.7: + resolution: {integrity: sha512-iD3898SR7sWVRHbiQv+sHUtHnMvC1o3nW5rAcqnq3uOn07DSAppZYUkIGslDz6gXC7HfunPe7YVBgoEJASPcHA==} + dev: true + /brace-expansion@1.1.11: resolution: {integrity: sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==} dependencies: @@ -2234,10 +2659,30 @@ packages: node-int64: 0.4.0 dev: true + /bson-objectid@2.0.4: + resolution: {integrity: sha512-vgnKAUzcDoa+AeyYwXCoHyF2q6u/8H46dxu5JN+4/TZeq/Dlinn0K6GvxsCLb3LHUJl0m/TLiEK31kUwtgocMQ==} + dev: true + + /bson@6.7.0: + resolution: {integrity: sha512-w2IquM5mYzYZv6rs3uN2DZTOBe2a0zXLj53TGDqwF4l6Sz/XsISrisXOJihArF9+BZ6Cq/GjVht7Sjfmri7ytQ==} + engines: {node: '>=16.20.1'} + dev: true + + /buffer-equal-constant-time@1.0.1: + resolution: {integrity: sha512-zRpUiDwd/xk6ADqPMATG8vc9VPrkck7T07OIx0gnjmJAnHnTVXNQG3vfvWNuiZIkwu9KrKdA1iJKfsfTVxE6NA==} + dev: true + /buffer-from@1.1.2: resolution: {integrity: sha512-E+XQCRwSbaaiChtv6k6Dwgc+bx+Bs6vuKJHHl5kox/BaKbhiXzqQOwK4cO22yElGp2OCmjwVhT3HmxgyPGnJfQ==} dev: true + /buffer@5.7.1: + resolution: {integrity: sha512-EHcyIPBQ4BSGlvjB16k5KgAJ27CIsHY/2JBmCRReo48y9rQ3MaUzWX3KVlBa4U7MyX02HdVj0K7C3WaB3ju7FQ==} + dependencies: + base64-js: 1.5.1 + ieee754: 1.2.1 + dev: true + /call-bind@1.0.5: resolution: {integrity: sha512-C3nQxfFZxFRVoJoGKKI8y3MOEo129NQ+FgQ08iye+Mk4zNZZGdjfs06bVTr+DBSlA66Q2VEcMki/cUCP4SercQ==} dependencies: @@ -2246,6 +2691,21 @@ packages: set-function-length: 1.1.1 dev: true + /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: true + + /callguard@2.0.0: + resolution: {integrity: sha512-I3nd+fuj20FK1qu00ImrbH+II+8ULS6ioYr9igqR1xyqySoqc3DiHEyUM0mkoAdKeLGg2CtGnO8R3VRQX5krpQ==} + dev: true + /callsites@3.1.0: resolution: {integrity: sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ==} engines: {node: '>=6'} @@ -2260,6 +2720,11 @@ packages: quick-lru: 4.0.1 dev: true + /camelcase@4.1.0: + resolution: {integrity: sha512-FxAv7HpHrXbh3aPo4o2qxHay2lkLY3x5Mw3KeE4KQE8ysVfziWeRZDwcjauvwBSGEC/nXUPzZy8zeh4HokqOnw==} + engines: {node: '>=4'} + dev: true + /camelcase@5.3.1: resolution: {integrity: sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg==} engines: {node: '>=6'} @@ -2304,6 +2769,34 @@ packages: resolution: {integrity: sha512-yrLQ/yVUFXkzg7EDQsPieE/53+0RlaWTs+wBrvW36cyilJ2SaDWfl4Yj7MtLTXleV9uEKefbAGUPv2/iWSooRA==} dev: true + /chownr@1.1.4: + resolution: {integrity: sha512-jJ0bqzaylmJtVnNgzTeSOs8DPavpbYgEr/b0YL8/2GO3xJEhInFmhKMUnEJQjZumK7KXGFhUy89PrsJWlakBVg==} + dev: true + + /chromadb@1.7.3(@google/generative-ai@0.11.4)(cohere-ai@7.10.1)(openai@4.47.1): + resolution: {integrity: sha512-3GgvQjpqgk5C89x5EuTDaXKbfrdqYDJ5UVyLQ3ZmwxnpetNc+HhRDGjkvXa5KSvpQ3lmKoyDoqnN4tZepfFkbw==} + engines: {node: '>=14.17.0'} + peerDependencies: + '@google/generative-ai': ^0.1.1 + cohere-ai: ^5.0.0 || ^6.0.0 || ^7.0.0 + openai: ^3.0.0 || ^4.0.0 + peerDependenciesMeta: + '@google/generative-ai': + optional: true + cohere-ai: + optional: true + openai: + optional: true + dependencies: + '@google/generative-ai': 0.11.4 + cliui: 8.0.1 + cohere-ai: 7.10.1 + isomorphic-fetch: 3.0.0 + openai: 4.47.1 + transitivePeerDependencies: + - encoding + dev: true + /ci-info@3.9.0: resolution: {integrity: sha512-NIxF55hv4nSqQswkAeiOi1r83xy8JldOFDTWiug55KBu9Jnblncd2U6ViHmYgHf01TPZS77NJBhBMKdWj9HQMQ==} engines: {node: '>=8'} @@ -2339,6 +2832,27 @@ packages: engines: {iojs: '>= 1.0.0', node: '>= 0.12.0'} dev: true + /codsen-utils@1.6.4: + resolution: {integrity: sha512-PDyvQ5f2PValmqZZIJATimcokDt4JjIev8cKbZgEOoZm+U1IJDYuLeTcxZPQdep99R/X0RIlQ6ReQgPOVnPbNw==} + engines: {node: '>=14.18.0'} + dependencies: + rfdc: 1.3.1 + dev: true + + /cohere-ai@7.10.1: + resolution: {integrity: sha512-iQmFMzTZ0/Hr44Z/blQ8R3XWDPku/Wk+9UM6ZPxvE52lJj/DLGRgZKWqA/21PRXGDyb1aSvJ3xiQ/KdIeHLTfg==} + dependencies: + form-data: 4.0.0 + form-data-encoder: 4.0.2 + formdata-node: 6.0.3 + js-base64: 3.7.2 + node-fetch: 2.7.0(encoding@0.1.13) + qs: 6.11.2 + url-join: 4.0.1 + transitivePeerDependencies: + - encoding + dev: true + /collect-v8-coverage@1.0.2: resolution: {integrity: sha512-lHl4d5/ONEbLlJvaJNtsF/Lz+WvB07u2ycqTYbdrq7UypDXailES4valYb2eWiJFxZlVmpGekfqoxQhzyFdT4Q==} dev: true @@ -2364,6 +2878,35 @@ packages: resolution: {integrity: sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==} dev: true + /color-string@1.9.1: + resolution: {integrity: sha512-shrVawQFojnZv6xM40anx4CkoDP+fZsw/ZerEMsW/pyzsRbElpsL/DBVW7q3ExxwusdNXI3lXpuhEZkzs8p5Eg==} + dependencies: + color-name: 1.1.4 + simple-swizzle: 0.2.2 + dev: true + + /color@3.2.1: + resolution: {integrity: sha512-aBl7dZI9ENN6fUGC7mWpMTPNHmWUSNan9tuWN6ahh5ZLNk9baLJOnSMlrQkHcrfFgz2/RigjUVAjdx36VcemKA==} + dependencies: + color-convert: 1.9.3 + color-string: 1.9.1 + dev: true + + /color@4.2.3: + resolution: {integrity: sha512-1rXeuUUiGGrykh+CeBdu5Ie7OJwinCgQY0bc7GCRxy5xVHy+moaqkpL/jqQq0MtQOeYcrqEz4abc5f0KtU7W4A==} + engines: {node: '>=12.5.0'} + dependencies: + color-convert: 2.0.1 + color-string: 1.9.1 + dev: true + + /colorspace@1.1.4: + resolution: {integrity: sha512-BgvKJiuVu1igBUF2kEjRCZXol6wiiGbY5ipL/oVPwm0BL9sIpMIzM8IK7vwuxIIzOXMV3Ey5w+vxhm0rR/TN8w==} + dependencies: + color: 3.2.1 + text-hex: 1.0.0 + dev: true + /combined-stream@1.0.8: resolution: {integrity: sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg==} engines: {node: '>= 0.8'} @@ -2384,7 +2927,11 @@ packages: resolution: {integrity: sha512-Kvp459HrV2FEJ1CAsi1Ku+MY3kasH19TFykTz2xWmMeq6bk2NU3XXvfJ+Q61m0xktWwt+1HSYf3JZsTms3aRJg==} dev: true - /create-jest@29.7.0(@types/node@20.12.4): + /core-util-is@1.0.3: + resolution: {integrity: sha512-ZQBvi1DcpJ4GDqanjucZ2Hj3wEO5pZDS89BWbkcrvdxksJorwUDDZamX9ldFkp9aw2lmBDLgkObEA4DWNJ9FYQ==} + dev: true + + /create-jest@29.7.0(@types/node@20.12.12): resolution: {integrity: sha512-Adz2bdH0Vq3F53KEMJOoftQFutWCukm6J24wbPWRO4k1kMY7gS7ds/uoJkNuV8wDCtWWnuwGcJwpWcih+zEW1Q==} engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} hasBin: true @@ -2393,7 +2940,7 @@ packages: chalk: 4.1.2 exit: 0.1.2 graceful-fs: 4.2.11 - jest-config: 29.7.0(@types/node@20.12.4) + jest-config: 29.7.0(@types/node@20.12.12) jest-util: 29.7.0 prompts: 2.4.2 transitivePeerDependencies: @@ -2403,6 +2950,14 @@ packages: - ts-node dev: true + /cross-fetch@3.1.8(encoding@0.1.13): + resolution: {integrity: sha512-cvA+JwZoU0Xq+h6WkMvAUqPEYy92Obet6UdKLfW60qn99ftItKjB5T+BkyWOFWe2pUyfQ+IJHmpOTznqk1M6Kg==} + dependencies: + node-fetch: 2.7.0(encoding@0.1.13) + transitivePeerDependencies: + - encoding + dev: true + /cross-spawn@5.1.0: resolution: {integrity: sha512-pTgQJ5KC0d2hcY8eyL1IzlBPYjTkyH72XRZPnLyKus2mBfNjQs3klqbJU2VILqZryAZUt9JOb3h/mWMy23/f5A==} dependencies: @@ -2446,6 +3001,10 @@ packages: stream-transform: 2.1.3 dev: true + /dayjs@1.11.11: + resolution: {integrity: sha512-okzr3f11N6WuqYtZSvm+F776mB41wRZMhKP+hc34YdW+KmtYYK9iqvHSwo2k9FEH3fhGXvOPV6yz2IcSrfRUDg==} + dev: true + /debug@4.3.4: resolution: {integrity: sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==} engines: {node: '>=6.0'} @@ -2470,6 +3029,13 @@ packages: engines: {node: '>=0.10.0'} dev: true + /decompress-response@6.0.0: + resolution: {integrity: sha512-aW35yZM6Bb/4oJlZncMH2LCoZtJXTRxES17vE3hoRiowU2kWHaJKFkSBDnDR+cm9J+9QhXmREyIfv0pji9ejCQ==} + engines: {node: '>=10'} + dependencies: + mimic-response: 3.1.0 + dev: true + /dedent@1.5.1: resolution: {integrity: sha512-+LxW+KLWxu3HW3M2w2ympwtqPrqYRzU8fqi6Fhd18fBALe15blJPI/I4+UHveMVG6lJqB4JNd4UG0S5cnVHwIg==} peerDependencies: @@ -2479,6 +3045,11 @@ packages: optional: true dev: true + /deep-extend@0.6.0: + resolution: {integrity: sha512-LOHxIOaPYdHlJRtCQfDIVZtfw/ufM8+rVj649RIHzcm/vGwQRXFt6OPqIFWsm2XEMrNIEtWR64sY1LEKD2vAOA==} + engines: {node: '>=4.0.0'} + dev: true + /deep-is@0.1.4: resolution: {integrity: sha512-oIPzksmTg4/MriiaYGO+okXDT7ztn/w3Eptv/+gSIdMdKsJo0u4CfYNFJPy+4SKMuCqGw2wxnA+URMg3t8a/bQ==} dev: true @@ -2503,6 +3074,15 @@ packages: has-property-descriptors: 1.0.1 dev: true + /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: true + /define-properties@1.2.1: resolution: {integrity: sha512-8QmQKqEASLd5nx0U1B1okLElbUuuttJ/AnYmRXbbbGDWh6uS208EjD4Xqq/I9wK7u0v6O08XhTWnt5XtEbR6Dg==} engines: {node: '>= 0.4'} @@ -2522,6 +3102,11 @@ packages: engines: {node: '>=8'} dev: true + /detect-libc@2.0.3: + resolution: {integrity: sha512-bwy0MGW55bG41VqxxypOsdSdGqLwXPI/focwgTYCFMbdUiBAxLg9CFzG08sz2aqzknwiX7Hkl0bQENjg8iLByw==} + engines: {node: '>=8'} + dev: true + /detect-newline@3.1.0: resolution: {integrity: sha512-TLz+x/vEXm/Y7P7wn1EJFNLxYpUD4TgMosxY6fAVJUnJMbupHBOncxyWUG9OpTaH9EBD7uFI5LfEgmMOc54DsA==} engines: {node: '>=8'} @@ -2539,6 +3124,10 @@ packages: md5: 2.3.0 dev: true + /dingbat-to-unicode@1.0.1: + resolution: {integrity: sha512-98l0sW87ZT58pU4i61wa2OHwxbiYSbuxsCBozaVnYX2iCnr3bLM3fIes1/ej7h1YdOKuKt/MLs706TVnALA65w==} + dev: true + /dir-glob@3.0.1: resolution: {integrity: sha512-WkrWp9GR4KXfKGYzOLmTuGVi1UWFfws377n9cc55/tb6DuqyF6pcQ5AbiHEshaDpY9v6oaSr2XCDidGmMwdzIA==} engines: {node: '>=8'} @@ -2558,10 +3147,22 @@ packages: engines: {node: '>=12'} dev: true + /duck@0.1.12: + resolution: {integrity: sha512-wkctla1O6VfP89gQ+J/yDesM0S7B7XLXjKGzXxMDVFg7uEn706niAtyYovKbyq1oT9YwDcly721/iUWoc8MVRg==} + dependencies: + underscore: 1.13.6 + dev: true + /eastasianwidth@0.2.0: resolution: {integrity: sha512-I88TYZWc9XiYHRQ4/3c5rjjfgkjhLyW2luGIheGERbNQ6OY7yTybanSpDXZa8y7VUP9YmDcYa+eyq4ca7iLqWA==} dev: true + /ecdsa-sig-formatter@1.0.11: + resolution: {integrity: sha512-nagl3RYrbNv6kQkeJIpt6NJZy8twLB/2vtz6yN9Z4vRKHN4/QZJIEbqohALSgwKdnksuY3k5Addp5lg8sVoVcQ==} + dependencies: + safe-buffer: 5.2.1 + dev: true + /electron-to-chromium@1.4.616: resolution: {integrity: sha512-1n7zWYh8eS0L9Uy+GskE0lkBUNK83cXTVJI0pU3mGprFsbfSdAc15VTFbo+A+Bq4pwstmL30AVcEU3Fo463lNg==} dev: true @@ -2579,6 +3180,22 @@ packages: resolution: {integrity: sha512-L18DaJsXSUk2+42pv8mLs5jJT2hqFkFE4j21wOmgbUqsZ2hL72NsUU785g9RXgo3s0ZNgVl42TiHp3ZtOv/Vyg==} dev: true + /enabled@2.0.0: + resolution: {integrity: sha512-AKrN98kuwOzMIdAizXGI86UFBoo26CL21UM763y1h/GMSJ4/OHU9k2YlsmBpyScFo/wbLzWQJBMCW4+IO3/+OQ==} + dev: true + + /encoding@0.1.13: + resolution: {integrity: sha512-ETBauow1T35Y/WZMkio9jiM0Z5xjHHmJ4XmjZOq1l/dXz3lr2sRn87nJy20RupqSh1F2m3HHPSp8ShIPQJrJ3A==} + dependencies: + iconv-lite: 0.6.3 + dev: true + + /end-of-stream@1.4.4: + resolution: {integrity: sha512-+uw1inIHVPQoaVuHzRyXd21icM+cnt4CzD5rW+NC1wjOUSTOs+Te7FOv7AhN7vS9x/oIyhLP5PR1H+phQAHu5Q==} + dependencies: + once: 1.4.0 + dev: true + /enquirer@2.4.1: resolution: {integrity: sha512-rRqJg/6gd538VHvR3PSrdRBb/1Vy2YfzHqzvbhGIQpDRKIa4FgV/54b5Q1xYSxOOwKvjXweS26E0Q+nAMwp2pQ==} engines: {node: '>=8.6'} @@ -2638,6 +3255,18 @@ packages: which-typed-array: 1.1.13 dev: true + /es-define-property@1.0.0: + resolution: {integrity: sha512-jxayLKShrEqqzJ0eumQbVhTYQM27CfT1T35+gCgDFoL82JLsXqTJ76zv6A0YLOgEnLUMvLzsDsGIrl8NFpT2gQ==} + engines: {node: '>= 0.4'} + dependencies: + get-intrinsic: 1.2.4 + dev: true + + /es-errors@1.3.0: + resolution: {integrity: sha512-Zf5H2Kxt2xjTvbJvP2ZWLEICxA6j+hAmMzIlypy4xcBg1vKVnx89Wy0GbS+kf5cwCVFFzdCFh2XSCFNULS6csw==} + engines: {node: '>= 0.4'} + dev: true + /es-set-tostringtag@2.0.2: resolution: {integrity: sha512-BuDyupZt65P9D2D2vA/zqcI3G5xRsklm5N3xCwuiy+/vKy8i0ifdsQP1sLgO4tZDSCaQUSnmC48khknGMV3D2Q==} engines: {node: '>= 0.4'} @@ -2810,6 +3439,11 @@ packages: engines: {node: '>= 0.8.0'} dev: true + /expand-template@2.0.3: + resolution: {integrity: sha512-XYfuKMvj4O35f/pOXLObndIRvyQ+/+6AhODh+OKWj9S9498pHHn/IMszH+gt0fBCRWMNfk1ZSp5x3AifmnI2vg==} + engines: {node: '>=6'} + dev: true + /expect@29.7.0: resolution: {integrity: sha512-2Zks0hf1VLFYI1kbh0I5jP3KHHyCHpkfyHBzsSXRFgl/Bg9mWYfMW8oD+PdMPlEwy5HNsR9JutYy6pMeOh61nw==} engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} @@ -2825,6 +3459,10 @@ packages: resolution: {integrity: sha512-4EMSHGOPSwAfBiibw3ndnP0AvjDWLsMvGOvWEZ2F96IGk0bIVdjQisOHxReSkE13mHcfbuCiXw+G4y0zv6N8Eg==} dev: true + /extend@3.0.2: + resolution: {integrity: sha512-fjquC59cD7CyW6urNXK0FBufkZcoiGG80wTuPujX590cB5Ttln20E2UB4S/WARVqhXffZl2LNgS+gQdPIIim/g==} + dev: true + /extendable-error@0.1.7: resolution: {integrity: sha512-UOiS2in6/Q0FK0R0q6UY9vYpQ21mr/Qn1KOnte7vsACuNJf514WvCCUHSRCPcgjPT2bAhNIJdlE6bVap1GKmeg==} dev: true @@ -2842,6 +3480,10 @@ packages: resolution: {integrity: sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==} dev: true + /fast-fifo@1.3.2: + resolution: {integrity: sha512-/d9sfos4yxzpwkDkuN7k2SqFKtYNmCTzgfEpz82x34IM9/zc8KGxQoXg1liNC/izpRM/MBdt44Nmx41ZWqk+FQ==} + dev: true + /fast-glob@3.3.2: resolution: {integrity: sha512-oX2ruAFQwf/Orj8m737Y5adxDQO0LAB7/S5MnxCdTNDd4p6BsyIVsv9JQsATbTSq8KHRpLwIHbVlUNatxd+1Ow==} engines: {node: '>=8.6.0'} @@ -2873,6 +3515,23 @@ packages: bser: 2.1.1 dev: true + /fecha@4.2.3: + resolution: {integrity: sha512-OP2IUU6HeYKJi3i0z4A19kHMQoLVs4Hc+DPqqxI2h/DPZHTm/vjsfC6P0b4jCMy14XizLBqvndQ+UilD7707Jw==} + dev: true + + /fetch-h2@3.0.2: + resolution: {integrity: sha512-Lo6UPdMKKc9Ond7yjG2vq0mnocspOLh1oV6+XZdtfdexacvMSz5xm3WoQhTAdoR2+UqPlyMNqcqfecipoD+l/A==} + engines: {node: '>=12'} + dependencies: + '@types/tough-cookie': 4.0.5 + already: 2.2.1 + callguard: 2.0.0 + get-stream: 6.0.1 + through2: 4.0.2 + to-arraybuffer: 1.0.1 + tough-cookie: 4.1.4 + dev: true + /file-entry-cache@6.0.1: resolution: {integrity: sha512-7Gps/XWymbLk2QLYK4NzpMOrYjMhdIxXuIvy2QBsLE6ljuodKvdkWs/cpyJJ3CVIVpH0Oi1Hvg1ovbMzLdFBBg==} engines: {node: ^10.12.0 || >=12.0.0} @@ -2924,10 +3583,28 @@ packages: hasBin: true dev: true + /flatbuffers@1.12.0: + resolution: {integrity: sha512-c7CZADjRcl6j0PlvFy0ZqXQ67qSEZfrVPynmnL+2zPc+NtMvrF8Y0QceMo7QqnSPc7+uWjUIAbvCQ5WIKlMVdQ==} + dev: true + /flatted@3.2.9: resolution: {integrity: sha512-36yxDn5H7OFZQla0/jFJmbIKTdZAQHngCedGxiMmpNfEZM0sdEeT+WczLQrjK6D7o2aiyLYDnkw0R3JK0Qv1RQ==} dev: true + /fn.name@1.1.0: + resolution: {integrity: sha512-GRnmB5gPyJpAhTQdSZTSp9uaPSvl09KoYcMQtsB9rQoOmzs9dH6ffeccH+Z+cv6P68Hu5bC6JjRh4Ah/mHSNRw==} + dev: true + + /follow-redirects@1.15.6: + resolution: {integrity: sha512-wWN62YITEaOpSK584EZXJafH1AGpO8RVgElfkuXbTOrPX4fIfOyEpW/CsiNd8JdYrAoOvafRTOEnvsO++qCqFA==} + engines: {node: '>=4.0'} + peerDependencies: + debug: '*' + peerDependenciesMeta: + debug: + optional: true + dev: true + /for-each@0.3.3: resolution: {integrity: sha512-jqYfLp7mo9vIyQf8ykW2v7A+2N4QjeCeI5+Dz9XraiO1ign81wjiH7Fb9vSOWvQfNtmSa4H2RoQTrrXivdUZmw==} dependencies: @@ -2946,6 +3623,11 @@ packages: resolution: {integrity: sha512-qfqtYan3rxrnCk1VYaA4H+Ms9xdpPqvLZa6xmMgFvhO32x7/3J/ExcTd6qpxM0vH2GdMI+poehyBZvqfMTto8A==} dev: true + /form-data-encoder@4.0.2: + resolution: {integrity: sha512-KQVhvhK8ZkWzxKxOr56CPulAhH3dobtuQ4+hNQ+HekH/Wp5gSOafqRAeTphQUJAIk0GBvHZgJ2ZGRWd5kphMuw==} + engines: {node: '>= 18'} + dev: true + /form-data@4.0.0: resolution: {integrity: sha512-ETEklSGi5t0QMZuiXoA/Q6vcnxcLQP5vdugSpuAyi6SVGi2clPPp+xgEhuMaHC+zGgn31Kd235W35f7Hykkaww==} engines: {node: '>= 6'} @@ -2963,6 +3645,22 @@ packages: web-streams-polyfill: 4.0.0-beta.3 dev: true + /formdata-node@6.0.3: + resolution: {integrity: sha512-8e1++BCiTzUno9v5IZ2J6bv4RU+3UKDmqWUQD0MIMVCd9AdhWkO1gw57oo1mNEX1dMq2EGI+FbWz4B92pscSQg==} + engines: {node: '>= 18'} + dev: true + + /fs-constants@1.0.0: + resolution: {integrity: sha512-y6OAwoSIf7FyjMIv94u+b5rdheZEjzR63GTyZJm5qh4Bi+2YgwLCcI/fPFZkL5PSixOt6ZNKm+w+Hfp/Bciwow==} + dev: true + + /fs-extra@2.1.2: + resolution: {integrity: sha512-9ztMtDZtSKC78V8mev+k31qaTabbmuH5jatdvPBMikrFHvw5BqlYnQIn/WGK3WHeRooSTkRvLa2IPlaHjPq5Sg==} + dependencies: + graceful-fs: 4.2.11 + jsonfile: 2.4.0 + dev: true + /fs-extra@7.0.1: resolution: {integrity: sha512-YJDaCJZEnBmcbw13fvdAM9AwNOJwOzrE4pqMqBq5nFiEqXUqHwlK4B+3pUw6JNvfSPtX05xFHtYy/1ni01eGCw==} engines: {node: '>=6 <7 || >=8'} @@ -2981,6 +3679,16 @@ packages: universalify: 0.1.2 dev: true + /fs-promise@2.0.3: + resolution: {integrity: sha512-oDrTLBQAcRd+p/tSRWvqitKegLPsvqr7aehs5N9ILWFM9az5y5Uh71jKdZ/DTMC4Kel7+GNCQyFCx/IftRv8yg==} + deprecated: Use mz or fs-extra^3.0 with Promise Support + dependencies: + any-promise: 1.3.0 + fs-extra: 2.1.2 + mz: 2.7.0 + thenify-all: 1.6.0 + dev: true + /fs.realpath@1.0.0: resolution: {integrity: sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw==} dev: true @@ -3010,6 +3718,36 @@ packages: resolution: {integrity: sha512-xckBUXyTIqT97tq2x2AMb+g163b5JFysYk0x4qxNFwbfQkmNZoiRHb6sPzI9/QV33WeuvVYBUIiD4NzNIyqaRQ==} dev: true + /gaxios@6.6.0: + resolution: {integrity: sha512-bpOZVQV5gthH/jVCSuYuokRo2bTKOcuBiVWpjmTn6C5Agl5zclGfTljuGsQZxwwDBkli+YhZhP4TdlqTnhOezQ==} + engines: {node: '>=14'} + dependencies: + extend: 3.0.2 + https-proxy-agent: 7.0.4 + is-stream: 2.0.1 + node-fetch: 2.7.0(encoding@0.1.13) + uuid: 9.0.1 + transitivePeerDependencies: + - encoding + - supports-color + dev: true + + /gcp-metadata@6.1.0: + resolution: {integrity: sha512-Jh/AIwwgaxan+7ZUUmRLCjtchyDiqh4KjBJ5tW3plBZb5iL/BPcso8A5DlzeD9qlw0duCamnNdpFjxwaT0KyKg==} + engines: {node: '>=14'} + dependencies: + gaxios: 6.6.0 + json-bigint: 1.0.0 + transitivePeerDependencies: + - encoding + - supports-color + dev: true + + /generic-pool@3.9.0: + resolution: {integrity: sha512-hymDOu5B53XvN4QT9dBmZxPX4CWhBPPLguTZ9MMFeFa/Kg0xWVfylOVNlJji/E7yTZWFd/q9GO5TxDLq156D7g==} + engines: {node: '>= 4'} + dev: true + /gensync@1.0.0-beta.2: resolution: {integrity: sha512-3hN7NaskYvMDLQY55gnW3NQ+mesEAepTqlg+VEbj7zzqEMBVNhzcGYYeqFo/TlYz6eQiFcp1HcsCZO+nGgS8zg==} engines: {node: '>=6.9.0'} @@ -3029,6 +3767,17 @@ packages: hasown: 2.0.0 dev: true + /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: true + /get-package-type@0.1.0: resolution: {integrity: sha512-pjzuKtY64GYfWizNAJ0fr9VqttZkNiK2iS430LtIHzjBEr6bX8Am2zm4sW4Ro5wjWW5cAlRL1qAMTcXbjNAO2Q==} engines: {node: '>=8.0.0'} @@ -3047,6 +3796,10 @@ packages: get-intrinsic: 1.2.2 dev: true + /github-from-package@0.0.0: + resolution: {integrity: sha512-SyHy3T1v2NUXn29OsWdxmK6RwHD+vkj3v8en8AOBZ1wBQ/hCAQ5bAQTD02kW4W9tUp/3Qh6J8r9EvntiyCmOOw==} + dev: true + /glob-parent@5.1.2: resolution: {integrity: sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==} engines: {node: '>= 6'} @@ -3115,6 +3868,21 @@ packages: slash: 3.0.0 dev: true + /google-auth-library@9.10.0: + resolution: {integrity: sha512-ol+oSa5NbcGdDqA+gZ3G3mev59OHBZksBTxY/tYwjtcp1H/scAFwJfSQU9/1RALoyZ7FslNbke8j4i3ipwlyuQ==} + engines: {node: '>=14'} + dependencies: + base64-js: 1.5.1 + ecdsa-sig-formatter: 1.0.11 + gaxios: 6.6.0 + gcp-metadata: 6.1.0 + gtoken: 7.1.0 + jws: 4.0.0 + transitivePeerDependencies: + - encoding + - supports-color + dev: true + /gopd@1.0.1: resolution: {integrity: sha512-d65bNlIadxvpb/A2abVdlqKqV563juRnZ1Wtk6s1sIR8uNsXR70xqIzVqxVf1eTqDunwT2MkczEeaezCKTZhwA==} dependencies: @@ -3133,6 +3901,21 @@ packages: resolution: {integrity: sha512-EtKwoO6kxCL9WO5xipiHTZlSzBm7WLT627TqC/uVRd0HKmq8NXyebnNYxDoBi7wt8eTWrUrKXCOVaFq9x1kgag==} dev: true + /gtoken@7.1.0: + resolution: {integrity: sha512-pCcEwRi+TKpMlxAQObHDQ56KawURgyAf6jtIY046fJ5tIv3zDe/LEIubckAO8fj6JnAxLdmWkUfNyulQ2iKdEw==} + engines: {node: '>=14.0.0'} + dependencies: + gaxios: 6.6.0 + jws: 4.0.0 + transitivePeerDependencies: + - encoding + - supports-color + dev: true + + /guid-typescript@1.0.9: + resolution: {integrity: sha512-Y8T4vYhEfwJOTbouREvG+3XDsjr8E3kIr7uf+JZ0BYloFsttiHU0WfvANVsR7TxNUJa/WpCnw/Ino/p+DeBhBQ==} + dev: true + /hard-rejection@2.1.0: resolution: {integrity: sha512-VIZB+ibDhx7ObhAe7OVtoEbuP4h/MuOTHJ+J8h/eBXotJYl0fBgR72xDFCKgIh22OJZIOVNxBMWuhAr10r8HdA==} engines: {node: '>=6'} @@ -3158,6 +3941,12 @@ packages: get-intrinsic: 1.2.2 dev: true + /has-property-descriptors@1.0.2: + resolution: {integrity: sha512-55JNKuIW+vq4Ke1BjOTjM2YctQIvCT7GFzHwmfZPGo5wnrgkid0YQtnAleFSqumZm4az3n2BS+erby5ipJdgrg==} + dependencies: + es-define-property: 1.0.0 + dev: true + /has-proto@1.0.1: resolution: {integrity: sha512-7qE+iP+O+bgF9clE5+UoBFzE65mlBiVj3tKCrlNQ0Ogwm0BjpT/gK4SlLYDMybDh5I3TCTKnPPa0oMG7JDYrhg==} engines: {node: '>= 0.4'} @@ -3185,10 +3974,24 @@ packages: resolution: {integrity: sha512-mxIDAb9Lsm6DoOJ7xH+5+X4y1LU/4Hi50L9C5sIswK3JzULS4bwk1FvjdBgvYR4bzT4tuUQiC15FE2f5HbLvYw==} dev: true + /html-entities@2.5.2: + resolution: {integrity: sha512-K//PSRMQk4FZ78Kyau+mZurHn3FH0Vwr+H36eE0rPbeYkRRi9YxceYPhuN60UwWorxyKHhqoAJl2OFKa4BVtaA==} + dev: true + /html-escaper@2.0.2: resolution: {integrity: sha512-H2iMtd0I4Mt5eYiapRdIDjp+XzelXQ0tFE4JS7YFwFevXXMmOp9myNrUvCg0D6ws8iqkRPBfKHgbwig1SmlLfg==} dev: true + /https-proxy-agent@7.0.4: + resolution: {integrity: sha512-wlwpilI7YdjSkWaQ/7omYBMTliDcmCN8OLihO6I9B86g06lMyAoqgoDpV0XqoaPOKj+0DIdAvnsWfyAAhmimcg==} + engines: {node: '>= 14'} + dependencies: + agent-base: 7.1.1 + debug: 4.3.4 + transitivePeerDependencies: + - supports-color + dev: true + /human-id@1.0.2: resolution: {integrity: sha512-UNopramDEhHJD+VR+ehk8rOslwSfByxPIZyJRfV739NDhN5LF1fa1MqnzKm2lGTQRjNrjK19Q5fhkgIfjlVUKw==} dev: true @@ -3211,11 +4014,26 @@ packages: safer-buffer: 2.1.2 dev: true + /iconv-lite@0.6.3: + resolution: {integrity: sha512-4fCk79wshMdzMp2rH06qWrJE4iolqLhCUH+OiuIgU++RB0+94NlDL81atO7GX55uUKueo0txHNtvEyI6D7WdMw==} + engines: {node: '>=0.10.0'} + dependencies: + safer-buffer: 2.1.2 + dev: true + + /ieee754@1.2.1: + resolution: {integrity: sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA==} + dev: true + /ignore@5.3.0: resolution: {integrity: sha512-g7dmpshy+gD7mh88OC9NwSGTKoc3kyLAZQRU1mt53Aw/vnvfXnbC+F/7F7QoYVKbV+KNvJx8wArewKy1vXMtlg==} engines: {node: '>= 4'} dev: true + /immediate@3.0.6: + resolution: {integrity: sha512-XXOFtyqDjNDAQxVfYxuF7g9Il/IbWmmlQg2MYKOH8ExIT1qg6xc4zyS3HaEEATgs1btfzxq15ciUiY7gjSXRGQ==} + dev: true + /import-fresh@3.3.0: resolution: {integrity: sha512-veYYhQa+D1QBKznvhUHxb8faxlrwUnxseDAbAp457E0wLNio2bOSKnjYDhMj+YiAq61xrMGhQk9iXVk5FzgQMw==} engines: {node: '>=6'} @@ -3259,10 +4077,20 @@ packages: wrappy: 1.0.2 dev: true + /infobox-parser@3.6.4: + resolution: {integrity: sha512-d2lTlxKZX7WsYxk9/UPt51nkmZv5tbC75SSw4hfHqZ3LpRAn6ug0oru9xI2X+S78va3aUAze3xl/UqMuwLmJUw==} + dependencies: + camelcase: 4.1.0 + dev: true + /inherits@2.0.4: resolution: {integrity: sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==} dev: true + /ini@1.3.8: + resolution: {integrity: sha512-JV/yugV2uzW5iMRSiZAyDtQd+nxtUnjeLt0acNdw98kKLrvuRVyB80tsREOE7yvGVgalhZ6RNXCmEHkUKBKxew==} + dev: true + /internal-slot@1.0.6: resolution: {integrity: sha512-Xj6dv+PsbtwyPpEflsejS+oIZxmMlV44zAhG479uYu89MsjcYOhCFnNyKrkJrihbsiasQyY0afoCl/9BLR65bg==} engines: {node: '>= 0.4'} @@ -3288,6 +4116,10 @@ packages: resolution: {integrity: sha512-zz06S8t0ozoDXMG+ube26zeCTNXcKIPJZJi8hBrF4idCLms4CG9QtK7qBl1boi5ODzFpjswb5JPmHCbMpjaYzg==} dev: true + /is-arrayish@0.3.2: + resolution: {integrity: sha512-eVRqCvVlZbuw3GrM63ovNSNAeA1K16kaR/LRY/92w0zxQ5/1YzwblUX652i4Xs9RwAGjW9d9y6X88t8OaAJfWQ==} + dev: true + /is-bigint@1.0.4: resolution: {integrity: sha512-zB9CruMamjym81i2JZ3UMn54PKGsQzsJeo6xvN3HJJ4CAsQNB6iRutp2To77OfCNuoxspsIhzaPoO1zyCEhFOg==} dependencies: @@ -3430,6 +4262,10 @@ packages: engines: {node: '>=0.10.0'} dev: true + /isarray@1.0.0: + resolution: {integrity: sha512-VLghIWNM6ELQzo7zwmcg0NmTVyWKYjvIeM83yjp0wRDTmUnrM678fQbcKBo6n2CJEF0szoG//ytg+TKla89ALQ==} + dev: true + /isarray@2.0.5: resolution: {integrity: sha512-xHjhDr3cNBK0BzdUJSPXZntQUx/mwMS5Rw4A7lPJ90XGAO6ISP/ePDNuo0vhqOZU+UD5JoodwCAAoZQd3FeAKw==} dev: true @@ -3438,6 +4274,15 @@ packages: resolution: {integrity: sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==} dev: true + /isomorphic-fetch@3.0.0: + resolution: {integrity: sha512-qvUtwJ3j6qwsF3jLxkZ72qCgjMysPzDfeV240JHiGZsANBYd+EEuu35v7dfrJ9Up0Ak07D7GGSkGhCHTqg/5wA==} + dependencies: + node-fetch: 2.7.0(encoding@0.1.13) + whatwg-fetch: 3.6.20 + transitivePeerDependencies: + - encoding + dev: true + /istanbul-lib-coverage@3.2.2: resolution: {integrity: sha512-O8dpsF+r0WV/8MNRKfnmrtCWhuKjxrq2w+jpzBL5UZKTi2LeVWnWOmWRxFlesJONmc+wLAGvKQZEOanko0LFTg==} engines: {node: '>=8'} @@ -3523,7 +4368,7 @@ packages: '@jest/expect': 29.7.0 '@jest/test-result': 29.7.0 '@jest/types': 29.6.3 - '@types/node': 20.12.4 + '@types/node': 20.12.12 chalk: 4.1.2 co: 4.6.0 dedent: 1.5.1 @@ -3544,7 +4389,7 @@ packages: - supports-color dev: true - /jest-cli@29.7.0(@types/node@20.12.4): + /jest-cli@29.7.0(@types/node@20.12.12): resolution: {integrity: sha512-OVVobw2IubN/GSYsxETi+gOe7Ka59EFMR/twOU3Jb2GnKKeMGJB5SGUUrEz3SFVmJASUdZUzy83sLNNQ2gZslg==} engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} hasBin: true @@ -3558,10 +4403,10 @@ packages: '@jest/test-result': 29.7.0 '@jest/types': 29.6.3 chalk: 4.1.2 - create-jest: 29.7.0(@types/node@20.12.4) + create-jest: 29.7.0(@types/node@20.12.12) exit: 0.1.2 import-local: 3.1.0 - jest-config: 29.7.0(@types/node@20.12.4) + jest-config: 29.7.0(@types/node@20.12.12) jest-util: 29.7.0 jest-validate: 29.7.0 yargs: 17.7.2 @@ -3572,7 +4417,7 @@ packages: - ts-node dev: true - /jest-config@29.7.0(@types/node@20.12.4): + /jest-config@29.7.0(@types/node@20.12.12): resolution: {integrity: sha512-uXbpfeQ7R6TZBqI3/TxCU4q4ttk3u0PJeC+E0zbfSoSjq6bJ7buBPxzQPL0ifrkY4DNu4JUdk0ImlBUYi840eQ==} engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} peerDependencies: @@ -3587,7 +4432,7 @@ packages: '@babel/core': 7.23.6 '@jest/test-sequencer': 29.7.0 '@jest/types': 29.6.3 - '@types/node': 20.12.4 + '@types/node': 20.12.12 babel-jest: 29.7.0(@babel/core@7.23.6) chalk: 4.1.2 ci-info: 3.9.0 @@ -3647,7 +4492,7 @@ packages: '@jest/environment': 29.7.0 '@jest/fake-timers': 29.7.0 '@jest/types': 29.6.3 - '@types/node': 20.12.4 + '@types/node': 20.12.12 jest-mock: 29.7.0 jest-util: 29.7.0 dev: true @@ -3663,7 +4508,7 @@ packages: dependencies: '@jest/types': 29.6.3 '@types/graceful-fs': 4.1.9 - '@types/node': 20.12.4 + '@types/node': 20.12.12 anymatch: 3.1.3 fb-watchman: 2.0.2 graceful-fs: 4.2.11 @@ -3714,7 +4559,7 @@ packages: engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} dependencies: '@jest/types': 29.6.3 - '@types/node': 20.12.4 + '@types/node': 20.12.12 jest-util: 29.7.0 dev: true @@ -3769,7 +4614,7 @@ packages: '@jest/test-result': 29.7.0 '@jest/transform': 29.7.0 '@jest/types': 29.6.3 - '@types/node': 20.12.4 + '@types/node': 20.12.12 chalk: 4.1.2 emittery: 0.13.1 graceful-fs: 4.2.11 @@ -3800,7 +4645,7 @@ packages: '@jest/test-result': 29.7.0 '@jest/transform': 29.7.0 '@jest/types': 29.6.3 - '@types/node': 20.12.4 + '@types/node': 20.12.12 chalk: 4.1.2 cjs-module-lexer: 1.2.3 collect-v8-coverage: 1.0.2 @@ -3852,7 +4697,7 @@ packages: engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} dependencies: '@jest/types': 29.6.3 - '@types/node': 20.12.4 + '@types/node': 20.12.12 chalk: 4.1.2 ci-info: 3.9.0 graceful-fs: 4.2.11 @@ -3877,7 +4722,7 @@ packages: dependencies: '@jest/test-result': 29.7.0 '@jest/types': 29.6.3 - '@types/node': 20.12.4 + '@types/node': 20.12.12 ansi-escapes: 4.3.2 chalk: 4.1.2 emittery: 0.13.1 @@ -3889,13 +4734,13 @@ packages: resolution: {integrity: sha512-eIz2msL/EzL9UFTFFx7jBTkeZfku0yUAyZZZmJ93H2TYEiroIx2PQjEXcwYtYl8zXCxb+PAmA2hLIt/6ZEkPHw==} engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} dependencies: - '@types/node': 20.12.4 + '@types/node': 20.12.12 jest-util: 29.7.0 merge-stream: 2.0.0 supports-color: 8.1.1 dev: true - /jest@29.7.0(@types/node@20.12.4): + /jest@29.7.0(@types/node@20.12.12): resolution: {integrity: sha512-NIy3oAFp9shda19hy4HK0HRTWKtPJmGdnvywu01nOqNC2vZg+Z+fvJDxpMQA88eb2I9EcafcdjYgsDthnYTvGw==} engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} hasBin: true @@ -3908,7 +4753,7 @@ packages: '@jest/core': 29.7.0 '@jest/types': 29.6.3 import-local: 3.1.0 - jest-cli: 29.7.0(@types/node@20.12.4) + jest-cli: 29.7.0(@types/node@20.12.12) transitivePeerDependencies: - '@types/node' - babel-plugin-macros @@ -3916,12 +4761,26 @@ packages: - ts-node dev: true - /js-tiktoken@1.0.10: + /js-base64@3.7.2: + resolution: {integrity: sha512-NnRs6dsyqUXejqk/yv2aiXlAvOs56sLkX6nUdeaNezI5LFFLlsZjOThmwnrcwh5ZZRwZlCMnVAY3CvhIhoVEKQ==} + dev: true + + /js-base64@3.7.7: + resolution: {integrity: sha512-7rCnleh0z2CkXhH67J8K1Ytz0b2Y+yxTPL+/KOJoa20hfnVQ/3/T6W/KflYI4bRHRagNeXeU2bkNGI3v1oS/lw==} + dev: true + + /js-tiktoken@1.0.10: resolution: {integrity: sha512-ZoSxbGjvGyMT13x6ACo9ebhDha/0FHdKA+OsQcMOWcm1Zs7r90Rhk5lhERLzji+3rA7EKpXCgwXcM5fF3DMpdA==} dependencies: base64-js: 1.5.1 dev: true + /js-tiktoken@1.0.12: + resolution: {integrity: sha512-L7wURW1fH9Qaext0VzaUDpFGVQgjkdE3Dgsy9/+yXyGEpBKnylTd0mU0bfbNkKDlXRb6TEsZkwuflu1B8uQbJQ==} + dependencies: + base64-js: 1.5.1 + dev: true + /js-tokens@4.0.0: resolution: {integrity: sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==} dev: true @@ -3947,6 +4806,12 @@ packages: hasBin: true dev: true + /json-bigint@1.0.0: + resolution: {integrity: sha512-SiPv/8VpZuWbvLSMtTDU8hEfrZWg/mH/nV/b4o0CYbSxu1UIQPLdwKOCIyLQX+VIPO5vrLX3i8qtqFyhdPSUSQ==} + dependencies: + bignumber.js: 9.1.2 + dev: true + /json-buffer@3.0.1: resolution: {integrity: sha512-4bV5BfR2mqfQTJm+V5tPPdf+ZpuhiIvTuAB5g8kcrXOZpTT/QwwVRWBywX1ozr6lEuPdbHxwaJlm9G6mI2sfSQ==} dev: true @@ -3959,6 +4824,10 @@ packages: resolution: {integrity: sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==} dev: true + /json-schema-traverse@1.0.0: + resolution: {integrity: sha512-NM8/P9n3XjXhIZn1lLhkFaACTOURQXjWhV4BA/RnOv8xvgqtqpAX9IO4mRQxSx1Rlo4tqzeqb0sOlruaOy3dug==} + dev: true + /json-stable-stringify-without-jsonify@1.0.1: resolution: {integrity: sha512-Bdboy+l7tA3OGW6FjyFHWkP5LuByj1Tk33Ljyq0axyzdk9//JSi2u3fP1QSmd1KNwq6VOKYGlAu87CisVir6Pw==} dev: true @@ -3969,6 +4838,12 @@ packages: hasBin: true dev: true + /jsonfile@2.4.0: + resolution: {integrity: sha512-PKllAqbgLgxHaj8TElYymKCAgrASebJrWpTnEkOaTowt23VKXXN0sUeriJ+eh7y6ufb/CC5ap11pz71/cM0hUw==} + optionalDependencies: + graceful-fs: 4.2.11 + dev: true + /jsonfile@4.0.0: resolution: {integrity: sha512-m6F1R3z8jjlf2imQHS2Qez5sjKWQzbuuhuJ/FKYFRZvPE3PuHcSMVZzfsLhGVOkfd20obL5SWEBew5ShlquNxg==} optionalDependencies: @@ -3980,6 +4855,30 @@ packages: engines: {node: '>=0.10.0'} dev: true + /jszip@3.10.1: + resolution: {integrity: sha512-xXDvecyTpGLrqFrvkrUSoxxfJI5AH7U8zxxtVclpsUtMCq4JQ290LY8AW5c7Ggnr/Y/oK+bQMbqK2qmtk3pN4g==} + dependencies: + lie: 3.3.0 + pako: 1.0.11 + readable-stream: 2.3.8 + setimmediate: 1.0.5 + dev: true + + /jwa@2.0.0: + resolution: {integrity: sha512-jrZ2Qx916EA+fq9cEAeCROWPTfCwi1IVHqT2tapuqLEVVDKFDENFw1oL+MwrTvH6msKxsd1YTDVw6uKEcsrLEA==} + dependencies: + buffer-equal-constant-time: 1.0.1 + ecdsa-sig-formatter: 1.0.11 + safe-buffer: 5.2.1 + dev: true + + /jws@4.0.0: + resolution: {integrity: sha512-KDncfTmOZoOMTFG4mBlG0qUIOlc03fmzH+ru6RgYVZhPkyiy/92Owlt/8UEN+a4TXR1FQetfIpJE8ApdvdVxTg==} + dependencies: + jwa: 2.0.0 + safe-buffer: 5.2.1 + dev: true + /keyv@4.5.4: resolution: {integrity: sha512-oxVHkHR/EJf2CNXnWxRLW6mg7JyCCUcG0DtEGmL2ctUo1PNTin1PUil+r/+4r5MpVgC/fn1kjsx7mjSujKqIpw==} dependencies: @@ -4001,6 +4900,10 @@ packages: engines: {node: '>=6'} dev: true + /kuler@2.0.0: + resolution: {integrity: sha512-Xq9nH7KlWZmXAtodXDDRE7vs6DU1gTU8zYDHDiWLSip45Egwq3plLHzPn27NgvzL2r1LMPC1vdqh98sQxtqj4A==} + dev: true + /langchain@0.1.30: resolution: {integrity: sha512-5h/vNMmutQ98tbB0sPDlAileZVca6A2McFgGa3+D56Dm8mSSCzTQL2DngPA6h09DlKDpSr7+6PdFw5Hoj0ZDSw==} engines: {node: '>=18'} @@ -4274,10 +5177,80 @@ packages: type-check: 0.4.0 dev: true + /lie@3.3.0: + resolution: {integrity: sha512-UaiMJzeWRlEujzAuw5LokY1L5ecNQYZKfmyZ9L7wDHb/p5etKaxXhohBcrw0EYby+G/NA52vRSN4N39dxHAIwQ==} + dependencies: + immediate: 3.0.6 + dev: true + /lines-and-columns@1.2.4: resolution: {integrity: sha512-7ylylesZQ/PV29jhEDl3Ufjo6ZX7gCqJr5F7PKrqc93v7fzSymt1BpwEU8nAUXs8qzzvqhbjhK5QZg6Mt/HkBg==} dev: true + /llamaindex@0.3.14(@notionhq/client@2.2.15)(typescript@5.3.3): + resolution: {integrity: sha512-tOhqurpsov26MNTHkNzcYxBcaWQ6Y4Ma7s6ILZzkSUHs//5B+zrGLnPPDRu0NFpVG8+s1ZoJT0KG/2ntcRr6WQ==} + engines: {node: '>=18.0.0'} + peerDependencies: + '@notionhq/client': ^2.2.15 + dependencies: + '@anthropic-ai/sdk': 0.20.9 + '@aws-crypto/sha256-js': 5.2.0 + '@datastax/astra-db-ts': 1.2.0 + '@google-cloud/vertexai': 1.2.0 + '@google/generative-ai': 0.11.4 + '@grpc/grpc-js': 1.10.8 + '@huggingface/inference': 2.7.0 + '@llamaindex/cloud': 0.0.5 + '@llamaindex/env': 0.1.3(@aws-crypto/sha256-js@5.2.0)(pathe@1.1.2) + '@mistralai/mistralai': 0.2.0 + '@notionhq/client': 2.2.15 + '@pinecone-database/pinecone': 2.2.1 + '@qdrant/js-client-rest': 1.9.0(typescript@5.3.3) + '@types/lodash': 4.17.4 + '@types/papaparse': 5.3.14 + '@types/pg': 8.11.6 + '@xenova/transformers': 2.17.1 + '@zilliz/milvus2-sdk-node': 2.4.2 + ajv: 8.13.0 + assemblyai: 4.4.3 + chromadb: 1.7.3(@google/generative-ai@0.11.4)(cohere-ai@7.10.1)(openai@4.47.1) + cohere-ai: 7.10.1 + js-tiktoken: 1.0.12 + lodash: 4.17.21 + magic-bytes.js: 1.10.0 + mammoth: 1.7.2 + md-utils-ts: 2.0.0 + mongodb: 6.6.2 + notion-md-crawler: 1.0.0 + openai: 4.47.1 + papaparse: 5.4.1 + pathe: 1.1.2 + pdf2json: 3.0.5 + pg: 8.11.5 + pgvector: 0.1.8 + portkey-ai: 0.1.16 + rake-modified: 1.0.8 + string-strip-html: 13.4.8 + wikipedia: 2.1.2 + wink-nlp: 2.3.0 + transitivePeerDependencies: + - '@aws-sdk/credential-providers' + - '@mongodb-js/zstd' + - bufferutil + - debug + - encoding + - gcp-metadata + - kerberos + - mongodb-client-encryption + - node-fetch + - pg-native + - snappy + - socks + - supports-color + - typescript + - utf-8-validate + dev: true + /load-yaml-file@0.2.0: resolution: {integrity: sha512-OfCBkGEw4nN6JLtgRidPX6QxjBQGQf72q3si2uvqyFEMbycSFFHwAZeXx6cJgFM9wmLrf9zBwCP3Ivqa+LLZPw==} engines: {node: '>=6'} @@ -4302,6 +5275,14 @@ packages: p-locate: 5.0.0 dev: true + /lodash-es@4.17.21: + resolution: {integrity: sha512-mKnC+QJ9pWVzv+C4/U3rRsHapFfHvQFoFB92e52xeyGMcX6/OlIl78je1u8vePzYZSkkogMPJ2yjxxsb89cxyw==} + dev: true + + /lodash.camelcase@4.3.0: + resolution: {integrity: sha512-TwuEnCnxbc3rAvhf/LbG7tJUDzhqXyFnv3dtzLOPgCG/hODL7WFnsbwktkD7yUV0RrreP/l1PALq/YSg6VvjlA==} + dev: true + /lodash.memoize@4.1.2: resolution: {integrity: sha512-t7j+NzmgnQzTAYXcsHYLgimltOV1MXHtlOWf6GjL9Kj8GK5FInw5JotxvbOs+IvV1/Dzo04/fCGfLVs7aXb4Ag==} dev: true @@ -4314,10 +5295,38 @@ packages: resolution: {integrity: sha512-+WKqsK294HMSc2jEbNgpHpd0JfIBhp7rEV4aqXWqFr6AlXov+SlcgB1Fv01y2kGe3Gc8nMW7VA0SrGuSkRfIEg==} dev: true + /lodash@4.17.21: + resolution: {integrity: sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==} + dev: true + + /logform@2.6.0: + resolution: {integrity: sha512-1ulHeNPp6k/LD8H91o7VYFBng5i1BDE7HoKxVbZiGFidS1Rj65qcywLxX+pVfAPoQJEjRdvKcusKwOupHCVOVQ==} + engines: {node: '>= 12.0.0'} + dependencies: + '@colors/colors': 1.6.0 + '@types/triple-beam': 1.3.5 + fecha: 4.2.3 + ms: 2.1.3 + safe-stable-stringify: 2.4.3 + triple-beam: 1.4.1 + dev: true + + /long@4.0.0: + resolution: {integrity: sha512-XsP+KhQif4bjX1kbuSiySJFNAehNxgLb6hPRGJ9QsUr8ajHkuXGdrHmFUTUUXhDwVX2R5bY4JNZEwbUiMhV+MA==} + dev: true + /long@5.2.3: resolution: {integrity: sha512-lcHwpNoggQTObv5apGNCTdJrO69eHOZMi4BNC+rTLER8iHAqGrUVeLh/irVIM7zTw2bOXA8T6uNPeujwOLg/2Q==} dev: true + /lop@0.4.1: + resolution: {integrity: sha512-9xyho9why2A2tzm5aIcMWKvzqKsnxrf9B5I+8O30olh6lQU8PH978LqZoI4++37RBgS1Em5i54v1TFs/3wnmXQ==} + dependencies: + duck: 0.1.12 + option: 0.2.4 + underscore: 1.13.6 + dev: true + /lru-cache@10.1.0: resolution: {integrity: sha512-/1clY/ui8CzjKFyjdvwPWJUYKiFVXG2I2cY0ssG7h4+hwk+XOIX7ZSG9Q7TW8TW3Kp3BUSqgFWBLgL4PJ+Blag==} engines: {node: 14 || >=16.14} @@ -4342,6 +5351,15 @@ packages: dependencies: yallist: 4.0.0 + /lru-cache@9.1.2: + resolution: {integrity: sha512-ERJq3FOzJTxBbFjZ7iDs+NiK4VI9Wz+RdrrAB8dio1oV+YvdPzUEE4QNiT2VD51DkIbCYRUUzCRkssXCHqSnKQ==} + engines: {node: 14 || >=16.14} + dev: true + + /magic-bytes.js@1.10.0: + resolution: {integrity: sha512-/k20Lg2q8LE5xiaaSkMXk4sfvI+9EGEykFS4b0CHHGWqDYU0bGUFSwchNOMA56D7TCs9GwVTkqe9als1/ns8UQ==} + dev: true + /make-dir@4.0.0: resolution: {integrity: sha512-hXdUTZYIVOt1Ex//jAQi+wTZZpUpwBj/0QsOzqegb3rGMMeJiSEu5xLHnYfBrRV4RH2+OCSOO95Is/7x1WJ4bw==} engines: {node: '>=10'} @@ -4359,6 +5377,23 @@ packages: tmpl: 1.0.5 dev: true + /mammoth@1.7.2: + resolution: {integrity: sha512-MqWU2hcLf1I5QMKyAbfJCvrLxnv5WztrAQyorfZ+WPq7Hk82vZFmvfR2/64ajIPpM4jlq0TXp1xZvp/FFaL1Ug==} + engines: {node: '>=12.0.0'} + hasBin: true + dependencies: + '@xmldom/xmldom': 0.8.10 + argparse: 1.0.10 + base64-js: 1.5.1 + bluebird: 3.4.7 + dingbat-to-unicode: 1.0.1 + jszip: 3.10.1 + lop: 0.4.1 + path-is-absolute: 1.0.1 + underscore: 1.13.6 + xmlbuilder: 10.1.1 + dev: true + /map-obj@1.0.1: resolution: {integrity: sha512-7N/q3lyZ+LVCp7PzuxrJr4KMbBE2hW7BT7YNia330OFxIf4d3r5zVpicP2650l7CPN6RM9zOJRl3NGpqSiw3Eg==} engines: {node: '>=0.10.0'} @@ -4369,6 +5404,10 @@ packages: engines: {node: '>=8'} dev: true + /md-utils-ts@2.0.0: + resolution: {integrity: sha512-sMG6JtX0ebcRMHxYTcmgsh0/m6o8hGdQHFE2OgjvflRZlQM51CGGj/uuk056D+12BlCiW0aTpt/AdlDNtgQiew==} + dev: true + /md5@2.3.0: resolution: {integrity: sha512-T1GITYmFaKuO91vxyoQMFETst+O71VUPEU3ze5GNzDm0OWdP8v1ziTaAEPUr/3kLsY3Sftgz242A1SetQiDL7g==} dependencies: @@ -4377,6 +5416,10 @@ packages: is-buffer: 1.1.6 dev: true + /memory-pager@1.5.0: + resolution: {integrity: sha512-ZS4Bp4r/Zoeq6+NLJpP+0Zzm0pR8whtGPf1XExKLJBAczGMnSi3It14OiNCStjQjM6NU1okjQGSxgEZN8eBYKg==} + dev: true + /meow@6.1.1: resolution: {integrity: sha512-3YffViIt2QWgTy6Pale5QpopX/IvU3LPL03jOTqp6pGj3VjesdO/U8CuHMKpnQr4shCNCM5fd5XFFvIIl6JBHg==} engines: {node: '>=8'} @@ -4428,6 +5471,11 @@ packages: engines: {node: '>=6'} dev: true + /mimic-response@3.1.0: + resolution: {integrity: sha512-z0yWI+4FDrrweS8Zmt4Ej5HdJmky15+L2e6Wgn3+iK5fWzb6T3fhNFq2+MeTRb064c6Wr4N/wv0DzQTjNzHNGQ==} + engines: {node: '>=10'} + dev: true + /min-indent@1.0.1: resolution: {integrity: sha512-I9jwMn07Sy/IwOj3zVkVik2JTvgpaykDZEigL6Rx6N9LbMywwUSMtxET+7lVoDLLd3O3IXwJwvuuns8UB/HeAg==} engines: {node: '>=4'} @@ -4455,6 +5503,10 @@ packages: kind-of: 6.0.3 dev: true + /minimist@1.2.8: + resolution: {integrity: sha512-2yyAR8qBkN3YuheJanUpWC5U3bb5osDywNB8RzDVlDwDHbocAJveqqj1u8+SVD7jkWT4yvsHCpWqqWqAxb0zCA==} + dev: true + /minipass@7.0.4: resolution: {integrity: sha512-jYofLM5Dam9279rdkWzqHozUo4ybjdZmCsDHePy5V/PbBcVMiSZR97gmAy45aqi8CK1lG2ECd356FU86avfwUQ==} engines: {node: '>=16 || 14 >=14.17'} @@ -4465,6 +5517,10 @@ packages: engines: {node: '>= 8.0.0'} dev: true + /mkdirp-classic@0.5.3: + resolution: {integrity: sha512-gKLcREMhtuZRwRAfqP3RFW+TK4JqApVBtOIftVgjuABpAtpxhPGaDcfvbhNvD0B8iD1oUr/txX35NjcaY6Ns/A==} + dev: true + /ml-array-mean@1.1.6: resolution: {integrity: sha512-MIdf7Zc8HznwIisyiJGRH9tRigg3Yf4FldW8DxKxpCCv/g5CafTw0RRu51nojVEOXuCQC7DRVVu5c7XXO/5joQ==} dependencies: @@ -4500,6 +5556,45 @@ packages: resolution: {integrity: sha512-ySViT69/76t8VhE1xXHK6Ch4NcDd26gx0MzKXLO+F7NOtnqH68d9zF94nT8ZWSxXh8ELOERsnJO/sWt1xZYw5A==} dev: false + /mongodb-connection-string-url@3.0.1: + resolution: {integrity: sha512-XqMGwRX0Lgn05TDB4PyG2h2kKO/FfWJyCzYQbIhXUxz7ETt0I/FqHjUeqj37irJ+Dl1ZtU82uYyj14u2XsZKfg==} + dependencies: + '@types/whatwg-url': 11.0.5 + whatwg-url: 13.0.0 + dev: true + + /mongodb@6.6.2: + resolution: {integrity: sha512-ZF9Ugo2JCG/GfR7DEb4ypfyJJyiKbg5qBYKRintebj8+DNS33CyGMkWbrS9lara+u+h+yEOGSRiLhFO/g1s1aw==} + engines: {node: '>=16.20.1'} + peerDependencies: + '@aws-sdk/credential-providers': ^3.188.0 + '@mongodb-js/zstd': ^1.1.0 + gcp-metadata: ^5.2.0 + kerberos: ^2.0.1 + mongodb-client-encryption: '>=6.0.0 <7' + snappy: ^7.2.2 + socks: ^2.7.1 + peerDependenciesMeta: + '@aws-sdk/credential-providers': + optional: true + '@mongodb-js/zstd': + optional: true + gcp-metadata: + optional: true + kerberos: + optional: true + mongodb-client-encryption: + optional: true + snappy: + optional: true + socks: + optional: true + dependencies: + '@mongodb-js/saslprep': 1.1.7 + bson: 6.7.0 + mongodb-connection-string-url: 3.0.1 + dev: true + /ms@2.1.2: resolution: {integrity: sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==} @@ -4507,16 +5602,39 @@ packages: resolution: {integrity: sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==} dev: true + /mz@2.7.0: + resolution: {integrity: sha512-z81GNO7nnYMEhrGh9LeymoE4+Yr0Wn5McHIZMK5cfQCl+NDX08sCZgUc9/6MHni9IWuFLm1Z3HTCXu2z9fN62Q==} + dependencies: + any-promise: 1.3.0 + object-assign: 4.1.1 + thenify-all: 1.6.0 + dev: true + + /napi-build-utils@1.0.2: + resolution: {integrity: sha512-ONmRUqK7zj7DWX0D9ADe03wbwOBZxNAfF20PlGfCWQcD3+/MakShIHrMqx9YwPTfxDdF1zLeL+RGZiR9kGMLdg==} + dev: true + /natural-compare@1.4.0: resolution: {integrity: sha512-OWND8ei3VtNC9h7V60qff3SVobHr996CTwgxubgyQYEpg290h9J0buyECNNJexkFm5sOajh5G116RYA1c8ZMSw==} dev: true + /node-abi@3.62.0: + resolution: {integrity: sha512-CPMcGa+y33xuL1E0TcNIu4YyaZCxnnvkVaEXrsosR3FxN+fV8xvb7Mzpb7IgKler10qeMkE6+Dp8qJhpzdq35g==} + engines: {node: '>=10'} + dependencies: + semver: 7.5.4 + dev: true + + /node-addon-api@6.1.0: + resolution: {integrity: sha512-+eawOlIgy680F0kBzPUNFhMZGtJ1YmqM6l4+Crf4IkImjYrO/mqPwRMh352g23uIaQKFItcQ64I7KMaJxHgAVA==} + dev: true + /node-domexception@1.0.0: resolution: {integrity: sha512-/jKZoMpw0F8GRwl4/eLROPA3cfcXtLApP0QzLmUT/HuPCZWyB7IY9ZrMeKw2O/nFIqPQB3PVM9aYm0F312AXDQ==} engines: {node: '>=10.5.0'} dev: true - /node-fetch@2.7.0: + /node-fetch@2.7.0(encoding@0.1.13): resolution: {integrity: sha512-c4FRfUm/dbcWZ7U+1Wq0AwCyFL+3nt2bEw05wfxSz+DWpWsitgmSgYmy2dQdWyKC1694ELPqMs/YzUSNozLt8A==} engines: {node: 4.x || >=6.0.0} peerDependencies: @@ -4525,6 +5643,7 @@ packages: encoding: optional: true dependencies: + encoding: 0.1.13 whatwg-url: 5.0.0 dev: true @@ -4550,6 +5669,15 @@ packages: engines: {node: '>=0.10.0'} dev: true + /notion-md-crawler@1.0.0: + resolution: {integrity: sha512-mdB6zn/i32qO2C7X7wZLDpWvFryO3bPYMuBfFgmTPomnfEtIejdQJNVaZzw2GapM82lfWZ5dfsZp3s3UL4p1Fg==} + dependencies: + '@notionhq/client': 2.2.15 + md-utils-ts: 2.0.0 + transitivePeerDependencies: + - encoding + dev: true + /npm-run-path@4.0.1: resolution: {integrity: sha512-S48WzZW777zhNIrn7gxOlISNAqi9ZC/uQFnRdbeIHhZhCA6UqpkOT8T1G7BvfdgP4Er8gF4sUbaS0i7QvIfCWw==} engines: {node: '>=8'} @@ -4562,6 +5690,16 @@ packages: engines: {node: '>=8'} dev: true + /object-assign@4.1.1: + resolution: {integrity: sha512-rJgTQnkUnH1sFw8yT6VSU3zD3sWmu6sZhIseY8VX+GRu3P6F7Fu+JNDoXfklElbLJSnc3FUQHVe4cU5hj+BcUg==} + engines: {node: '>=0.10.0'} + dev: true + + /object-hash@3.0.0: + resolution: {integrity: sha512-RSn9F68PjH9HqtltsSnqYC1XXoWe9Bju5+213R98cNGttag9q9yAOTzdbsqvIa7aNm5WffBZFpWYr2aWrklWAw==} + engines: {node: '>= 6'} + dev: true + /object-inspect@1.13.1: resolution: {integrity: sha512-5qoj1RUiKOMsCCNLV1CBiPYE10sziTsnmNxkAI/rZhiD63CF7IqdFGC/XzjWjpSgLf0LxXX3bDFIh0E18f6UhQ==} dev: true @@ -4581,12 +5719,22 @@ packages: object-keys: 1.1.1 dev: true + /obuf@1.1.2: + resolution: {integrity: sha512-PX1wu0AmAdPqOL1mWhqmlOd8kOIZQwGZw6rh7uby9fTc5lhaOWFLX3I6R1hrF9k3zUY40e6igsLGkDXK92LJNg==} + dev: true + /once@1.4.0: resolution: {integrity: sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w==} dependencies: wrappy: 1.0.2 dev: true + /one-time@1.0.0: + resolution: {integrity: sha512-5DXOiRKwuSEcQ/l0kGCF6Q3jcADFv5tSmRaJck/OqkVFcOzutB134KRSfF0xDrL39MNnqxbHBbUUcjZIhTgb2g==} + dependencies: + fn.name: 1.1.0 + dev: true + /onetime@5.1.2: resolution: {integrity: sha512-kbpaSSGJTWdAY5KPVeMOKXSrPtr8C8C7wodJbcsd51jRnmD+GZu8Y0VoU6Dm5Z4vWr0Ig/1NKuWRKf7j5aaYSg==} engines: {node: '>=6'} @@ -4594,6 +5742,36 @@ packages: mimic-fn: 2.1.0 dev: true + /onnx-proto@4.0.4: + resolution: {integrity: sha512-aldMOB3HRoo6q/phyB6QRQxSt895HNNw82BNyZ2CMh4bjeKv7g/c+VpAFtJuEMVfYLMbRx61hbuqnKceLeDcDA==} + dependencies: + protobufjs: 6.11.4 + dev: true + + /onnxruntime-common@1.14.0: + resolution: {integrity: sha512-3LJpegM2iMNRX2wUmtYfeX/ytfOzNwAWKSq1HbRrKc9+uqG/FsEA0bbKZl1btQeZaXhC26l44NWpNUeXPII7Ew==} + dev: true + + /onnxruntime-node@1.14.0: + resolution: {integrity: sha512-5ba7TWomIV/9b6NH/1x/8QEeowsb+jBEvFzU6z0T4mNsFwdPqXeFUM7uxC6QeSRkEbWu3qEB0VMjrvzN/0S9+w==} + os: [win32, darwin, linux] + requiresBuild: true + dependencies: + onnxruntime-common: 1.14.0 + dev: true + optional: true + + /onnxruntime-web@1.14.0: + resolution: {integrity: sha512-Kcqf43UMfW8mCydVGcX9OMXI2VN17c0p6XvR7IPSZzBf/6lteBzXHvcEVWDPmCKuGombl997HgLqj91F11DzXw==} + dependencies: + flatbuffers: 1.12.0 + guid-typescript: 1.0.9 + long: 4.0.0 + onnx-proto: 4.0.4 + onnxruntime-common: 1.14.0 + platform: 1.3.6 + dev: true + /openai@4.24.1: resolution: {integrity: sha512-ezm/O3eiZMnyBqirUnWm9N6INJU1WhNtz+nK/Zj/2oyKvRz9pgpViDxa5wYOtyGYXPn1sIKBV0I/S4BDhtydqw==} hasBin: true @@ -4605,7 +5783,7 @@ packages: digest-fetch: 1.3.0 form-data-encoder: 1.7.2 formdata-node: 4.4.1 - node-fetch: 2.7.0 + node-fetch: 2.7.0(encoding@0.1.13) web-streams-polyfill: 3.2.1 transitivePeerDependencies: - encoding @@ -4621,7 +5799,23 @@ packages: agentkeepalive: 4.5.0 form-data-encoder: 1.7.2 formdata-node: 4.4.1 - node-fetch: 2.7.0 + node-fetch: 2.7.0(encoding@0.1.13) + web-streams-polyfill: 3.2.1 + transitivePeerDependencies: + - encoding + dev: true + + /openai@4.47.1: + resolution: {integrity: sha512-WWSxhC/69ZhYWxH/OBsLEirIjUcfpQ5+ihkXKp06hmeYXgBBIUCa9IptMzYx6NdkiOCsSGYCnTIsxaic3AjRCQ==} + hasBin: true + dependencies: + '@types/node': 18.19.3 + '@types/node-fetch': 2.6.9 + abort-controller: 3.0.0 + agentkeepalive: 4.5.0 + form-data-encoder: 1.7.2 + formdata-node: 4.4.1 + node-fetch: 2.7.0(encoding@0.1.13) web-streams-polyfill: 3.2.1 transitivePeerDependencies: - encoding @@ -4631,6 +5825,10 @@ packages: resolution: {integrity: sha512-N4YtSYJqghVu4iek2ZUvcN/0aqH1kRDuNqzcycDxhOUpg7GdvLa2F3DgS6yBNhInhv2r/6I0Flkn7CqL8+nIcw==} dev: true + /option@0.2.4: + resolution: {integrity: sha512-pkEqbDyl8ou5cpq+VsnQbe/WlEy5qS7xPzMS1U55OCG9KPvwFD46zDbxQIj3egJSFc3D+XhYOPUzz49zQAVy7A==} + dev: true + /optionator@0.9.3: resolution: {integrity: sha512-JjCoypp+jKn1ttEFExxhetCKeJt9zhAgAve5FXHixTvFDW/5aEktX9bufBKLRRMdU7bNtpLfcGu94B3cdEJgjg==} engines: {node: '>= 0.8.0'} @@ -4725,6 +5923,14 @@ packages: engines: {node: '>=6'} dev: true + /pako@1.0.11: + resolution: {integrity: sha512-4hLB8Py4zZce5s4yd9XzopqwVv/yGNhV1Bl8NTmCq1763HeK2+EwVTv+leGeL13Dnh2wfbqowVPXCIO0z4taYw==} + dev: true + + /papaparse@5.4.1: + resolution: {integrity: sha512-HipMsgJkZu8br23pW15uvo6sib6wne/4woLZPlFf3rpDyMe9ywEXUsuD7+6K9PRkJlVT51j/sCOYDKGGS3ZJrw==} + dev: true + /parent-module@1.0.1: resolution: {integrity: sha512-GQ2EWRpQV8/o+Aw8YqtfZZPfNRWZYkbidE9k5rpl/hC3vtHHBfGm2Ifi6qWV+coDGkrUKZAxE3Lot5kcsRlh+g==} engines: {node: '>=6'} @@ -4773,6 +5979,103 @@ packages: engines: {node: '>=8'} dev: true + /pathe@1.1.2: + resolution: {integrity: sha512-whLdWMYL2TwI08hn8/ZqAbrVemu0LNaNNJZX73O6qaIdCTfXutsLhMkjdENX0qhsQ9uIimo4/aQOmXkoon2nDQ==} + dev: true + + /pdf2json@3.0.5: + resolution: {integrity: sha512-Un1yLbSlk/zfwrltgguskExIioXZlFSFwsyXU0cnBorLywbTbcdzmJJEebh+U2cFCtR7y8nDs5lPHAe7ldxjZg==} + engines: {node: '>=18.12.1', npm: '>=8.19.2'} + hasBin: true + dev: true + bundledDependencies: + - '@xmldom/xmldom' + + /pg-cloudflare@1.1.1: + resolution: {integrity: sha512-xWPagP/4B6BgFO+EKz3JONXv3YDgvkbVrGw2mTo3D6tVDQRh1e7cqVGvyR3BE+eQgAvx1XhW/iEASj4/jCWl3Q==} + requiresBuild: true + dev: true + optional: true + + /pg-connection-string@2.6.4: + resolution: {integrity: sha512-v+Z7W/0EO707aNMaAEfiGnGL9sxxumwLl2fJvCQtMn9Fxsg+lPpPkdcyBSv/KFgpGdYkMfn+EI1Or2EHjpgLCA==} + dev: true + + /pg-int8@1.0.1: + resolution: {integrity: sha512-WCtabS6t3c8SkpDBUlb1kjOs7l66xsGdKpIPZsg4wR+B3+u9UAum2odSsF9tnvxg80h4ZxLWMy4pRjOsFIqQpw==} + engines: {node: '>=4.0.0'} + dev: true + + /pg-numeric@1.0.2: + resolution: {integrity: sha512-BM/Thnrw5jm2kKLE5uJkXqqExRUY/toLHda65XgFTBTFYZyopbKjBe29Ii3RbkvlsMoFwD+tHeGaCjjv0gHlyw==} + engines: {node: '>=4'} + dev: true + + /pg-pool@3.6.2(pg@8.11.5): + resolution: {integrity: sha512-Htjbg8BlwXqSBQ9V8Vjtc+vzf/6fVUuak/3/XXKA9oxZprwW3IMDQTGHP+KDmVL7rtd+R1QjbnCFPuTHm3G4hg==} + peerDependencies: + pg: '>=8.0' + dependencies: + pg: 8.11.5 + dev: true + + /pg-protocol@1.6.1: + resolution: {integrity: sha512-jPIlvgoD63hrEuihvIg+tJhoGjUsLPn6poJY9N5CnlPd91c2T18T/9zBtLxZSb1EhYxBRoZJtzScCaWlYLtktg==} + dev: true + + /pg-types@2.2.0: + resolution: {integrity: sha512-qTAAlrEsl8s4OiEQY69wDvcMIdQN6wdz5ojQiOy6YRMuynxenON0O5oCpJI6lshc6scgAY8qvJ2On/p+CXY0GA==} + engines: {node: '>=4'} + dependencies: + pg-int8: 1.0.1 + postgres-array: 2.0.0 + postgres-bytea: 1.0.0 + postgres-date: 1.0.7 + postgres-interval: 1.2.0 + dev: true + + /pg-types@4.0.2: + resolution: {integrity: sha512-cRL3JpS3lKMGsKaWndugWQoLOCoP+Cic8oseVcbr0qhPzYD5DWXK+RZ9LY9wxRf7RQia4SCwQlXk0q6FCPrVng==} + engines: {node: '>=10'} + dependencies: + pg-int8: 1.0.1 + pg-numeric: 1.0.2 + postgres-array: 3.0.2 + postgres-bytea: 3.0.0 + postgres-date: 2.1.0 + postgres-interval: 3.0.0 + postgres-range: 1.1.4 + dev: true + + /pg@8.11.5: + resolution: {integrity: sha512-jqgNHSKL5cbDjFlHyYsCXmQDrfIX/3RsNwYqpd4N0Kt8niLuNoRNH+aazv6cOd43gPh9Y4DjQCtb+X0MH0Hvnw==} + engines: {node: '>= 8.0.0'} + peerDependencies: + pg-native: '>=3.0.1' + peerDependenciesMeta: + pg-native: + optional: true + dependencies: + pg-connection-string: 2.6.4 + pg-pool: 3.6.2(pg@8.11.5) + pg-protocol: 1.6.1 + pg-types: 2.2.0 + pgpass: 1.0.5 + optionalDependencies: + pg-cloudflare: 1.1.1 + dev: true + + /pgpass@1.0.5: + resolution: {integrity: sha512-FdW9r/jQZhSeohs1Z3sI1yxFQNFvMcnmfuj4WBMUTxOrAyLMaTcE1aAMBiTlbMNaXvBCQuVi0R7hd8udDSP7ug==} + dependencies: + split2: 4.2.0 + dev: true + + /pgvector@0.1.8: + resolution: {integrity: sha512-mD6aw+XYJrsuLl3Y8s8gHDDfOZQ9ERtfQPdhvjOrC7eOTM7b6sNkxeZxBhHwUdXMfHmyGWIbwU0QbmSnn7pPmg==} + engines: {node: '>= 12'} + dev: true + /picocolors@1.0.0: resolution: {integrity: sha512-1fygroTLlHu66zi26VoTDv8yRgm0Fccecssto+MhsZ0D/DGW2sm8E8AjW7NU5VVTRt5GxbeZ5qBuJr+HyLYkjQ==} dev: true @@ -4799,6 +6102,83 @@ packages: find-up: 4.1.0 dev: true + /platform@1.3.6: + resolution: {integrity: sha512-fnWVljUchTro6RiCFvCXBbNhJc2NijN7oIQxbwsyL0buWJPG85v81ehlHI9fXrJsMNgTofEoWIQeClKpgxFLrg==} + dev: true + + /portkey-ai@0.1.16: + resolution: {integrity: sha512-EY4FRp6PZSD75Q1o1qc08DfPNTG9FnkUPN3Z1/lEvaq9iFpSO5UekcagUZaKSVhao311qjBjns+kF0rS9ht7iA==} + dependencies: + agentkeepalive: 4.5.0 + dev: true + + /postgres-array@2.0.0: + resolution: {integrity: sha512-VpZrUqU5A69eQyW2c5CA1jtLecCsN2U/bD6VilrFDWq5+5UIEVO7nazS3TEcHf1zuPYO/sqGvUvW62g86RXZuA==} + engines: {node: '>=4'} + dev: true + + /postgres-array@3.0.2: + resolution: {integrity: sha512-6faShkdFugNQCLwucjPcY5ARoW1SlbnrZjmGl0IrrqewpvxvhSLHimCVzqeuULCbG0fQv7Dtk1yDbG3xv7Veog==} + engines: {node: '>=12'} + dev: true + + /postgres-bytea@1.0.0: + resolution: {integrity: sha512-xy3pmLuQqRBZBXDULy7KbaitYqLcmxigw14Q5sj8QBVLqEwXfeybIKVWiqAXTlcvdvb0+xkOtDbfQMOf4lST1w==} + engines: {node: '>=0.10.0'} + dev: true + + /postgres-bytea@3.0.0: + resolution: {integrity: sha512-CNd4jim9RFPkObHSjVHlVrxoVQXz7quwNFpz7RY1okNNme49+sVyiTvTRobiLV548Hx/hb1BG+iE7h9493WzFw==} + engines: {node: '>= 6'} + dependencies: + obuf: 1.1.2 + dev: true + + /postgres-date@1.0.7: + resolution: {integrity: sha512-suDmjLVQg78nMK2UZ454hAG+OAW+HQPZ6n++TNDUX+L0+uUlLywnoxJKDou51Zm+zTCjrCl0Nq6J9C5hP9vK/Q==} + engines: {node: '>=0.10.0'} + dev: true + + /postgres-date@2.1.0: + resolution: {integrity: sha512-K7Juri8gtgXVcDfZttFKVmhglp7epKb1K4pgrkLxehjqkrgPhfG6OO8LHLkfaqkbpjNRnra018XwAr1yQFWGcA==} + engines: {node: '>=12'} + dev: true + + /postgres-interval@1.2.0: + resolution: {integrity: sha512-9ZhXKM/rw350N1ovuWHbGxnGh/SNJ4cnxHiM0rxE4VN41wsg8P8zWn9hv/buK00RP4WvlOyr/RBDiptyxVbkZQ==} + engines: {node: '>=0.10.0'} + dependencies: + xtend: 4.0.2 + dev: true + + /postgres-interval@3.0.0: + resolution: {integrity: sha512-BSNDnbyZCXSxgA+1f5UU2GmwhoI0aU5yMxRGO8CdFEcY2BQF9xm/7MqKnYoM1nJDk8nONNWDk9WeSmePFhQdlw==} + engines: {node: '>=12'} + dev: true + + /postgres-range@1.1.4: + resolution: {integrity: sha512-i/hbxIE9803Alj/6ytL7UHQxRvZkI9O4Sy+J3HGc4F4oo/2eQAjTSNJ0bfxyse3bH0nuVesCk+3IRLaMtG3H6w==} + dev: true + + /prebuild-install@7.1.2: + resolution: {integrity: sha512-UnNke3IQb6sgarcZIDU3gbMeTp/9SSU1DAIkil7PrqG1vZlBtY5msYccSKSHDqa3hNg436IXK+SNImReuA1wEQ==} + engines: {node: '>=10'} + hasBin: true + dependencies: + detect-libc: 2.0.3 + expand-template: 2.0.3 + github-from-package: 0.0.0 + minimist: 1.2.8 + mkdirp-classic: 0.5.3 + napi-build-utils: 1.0.2 + node-abi: 3.62.0 + pump: 3.0.0 + rc: 1.2.8 + simple-get: 4.0.1 + tar-fs: 2.1.1 + tunnel-agent: 0.6.0 + dev: true + /preferred-pm@3.1.2: resolution: {integrity: sha512-nk7dKrcW8hfCZ4H6klWcdRknBOXWzNQByJ0oJyX97BOupsYD+FzLS4hflgEu/uPUEHZCuRfMxzCBsuWd7OzT8Q==} engines: {node: '>=10'} @@ -4835,6 +6215,10 @@ packages: react-is: 18.2.0 dev: true + /process-nextick-args@2.0.1: + resolution: {integrity: sha512-3ouUOpQhtgrbOa17J7+uxOTpITYWaGP7/AhoR3+A+/1e9skrzelGi/dXzEYyvbxubEF6Wn2ypscTKiKJFFn1ag==} + dev: true + /prompts@2.4.2: resolution: {integrity: sha512-NxNv/kLguCA7p3jE8oL2aEBsrJWgAakBpgmgK6lpPWV+WuOmY6r2/zbAVnP+T8bQlA0nzHXSJSJW0Hq7ylaD2Q==} engines: {node: '>= 6'} @@ -4843,6 +6227,26 @@ packages: sisteransi: 1.0.5 dev: true + /protobufjs@6.11.4: + resolution: {integrity: sha512-5kQWPaJHi1WoCpjTGszzQ32PG2F4+wRY6BmAT4Vfw56Q2FZ4YZzK20xUYQH4YkfehY1e6QSICrJquM6xXZNcrw==} + hasBin: true + requiresBuild: true + dependencies: + '@protobufjs/aspromise': 1.1.2 + '@protobufjs/base64': 1.1.2 + '@protobufjs/codegen': 2.0.4 + '@protobufjs/eventemitter': 1.1.0 + '@protobufjs/fetch': 1.1.0 + '@protobufjs/float': 1.0.2 + '@protobufjs/inquire': 1.1.0 + '@protobufjs/path': 1.1.2 + '@protobufjs/pool': 1.1.0 + '@protobufjs/utf8': 1.1.0 + '@types/long': 4.0.2 + '@types/node': 20.12.12 + long: 4.0.0 + dev: true + /protobufjs@7.2.6: resolution: {integrity: sha512-dgJaEDDL6x8ASUZ1YqWciTRrdOuYNzoOf27oHNfdyvKqHr5i0FV7FSLU+aIeFjyFgVxrpTOtQUi0BLLBymZaBw==} engines: {node: '>=12.0.0'} @@ -4858,14 +6262,29 @@ packages: '@protobufjs/path': 1.1.2 '@protobufjs/pool': 1.1.0 '@protobufjs/utf8': 1.1.0 - '@types/node': 20.12.4 + '@types/node': 20.12.12 long: 5.2.3 dev: true + /proxy-from-env@1.1.0: + resolution: {integrity: sha512-D+zkORCbA9f1tdWRK0RaCR3GPv50cMxcrz4X8k5LTSUD1Dkw47mKJEZQNunItRTkWwgtaUSo1RVFRIG9ZXiFYg==} + dev: true + /pseudomap@1.0.2: resolution: {integrity: sha512-b/YwNhb8lk1Zz2+bXXpS/LK9OisiZZ1SNsSLxN1x2OXVEhW2Ckr/7mWE5vrC1ZTiJlD9g19jWszTmJsB+oEpFQ==} dev: true + /psl@1.9.0: + resolution: {integrity: sha512-E/ZsdU4HLs/68gYzgGTkMicWTLPdAftJLfJFlLUAAKZGkStNU72sZjT66SnMDVOfOWY/YAoiD7Jxa9iHvngcag==} + dev: true + + /pump@3.0.0: + resolution: {integrity: sha512-LwZy+p3SFs1Pytd/jYct4wpv49HiYCqd9Rlc5ZVdk0V+8Yzv6jR5Blk3TRmPL1ft69TxP0IMZGJ+WPFU2BFhww==} + dependencies: + end-of-stream: 1.4.4 + once: 1.4.0 + dev: true + /punycode@2.3.1: resolution: {integrity: sha512-vYt7UD1U9Wg6138shLtLOvdAu+8DsC/ilFtEVHcH+wydcSpNE20AfSOduf6MkRFahL5FY7X1oU7nKVZFtfq8Fg==} engines: {node: '>=6'} @@ -4875,15 +6294,85 @@ packages: resolution: {integrity: sha512-LA0Y9kxMYv47GIPJy6MI84fqTd2HmYZI83W/kM/SkKfDlajnZYfmXFTxkbY+xSBPkLJxltMa9hIkmdc29eguMA==} dev: true + /qs@6.11.2: + resolution: {integrity: sha512-tDNIz22aBzCDxLtVH++VnTfzxlfeK5CbqohpSqpJgj1Wg/cQbStNAz3NuqCs5vV+pjBsK4x4pN9HlVh7rcYRiA==} + engines: {node: '>=0.6'} + dependencies: + side-channel: 1.0.4 + dev: true + + /qs@6.12.1: + resolution: {integrity: sha512-zWmv4RSuB9r2mYQw3zxQuHWeU+42aKi1wWig/j4ele4ygELZ7PEO6MM7rim9oAQH2A5MWfsAVf/jPvTPgCbvUQ==} + engines: {node: '>=0.6'} + dependencies: + side-channel: 1.0.6 + dev: true + + /querystringify@2.2.0: + resolution: {integrity: sha512-FIqgj2EUvTa7R50u0rGsyTftzjYmv/a3hO345bZNrqabNqjtgiDMgmo4mkUjd+nzU5oF3dClKqFIPUKybUyqoQ==} + dev: true + /queue-microtask@1.2.3: resolution: {integrity: sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A==} dev: true + /queue-tick@1.0.1: + resolution: {integrity: sha512-kJt5qhMxoszgU/62PLP1CJytzd2NKetjSRnyuj31fDd3Rlcz3fzlFdFLD1SItunPwyqEOkca6GbV612BWfaBag==} + dev: true + /quick-lru@4.0.1: resolution: {integrity: sha512-ARhCpm70fzdcvNQfPoy49IaanKkTlRWF2JMzqhcJbhSFRZv7nPTvZJdcY7301IPmvW+/p0RgIWnQDLJxifsQ7g==} engines: {node: '>=8'} dev: true + /rake-modified@1.0.8: + resolution: {integrity: sha512-rj/1t+EyI8Ly52eaCeSy5hoNpdNnDlNQ/+jll2DypR6nkuxotMbaupzwbuMSaXzuSL1I2pYVYy7oPus/Ls49ag==} + dependencies: + fs-promise: 2.0.3 + lodash: 4.17.21 + dev: true + + /ranges-apply@7.0.16: + resolution: {integrity: sha512-4rGJHOyA7qatiMDg3vcETkc/TVBPU86/xZRTXff6o7a2neYLmj0EXUUAlhLVuiWAzTPHDPHOQxtk8EDrIF4ohg==} + engines: {node: '>=14.18.0'} + dependencies: + ranges-merge: 9.0.15 + tiny-invariant: 1.3.3 + dev: true + + /ranges-merge@9.0.15: + resolution: {integrity: sha512-hvt4hx0FKIaVfjd1oKx0poL57ljxdL2KHC6bXBrAdsx2iCsH+x7nO/5J0k2veM/isnOcFZKp0ZKkiCjCtzy74Q==} + engines: {node: '>=14.18.0'} + dependencies: + ranges-push: 7.0.15 + ranges-sort: 6.0.11 + dev: true + + /ranges-push@7.0.15: + resolution: {integrity: sha512-gXpBYQ5Umf3uG6jkJnw5ddok2Xfo5p22rAJBLrqzNKa7qkj3q5AOCoxfRPXEHUVaJutfXc9K9eGXdIzdyQKPkw==} + engines: {node: '>=14.18.0'} + dependencies: + codsen-utils: 1.6.4 + ranges-sort: 6.0.11 + string-collapse-leading-whitespace: 7.0.7 + string-trim-spaces-only: 5.0.10 + dev: true + + /ranges-sort@6.0.11: + resolution: {integrity: sha512-fhNEG0vGi7bESitNNqNBAfYPdl2efB+1paFlI8BQDCNkruERKuuhG8LkQClDIVqUJLkrmKuOSPQ3xZHqVnVo3Q==} + engines: {node: '>=14.18.0'} + dev: true + + /rc@1.2.8: + resolution: {integrity: sha512-y3bGgqKj3QBdxLbLkomlohkvsA8gdAiUQlSBJnBhfn+BPxg4bc62d8TcBW15wavDfgexCgccckhcZvywyQYPOw==} + hasBin: true + dependencies: + deep-extend: 0.6.0 + ini: 1.3.8 + minimist: 1.2.8 + strip-json-comments: 2.0.1 + dev: true + /react-is@18.2.0: resolution: {integrity: sha512-xWGDIW6x921xtzPkhiULtthJHoJvBbF3q26fzloPCK0hsvxtPVelvftw3zjbHWSkR2km9Z+4uxbDDK/6Zw9B8w==} dev: true @@ -4917,6 +6406,27 @@ packages: strip-bom: 3.0.0 dev: true + /readable-stream@2.3.8: + resolution: {integrity: sha512-8p0AUk4XODgIewSi0l8Epjs+EVnWiK7NoDIEGU0HhE7+ZyY8D1IMY7odu5lRrFXGg71L15KG8QrPmum45RTtdA==} + dependencies: + core-util-is: 1.0.3 + inherits: 2.0.4 + isarray: 1.0.0 + process-nextick-args: 2.0.1 + safe-buffer: 5.1.2 + string_decoder: 1.1.1 + util-deprecate: 1.0.2 + dev: true + + /readable-stream@3.6.2: + resolution: {integrity: sha512-9u/sniCrY3D5WdsERHzHE4G2YCXqoG5FTHUiCC4SIbr6XcLZBY05ya9EKjYek9O5xOAwjGq+1JdGBAS7Q9ScoA==} + engines: {node: '>= 6'} + dependencies: + inherits: 2.0.4 + string_decoder: 1.3.0 + util-deprecate: 1.0.2 + dev: true + /redent@3.0.0: resolution: {integrity: sha512-6tDA8g98We0zd0GvVeMT9arEOnTw9qM03L9cJXaCjrip1OO764RDBLBfrB4cwzNGDj5OA5ioymC9GkizgWJDUg==} engines: {node: '>=8'} @@ -4943,6 +6453,11 @@ packages: engines: {node: '>=0.10.0'} dev: true + /require-from-string@2.0.2: + resolution: {integrity: sha512-Xf0nWe6RseziFMu+Ap9biiUbmplq6S9/p+7w7YXP/JBHhrUDDUhwa+vANyubuqfZWTveU//DYVGsDG7RKL/vEw==} + engines: {node: '>=0.10.0'} + dev: true + /require-in-the-middle@7.2.0: resolution: {integrity: sha512-3TLx5TGyAY6AOqLBoXmHkNql0HIf2RGbuMgCDT2WO/uGVAPJs6h7Kl+bN6TIZGd9bWhWPwnDnTHGtW8Iu77sdw==} engines: {node: '>=8.6.0'} @@ -4958,6 +6473,10 @@ packages: resolution: {integrity: sha512-NKN5kMDylKuldxYLSUfrbo5Tuzh4hd+2E8NPPX02mZtn1VuREQToYe/ZdlJy+J3uCpfaiGF05e7B8W0iXbQHmg==} dev: true + /requires-port@1.0.0: + resolution: {integrity: sha512-KigOCHcocU3XODJxsu8i/j8T9tzT4adHiecwORRQ0ZZFcp7ahwXuRU1m+yuO90C5ZUyGeGfocHDI14M3L3yDAQ==} + dev: true + /resolve-cwd@3.0.0: resolution: {integrity: sha512-OrZaX2Mb+rJCpH/6CpSqt9xFVpN++x01XnN2ie9g6P5/3xelLAkXWVADpdz1IHD/KFfEXyE6V0U01OQ3UO2rEg==} engines: {node: '>=8'} @@ -4998,6 +6517,10 @@ packages: engines: {iojs: '>=1.0.0', node: '>=0.10.0'} dev: true + /rfdc@1.3.1: + resolution: {integrity: sha512-r5a3l5HzYlIC68TpmYKlxWjmOP6wiPJ1vWv2HeLhNsRZMrCkxeqxiHlQ21oXmQ4F3SiryXBHhAD7JZqvOJjFmg==} + dev: true + /rimraf@3.0.2: resolution: {integrity: sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA==} hasBin: true @@ -5019,6 +6542,14 @@ packages: queue-microtask: 1.2.3 dev: true + /rxjs@7.8.1: + resolution: {integrity: sha512-AA3TVj+0A2iuIoQkWEK/tqFjBq2j+6PO6Y0zJcvzLAFhEFIO3HL0vls9hWLncZbAAbK0mar7oZ4V079I/qPMxg==} + requiresBuild: true + dependencies: + tslib: 2.6.2 + dev: true + optional: true + /safe-array-concat@1.0.1: resolution: {integrity: sha512-6XbUAseYE2KtOuGueyeobCySj9L4+66Tn6KQMOPQJrAJEowYKW/YR/MGJZl7FdydUdaFu4LYyDZjxf4/Nmo23Q==} engines: {node: '>=0.4'} @@ -5029,6 +6560,14 @@ packages: isarray: 2.0.5 dev: true + /safe-buffer@5.1.2: + resolution: {integrity: sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==} + dev: true + + /safe-buffer@5.2.1: + resolution: {integrity: sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==} + dev: true + /safe-regex-test@1.0.0: resolution: {integrity: sha512-JBUUzyOgEwXQY1NuPtvcj/qcBDbDmEvWufhlnXZIm75DEHp+afM1r1ujJpJsV/gSM4t59tpDyPi1sd6ZaPFfsA==} dependencies: @@ -5037,6 +6576,11 @@ packages: is-regex: 1.1.4 dev: true + /safe-stable-stringify@2.4.3: + resolution: {integrity: sha512-e2bDA2WJT0wxseVd4lsDP4+3ONX6HpMXQa1ZhFQ7SU+GjvORCmShbCMltrtIDfkYhVHrOcPtj+KhmDBdPdZD1g==} + engines: {node: '>=10'} + dev: true + /safer-buffer@2.1.2: resolution: {integrity: sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==} dev: true @@ -5072,6 +6616,18 @@ packages: has-property-descriptors: 1.0.1 dev: true + /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: true + /set-function-name@2.0.1: resolution: {integrity: sha512-tMNCiqYVkXIZgc2Hnoy2IvC/f8ezc5koaRFkCjrpWzGpCd3qbZXPzVy9MAZzK1ch/X0jvSkojys3oqJN0qCmdA==} engines: {node: '>= 0.4'} @@ -5081,6 +6637,25 @@ packages: has-property-descriptors: 1.0.1 dev: true + /setimmediate@1.0.5: + resolution: {integrity: sha512-MATJdZp8sLqDl/68LfQmbP8zKPLQNV6BIZoIgrscFDQ+RsvK/BxeDQOgyxKKoh0y/8h3BqVFnCqQ/gd+reiIXA==} + dev: true + + /sharp@0.32.6: + resolution: {integrity: sha512-KyLTWwgcR9Oe4d9HwCwNM2l7+J0dUQwn/yf7S0EnTtb0eVS4RxO0eUSvxPtzT4F3SY+C4K6fqdv/DO27sJ/v/w==} + engines: {node: '>=14.15.0'} + requiresBuild: true + dependencies: + color: 4.2.3 + detect-libc: 2.0.3 + node-addon-api: 6.1.0 + prebuild-install: 7.1.2 + semver: 7.5.4 + simple-get: 4.0.1 + tar-fs: 3.0.6 + tunnel-agent: 0.6.0 + dev: true + /shebang-command@1.2.0: resolution: {integrity: sha512-EV3L1+UQWGor21OmnvojK36mhg+TyIKDh3iFBKBohr5xeXIhNBcx8oWdgkTEEQ+BEFFYdLRuqMfd5L84N1V5Vg==} engines: {node: '>=0.10.0'} @@ -5117,6 +6692,16 @@ packages: object-inspect: 1.13.1 dev: true + /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: true + /signal-exit@3.0.7: resolution: {integrity: sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ==} dev: true @@ -5126,6 +6711,24 @@ packages: engines: {node: '>=14'} dev: true + /simple-concat@1.0.1: + resolution: {integrity: sha512-cSFtAPtRhljv69IK0hTVZQ+OfE9nePi/rtJmw5UjHeVyVroEqJXP1sFztKUy1qU+xvz3u/sfYJLa947b7nAN2Q==} + dev: true + + /simple-get@4.0.1: + resolution: {integrity: sha512-brv7p5WgH0jmQJr1ZDDfKDOSeWWg+OVypG99A/5vYGPqJ6pxiaHLy8nxtFjBA7oMa01ebA9gfh1uMCFqOuXxvA==} + dependencies: + decompress-response: 6.0.0 + once: 1.4.0 + simple-concat: 1.0.1 + dev: true + + /simple-swizzle@0.2.2: + resolution: {integrity: sha512-JA//kQgZtbuY83m+xT+tXJkmJncGMTFT+C+g2h2R9uxkYIrE2yy9sgmcLhCnw57/WSD+Eh3J97FPEDFnbXnDUg==} + dependencies: + is-arrayish: 0.3.2 + dev: true + /sisteransi@1.0.5: resolution: {integrity: sha512-bLGGlR1QxBcynn2d5YmDX4MGjlZvy2MRBDRNHLJ8VI6l6+9FUiyTFNJ0IveOSP0bcXgVDPRcfGqA0pjaqUpfVg==} dev: true @@ -5160,6 +6763,12 @@ packages: engines: {node: '>=0.10.0'} dev: true + /sparse-bitfield@3.0.3: + resolution: {integrity: sha512-kvzhi7vqKTfkh0PZU+2D2PIllw2ymqJKujUcyPMd9Y75Nv4nPbGJZXNhxsgdQab2BmlDct1YnfQCguEvHr7VsQ==} + dependencies: + memory-pager: 1.5.0 + dev: true + /spawndamnit@2.0.0: resolution: {integrity: sha512-j4JKEcncSjFlqIwU5L/rp2N5SIPsdxaRsIv678+TZxZ0SRDJTm8JrxJMjE/XuiEZNEir3S8l0Fa3Ke339WI4qA==} dependencies: @@ -5189,10 +6798,19 @@ packages: resolution: {integrity: sha512-eWN+LnM3GR6gPu35WxNgbGl8rmY1AEmoMDvL/QD6zYmPWgywxWqJWNdLGT+ke8dKNWrcYgYjPpG5gbTfghP8rw==} dev: true + /split2@4.2.0: + resolution: {integrity: sha512-UcjcJOWknrNkF6PLX83qcHM6KHgVKNkV62Y8a5uYDVv9ydGQVwAHMKqHdJje1VTWpljG0WYpCDhrCdAOYH4TWg==} + engines: {node: '>= 10.x'} + dev: true + /sprintf-js@1.0.3: resolution: {integrity: sha512-D9cPgkvLlV3t3IzL0D0YLvGA9Ahk4PcvVwUbN0dSGr1aP0Nrt4AEnTUbuGvquEC0mA64Gqt1fzirlRs5ibXx8g==} dev: true + /stack-trace@0.0.10: + resolution: {integrity: sha512-KGzahc7puUKkzyMt+IqAep+TVNbKP+k2Lmwhub39m1AsTSkaDutx56aDCo+HLDzf/D26BIHTJWNiTG1KAJiQCg==} + dev: true + /stack-utils@2.0.6: resolution: {integrity: sha512-XlkWvfIm6RmsWtNJx+uqtKLS8eqFbxUg0ZzLXqY0caEy9l7hruX8IpiDnjsLavoBgqCCR71TqWO8MaXYheJ3RQ==} engines: {node: '>=10'} @@ -5206,6 +6824,28 @@ packages: mixme: 0.5.10 dev: true + /streamx@2.16.1: + resolution: {integrity: sha512-m9QYj6WygWyWa3H1YY69amr4nVgy61xfjys7xO7kviL5rfIEc2naf+ewFiOA+aEJD7y0JO3h2GoiUv4TDwEGzQ==} + dependencies: + fast-fifo: 1.3.2 + queue-tick: 1.0.1 + optionalDependencies: + bare-events: 2.2.2 + dev: true + + /string-collapse-leading-whitespace@7.0.7: + resolution: {integrity: sha512-jF9eynJoE6ezTCdYI8Qb02/ij/DlU9ItG93Dty4SWfJeLFrotOr+wH9IRiWHTqO3mjCyqBWEiU3uSTIbxYbAEQ==} + engines: {node: '>=14.18.0'} + dev: true + + /string-left-right@6.0.17: + resolution: {integrity: sha512-nuyIV4D4ivnwT64E0TudmCRg52NfkumuEUilyoOrHb/Z2wEOF5I+9SI6P+veFKqWKZfGpAs6OqKe4nAjujARyw==} + engines: {node: '>=14.18.0'} + dependencies: + codsen-utils: 1.6.4 + rfdc: 1.3.1 + dev: true + /string-length@4.0.2: resolution: {integrity: sha512-+l6rNN5fYHNhZZy41RXsYptCjA2Igmq4EG7kZAYFQI1E1VTXarr6ZPXBg6eq7Y6eK4FEhY6AJlyuFIb/v/S0VQ==} engines: {node: '>=10'} @@ -5214,6 +6854,24 @@ packages: strip-ansi: 6.0.1 dev: true + /string-strip-html@13.4.8: + resolution: {integrity: sha512-vlcRAtx5DN6zXGUx3EYGFg0/JOQWM65mqLgDaBHviQPP+ovUFzqZ30iQ+674JHWr9wNgnzFGxx9TGipPZMnZXg==} + engines: {node: '>=14.18.0'} + dependencies: + '@types/lodash-es': 4.17.12 + codsen-utils: 1.6.4 + html-entities: 2.5.2 + lodash-es: 4.17.21 + ranges-apply: 7.0.16 + ranges-push: 7.0.15 + string-left-right: 6.0.17 + dev: true + + /string-trim-spaces-only@5.0.10: + resolution: {integrity: sha512-MhmjE5jNqb1Ylo+BARPRlsdChGLrnPpAUWrT1VOxo9WhWwKVUU6CbZTfjwKaQPYTGS/wsX/4Zek88FM2rEb5iA==} + engines: {node: '>=14.18.0'} + dev: true + /string-width@4.2.3: resolution: {integrity: sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==} engines: {node: '>=8'} @@ -5257,6 +6915,18 @@ packages: es-abstract: 1.22.3 dev: true + /string_decoder@1.1.1: + resolution: {integrity: sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==} + dependencies: + safe-buffer: 5.1.2 + dev: true + + /string_decoder@1.3.0: + resolution: {integrity: sha512-hkRX8U1WjJFd8LsDJ2yQ/wWWxaopEsABU1XfkM8A+j0+85JAGppt16cr1Whg6KIbb4okU6Mql6BOj+uup/wKeA==} + dependencies: + safe-buffer: 5.2.1 + dev: true + /strip-ansi@6.0.1: resolution: {integrity: sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==} engines: {node: '>=8'} @@ -5293,6 +6963,11 @@ packages: min-indent: 1.0.1 dev: true + /strip-json-comments@2.0.1: + resolution: {integrity: sha512-4gB8na07fecVVkOI6Rs4e7T6NOTki5EmL7TUduTs6bu3EdnSycntVJ4re8kgZA+wx9IueI2Y11bfbgwtzuE0KQ==} + engines: {node: '>=0.10.0'} + dev: true + /strip-json-comments@3.1.1: resolution: {integrity: sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig==} engines: {node: '>=8'} @@ -5323,6 +6998,44 @@ packages: resolution: {integrity: sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w==} engines: {node: '>= 0.4'} + /tar-fs@2.1.1: + resolution: {integrity: sha512-V0r2Y9scmbDRLCNex/+hYzvp/zyYjvFbHPNgVTKfQvVrb6guiE/fxP+XblDNR011utopbkex2nM4dHNV6GDsng==} + dependencies: + chownr: 1.1.4 + mkdirp-classic: 0.5.3 + pump: 3.0.0 + tar-stream: 2.2.0 + dev: true + + /tar-fs@3.0.6: + resolution: {integrity: sha512-iokBDQQkUyeXhgPYaZxmczGPhnhXZ0CmrqI+MOb/WFGS9DW5wnfrLgtjUJBvz50vQ3qfRwJ62QVoCFu8mPVu5w==} + dependencies: + pump: 3.0.0 + tar-stream: 3.1.7 + optionalDependencies: + bare-fs: 2.3.0 + bare-path: 2.1.3 + dev: true + + /tar-stream@2.2.0: + resolution: {integrity: sha512-ujeqbceABgwMZxEJnk2HDY2DlnUZ+9oEcb1KzTVfYHio0UE6dG71n60d8D2I4qNvleWrrXpmjpt7vZeF1LnMZQ==} + engines: {node: '>=6'} + dependencies: + bl: 4.1.0 + end-of-stream: 1.4.4 + fs-constants: 1.0.0 + inherits: 2.0.4 + readable-stream: 3.6.2 + dev: true + + /tar-stream@3.1.7: + resolution: {integrity: sha512-qJj60CXt7IU1Ffyc3NJMjh6EkuCFej46zUqJ4J7pqYlThyd9bO0XBTmcOIhSzZJVWfsLks0+nle/j538YAW9RQ==} + dependencies: + b4a: 1.6.6 + fast-fifo: 1.3.2 + streamx: 2.16.1 + dev: true + /term-size@2.2.1: resolution: {integrity: sha512-wK0Ri4fOGjv/XPy8SBHZChl8CM7uMc5VML7SqiQ0zG7+J5Vr+RMQDoHa2CNT6KHUnTGIXH34UDMkPzAUyapBZg==} engines: {node: '>=8'} @@ -5337,10 +7050,37 @@ packages: minimatch: 3.1.2 dev: true + /text-hex@1.0.0: + resolution: {integrity: sha512-uuVGNWzgJ4yhRaNSiubPY7OjISw4sw4E5Uv0wbjp+OzcbmVU/rsT8ujgcXJhn9ypzsgr5vlzpPqP+MBBKcGvbg==} + dev: true + /text-table@0.2.0: resolution: {integrity: sha512-N+8UisAXDGk8PFXP4HAzVR9nbfmVJ3zYLAWiTIoqC5v5isinhr+r5uaO8+7r3BMfuNIufIsA7RdpVgacC2cSpw==} dev: true + /thenify-all@1.6.0: + resolution: {integrity: sha512-RNxQH/qI8/t3thXJDwcstUO4zeqo64+Uy/+sNVRBx4Xn2OX+OZ9oP+iJnNFqplFra2ZUVeKCSa2oVWi3T4uVmA==} + engines: {node: '>=0.8'} + dependencies: + thenify: 3.3.1 + dev: true + + /thenify@3.3.1: + resolution: {integrity: sha512-RVZSIV5IG10Hk3enotrhvz0T9em6cyHBLkH/YAZuKqd8hRkKhSfCGIcP2KUY0EPxndzANBmNllzWPwak+bheSw==} + dependencies: + any-promise: 1.3.0 + dev: true + + /through2@4.0.2: + resolution: {integrity: sha512-iOqSav00cVxEEICeD7TjLB1sueEL+81Wpzp2bY17uZjZN0pWZPuo4suZ/61VujxmqSGFfgOcNuTZ85QJwNZQpw==} + dependencies: + readable-stream: 3.6.2 + dev: true + + /tiny-invariant@1.3.3: + resolution: {integrity: sha512-+FbBPE1o9QAYvviau/qC5SE3caw21q3xkvWKBtja5vgqOWIHHJ3ioaq1VPfn/Szqctz2bU/oYeKd9/z5BL+PVg==} + dev: true + /tmp@0.0.33: resolution: {integrity: sha512-jRCJlojKnZ3addtTOjdIqoRuPEKBvNXcGYqzO6zWZX8KfKEpnGY5jfggJQ3EjKuu8D4bJRr0y+cYJFmYbImXGw==} engines: {node: '>=0.6.0'} @@ -5352,6 +7092,10 @@ packages: resolution: {integrity: sha512-3f0uOEAQwIqGuWW2MVzYg8fV/QNnc/IpuJNG837rLuczAaLVHslWHZQj4IGiEl5Hs3kkbhwL9Ab7Hrsmuj+Smw==} dev: true + /to-arraybuffer@1.0.1: + resolution: {integrity: sha512-okFlQcoGTi4LQBG/PgSYblw9VOyptsz2KJZqc6qtgGdes8VktzUQkj4BI2blit072iS8VODNcMA+tvnS9dnuMA==} + dev: true + /to-fast-properties@2.0.0: resolution: {integrity: sha512-/OaKK0xYrs3DmxRYqL/yDc+FxFUVYhDlXMhRmv3z915w2HF1tnN1omB354j8VUGO/hbRzyD6Y3sA7v7GS/ceog==} engines: {node: '>=4'} @@ -5364,15 +7108,37 @@ packages: is-number: 7.0.0 dev: true + /tough-cookie@4.1.4: + resolution: {integrity: sha512-Loo5UUvLD9ScZ6jh8beX1T6sO1w2/MpCRpEP7V280GKMVUQ0Jzar2U3UJPsrdbziLEMMhu3Ujnq//rhiFuIeag==} + engines: {node: '>=6'} + dependencies: + psl: 1.9.0 + punycode: 2.3.1 + universalify: 0.2.0 + url-parse: 1.5.10 + dev: true + /tr46@0.0.3: resolution: {integrity: sha512-N3WMsuqV66lT30CrXNbEjx4GEwlow3v6rr4mCcv6prnfwhS01rkgyFdjPNBYd9br7LpXV1+Emh01fHnq2Gdgrw==} dev: true + /tr46@4.1.1: + resolution: {integrity: sha512-2lv/66T7e5yNyhAAC4NaKe5nVavzuGJQVVtRYLyQ2OI8tsJ61PMLlelehb0wi2Hx6+hT/OJUWZcw8MjlSRnxvw==} + engines: {node: '>=14'} + dependencies: + punycode: 2.3.1 + dev: true + /trim-newlines@3.0.1: resolution: {integrity: sha512-c1PTsA3tYrIsLGkJkzHF+w9F2EyxfXGo4UyJc4pFL++FMjnq0HJS69T3M7d//gKrFKwy429bouPescbjecU+Zw==} engines: {node: '>=8'} dev: true + /triple-beam@1.4.1: + resolution: {integrity: sha512-aZbgViZrg1QNcG+LULa7nhZpJTZSLm/mXnHXnbAbjmN5aSa0y7V+wvv6+4WaBtpISJzThKy+PIPxc1Nq1EJ9mg==} + engines: {node: '>= 14.0.0'} + dev: true + /ts-api-utils@1.0.3(typescript@5.3.3): resolution: {integrity: sha512-wNMeqtMz5NtwpT/UZGY5alT+VoKdSsOOP/kqHFcUW1P/VRhH2wJ48+DN2WwUliNbQ976ETwDL0Ifd2VVvgonvg==} engines: {node: '>=16.13.0'} @@ -5406,7 +7172,7 @@ packages: '@babel/core': 7.23.6 bs-logger: 0.2.6 fast-json-stable-stringify: 2.1.0 - jest: 29.7.0(@types/node@20.12.4) + jest: 29.7.0(@types/node@20.12.12) jest-util: 29.7.0 json5: 2.2.3 lodash.memoize: 4.1.2 @@ -5416,6 +7182,10 @@ packages: yargs-parser: 21.1.1 dev: true + /tslib@2.6.2: + resolution: {integrity: sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q==} + dev: true + /tty-table@4.2.3: resolution: {integrity: sha512-Fs15mu0vGzCrj8fmJNP7Ynxt5J7praPXqFN0leZeZBXJwkMxv9cb2D454k1ltrtUSJbZ4yH4e0CynsHLxmUfFA==} engines: {node: '>=8.0.0'} @@ -5430,6 +7200,12 @@ packages: yargs: 17.7.2 dev: true + /tunnel-agent@0.6.0: + resolution: {integrity: sha512-McnNiV1l8RYeY8tBgEpuodCC1mLUdbSN+CYBL7kJsJNInOP8UjDDEwdk6Mw60vdLLrr5NHKZhMAOSrR2NZuQ+w==} + dependencies: + safe-buffer: 5.2.1 + dev: true + /type-check@0.4.0: resolution: {integrity: sha512-XleUoc9uwGXqjWwXaUTZAmzMcFZ5858QA2vvx1Ur5xIcixXIP+8LnFDgRplU30us6teqdlskFfu+ae4K79Ooew==} engines: {node: '>= 0.8.0'} @@ -5505,6 +7281,12 @@ packages: is-typed-array: 1.1.12 dev: true + /typed-emitter@2.1.0: + resolution: {integrity: sha512-g/KzbYKbH5C2vPkaXGu8DJlHrGKHLsM25Zg9WuC9pMGfuvT+X25tZQWo5fK1BjBm8+UrVE9LDCvaY0CQk+fXDA==} + optionalDependencies: + rxjs: 7.8.1 + dev: true + /typescript@5.3.3: resolution: {integrity: sha512-pXWcraxM0uxAS+tN0AG/BF2TyqmHO014Z070UsJ+pFvYuRSq8KH8DmWpnbXe0pEPDHXZV3FcAbJkijJ5oNEnWw==} engines: {node: '>=14.17'} @@ -5520,15 +7302,31 @@ packages: which-boxed-primitive: 1.0.2 dev: true + /underscore@1.13.6: + resolution: {integrity: sha512-+A5Sja4HP1M08MaXya7p5LvjuM7K6q/2EaC0+iovj/wOcMsTzMvDFbasi/oSapiwOlt252IqsKqPjCl7huKS0A==} + dev: true + /undici-types@5.26.5: resolution: {integrity: sha512-JlCMO+ehdEIKqlFxk6IfVoAUVmgz7cU7zD/h9XZ0qzeosSHmUJVOzSQvvYSYWXkFXC+IfLKSIffhv0sVZup6pA==} dev: true + /undici@5.28.4: + resolution: {integrity: sha512-72RFADWFqKmUb2hmmvNODKL3p9hcB6Gt2DOQMis1SEBaV6a4MH8soBvzg+95CYhCKPFedut2JY9bMfrDl9D23g==} + engines: {node: '>=14.0'} + dependencies: + '@fastify/busboy': 2.1.1 + dev: true + /universalify@0.1.2: resolution: {integrity: sha512-rBJeI5CXAlmy1pV+617WB9J63U6XcazHHF2f2dbJix4XzpUF0RS3Zbj0FGIOCAva5P/d/GBOYaACQ1w+0azUkg==} engines: {node: '>= 4.0.0'} dev: true + /universalify@0.2.0: + resolution: {integrity: sha512-CJ1QgKmNg3CwvAv/kOFmtnEN05f0D/cn9QntgNOQlQF9dgvVTHj3t+8JPdjqawCHk7V/KA+fbUqzZ9XWhcqPUg==} + engines: {node: '>= 4.0.0'} + dev: true + /update-browserslist-db@1.0.13(browserslist@4.22.2): resolution: {integrity: sha512-xebP81SNcPuNpPP3uzeW1NYXxI3rxyJzF3pD6sH4jE7o/IX+WtSpwnVU+qIsDPyk0d3hmFQ7mjqc6AtV604hbg==} hasBin: true @@ -5546,11 +7344,31 @@ packages: punycode: 2.3.1 dev: true + /url-join@4.0.1: + resolution: {integrity: sha512-jk1+QP6ZJqyOiuEI9AEWQfju/nB2Pw466kbA0LEZljHwKeMgd9WrAEgEGxjPDD2+TNbbb37rTyhEfrCXfuKXnA==} + dev: true + + /url-parse@1.5.10: + resolution: {integrity: sha512-WypcfiRhfeUP9vvF0j6rw0J3hrWrw6iZv3+22h6iRMJ/8z1Tj6XfLP4DsUix5MhMPnXpiHDoKyoZ/bdCkwBCiQ==} + dependencies: + querystringify: 2.2.0 + requires-port: 1.0.0 + dev: true + + /util-deprecate@1.0.2: + resolution: {integrity: sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw==} + dev: true + /uuid@9.0.1: resolution: {integrity: sha512-b+1eJOlsR9K8HJpow9Ok3fiWOWSIcIzXodvv0rQjVoOVNpWMpxf1wZNpt4y9h10odCNrqnYp1OBzRktckBe3sA==} hasBin: true dev: true + /uuidv7@0.6.3: + resolution: {integrity: sha512-zV3eW2NlXTsun/aJ7AixxZjH/byQcH/r3J99MI0dDEkU2cJIBJxhEWUHDTpOaLPRNhebPZoeHuykYREkI9HafA==} + hasBin: true + dev: true + /v8-to-istanbul@9.2.0: resolution: {integrity: sha512-/EH/sDgxU2eGxajKdwLCDmQ4FWq+kpi3uCmBGpw1xJtnAxEjlD8j8PEiGWpCIMIs3ciNAgH0d3TTJiUkYzyZjA==} engines: {node: '>=10.12.0'} @@ -5593,6 +7411,23 @@ packages: resolution: {integrity: sha512-2JAn3z8AR6rjK8Sm8orRC0h/bcl/DqL7tRPdGZ4I1CjdF+EaMLmYxBHyXuKL849eucPFhvBoxMsflfOb8kxaeQ==} dev: true + /webidl-conversions@7.0.0: + resolution: {integrity: sha512-VwddBukDzu71offAQR975unBIGqfKZpM+8ZX6ySk8nYhVoo5CYaZyzt3YBvYtRtO+aoGlqxPg/B87NGVZ/fu6g==} + engines: {node: '>=12'} + dev: true + + /whatwg-fetch@3.6.20: + resolution: {integrity: sha512-EqhiFU6daOA8kpjOWTL0olhVOF3i7OrFzSYiGsEMB8GcXS+RrzauAERX65xMeNWVqxA6HXH2m69Z9LaKKdisfg==} + dev: true + + /whatwg-url@13.0.0: + resolution: {integrity: sha512-9WWbymnqj57+XEuqADHrCJ2eSXzn8WXIW/YSGaZtb2WKAInQ6CHfaUUcTyyver0p8BDg5StLQq8h1vtZuwmOig==} + engines: {node: '>=16'} + dependencies: + tr46: 4.1.1 + webidl-conversions: 7.0.0 + dev: true + /whatwg-url@5.0.0: resolution: {integrity: sha512-saE57nupxk6v3HY35+jzBwYa0rKSy0XR8JSxZPwgLr7ys0IBzhGviA1/TUGJLmSVqs8pb9AnvICXEuOHLprYTw==} dependencies: @@ -5648,6 +7483,46 @@ packages: isexe: 2.0.0 dev: true + /wikipedia@2.1.2: + resolution: {integrity: sha512-RAYaMpXC9/E873RaSEtlEa8dXK4e0p5k98GKOd210MtkE5emm6fcnwD+N6ZA4cuffjDWagvhaQKtp/mGp2BOVQ==} + engines: {node: '>=10'} + dependencies: + axios: 1.7.2 + infobox-parser: 3.6.4 + transitivePeerDependencies: + - debug + dev: true + + /wink-nlp@2.3.0: + resolution: {integrity: sha512-NcMmlsJavRZgaV4dAjsOQPuXG4v3yLRRssEibfx41lhmwTTOCaQGW7czNC73bDKCq7q4vqGTjX3/MFhK3I76TA==} + dev: true + + /winston-transport@4.7.0: + resolution: {integrity: sha512-ajBj65K5I7denzer2IYW6+2bNIVqLGDHqDw3Ow8Ohh+vdW+rv4MZ6eiDvHoKhfJFZ2auyN8byXieDDJ96ViONg==} + engines: {node: '>= 12.0.0'} + dependencies: + logform: 2.6.0 + readable-stream: 3.6.2 + triple-beam: 1.4.1 + dev: true + + /winston@3.13.0: + resolution: {integrity: sha512-rwidmA1w3SE4j0E5MuIufFhyJPBDG7Nu71RkZor1p2+qHvJSZ9GYDA81AyleQcZbh/+V6HjeBdfnTZJm9rSeQQ==} + engines: {node: '>= 12.0.0'} + dependencies: + '@colors/colors': 1.6.0 + '@dabh/diagnostics': 2.0.3 + async: 3.2.5 + is-stream: 2.0.1 + logform: 2.6.0 + one-time: 1.0.0 + readable-stream: 3.6.2 + safe-stable-stringify: 2.4.3 + stack-trace: 0.0.10 + triple-beam: 1.4.1 + winston-transport: 4.7.0 + dev: true + /wrap-ansi@6.2.0: resolution: {integrity: sha512-r6lPcBGxZXlIcymEu7InxDMhdW0KDxpLgoFLcguasxCaJ/SOIZwINatK9KY/tf+ZrlywOKU0UDj3ATXUBfxJXA==} engines: {node: '>=8'} @@ -5687,6 +7562,29 @@ packages: signal-exit: 3.0.7 dev: true + /ws@8.17.0: + resolution: {integrity: sha512-uJq6108EgZMAl20KagGkzCKfMEjxmKvZHG7Tlq0Z6nOky7YF7aq4mOx6xK8TJ/i1LeK4Qus7INktacctDgY8Ow==} + engines: {node: '>=10.0.0'} + peerDependencies: + bufferutil: ^4.0.1 + utf-8-validate: '>=5.0.2' + peerDependenciesMeta: + bufferutil: + optional: true + utf-8-validate: + optional: true + dev: true + + /xmlbuilder@10.1.1: + resolution: {integrity: sha512-OyzrcFLL/nb6fMGHbiRDuPup9ljBycsdCypwuyg5AAHvyWzGfChJpCXMG88AGTIMFhGZ9RccFN1e6lhg3hkwKg==} + engines: {node: '>=4.0'} + dev: true + + /xtend@4.0.2: + resolution: {integrity: sha512-LKYU1iAXJXUgAXn9URjiu+MWhyUXHsvfp7mcuYm9dSUKK0/CjtrUwFAxD82/mCWbtLsGjFIad0wIsod4zrTAEQ==} + engines: {node: '>=0.4'} + dev: true + /y18n@4.0.3: resolution: {integrity: sha512-JKhqTOwSrqNA1NY5lSztJ1GrBiUodLMmIZuLiDaMRJ+itFd+ABVE8XBjOvIWL+rSqNDC74LCSFmlb/U4UZ4hJQ==} dev: true From ae7af3f95ff8c421876dcd58cb25104702b93271 Mon Sep 17 00:00:00 2001 From: Chris Park Date: Thu, 1 Aug 2024 14:41:00 -0700 Subject: [PATCH 3/4] feat(js): llama-index-ts initial retrieval span support (#643) --- .../src/instrumentation.ts | 101 ++-------- .../src/types.ts | 63 ++++++ .../src/utils.ts | 185 ++++++++++++++++++ .../test/llamaIndex.test.ts | 90 ++++++++- 4 files changed, 352 insertions(+), 87 deletions(-) create mode 100644 js/packages/openinference-instrumentation-llama-index/src/types.ts create mode 100644 js/packages/openinference-instrumentation-llama-index/src/utils.ts diff --git a/js/packages/openinference-instrumentation-llama-index/src/instrumentation.ts b/js/packages/openinference-instrumentation-llama-index/src/instrumentation.ts index ccee4ce07..af73f1541 100644 --- a/js/packages/openinference-instrumentation-llama-index/src/instrumentation.ts +++ b/js/packages/openinference-instrumentation-llama-index/src/instrumentation.ts @@ -1,4 +1,3 @@ -/* eslint-disable @typescript-eslint/no-explicit-any */ import type * as llamaindex from "llamaindex"; import { @@ -6,18 +5,10 @@ import { InstrumentationConfig, InstrumentationModuleDefinition, InstrumentationNodeModuleDefinition, - safeExecuteInTheMiddle, } from "@opentelemetry/instrumentation"; +import { diag } from "@opentelemetry/api"; +import { patchQueryMethod, patchRetrieveMethod } from "./utils"; import { VERSION } from "./version"; -import { - Span, - SpanKind, - SpanStatusCode, - context, - diag, - trace, -} from "@opentelemetry/api"; -import { isTracingSuppressed } from "@opentelemetry/core"; const MODULE_NAME = "llamaindex"; @@ -34,28 +25,6 @@ export function isPatched() { return _isOpenInferencePatched; } -import { - OpenInferenceSpanKind, - SemanticConventions, -} from "@arizeai/openinference-semantic-conventions"; - -/** - * Resolves the execution context for the current span - * If tracing is suppressed, the span is dropped and the current context is returned - * @param span - */ -function getExecContext(span: Span) { - const activeContext = context.active(); - const suppressTracing = isTracingSuppressed(activeContext); - const execContext = suppressTracing - ? trace.setSpan(context.active(), span) - : activeContext; - // Drop the span from the context - if (suppressTracing) { - trace.deleteSpan(activeContext); - } - return execContext; -} export class LlamaIndexInstrumentation extends InstrumentationBase< typeof llamaindex > { @@ -66,7 +35,8 @@ export class LlamaIndexInstrumentation extends InstrumentationBase< Object.assign({}, config), ); } - manuallyInstrument(module: typeof llamaindex) { + + public manuallyInstrument(module: typeof llamaindex) { diag.debug(`Manually instrumenting ${MODULE_NAME}`); this.patch(module); } @@ -87,71 +57,32 @@ export class LlamaIndexInstrumentation extends InstrumentationBase< return moduleExports; } - // eslint-disable-next-line @typescript-eslint/no-this-alias - const instrumentation: LlamaIndexInstrumentation = this; - - type RetrieverQueryEngineQueryType = - typeof moduleExports.RetrieverQueryEngine.prototype.query; - + // TODO: Support streaming this._wrap( moduleExports.RetrieverQueryEngine.prototype, "query", - (original: RetrieverQueryEngineQueryType): any => { - return function patchedQuery( - this: unknown, - ...args: Parameters - ) { - const span = instrumentation.tracer.startSpan(`Query`, { - kind: SpanKind.INTERNAL, - attributes: { - [SemanticConventions.OPENINFERENCE_SPAN_KIND]: - OpenInferenceSpanKind.CHAIN, - [SemanticConventions.INPUT_VALUE]: args[0].query, - }, - }); - - const execContext = getExecContext(span); + // eslint-disable-next-line @typescript-eslint/no-explicit-any + (original): any => { + return patchQueryMethod(original, moduleExports, this.tracer); + }, + ); - const execPromise = safeExecuteInTheMiddle< - ReturnType - >( - () => { - return context.with(execContext, () => { - return original.apply(this, args); - }); - }, - (error) => { - // Push the error to the span - if (error) { - span.recordException(error); - span.setStatus({ - code: SpanStatusCode.ERROR, - message: error.message, - }); - span.end(); - } - }, - ); - const wrappedPromise = execPromise.then((result) => { - span.setAttributes({ - [SemanticConventions.OUTPUT_VALUE]: result.response, - }); - span.end(); - return result; - }); - return context.bind(execContext, wrappedPromise); - }; + this._wrap( + moduleExports.VectorIndexRetriever.prototype, + "retrieve", + (original) => { + return patchRetrieveMethod(original, moduleExports, this.tracer); }, ); _isOpenInferencePatched = true; - return moduleExports; } private unpatch(moduleExports: typeof llamaindex, moduleVersion?: string) { this._diag.debug(`Un-patching ${MODULE_NAME}@${moduleVersion}`); this._unwrap(moduleExports.RetrieverQueryEngine.prototype, "query"); + this._unwrap(moduleExports.VectorIndexRetriever.prototype, "retrieve"); _isOpenInferencePatched = false; } diff --git a/js/packages/openinference-instrumentation-llama-index/src/types.ts b/js/packages/openinference-instrumentation-llama-index/src/types.ts new file mode 100644 index 000000000..faafbff0a --- /dev/null +++ b/js/packages/openinference-instrumentation-llama-index/src/types.ts @@ -0,0 +1,63 @@ +import { SemanticConventions } from "@arizeai/openinference-semantic-conventions"; + +export type RetrievalDocument = { + [SemanticConventions.DOCUMENT_ID]?: string; + [SemanticConventions.DOCUMENT_CONTENT]?: string; + [SemanticConventions.DOCUMENT_SCORE]?: number | undefined; + [SemanticConventions.DOCUMENT_METADATA]?: string; +}; + +type LLMMessageToolCall = { + [SemanticConventions.TOOL_CALL_FUNCTION_NAME]?: string; + [SemanticConventions.TOOL_CALL_FUNCTION_ARGUMENTS_JSON]?: string; +}; + +export type LLMMessageToolCalls = { + [SemanticConventions.MESSAGE_TOOL_CALLS]?: LLMMessageToolCall[]; +}; + +export type LLMMessageFunctionCall = { + [SemanticConventions.MESSAGE_FUNCTION_CALL_NAME]?: string; + [SemanticConventions.MESSAGE_FUNCTION_CALL_ARGUMENTS_JSON]?: string; +}; + +export type LLMMessage = LLMMessageToolCalls & + LLMMessageFunctionCall & { + [SemanticConventions.MESSAGE_ROLE]?: string; + [SemanticConventions.MESSAGE_CONTENT]?: string; + }; + +export type LLMMessagesAttributes = + | { + [SemanticConventions.LLM_INPUT_MESSAGES]: LLMMessage[]; + } + | { + [SemanticConventions.LLM_OUTPUT_MESSAGES]: LLMMessage[]; + }; + +// eslint-disable-next-line @typescript-eslint/no-explicit-any +export type GenericFunction = (...args: any[]) => any; + +export type SafeFunction = ( + ...args: Parameters +) => ReturnType | null; + +export type LLMParameterAttributes = { + [SemanticConventions.LLM_MODEL_NAME]?: string; + [SemanticConventions.LLM_INVOCATION_PARAMETERS]?: string; +}; + +export type PromptTemplateAttributes = { + [SemanticConventions.PROMPT_TEMPLATE_TEMPLATE]?: string; + [SemanticConventions.PROMPT_TEMPLATE_VARIABLES]?: string; +}; +export type TokenCountAttributes = { + [SemanticConventions.LLM_TOKEN_COUNT_COMPLETION]?: number; + [SemanticConventions.LLM_TOKEN_COUNT_PROMPT]?: number; + [SemanticConventions.LLM_TOKEN_COUNT_TOTAL]?: number; +}; + +export type ToolAttributes = { + [SemanticConventions.TOOL_NAME]?: string; + [SemanticConventions.TOOL_DESCRIPTION]?: string; +}; diff --git a/js/packages/openinference-instrumentation-llama-index/src/utils.ts b/js/packages/openinference-instrumentation-llama-index/src/utils.ts new file mode 100644 index 000000000..b35a79e1a --- /dev/null +++ b/js/packages/openinference-instrumentation-llama-index/src/utils.ts @@ -0,0 +1,185 @@ +import type * as llamaindex from "llamaindex"; + +import { TextNode } from "llamaindex"; +import { safeExecuteInTheMiddle } from "@opentelemetry/instrumentation"; +import { + Attributes, + Span, + SpanKind, + SpanStatusCode, + context, + trace, + Tracer, + diag, +} from "@opentelemetry/api"; +import { isTracingSuppressed } from "@opentelemetry/core"; +import { + MimeType, + OpenInferenceSpanKind, + SemanticConventions, +} from "@arizeai/openinference-semantic-conventions"; +import { GenericFunction, SafeFunction } from "./types"; + +/** + * Wraps a function with a try-catch block to catch and log any errors. + * @param fn - A function to wrap with a try-catch block. + * @returns A function that returns null if an error is thrown. + */ +export function withSafety(fn: T): SafeFunction { + return (...args) => { + try { + return fn(...args); + } catch (error) { + diag.error(`Failed to get attributes for span: ${error}`); + return null; + } + }; +} + +const safelyJSONStringify = withSafety(JSON.stringify); + +/** + * Resolves the execution context for the current span + * If tracing is suppressed, the span is dropped and the current context is returned + * @param span + */ +function getExecContext(span: Span) { + const activeContext = context.active(); + const suppressTracing = isTracingSuppressed(activeContext); + const execContext = suppressTracing + ? trace.setSpan(context.active(), span) + : activeContext; + // Drop the span from the context + if (suppressTracing) { + trace.deleteSpan(activeContext); + } + return execContext; +} + +export function patchQueryMethod( + original: typeof module.RetrieverQueryEngine.prototype.query, + module: typeof llamaindex, + tracer: Tracer, +) { + return function patchedQuery( + this: unknown, + ...args: Parameters + ) { + const span = tracer.startSpan(`query`, { + kind: SpanKind.INTERNAL, + attributes: { + [SemanticConventions.OPENINFERENCE_SPAN_KIND]: + OpenInferenceSpanKind.CHAIN, + [SemanticConventions.INPUT_VALUE]: args[0].query, + [SemanticConventions.INPUT_MIME_TYPE]: MimeType.TEXT, + }, + }); + + const execContext = getExecContext(span); + + const execPromise = safeExecuteInTheMiddle< + ReturnType + >( + () => { + return context.with(execContext, () => { + return original.apply(this, args); + }); + }, + (error) => { + // Push the error to the span + if (error) { + span.recordException(error); + span.setStatus({ + code: SpanStatusCode.ERROR, + message: error.message, + }); + span.end(); + } + }, + ); + + const wrappedPromise = execPromise.then((result) => { + span.setAttributes({ + [SemanticConventions.OUTPUT_VALUE]: result.response, + [SemanticConventions.OUTPUT_MIME_TYPE]: MimeType.TEXT, + }); + span.end(); + return result; + }); + return context.bind(execContext, wrappedPromise); + }; +} + +export function patchRetrieveMethod( + original: typeof module.VectorIndexRetriever.prototype.retrieve, + module: typeof llamaindex, + tracer: Tracer, +) { + return function patchedRetrieve( + this: unknown, + ...args: Parameters + ) { + const span = tracer.startSpan(`retrieve`, { + kind: SpanKind.INTERNAL, + attributes: { + [SemanticConventions.OPENINFERENCE_SPAN_KIND]: + OpenInferenceSpanKind.RETRIEVER, + [SemanticConventions.INPUT_VALUE]: args[0].query, + [SemanticConventions.INPUT_MIME_TYPE]: MimeType.TEXT, + }, + }); + + const execContext = getExecContext(span); + + const execPromise = safeExecuteInTheMiddle< + ReturnType + >( + () => { + return context.with(execContext, () => { + return original.apply(this, args); + }); + }, + (error) => { + // Push the error to the span + if (error) { + span.recordException(error); + span.setStatus({ + code: SpanStatusCode.ERROR, + message: error.message, + }); + span.end(); + } + }, + ); + + const wrappedPromise = execPromise.then((result) => { + span.setAttributes(documentAttributes(result)); + span.end(); + return result; + }); + return context.bind(execContext, wrappedPromise); + }; +} + +function documentAttributes( + output: llamaindex.NodeWithScore[], +) { + const docs: Attributes = {}; + output.forEach((document, index) => { + const { node, score } = document; + + if (node instanceof TextNode) { + const nodeId = node.id_; + const nodeText = node.getContent(); + const nodeMetadata = node.metadata; + + const prefix = `${SemanticConventions.RETRIEVAL_DOCUMENTS}.${index}`; + docs[`${prefix}.${SemanticConventions.DOCUMENT_ID}`] = nodeId; + docs[`${prefix}.${SemanticConventions.DOCUMENT_SCORE}`] = score; + docs[`${prefix}.${SemanticConventions.DOCUMENT_CONTENT}`] = nodeText; + docs[`${prefix}.${SemanticConventions.DOCUMENT_METADATA}`] = + safelyJSONStringify(nodeMetadata) ?? undefined; + } + }); + return docs; +} diff --git a/js/packages/openinference-instrumentation-llama-index/test/llamaIndex.test.ts b/js/packages/openinference-instrumentation-llama-index/test/llamaIndex.test.ts index 4719e10c9..e4c3ff165 100644 --- a/js/packages/openinference-instrumentation-llama-index/test/llamaIndex.test.ts +++ b/js/packages/openinference-instrumentation-llama-index/test/llamaIndex.test.ts @@ -5,6 +5,11 @@ import { import { LlamaIndexInstrumentation, isPatched } from "../src/index"; import { NodeTracerProvider } from "@opentelemetry/sdk-trace-node"; import * as llamaindex from "llamaindex"; +import { + SemanticConventions, + OpenInferenceSpanKind, + RETRIEVAL_DOCUMENTS, +} from "@arizeai/openinference-semantic-conventions"; const { Document, VectorStoreIndex } = llamaindex; @@ -69,7 +74,7 @@ describe("LlamaIndexInstrumentation", () => { openAITextEmbedSpy = jest .spyOn(llamaindex.OpenAIEmbedding.prototype, "getTextEmbeddings") .mockImplementation(() => { - return Promise.resolve([fakeEmbedding]); + return Promise.resolve([fakeEmbedding, fakeEmbedding, fakeEmbedding]); }); openAIQueryEmbedSpy = jest @@ -112,7 +117,88 @@ describe("LlamaIndexInstrumentation", () => { expect(spans.length).toBeGreaterThan(0); // Expect a span for the query engine - const queryEngineSpan = spans.find((span) => span.name.includes("Query")); + const queryEngineSpan = spans.find((span) => span.name.includes("query")); expect(queryEngineSpan).toBeDefined(); + + // Verify query span attributes + expect( + queryEngineSpan?.attributes[SemanticConventions.OPENINFERENCE_SPAN_KIND], + ).toEqual(OpenInferenceSpanKind.CHAIN); + expect( + queryEngineSpan?.attributes[SemanticConventions.INPUT_VALUE], + ).toEqual("What did the author do in college?"); + expect( + queryEngineSpan?.attributes[SemanticConventions.OUTPUT_VALUE], + ).toEqual(DUMMY_RESPONSE); + }); + it("should create a span for retrieve method", async () => { + // Create Document objects with essays + const documents = [ + new Document({ text: "lorem ipsum 1" }), + new Document({ text: "lorem ipsum 2" }), + new Document({ text: "lorem ipsum 3" }), + ]; + + // Split text and create embeddings. Store them in a VectorStoreIndex + const index = await VectorStoreIndex.fromDocuments(documents); + + // Retrieve documents from the index + const retriever = index.asRetriever(); + + const response = await retriever.retrieve({ + query: "What did the author do in college?", + }); + + // OpenAI Chat method should not be called + expect(openAISpy).toHaveBeenCalledTimes(0); + expect(openAIQueryEmbedSpy).toHaveBeenCalledTimes(1); + expect(openAITextEmbedSpy).toHaveBeenCalledTimes(1); + + const spans = memoryExporter.getFinishedSpans(); + expect(spans.length).toBeGreaterThan(0); + + // Expect a span for the retrieve method + const retrievalSpan = spans.find((span) => span.name.includes("retrieve")); + expect(retrievalSpan).toBeDefined(); + + // Verify query span attributes + expect( + retrievalSpan?.attributes[SemanticConventions.OPENINFERENCE_SPAN_KIND], + ).toEqual(OpenInferenceSpanKind.RETRIEVER); + expect(retrievalSpan?.attributes[SemanticConventions.INPUT_VALUE]).toEqual( + "What did the author do in college?", + ); + + // Check document attributes + response.forEach((document, index) => { + const { node, score } = document; + + if (node instanceof llamaindex.TextNode) { + const nodeId = node.id_; + const nodeText = node.getContent(); + const nodeMetadata = node.metadata; + + expect( + retrievalSpan?.attributes[ + `${RETRIEVAL_DOCUMENTS}.${index}.document.id` + ], + ).toEqual(nodeId); + expect( + retrievalSpan?.attributes[ + `${RETRIEVAL_DOCUMENTS}.${index}.document.score` + ], + ).toEqual(score); + expect( + retrievalSpan?.attributes[ + `${RETRIEVAL_DOCUMENTS}.${index}.document.content` + ], + ).toEqual(nodeText); + expect( + retrievalSpan?.attributes[ + `${RETRIEVAL_DOCUMENTS}.${index}.document.metadata` + ], + ).toEqual(JSON.stringify(nodeMetadata)); + } + }); }); }); From 337fb866d3bc9866e80304a51e2380ee4c987296 Mon Sep 17 00:00:00 2001 From: Chris Park Date: Thu, 8 Aug 2024 17:02:07 -0700 Subject: [PATCH 4/4] feat(js): llama-index-ts embeddings support (#761) Co-authored-by: Parker Stafford Co-authored-by: Mikyo King --- .../package.json | 4 +- .../src/instrumentation.ts | 47 +++- .../src/types.ts | 62 +---- .../src/utils.ts | 247 +++++++++++++----- .../test/llamaIndex.test.ts | 226 ++++++++++++---- .../tsconfig.json | 2 +- js/pnpm-lock.yaml | 8 + 7 files changed, 416 insertions(+), 180 deletions(-) diff --git a/js/packages/openinference-instrumentation-llama-index/package.json b/js/packages/openinference-instrumentation-llama-index/package.json index 3ef330a8b..abdefcf54 100644 --- a/js/packages/openinference-instrumentation-llama-index/package.json +++ b/js/packages/openinference-instrumentation-llama-index/package.json @@ -24,6 +24,8 @@ "@opentelemetry/instrumentation": "^0.46.0" }, "devDependencies": { - "llamaindex": "^0.3.14" + "jest": "^29.7.0", + "llamaindex": "^0.3.14", + "openai": "^4.24.1" } } diff --git a/js/packages/openinference-instrumentation-llama-index/src/instrumentation.ts b/js/packages/openinference-instrumentation-llama-index/src/instrumentation.ts index af73f1541..d2f62e452 100644 --- a/js/packages/openinference-instrumentation-llama-index/src/instrumentation.ts +++ b/js/packages/openinference-instrumentation-llama-index/src/instrumentation.ts @@ -7,7 +7,13 @@ import { InstrumentationNodeModuleDefinition, } from "@opentelemetry/instrumentation"; import { diag } from "@opentelemetry/api"; -import { patchQueryMethod, patchRetrieveMethod } from "./utils"; +import { + patchQueryEngineQueryMethod, + patchRetrieveMethod, + patchQueryEmbeddingMethod, + isRetrieverPrototype, + isEmbeddingPrototype, +} from "./utils"; import { VERSION } from "./version"; const MODULE_NAME = "llamaindex"; @@ -58,23 +64,32 @@ export class LlamaIndexInstrumentation extends InstrumentationBase< } // TODO: Support streaming + // TODO: Generalize to QueryEngine interface (RetrieverQueryEngine, RouterQueryEngine) this._wrap( moduleExports.RetrieverQueryEngine.prototype, "query", // eslint-disable-next-line @typescript-eslint/no-explicit-any (original): any => { - return patchQueryMethod(original, moduleExports, this.tracer); + return patchQueryEngineQueryMethod(original, this.tracer); }, ); - this._wrap( - moduleExports.VectorIndexRetriever.prototype, - "retrieve", - (original) => { - return patchRetrieveMethod(original, moduleExports, this.tracer); - }, - ); + for (const value of Object.values(moduleExports)) { + // eslint-disable-next-line @typescript-eslint/no-explicit-any + const prototype = (value as any).prototype; + + if (isRetrieverPrototype(prototype)) { + this._wrap(prototype, "retrieve", (original) => { + return patchRetrieveMethod(original, this.tracer); + }); + } + if (isEmbeddingPrototype(prototype)) { + this._wrap(prototype, "getQueryEmbedding", (original) => { + return patchQueryEmbeddingMethod(original, this.tracer); + }); + } + } _isOpenInferencePatched = true; return moduleExports; } @@ -82,7 +97,19 @@ export class LlamaIndexInstrumentation extends InstrumentationBase< private unpatch(moduleExports: typeof llamaindex, moduleVersion?: string) { this._diag.debug(`Un-patching ${MODULE_NAME}@${moduleVersion}`); this._unwrap(moduleExports.RetrieverQueryEngine.prototype, "query"); - this._unwrap(moduleExports.VectorIndexRetriever.prototype, "retrieve"); + + for (const value of Object.values(moduleExports)) { + // eslint-disable-next-line @typescript-eslint/no-explicit-any + const prototype = (value as any).prototype; + + if (isRetrieverPrototype(prototype)) { + this._unwrap(prototype, "retrieve"); + } + + if (isEmbeddingPrototype(prototype)) { + this._unwrap(prototype, "getQueryEmbedding"); + } + } _isOpenInferencePatched = false; } diff --git a/js/packages/openinference-instrumentation-llama-index/src/types.ts b/js/packages/openinference-instrumentation-llama-index/src/types.ts index faafbff0a..3ba845ad0 100644 --- a/js/packages/openinference-instrumentation-llama-index/src/types.ts +++ b/js/packages/openinference-instrumentation-llama-index/src/types.ts @@ -1,39 +1,5 @@ -import { SemanticConventions } from "@arizeai/openinference-semantic-conventions"; - -export type RetrievalDocument = { - [SemanticConventions.DOCUMENT_ID]?: string; - [SemanticConventions.DOCUMENT_CONTENT]?: string; - [SemanticConventions.DOCUMENT_SCORE]?: number | undefined; - [SemanticConventions.DOCUMENT_METADATA]?: string; -}; - -type LLMMessageToolCall = { - [SemanticConventions.TOOL_CALL_FUNCTION_NAME]?: string; - [SemanticConventions.TOOL_CALL_FUNCTION_ARGUMENTS_JSON]?: string; -}; - -export type LLMMessageToolCalls = { - [SemanticConventions.MESSAGE_TOOL_CALLS]?: LLMMessageToolCall[]; -}; - -export type LLMMessageFunctionCall = { - [SemanticConventions.MESSAGE_FUNCTION_CALL_NAME]?: string; - [SemanticConventions.MESSAGE_FUNCTION_CALL_ARGUMENTS_JSON]?: string; -}; - -export type LLMMessage = LLMMessageToolCalls & - LLMMessageFunctionCall & { - [SemanticConventions.MESSAGE_ROLE]?: string; - [SemanticConventions.MESSAGE_CONTENT]?: string; - }; - -export type LLMMessagesAttributes = - | { - [SemanticConventions.LLM_INPUT_MESSAGES]: LLMMessage[]; - } - | { - [SemanticConventions.LLM_OUTPUT_MESSAGES]: LLMMessage[]; - }; +import * as llamaindex from "llamaindex"; +import { BaseRetriever } from "llamaindex"; // eslint-disable-next-line @typescript-eslint/no-explicit-any export type GenericFunction = (...args: any[]) => any; @@ -42,22 +8,12 @@ export type SafeFunction = ( ...args: Parameters ) => ReturnType | null; -export type LLMParameterAttributes = { - [SemanticConventions.LLM_MODEL_NAME]?: string; - [SemanticConventions.LLM_INVOCATION_PARAMETERS]?: string; -}; +export type ObjectWithModel = { model: string }; + +export type RetrieverQueryEngineQueryMethodType = + typeof llamaindex.RetrieverQueryEngine.prototype.query; -export type PromptTemplateAttributes = { - [SemanticConventions.PROMPT_TEMPLATE_TEMPLATE]?: string; - [SemanticConventions.PROMPT_TEMPLATE_VARIABLES]?: string; -}; -export type TokenCountAttributes = { - [SemanticConventions.LLM_TOKEN_COUNT_COMPLETION]?: number; - [SemanticConventions.LLM_TOKEN_COUNT_PROMPT]?: number; - [SemanticConventions.LLM_TOKEN_COUNT_TOTAL]?: number; -}; +export type RetrieverRetrieveMethodType = BaseRetriever["retrieve"]; -export type ToolAttributes = { - [SemanticConventions.TOOL_NAME]?: string; - [SemanticConventions.TOOL_DESCRIPTION]?: string; -}; +export type QueryEmbeddingMethodType = + typeof llamaindex.BaseEmbedding.prototype.getQueryEmbedding; diff --git a/js/packages/openinference-instrumentation-llama-index/src/utils.ts b/js/packages/openinference-instrumentation-llama-index/src/utils.ts index b35a79e1a..50c1d2544 100644 --- a/js/packages/openinference-instrumentation-llama-index/src/utils.ts +++ b/js/packages/openinference-instrumentation-llama-index/src/utils.ts @@ -1,6 +1,5 @@ -import type * as llamaindex from "llamaindex"; +import * as llamaindex from "llamaindex"; -import { TextNode } from "llamaindex"; import { safeExecuteInTheMiddle } from "@opentelemetry/instrumentation"; import { Attributes, @@ -18,12 +17,20 @@ import { OpenInferenceSpanKind, SemanticConventions, } from "@arizeai/openinference-semantic-conventions"; -import { GenericFunction, SafeFunction } from "./types"; +import { + GenericFunction, + SafeFunction, + ObjectWithModel, + RetrieverQueryEngineQueryMethodType, + RetrieverRetrieveMethodType, + QueryEmbeddingMethodType, +} from "./types"; +import { BaseEmbedding, BaseRetriever } from "llamaindex"; /** * Wraps a function with a try-catch block to catch and log any errors. - * @param fn - A function to wrap with a try-catch block. - * @returns A function that returns null if an error is thrown. + * @param {T} fn - A function to wrap with a try-catch block. + * @returns {SafeFunction} A function that returns null if an error is thrown. */ export function withSafety(fn: T): SafeFunction { return (...args) => { @@ -35,13 +42,13 @@ export function withSafety(fn: T): SafeFunction { } }; } - const safelyJSONStringify = withSafety(JSON.stringify); /** - * Resolves the execution context for the current span - * If tracing is suppressed, the span is dropped and the current context is returned - * @param span + * Resolves the execution context for the current span. + * If tracing is suppressed, the span is dropped and the current context is returned. + * @param {Span} span - Tracer span + * @returns {Context} An execution context. */ function getExecContext(span: Span) { const activeContext = context.active(); @@ -56,14 +63,129 @@ function getExecContext(span: Span) { return execContext; } -export function patchQueryMethod( - original: typeof module.RetrieverQueryEngine.prototype.query, - module: typeof llamaindex, +/** + * If execution results in an error, push the error to the span. + * @param span + * @param error + */ +function handleError(span: Span, error: Error | undefined) { + if (error) { + span.recordException(error); + span.setStatus({ + code: SpanStatusCode.ERROR, + message: error.message, + }); + span.end(); + } +} + +/** + * Checks whether the provided prototype is an instance of a `BaseRetriever`. + * + * @param {unknown} proto - The prototype to check. + * @returns {boolean} Whether the prototype is a `BaseRetriever`. + */ +export function isRetrieverPrototype(proto: unknown): proto is BaseRetriever { + return ( + proto != null && + typeof proto === "object" && + "retrieve" in proto && + typeof proto.retrieve === "function" + ); +} + +/** + * Checks whether the provided prototype is an instance of a `BaseEmbedding`. + * + * @param {unknown} proto - The prototype to check. + * @returns {boolean} Whether the prototype is a `BaseEmbedding`. + */ +export function isEmbeddingPrototype(proto: unknown): proto is BaseEmbedding { + return proto != null && proto instanceof BaseEmbedding; +} + +/** + * Extracts document attributes from an array of nodes with scores and returns extracted + * attributes in an Attributes object. + * + * @param {llamaindex.NodeWithScore[]} output - Array of nodes. + * @returns {Attributes} The extracted document attributes. + */ +function getDocumentAttributes( + output: llamaindex.NodeWithScore[], +) { + const docs: Attributes = {}; + output.forEach(({ node, score }, idx) => { + if (node instanceof llamaindex.TextNode) { + const prefix = `${SemanticConventions.RETRIEVAL_DOCUMENTS}.${idx}`; + docs[`${prefix}.${SemanticConventions.DOCUMENT_ID}`] = node.id_; + docs[`${prefix}.${SemanticConventions.DOCUMENT_SCORE}`] = score; + docs[`${prefix}.${SemanticConventions.DOCUMENT_CONTENT}`] = + node.getContent(); + docs[`${prefix}.${SemanticConventions.DOCUMENT_METADATA}`] = + safelyJSONStringify(node.metadata) ?? undefined; + } + }); + return docs; +} + +/** + * Extracts embedding information (input text and the output embedding vector), + * and constructs an Attributes object with the relevant semantic conventions + * for embeddings. + * + * @param {Object} embedInfo - The embedding information. + * @param {string} embedInfo.input - The input text for the embedding. + * @param {number[]} embedInfo.output - The output embedding vector. + * @returns {Attributes} The constructed embedding attributes. + */ +function getQueryEmbeddingAttributes(embedInfo: { + input: string; + output: number[]; +}): Attributes { + return { + [`${SemanticConventions.EMBEDDING_EMBEDDINGS}.0.${SemanticConventions.EMBEDDING_TEXT}`]: + embedInfo.input, + [`${SemanticConventions.EMBEDDING_EMBEDDINGS}.0.${SemanticConventions.EMBEDDING_VECTOR}`]: + embedInfo.output, + }; +} + +/** + * Checks if the provided class has a `model` property of type string + * as a class property. + * + * @param {unknown} cls - The class to check. + * @returns {boolean} Whether the object has a `model` property. + */ +function hasModelProperty(cls: unknown): cls is ObjectWithModel { + const objectWithModelMaybe = cls as ObjectWithModel; + return ( + "model" in objectWithModelMaybe && + typeof objectWithModelMaybe.model === "string" + ); +} + +/** + * Retrieves the value of the `model` property if the provided class + * implements it; otherwise, returns undefined. + * + * @param {unknown} cls - The class to retrieve the model name from. + * @returns {string | undefined} The model name or undefined. + */ +function getModelName(cls: unknown) { + if (hasModelProperty(cls)) { + return cls.model; + } +} + +export function patchQueryEngineQueryMethod( + original: RetrieverQueryEngineQueryMethodType, tracer: Tracer, ) { - return function patchedQuery( + return function ( this: unknown, - ...args: Parameters + ...args: Parameters ) { const span = tracer.startSpan(`query`, { kind: SpanKind.INTERNAL, @@ -78,24 +200,14 @@ export function patchQueryMethod( const execContext = getExecContext(span); const execPromise = safeExecuteInTheMiddle< - ReturnType + ReturnType >( () => { return context.with(execContext, () => { return original.apply(this, args); }); }, - (error) => { - // Push the error to the span - if (error) { - span.recordException(error); - span.setStatus({ - code: SpanStatusCode.ERROR, - message: error.message, - }); - span.end(); - } - }, + (error) => handleError(span, error), ); const wrappedPromise = execPromise.then((result) => { @@ -111,13 +223,12 @@ export function patchQueryMethod( } export function patchRetrieveMethod( - original: typeof module.VectorIndexRetriever.prototype.retrieve, - module: typeof llamaindex, + original: RetrieverRetrieveMethodType, tracer: Tracer, ) { - return function patchedRetrieve( + return function ( this: unknown, - ...args: Parameters + ...args: Parameters ) { const span = tracer.startSpan(`retrieve`, { kind: SpanKind.INTERNAL, @@ -132,28 +243,18 @@ export function patchRetrieveMethod( const execContext = getExecContext(span); const execPromise = safeExecuteInTheMiddle< - ReturnType + ReturnType >( () => { return context.with(execContext, () => { return original.apply(this, args); }); }, - (error) => { - // Push the error to the span - if (error) { - span.recordException(error); - span.setStatus({ - code: SpanStatusCode.ERROR, - message: error.message, - }); - span.end(); - } - }, + (error) => handleError(span, error), ); const wrappedPromise = execPromise.then((result) => { - span.setAttributes(documentAttributes(result)); + span.setAttributes(getDocumentAttributes(result)); span.end(); return result; }); @@ -161,25 +262,49 @@ export function patchRetrieveMethod( }; } -function documentAttributes( - output: llamaindex.NodeWithScore[], +export function patchQueryEmbeddingMethod( + original: QueryEmbeddingMethodType, + tracer: Tracer, ) { - const docs: Attributes = {}; - output.forEach((document, index) => { - const { node, score } = document; + return function ( + this: unknown, + ...args: Parameters + ) { + const span = tracer.startSpan(`embedding`, { + kind: SpanKind.INTERNAL, + attributes: { + [SemanticConventions.OPENINFERENCE_SPAN_KIND]: + OpenInferenceSpanKind.EMBEDDING, + }, + }); - if (node instanceof TextNode) { - const nodeId = node.id_; - const nodeText = node.getContent(); - const nodeMetadata = node.metadata; + const execContext = getExecContext(span); - const prefix = `${SemanticConventions.RETRIEVAL_DOCUMENTS}.${index}`; - docs[`${prefix}.${SemanticConventions.DOCUMENT_ID}`] = nodeId; - docs[`${prefix}.${SemanticConventions.DOCUMENT_SCORE}`] = score; - docs[`${prefix}.${SemanticConventions.DOCUMENT_CONTENT}`] = nodeText; - docs[`${prefix}.${SemanticConventions.DOCUMENT_METADATA}`] = - safelyJSONStringify(nodeMetadata) ?? undefined; - } - }); - return docs; + const execPromise = safeExecuteInTheMiddle< + ReturnType + >( + () => { + return context.with(execContext, () => { + return original.apply(this, args); + }); + }, + (error) => handleError(span, error), + ); + + // Model ID/name is a property found on the class and not in args + // Extract from class and set as attribute + span.setAttributes({ + [SemanticConventions.EMBEDDING_MODEL_NAME]: getModelName(this), + }); + + const wrappedPromise = execPromise.then((result) => { + const [query] = args; + span.setAttributes( + getQueryEmbeddingAttributes({ input: query, output: result }), + ); + span.end(); + return result; + }); + return context.bind(execContext, wrappedPromise); + }; } diff --git a/js/packages/openinference-instrumentation-llama-index/test/llamaIndex.test.ts b/js/packages/openinference-instrumentation-llama-index/test/llamaIndex.test.ts index e4c3ff165..e07e96ed2 100644 --- a/js/packages/openinference-instrumentation-llama-index/test/llamaIndex.test.ts +++ b/js/packages/openinference-instrumentation-llama-index/test/llamaIndex.test.ts @@ -1,28 +1,175 @@ +import * as llamaindex from "llamaindex"; + import { InMemorySpanExporter, SimpleSpanProcessor, } from "@opentelemetry/sdk-trace-base"; import { LlamaIndexInstrumentation, isPatched } from "../src/index"; import { NodeTracerProvider } from "@opentelemetry/sdk-trace-node"; -import * as llamaindex from "llamaindex"; import { SemanticConventions, OpenInferenceSpanKind, RETRIEVAL_DOCUMENTS, } from "@arizeai/openinference-semantic-conventions"; +import { + Document, + VectorStoreIndex, + GeminiEmbedding, + HuggingFaceEmbedding, + MistralAIEmbedding, + OllamaEmbedding, + OpenAIEmbedding, + RetrieverQueryEngine, +} from "llamaindex"; +import { isEmbeddingPrototype, isRetrieverPrototype } from "../src/utils"; +import { OpenAI } from "openai"; -const { Document, VectorStoreIndex } = llamaindex; - +// Mocked return values const DUMMY_RESPONSE = "lorem ipsum"; +const FAKE_EMBEDDING = Array(1536).fill(0); // Mock out the embeddings response to size 1536 (ada-2) +const RESPONSE_MESSAGE = { + content: DUMMY_RESPONSE, + role: "assistant", +}; + +const EMBEDDING_RESPONSE = { + object: "list", + data: [ + { object: "embedding", index: 0, embedding: FAKE_EMBEDDING }, + { object: "embedding", index: 0, embedding: FAKE_EMBEDDING }, + { object: "embedding", index: 0, embedding: FAKE_EMBEDDING }, + ], +}; + +// Mock out the chat completions endpoint +const CHAT_RESPONSE = { + id: "chatcmpl-8adq9JloOzNZ9TyuzrKyLpGXexh6p", + object: "chat.completion", + created: 1703743645, + model: "gpt-3.5-turbo-0613", + choices: [ + { + index: 0, + message: RESPONSE_MESSAGE, + logprobs: null, + finish_reason: "stop", + }, + ], + usage: { + prompt_tokens: 12, + completion_tokens: 5, + total_tokens: 17, + }, +}; const tracerProvider = new NodeTracerProvider(); tracerProvider.register(); const instrumentation = new LlamaIndexInstrumentation(); instrumentation.disable(); -describe("llamaIndex", () => { - it("should pass", () => { - expect(true).toBe(true); + +/* + * Tests for embeddings patching + */ +describe("LlamaIndexInstrumentation - Embeddings", () => { + const memoryExporter = new InMemorySpanExporter(); + const spanProcessor = new SimpleSpanProcessor(memoryExporter); + instrumentation.setTracerProvider(tracerProvider); + + tracerProvider.addSpanProcessor(spanProcessor); + // @ts-expect-error the moduleExports property is private. This is needed to make the test work with auto-mocking + instrumentation._modules[0].moduleExports = llamaindex; + + beforeAll(() => { + instrumentation.enable(); + process.env["OPENAI_API_KEY"] = "fake-api-key"; + process.env["MISTRAL_API_KEY"] = "fake-api-key"; + process.env["GOOGLE_API_KEY"] = "fake-api-key"; + }); + + afterAll(() => { + instrumentation.disable(); + delete process.env["OPENAI_API_KEY"]; + delete process.env["MISTRAL_API_KEY"]; + delete process.env["GOOGLE_API_KEY"]; + }); + beforeEach(() => { + jest + .spyOn(OpenAI.Embeddings.prototype, "create") + // @ts-expect-error the response type is not correct - this is just for testing + .mockImplementation(async (): Promise => { + return EMBEDDING_RESPONSE; + }); + + memoryExporter.reset(); + }); + afterEach(() => { + jest.clearAllMocks(); + jest.restoreAllMocks(); + jest.resetModules(); + }); + + it("is patched", () => { + expect(isPatched()).toBe(true); + }); + + it("isEmbeddingPrototype should identify retriever prototypes correctly", async () => { + // Expect all retriever prototypes to be identified as a retriever + expect(isRetrieverPrototype(RetrieverQueryEngine.prototype)).toEqual(true); + + // Expect a non-retriever object to be identified as such + expect(isRetrieverPrototype(HuggingFaceEmbedding.prototype)).toEqual(false); + }); + + it("isEmbeddingPrototype should identify embedder prototypes correctly", async () => { + // Expect all embedders to be identified as embeddings + expect(isEmbeddingPrototype(HuggingFaceEmbedding.prototype)).toEqual(true); + expect(isEmbeddingPrototype(GeminiEmbedding.prototype)).toEqual(true); + expect(isEmbeddingPrototype(MistralAIEmbedding.prototype)).toEqual(true); + expect(isEmbeddingPrototype(OpenAIEmbedding.prototype)).toEqual(true); + expect(isEmbeddingPrototype(OllamaEmbedding.prototype)).toEqual(true); + + // Expect a non-embedding object to be identified as such + expect(isEmbeddingPrototype({})).toEqual(false); + expect(isEmbeddingPrototype(null)).toEqual(false); + expect(isEmbeddingPrototype(undefined)).toEqual(false); + }); + + it("should create a span for embeddings (query)", async () => { + // Get embeddings + const embedder = new OpenAIEmbedding(); + const embeddedVector = await embedder.getQueryEmbedding( + "What did the author do in college?", + ); + + const spans = memoryExporter.getFinishedSpans(); + expect(spans.length).toBeGreaterThan(0); + + // Expect a span for the embedding + const queryEmbeddingSpan = spans.find((span) => + span.name.includes("embedding"), + ); + expect(queryEmbeddingSpan).toBeDefined(); + + // Verify span attributes + expect( + queryEmbeddingSpan?.attributes[ + SemanticConventions.OPENINFERENCE_SPAN_KIND + ], + ).toEqual(OpenInferenceSpanKind.EMBEDDING); + expect( + queryEmbeddingSpan?.attributes[ + `${SemanticConventions.EMBEDDING_EMBEDDINGS}.0.${SemanticConventions.EMBEDDING_TEXT}` + ], + ).toEqual("What did the author do in college?"); + expect( + queryEmbeddingSpan?.attributes[ + `${SemanticConventions.EMBEDDING_EMBEDDINGS}.0.${SemanticConventions.EMBEDDING_VECTOR}` + ], + ).toEqual(embeddedVector); + expect( + queryEmbeddingSpan?.attributes[SemanticConventions.EMBEDDING_MODEL_NAME], + ).toEqual("text-embedding-ada-002"); }); }); @@ -35,9 +182,6 @@ describe("LlamaIndexInstrumentation", () => { // @ts-expect-error the moduleExports property is private. This is needed to make the test work with auto-mocking instrumentation._modules[0].moduleExports = llamaindex; - let openAISpy: jest.SpyInstance; - let openAITextEmbedSpy: jest.SpyInstance; - let openAIQueryEmbedSpy: jest.SpyInstance; beforeAll(() => { instrumentation.enable(); @@ -52,46 +196,29 @@ describe("LlamaIndexInstrumentation", () => { beforeEach(() => { memoryExporter.reset(); - // Use OpenAI and mock out the calls - const response: llamaindex.ChatResponse = - { - message: { - content: DUMMY_RESPONSE, - role: "assistant", - }, - raw: null, - }; - // Mock out the chat completions endpoint - openAISpy = jest - .spyOn(llamaindex.OpenAI.prototype, "chat") - .mockImplementation(() => { - return Promise.resolve(response); - }); - - // Mock out the embeddings response to size 1536 (ada-2) - const fakeEmbedding = Array(1536).fill(0); - // Mock out the embeddings endpoint - openAITextEmbedSpy = jest - .spyOn(llamaindex.OpenAIEmbedding.prototype, "getTextEmbeddings") - .mockImplementation(() => { - return Promise.resolve([fakeEmbedding, fakeEmbedding, fakeEmbedding]); - }); - - openAIQueryEmbedSpy = jest - .spyOn(llamaindex.OpenAIEmbedding.prototype, "getQueryEmbedding") - .mockImplementation(() => { - return Promise.resolve(fakeEmbedding); - }); + jest.spyOn(OpenAI.Chat.Completions.prototype, "create").mockImplementation( + // @ts-expect-error the response type is not correct - this is just for testing + async (): Promise => { + return CHAT_RESPONSE; + }, + ); + jest.spyOn(OpenAI.Embeddings.prototype, "create").mockImplementation( + // @ts-expect-error the response type is not correct - this is just for testing + async (): Promise => { + return EMBEDDING_RESPONSE; + }, + ); }); afterEach(() => { jest.clearAllMocks(); - openAISpy.mockRestore(); - openAIQueryEmbedSpy.mockRestore(); - openAITextEmbedSpy.mockRestore(); + jest.restoreAllMocks(); + jest.resetModules(); }); + it("is patched", () => { expect(isPatched()).toBe(true); }); + it("should create a span for query engines", async () => { // Create Document object with essay const document = new Document({ text: "lorem ipsum" }); @@ -105,13 +232,8 @@ describe("LlamaIndexInstrumentation", () => { query: "What did the author do in college?", }); - // Verify that the OpenAI chat method was called once during synthesis - expect(openAISpy).toHaveBeenCalledTimes(1); - expect(openAIQueryEmbedSpy).toHaveBeenCalledTimes(1); - expect(openAITextEmbedSpy).toHaveBeenCalledTimes(1); - // Output response - expect(response.response).toEqual(DUMMY_RESPONSE); + expect(response.response).toEqual(RESPONSE_MESSAGE.content); const spans = memoryExporter.getFinishedSpans(); expect(spans.length).toBeGreaterThan(0); @@ -129,8 +251,9 @@ describe("LlamaIndexInstrumentation", () => { ).toEqual("What did the author do in college?"); expect( queryEngineSpan?.attributes[SemanticConventions.OUTPUT_VALUE], - ).toEqual(DUMMY_RESPONSE); + ).toEqual(RESPONSE_MESSAGE.content); }); + it("should create a span for retrieve method", async () => { // Create Document objects with essays const documents = [ @@ -149,11 +272,6 @@ describe("LlamaIndexInstrumentation", () => { query: "What did the author do in college?", }); - // OpenAI Chat method should not be called - expect(openAISpy).toHaveBeenCalledTimes(0); - expect(openAIQueryEmbedSpy).toHaveBeenCalledTimes(1); - expect(openAITextEmbedSpy).toHaveBeenCalledTimes(1); - const spans = memoryExporter.getFinishedSpans(); expect(spans.length).toBeGreaterThan(0); diff --git a/js/packages/openinference-instrumentation-llama-index/tsconfig.json b/js/packages/openinference-instrumentation-llama-index/tsconfig.json index 3c3ab5350..aab9d61e5 100644 --- a/js/packages/openinference-instrumentation-llama-index/tsconfig.json +++ b/js/packages/openinference-instrumentation-llama-index/tsconfig.json @@ -5,6 +5,6 @@ "rootDir": "." }, "files": [], - "include": ["src/**/*.ts", "test/**/*.ts"], + "include": ["src/**/*.ts", "test/**/*.ts", "examples/**/*.ts"], "references": [] } diff --git a/js/pnpm-lock.yaml b/js/pnpm-lock.yaml index 3a10f1469..3ccdc52bc 100644 --- a/js/pnpm-lock.yaml +++ b/js/pnpm-lock.yaml @@ -106,9 +106,15 @@ importers: specifier: ^0.46.0 version: 0.46.0(@opentelemetry/api@1.7.0) devDependencies: + jest: + specifier: ^29.7.0 + version: 29.7.0(@types/node@20.12.12) llamaindex: specifier: ^0.3.14 version: 0.3.14(@notionhq/client@2.2.15)(typescript@5.3.3) + openai: + specifier: ^4.24.1 + version: 4.47.1 packages/openinference-instrumentation-openai: dependencies: @@ -5987,6 +5993,8 @@ packages: resolution: {integrity: sha512-Un1yLbSlk/zfwrltgguskExIioXZlFSFwsyXU0cnBorLywbTbcdzmJJEebh+U2cFCtR7y8nDs5lPHAe7ldxjZg==} engines: {node: '>=18.12.1', npm: '>=8.19.2'} hasBin: true + dependencies: + '@xmldom/xmldom': 0.8.10 dev: true bundledDependencies: - '@xmldom/xmldom'