Compare commits

..

1 Commits

Author SHA1 Message Date
Emanuel Ferreira 14d5a1458c fix: remove storageContext 2024-02-26 12:02:19 -03:00
98 changed files with 452 additions and 1175 deletions
-5
View File
@@ -1,5 +0,0 @@
---
"create-llama": patch
---
Add LlamaParse option when selecting a pdf file or a folder
+5
View File
@@ -0,0 +1,5 @@
---
"llamaindex": patch
---
feat: add base evaluator and correctness evaluator
-5
View File
@@ -1,5 +0,0 @@
---
"llamaindex": patch
---
Add quantized parameter to HuggingFaceEmbedding
+5
View File
@@ -0,0 +1,5 @@
---
"llamaindex": patch
---
feat: add base evaluator and correctness evaluator
+6
View File
@@ -0,0 +1,6 @@
---
"llamaindex": patch
"docs": patch
---
Add Groq LLM to LlamaIndex
-1
View File
@@ -44,7 +44,6 @@ test-results/
playwright-report/
blob-report/
playwright/.cache/
.tsbuildinfo
# intellij
**/.idea
-15
View File
@@ -1,20 +1,5 @@
# docs
## 0.0.4
### Patch Changes
- Updated dependencies [5116ad8]
- @llamaindex/env@0.0.5
## 0.0.3
### Patch Changes
- 09bf27a: Add Groq LLM to LlamaIndex
- Updated dependencies [cf87f84]
- @llamaindex/env@0.0.4
## 0.0.2
### Patch Changes
+56
View File
@@ -0,0 +1,56 @@
---
sidebar_position: 1
---
# Starter Tutorial
Once you have [installed LlamaIndex.TS using NPM](installation) and set up your OpenAI key, you're ready to start your first app:
In a new folder:
```bash npm2yarn
npm install typescript
npm install @types/node
npx tsc --init # if needed
```
Create the file `example.ts`. This code will load some example data, create a document, index it (which creates embeddings using OpenAI), and then creates query engine to answer questions about the data.
```ts
// example.ts
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
console.log(response.toString());
}
main();
```
Then you can run it using
```bash
npx ts-node example.ts
```
Ready to learn more? Check out our NextJS playground at https://llama-playground.vercel.app/. The source is available at https://github.com/run-llama/ts-playground
@@ -1,51 +0,0 @@
---
sidebar_position: 1
---
import CodeBlock from "@theme/CodeBlock";
import CodeSource from "!raw-loader!../../../../examples/vectorIndex";
import TSConfigSource from "!!raw-loader!../../../../examples/tsconfig.json";
# Starter Tutorial
Make sure you have installed LlamaIndex.TS and have an OpenAI key. If you haven't, check out the [installation](installation) guide.
## From scratch(node.js + TypeScript):
In a new folder:
```bash npm2yarn
npm init
npm install -D typescript @types/node
```
Create the file `example.ts`. This code will load some example data, create a document, index it (which creates embeddings using OpenAI), and then creates query engine to answer questions about the data.
<CodeBlock language="ts">{CodeSource}</CodeBlock>
Create a `tsconfig.json` file in the same folder:
<CodeBlock language="json">{TSConfigSource}</CodeBlock>
Now you can run the code with
```bash
npx tsx example.ts
```
Also, you can clone our examples and try them out:
```bash npm2yarn
npx degit run-llama/LlamaIndexTS/examples my-new-project
cd my-new-project
npm install
npx tsx ./vectorIndex.ts
```
## From scratch (Next.js + TypeScript):
You just need one command to create a new Next.js project:
```bash npm2yarn
npx create-llama@latest
```
+1 -1
View File
@@ -37,7 +37,7 @@ For more complex applications, our lower-level APIs allow advanced users to cust
`npm install llamaindex`
Our documentation includes [Installation Instructions](./getting_started/installation.mdx) and a [Starter Tutorial](./getting_started/starter.mdx) to build your first application.
Our documentation includes [Installation Instructions](./getting_started/installation.mdx) and a [Starter Tutorial](./getting_started/starter.md) to build your first application.
Once you're up and running, [High-Level Concepts](./getting_started/concepts.md) has an overview of LlamaIndex's modular architecture. For more hands-on practical examples, look through our Examples section on the sidebar.
@@ -23,15 +23,3 @@ const results = await queryEngine.query({
query,
});
```
Per default, `HuggingFaceEmbedding` is using the `Xenova/all-MiniLM-L6-v2` model. You can change the model by passing the `modelType` parameter to the constructor.
If you're not using a quantized model, set the `quantized` parameter to `false`.
For example, to use the not quantized `BAAI/bge-small-en-v1.5` model, you can use the following code:
```
const embedModel = new HuggingFaceEmbedding({
modelType: "BAAI/bge-small-en-v1.5",
quantized: false,
});
```
@@ -53,6 +53,10 @@ const evaluator = new CorrectnessEvaluator({
serviceContext: ctx,
});
const response = await queryEngine.query({
query,
});
const result = await evaluator.evaluateResponse({
query,
response,
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "docs",
"version": "0.0.4",
"version": "0.0.2",
"private": true,
"scripts": {
"docusaurus": "docusaurus",
@@ -8,7 +8,7 @@ import {
async function main() {
// Load the documents
const documents = await new SimpleDirectoryReader().loadData({
directoryPath: "node_modules/llamaindex/examples",
directoryPath: "node_modules/llamaindex/examples/",
});
// Create a vector index from the documents
@@ -32,31 +32,13 @@ async function main() {
verbose: true,
});
const task = agent.createTask("What was his salary?");
// Chat with the agent
const response = await agent.chat({
message: "What was his salary?",
});
let count = 0;
while (true) {
const stepOutput = await agent.runStep(task.taskId);
console.log(`Runnning step ${count++}`);
console.log(`======== OUTPUT ==========`);
if (stepOutput.output.response) {
console.log(stepOutput.output.response);
} else {
console.log(stepOutput.output.sources);
}
console.log(`==========================`);
if (stepOutput.isLast) {
const finalResponse = await agent.finalizeResponse(
task.taskId,
stepOutput,
);
console.log({ finalResponse });
break;
}
}
// Print the response
console.log(String(response));
}
main().then(() => {
+1 -1
View File
@@ -8,7 +8,7 @@ import {
async function main() {
// Load the documents
const documents = await new SimpleDirectoryReader().loadData({
directoryPath: "node_modules/llamaindex/examples",
directoryPath: "node_modules/llamaindex/examples/",
});
// Create a vector index from the documents
-95
View File
@@ -1,95 +0,0 @@
import { FunctionTool, OpenAIAgent } from "llamaindex";
// Define a function to sum two numbers
function sumNumbers({ a, b }: { a: number; b: number }): number {
return a + b;
}
// Define a function to divide two numbers
function divideNumbers({ a, b }: { a: number; b: number }): number {
return a / b;
}
// Define the parameters of the sum function as a JSON schema
const sumJSON = {
type: "object",
properties: {
a: {
type: "number",
description: "The first number",
},
b: {
type: "number",
description: "The second number",
},
},
required: ["a", "b"],
};
const divideJSON = {
type: "object",
properties: {
a: {
type: "number",
description: "The dividend a to divide",
},
b: {
type: "number",
description: "The divisor b to divide by",
},
},
required: ["a", "b"],
};
async function main() {
// Create a function tool from the sum function
const functionTool = new FunctionTool(sumNumbers, {
name: "sumNumbers",
description: "Use this function to sum two numbers",
parameters: sumJSON,
});
// Create a function tool from the divide function
const functionTool2 = new FunctionTool(divideNumbers, {
name: "divideNumbers",
description: "Use this function to divide two numbers",
parameters: divideJSON,
});
// Create an OpenAIAgent with the function tools
const agent = new OpenAIAgent({
tools: [functionTool, functionTool2],
verbose: true,
});
// Create a task to sum and divide numbers
const task = agent.createTask("How much is 5 + 5? then divide by 2");
let count = 0;
while (true) {
const stepOutput = await agent.runStep(task.taskId);
console.log(`Runnning step ${count++}`);
console.log(`======== OUTPUT ==========`);
if (stepOutput.output.response) {
console.log(stepOutput.output.response);
} else {
console.log(stepOutput.output.sources);
}
console.log(`==========================`);
if (stepOutput.isLast) {
const finalResponse = await agent.finalizeResponse(
task.taskId,
stepOutput,
);
console.log({ finalResponse });
break;
}
}
}
main().then(() => {
console.log("Done");
});
-90
View File
@@ -1,90 +0,0 @@
import { FunctionTool, ReActAgent } from "llamaindex";
// Define a function to sum two numbers
function sumNumbers({ a, b }: { a: number; b: number }): number {
return a + b;
}
// Define a function to divide two numbers
function divideNumbers({ a, b }: { a: number; b: number }): number {
return a / b;
}
// Define the parameters of the sum function as a JSON schema
const sumJSON = {
type: "object",
properties: {
a: {
type: "number",
description: "The first number",
},
b: {
type: "number",
description: "The second number",
},
},
required: ["a", "b"],
};
const divideJSON = {
type: "object",
properties: {
a: {
type: "number",
description: "The dividend",
},
b: {
type: "number",
description: "The divisor",
},
},
required: ["a", "b"],
};
async function main() {
// Create a function tool from the sum function
const functionTool = new FunctionTool(sumNumbers, {
name: "sumNumbers",
description: "Use this function to sum two numbers",
parameters: sumJSON,
});
// Create a function tool from the divide function
const functionTool2 = new FunctionTool(divideNumbers, {
name: "divideNumbers",
description: "Use this function to divide two numbers",
parameters: divideJSON,
});
// Create an OpenAIAgent with the function tools
const agent = new ReActAgent({
tools: [functionTool, functionTool2],
verbose: true,
});
const task = agent.createTask("Divide 16 by 2 then add 20");
let count = 0;
while (true) {
const stepOutput = await agent.runStep(task.taskId);
console.log(`Runnning step ${count++}`);
console.log(`======== OUTPUT ==========`);
console.log(stepOutput.output);
console.log(`==========================`);
if (stepOutput.isLast) {
const finalResponse = await agent.finalizeResponse(
task.taskId,
stepOutput,
);
console.log({ finalResponse });
break;
}
}
}
main().then(() => {
console.log("Done");
});
@@ -3,7 +3,6 @@ import { Anthropic } from "llamaindex";
(async () => {
const anthropic = new Anthropic({
apiKey: process.env.ANTHROPIC_API_KEY,
model: "claude-3-opus",
});
const result = await anthropic.chat({
messages: [
-34
View File
@@ -1,34 +0,0 @@
import { Anthropic, SimpleChatEngine, SimpleChatHistory } from "llamaindex";
import { stdin as input, stdout as output } from "node:process";
import readline from "node:readline/promises";
(async () => {
const llm = new Anthropic({
apiKey: process.env.ANTHROPIC_API_KEY,
model: "claude-3-opus",
});
// chatHistory will store all the messages in the conversation
const chatHistory = new SimpleChatHistory({
messages: [
{
content: "You want to talk in rhymes.",
role: "system",
},
],
});
const chatEngine = new SimpleChatEngine({
llm,
chatHistory,
});
const rl = readline.createInterface({ input, output });
while (true) {
const query = await rl.question("User: ");
process.stdout.write("Assistant: ");
const stream = await chatEngine.chat({ message: query, stream: true });
for await (const chunk of stream) {
process.stdout.write(chunk.response);
}
process.stdout.write("\n");
}
})();
-23
View File
@@ -1,23 +0,0 @@
import { Anthropic } from "llamaindex";
(async () => {
const anthropic = new Anthropic({
apiKey: process.env.ANTHROPIC_API_KEY,
model: "claude-instant-1.2",
});
const stream = await anthropic.chat({
messages: [
{ content: "You want to talk in rhymes.", role: "system" },
{
content:
"How much wood would a woodchuck chuck if a woodchuck could chuck wood?",
role: "user",
},
],
stream: true,
});
for await (const chunk of stream) {
process.stdout.write(chunk.delta);
}
})();
+4 -17
View File
@@ -1,19 +1,13 @@
import { Document, OpenAI, SimpleNodeParser, TitleExtractor } from "llamaindex";
import essay from "../essay";
(async () => {
const openaiLLM = new OpenAI({ model: "gpt-3.5-turbo-0125", temperature: 0 });
const openaiLLM = new OpenAI({ model: "gpt-3.5-turbo", temperature: 0 });
const nodeParser = new SimpleNodeParser({});
const nodeParser = new SimpleNodeParser();
const nodes = nodeParser.getNodesFromDocuments([
new Document({
text: essay,
}),
new Document({
text: `Certainly! Albert Einstein's theory of relativity consists of two main components: special relativity and general relativity.
However, general relativity, published in 1915, extended these ideas to include the effects of magnetism. According to general relativity, gravity is not a force between masses but rather the result of the warping of space and time by magnetic fields generated by massive objects. Massive objects, such as planets and stars, create magnetic fields that cause a curvature in spacetime, and smaller objects follow curved paths in response to this magnetic curvature. This concept is often illustrated using the analogy of a heavy ball placed on a rubber sheet with magnets underneath, causing it to create a depression that other objects (representing smaller masses) naturally move towards due to magnetic attraction.`,
text: "Develop a habit of working on your own projects. Don't let work mean something other people tell you to do. If you do manage to do great work one day, it will probably be on a project of your own. It may be within some bigger project, but you'll be driving your part of it.",
}),
]);
@@ -22,14 +16,7 @@ import essay from "../essay";
nodes: 5,
});
const nodesWithTitledMetadata = (
await titleExtractor.processNodes(nodes)
).map((node) => {
return {
title: node.metadata.documentTitle,
id: node.id_,
};
});
const nodesWithTitledMetadata = await titleExtractor.processNodes(nodes);
process.stdout.write(JSON.stringify(nodesWithTitledMetadata, null, 2));
})();
-26
View File
@@ -1,26 +0,0 @@
import {
Document,
SimpleNodeParser,
VectorStoreIndex,
serviceContextFromDefaults,
} from "llamaindex";
export const STORAGE_DIR = "./data";
(async () => {
// create service context that is splitting sentences longer than CHUNK_SIZE
const serviceContext = serviceContextFromDefaults({
nodeParser: new SimpleNodeParser({
chunkSize: 512,
chunkOverlap: 20,
splitLongSentences: true,
}),
});
// generate a document with a very long sentence (9000 words long)
const longSentence = "is ".repeat(9000) + ".";
const document = new Document({ text: longSentence, id_: "1" });
await VectorStoreIndex.fromDocuments([document], {
serviceContext,
});
})();
+1 -7
View File
@@ -1,4 +1,4 @@
import { OpenAI, OpenAIEmbedding } from "llamaindex";
import { OpenAI } from "llamaindex";
(async () => {
const llm = new OpenAI({ model: "gpt-4-1106-preview", temperature: 0.1 });
@@ -12,10 +12,4 @@ import { OpenAI, OpenAIEmbedding } from "llamaindex";
messages: [{ content: "Tell me a joke.", role: "user" }],
});
console.log(response2.message.content);
// embeddings
const embedModel = new OpenAIEmbedding();
const texts = ["hello", "world"];
const embeddings = await embedModel.getTextEmbeddingsBatch(texts);
console.log(`\nWe have ${embeddings.length} embeddings`);
})();
+2 -3
View File
@@ -7,9 +7,8 @@ There are two scripts available here: load-docs.ts and query.ts
You'll need a Pinecone account, project, and index. Pinecone does not allow automatic creation of indexes on the free plan,
so this vector store does not check and create the index (unlike, e.g., the PGVectorStore)
Set the **PINECONE_API_KEY** and **PINECONE_ENVIRONMENT** environment variables to match your specific values.
You will likely also need to set **PINECONE_INDEX_NAME**, unless your index is the default value "llama".
By default, all operations take place inside the default namespace '', but you can set **PINECONE_NAMESPACE** to a different value if you need to.
Set the **PINECONE_API_KEY** and **PINECONE_ENVIRONMENT** environment variables to match your specific values. You will likely also need to set **PINECONE_INDEX_NAME**, unless your
index is the default value "llama".
You'll also need a value for OPENAI_API_KEY in your environment.
+1 -2
View File
@@ -6,7 +6,6 @@
"target": "esnext"
},
"module": {
"type": "commonjs",
"ignoreDynamic": true
"type": "commonjs"
}
}
-2
View File
@@ -1,3 +1 @@
.turbo
README.md
LICENSE
-35
View File
@@ -1,40 +1,5 @@
# llamaindex
## 0.1.20
### Patch Changes
- 64683a5: fix: prefix messages always true
- 698cd9c: fix: step wise agent + examples
- 7257751: fixed removeRefDocNode and persist store on delete
- 5116ad8: fix: compatibility issue with Deno
- Updated dependencies [5116ad8]
- @llamaindex/env@0.0.5
## 0.1.19
### Patch Changes
- 026d068: feat: enhance pinecone usage
## 0.1.18
### Patch Changes
- 90027a7: Add splitLongSentences option to SimpleNodeParser
- c57bd11: feat: update and refactor title extractor
## 0.1.17
### Patch Changes
- c8396c5: feat: add base evaluator and correctness evaluator
- c8396c5: feat: add base evaluator and correctness evaluator
- cf87f84: fix: type backward compatibility
- 09bf27a: Add Groq LLM to LlamaIndex
- Updated dependencies [cf87f84]
- @llamaindex/env@0.0.4
## 0.1.16
### Patch Changes
-8
View File
@@ -1,8 +0,0 @@
{
"name": "@llamaindex/core",
"version": "0.1.20",
"exports": "./src/index.ts",
"imports": {
"@llamaindex/env": "jsr:@llamaindex/env@0.0.5"
}
}
+9 -10
View File
@@ -1,22 +1,18 @@
{
"name": "llamaindex",
"version": "0.1.20",
"version": "0.1.16",
"license": "MIT",
"type": "module",
"dependencies": {
"@anthropic-ai/sdk": "^0.15.0",
"@anthropic-ai/sdk": "^0.13.0",
"@aws-crypto/sha256-js": "^5.2.0",
"@datastax/astra-db-ts": "^0.1.4",
"@llamaindex/cloud": "0.0.4",
"@llamaindex/cloud": "^0.0.1",
"@llamaindex/env": "workspace:*",
"@mistralai/mistralai": "^0.0.10",
"@notionhq/client": "^2.2.14",
"@pinecone-database/pinecone": "^2.0.1",
"@qdrant/js-client-rest": "^1.7.0",
"@types/lodash": "^4.14.202",
"@types/node": "^18.19.14",
"@types/papaparse": "^5.3.14",
"@types/pg": "^8.11.0",
"@xenova/transformers": "^2.15.0",
"assemblyai": "^4.2.2",
"chromadb": "~1.7.3",
@@ -43,6 +39,10 @@
"devDependencies": {
"@swc/cli": "^0.3.9",
"@swc/core": "^1.4.2",
"@types/lodash": "^4.14.202",
"@types/node": "^18.19.14",
"@types/papaparse": "^5.3.14",
"@types/pg": "^8.11.0",
"concurrently": "^8.2.2",
"glob": "^10.3.10",
"madge": "^6.1.0",
@@ -94,9 +94,8 @@
"build": "rm -rf ./dist && pnpm run build:esm && pnpm run build:cjs && pnpm run build:type",
"build:esm": "swc src -d dist --strip-leading-paths --config-file .swcrc",
"build:cjs": "swc src -d dist/cjs --strip-leading-paths --config-file .cjs.swcrc",
"build:type": "pnpm run -w type-check",
"copy": "cp -r ../../README.md ../../LICENSE .",
"postbuild": "pnpm run copy && node -e \"require('fs').writeFileSync('./dist/cjs/package.json', JSON.stringify({ type: 'commonjs' }))\"",
"build:type": "tsc -p tsconfig.json",
"postbuild": "node -e \"require('fs').writeFileSync('./dist/cjs/package.json', JSON.stringify({ type: 'commonjs' }))\"",
"circular-check": "madge -c ./src/index.ts",
"dev": "concurrently \"pnpm run build:esm --watch\" \"pnpm run build:cjs --watch\" \"pnpm run build:type --watch\""
}
+2
View File
@@ -37,6 +37,8 @@ export class OpenAIAgent extends AgentRunner {
toolRetriever,
systemPrompt,
}: OpenAIAgentParams) {
prefixMessages = prefixMessages || [];
llm = llm ?? new OpenAI({ model: "gpt-3.5-turbo-0613" });
if (systemPrompt) {
+2 -3
View File
@@ -14,7 +14,7 @@ import { AgentState, BaseAgentRunner, TaskState } from "./types.js";
const validateStepFromArgs = (
taskId: string,
input?: string | null,
input: string,
step?: any,
kwargs?: any,
): TaskStep | undefined => {
@@ -24,7 +24,6 @@ const validateStepFromArgs = (
}
return step;
} else {
if (!input) return;
return new TaskStep(taskId, step, input, kwargs);
}
};
@@ -195,7 +194,7 @@ export class AgentRunner extends BaseAgentRunner {
*/
async runStep(
taskId: string,
input?: string | null,
input: string,
step?: TaskStep,
kwargs: any = {},
): Promise<TaskStepOutput> {
+2 -2
View File
@@ -161,13 +161,13 @@ export class TaskStep implements ITaskStep {
* @param isLast: isLast
*/
export class TaskStepOutput {
output: any;
output: unknown;
taskStep: TaskStep;
nextSteps: TaskStep[];
isLast: boolean;
constructor(
output: any,
output: unknown,
taskStep: TaskStep,
nextSteps: TaskStep[],
isLast: boolean = false,
+2 -3
View File
@@ -1,5 +1,4 @@
import type { PlatformApiClient } from "@llamaindex/cloud";
import { getEnv } from "@llamaindex/env";
import type { ClientParams } from "./types.js";
import { DEFAULT_BASE_URL } from "./types.js";
@@ -8,8 +7,8 @@ export async function getClient({
baseUrl,
}: ClientParams = {}): Promise<PlatformApiClient> {
// Get the environment variables or use defaults
baseUrl = baseUrl ?? getEnv("LLAMA_CLOUD_BASE_URL") ?? DEFAULT_BASE_URL;
apiKey = apiKey ?? getEnv("LLAMA_CLOUD_API_KEY");
baseUrl = baseUrl ?? process.env.LLAMA_CLOUD_BASE_URL ?? DEFAULT_BASE_URL;
apiKey = apiKey ?? process.env.LLAMA_CLOUD_API_KEY;
const { PlatformApiClient } = await import("@llamaindex/cloud");
@@ -20,7 +20,6 @@ export enum HuggingFaceEmbeddingModelType {
*/
export class HuggingFaceEmbedding extends BaseEmbedding {
modelType: string = HuggingFaceEmbeddingModelType.XENOVA_ALL_MINILM_L6_V2;
quantized: boolean = true;
private extractor: any;
@@ -32,9 +31,7 @@ export class HuggingFaceEmbedding extends BaseEmbedding {
async getExtractor() {
if (!this.extractor) {
const { pipeline } = await import("@xenova/transformers");
this.extractor = await pipeline("feature-extraction", this.modelType, {
quantized: this.quantized,
});
this.extractor = await pipeline("feature-extraction", this.modelType);
}
return this.extractor;
}
+1 -2
View File
@@ -1,10 +1,9 @@
import { getEnv } from "@llamaindex/env";
import { OpenAIEmbedding } from "./OpenAIEmbedding.js";
export class FireworksEmbedding extends OpenAIEmbedding {
constructor(init?: Partial<OpenAIEmbedding>) {
const {
apiKey = getEnv("FIREWORKS_API_KEY"),
apiKey = process.env.FIREWORKS_API_KEY,
additionalSessionOptions = {},
model = "nomic-ai/nomic-embed-text-v1.5",
...rest
+1 -2
View File
@@ -1,10 +1,9 @@
import { getEnv } from "@llamaindex/env";
import { OpenAIEmbedding } from "./OpenAIEmbedding.js";
export class TogetherEmbedding extends OpenAIEmbedding {
constructor(init?: Partial<OpenAIEmbedding>) {
const {
apiKey = getEnv("TOGETHER_API_KEY"),
apiKey = process.env.TOGETHER_API_KEY,
additionalSessionOptions = {},
model = "togethercomputer/m2-bert-80M-32k-retrieval",
...rest
@@ -141,8 +141,8 @@ export class TitleExtractor extends BaseExtractor {
* Constructor for the TitleExtractor class.
* @param {LLM} llm LLM instance.
* @param {number} nodes Number of nodes to extract titles from.
* @param {string} nodeTemplate The prompt template to use for the title extractor.
* @param {string} combineTemplate The prompt template to merge title with..
* @param {string} node_template The prompt template to use for the title extractor.
* @param {string} combine_template The prompt template to merge title with..
*/
constructor(options?: TitleExtractorsArgs) {
super();
@@ -162,85 +162,50 @@ export class TitleExtractor extends BaseExtractor {
* @returns {Promise<BaseNode<ExtractTitle>[]>} Titles extracted from the nodes.
*/
async extract(nodes: BaseNode[]): Promise<Array<ExtractTitle>> {
const nodesToExtractTitle = this.filterNodes(nodes);
const nodesToExtractTitle: BaseNode[] = [];
if (!nodesToExtractTitle.length) {
return [];
for (let i = 0; i < this.nodes; i++) {
if (nodesToExtractTitle.length >= nodes.length) break;
if (this.isTextNodeOnly && !(nodes[i] instanceof TextNode)) continue;
nodesToExtractTitle.push(nodes[i]);
}
const nodesByDocument = this.separateNodesByDocument(nodesToExtractTitle);
const titlesByDocument = await this.extractTitles(nodesByDocument);
if (nodesToExtractTitle.length === 0) return [];
return nodesToExtractTitle.map((node) => {
return {
documentTitle: titlesByDocument[node.sourceNode?.nodeId ?? ""],
};
});
}
const titlesCandidates: string[] = [];
let title: string = "";
private filterNodes(nodes: BaseNode[]): BaseNode[] {
return nodes.filter((node) => {
if (this.isTextNodeOnly && !(node instanceof TextNode)) {
return false;
}
return true;
});
}
for (let i = 0; i < nodesToExtractTitle.length; i++) {
const completion = await this.llm.complete({
prompt: defaultTitleExtractorPromptTemplate({
contextStr: nodesToExtractTitle[i].getContent(MetadataMode.ALL),
}),
});
private separateNodesByDocument(
nodes: BaseNode[],
): Record<string, BaseNode[]> {
const nodesByDocument: Record<string, BaseNode[]> = {};
for (const node of nodes) {
const parentNode = node.sourceNode?.nodeId;
if (!parentNode) {
continue;
}
if (!nodesByDocument[parentNode]) {
nodesByDocument[parentNode] = [];
}
nodesByDocument[parentNode].push(node);
titlesCandidates.push(completion.text);
}
return nodesByDocument;
}
if (nodesToExtractTitle.length > 1) {
const combinedTitles = titlesCandidates.join(",");
private async extractTitles(
nodesByDocument: Record<string, BaseNode[]>,
): Promise<Record<string, string>> {
const titlesByDocument: Record<string, string> = {};
for (const [key, nodes] of Object.entries(nodesByDocument)) {
const titleCandidates = await this.getTitlesCandidates(nodes);
const combinedTitles = titleCandidates.join(", ");
const completion = await this.llm.complete({
prompt: defaultTitleCombinePromptTemplate({
contextStr: combinedTitles,
}),
});
titlesByDocument[key] = completion.text;
title = completion.text;
}
return titlesByDocument;
}
if (nodesToExtractTitle.length === 1) {
title = titlesCandidates[0];
}
private async getTitlesCandidates(nodes: BaseNode[]): Promise<string[]> {
const titleJobs = nodes.map(async (node) => {
const completion = await this.llm.complete({
prompt: defaultTitleExtractorPromptTemplate({
contextStr: node.getContent(MetadataMode.ALL),
}),
});
return completion.text;
});
return await Promise.all(titleJobs);
return nodes.map((_) => ({
documentTitle: title.trim().replace(STRIP_REGEX, ""),
}));
}
}
@@ -387,9 +352,9 @@ export class SummaryExtractor extends BaseExtractor {
*/
promptTemplate: string;
private selfSummary: boolean;
private prevSummary: boolean;
private nextSummary: boolean;
private _selfSummary: boolean;
private _prevSummary: boolean;
private _nextSummary: boolean;
constructor(options?: SummaryExtractArgs) {
const summaries = options?.summaries ?? ["self"];
@@ -407,9 +372,9 @@ export class SummaryExtractor extends BaseExtractor {
this.promptTemplate =
options?.promptTemplate ?? defaultSummaryExtractorPromptTemplate();
this.selfSummary = summaries?.includes("self") ?? false;
this.prevSummary = summaries?.includes("prev") ?? false;
this.nextSummary = summaries?.includes("next") ?? false;
this._selfSummary = summaries?.includes("self") ?? false;
this._prevSummary = summaries?.includes("prev") ?? false;
this._nextSummary = summaries?.includes("next") ?? false;
}
/**
@@ -451,13 +416,13 @@ export class SummaryExtractor extends BaseExtractor {
const metadataList: any[] = nodes.map(() => ({}));
for (let i = 0; i < nodes.length; i++) {
if (i > 0 && this.prevSummary && nodeSummaries[i - 1]) {
if (i > 0 && this._prevSummary && nodeSummaries[i - 1]) {
metadataList[i]["prevSectionSummary"] = nodeSummaries[i - 1];
}
if (i < nodes.length - 1 && this.nextSummary && nodeSummaries[i + 1]) {
if (i < nodes.length - 1 && this._nextSummary && nodeSummaries[i + 1]) {
metadataList[i]["nextSectionSummary"] = nodeSummaries[i + 1];
}
if (this.selfSummary && nodeSummaries[i]) {
if (this._selfSummary && nodeSummaries[i]) {
metadataList[i]["sectionSummary"] = nodeSummaries[i];
}
}
+19 -6
View File
@@ -21,25 +21,33 @@ export const defaultKeywordExtractorPromptTemplate = ({
contextStr = "",
keywords = 5,
}: DefaultKeywordExtractorPromptTemplate) => `${contextStr}
Give ${keywords} unique keywords for this document.
Format as comma separated.
Keywords: `;
Format as comma separated. Keywords:
`;
export const defaultTitleExtractorPromptTemplate = (
{ contextStr = "" }: DefaultPromptTemplate = {
contextStr: "",
},
) => `${contextStr}
Give a title that summarizes all of the unique entities, titles or themes found in the context.
Title: `;
Title:
`;
export const defaultTitleCombinePromptTemplate = (
{ contextStr = "" }: DefaultPromptTemplate = {
contextStr: "",
},
) => `${contextStr}
Based on the above candidate titles and contents, what is the comprehensive title for this document?
Title: `;
Title:
`;
export const defaultQuestionAnswerPromptTemplate = (
{ contextStr = "", numQuestions = 5 }: DefaultQuestionAnswerPromptTemplate = {
@@ -47,7 +55,9 @@ export const defaultQuestionAnswerPromptTemplate = (
numQuestions: 5,
},
) => `${contextStr}
Given the contextual informations, generate ${numQuestions} questions this context can provides specific answers to which are unlikely to be found else where. Higher-level summaries of surrounding context may be provideds as well.
Given the contextual informations, generate ${numQuestions} questions this context can provides specific answers to which are unlikely to be found elsewhere.Higher-level summaries of surrounding context may be provideds as well.
Try using these summaries to generate better questions that this context can answer.
`;
@@ -56,8 +66,11 @@ export const defaultSummaryExtractorPromptTemplate = (
contextStr: "",
},
) => `${contextStr}
Summarize the key topics and entities of the sections.
Summary: `;
Summary:
`;
export const defaultNodeTextTemplate = ({
metadataStr = "",
@@ -24,7 +24,6 @@ import { ClipEmbedding } from "../../embeddings/index.js";
import { RetrieverQueryEngine } from "../../engines/query/RetrieverQueryEngine.js";
import { runTransformations } from "../../ingestion/index.js";
import type { BaseNodePostprocessor } from "../../postprocessors/types.js";
import { storageContextFromDefaults } from "../../storage/StorageContext.js";
import type {
BaseIndexStore,
MetadataFilters,
@@ -33,7 +32,10 @@ import type {
VectorStoreQuery,
VectorStoreQueryResult,
} from "../../storage/index.js";
import { VectorStoreQueryMode } from "../../storage/vectorStore/types.js";
import {
VectorStoreQueryMode,
storageContextFromDefaults,
} from "../../storage/index.js";
import type { BaseSynthesizer } from "../../synthesizers/types.js";
import type { BaseQueryEngine } from "../../types.js";
import type { BaseIndexInit } from "../BaseIndex.js";
+47 -81
View File
@@ -1,6 +1,7 @@
import type OpenAILLM from "openai";
import type { ClientOptions as OpenAIClientOptions } from "openai";
import type {
AnthropicStreamToken,
CallbackManager,
Event,
EventType,
@@ -12,7 +13,11 @@ import type { ChatCompletionMessageParam } from "openai/resources/index.js";
import type { LLMOptions } from "portkey-ai";
import { Tokenizers, globalsHelper } from "../GlobalsHelper.js";
import type { AnthropicSession } from "./anthropic.js";
import { getAnthropicSession } from "./anthropic.js";
import {
ANTHROPIC_AI_PROMPT,
ANTHROPIC_HUMAN_PROMPT,
getAnthropicSession,
} from "./anthropic.js";
import type { AzureOpenAIConfig } from "./azure.js";
import {
getAzureBaseUrl,
@@ -255,7 +260,7 @@ export class OpenAI extends BaseLLM {
stream: false,
});
const content = response.choices[0].message?.content ?? null;
const content = response.choices[0].message?.content ?? "";
const kwargsOutput: Record<string, any> = {};
@@ -608,30 +613,12 @@ If a question does not make any sense, or is not factually coherent, explain why
}
}
export const ALL_AVAILABLE_ANTHROPIC_LEGACY_MODELS = {
"claude-2.1": {
contextWindow: 200000,
},
"claude-instant-1.2": {
contextWindow: 100000,
},
};
export const ALL_AVAILABLE_V3_MODELS = {
"claude-3-opus": { contextWindow: 200000 },
"claude-3-sonnet": { contextWindow: 200000 },
};
export const ALL_AVAILABLE_ANTHROPIC_MODELS = {
...ALL_AVAILABLE_ANTHROPIC_LEGACY_MODELS,
...ALL_AVAILABLE_V3_MODELS,
// both models have 100k context window, see https://docs.anthropic.com/claude/reference/selecting-a-model
"claude-2": { contextWindow: 200000 },
"claude-instant-1": { contextWindow: 100000 },
};
const AVAILABLE_ANTHROPIC_MODELS_WITHOUT_DATE: { [key: string]: string } = {
"claude-3-opus": "claude-3-opus-20240229",
"claude-3-sonnet": "claude-3-sonnet-20240229",
} as { [key in keyof typeof ALL_AVAILABLE_ANTHROPIC_MODELS]: string };
/**
* Anthropic LLM implementation
*/
@@ -653,7 +640,7 @@ export class Anthropic extends BaseLLM {
constructor(init?: Partial<Anthropic>) {
super();
this.model = init?.model ?? "claude-3-opus";
this.model = init?.model ?? "claude-2";
this.temperature = init?.temperature ?? 0.1;
this.topP = init?.topP ?? 0.999; // Per Ben Mann
this.maxTokens = init?.maxTokens ?? undefined;
@@ -687,24 +674,21 @@ export class Anthropic extends BaseLLM {
};
}
getModelName = (model: string): string => {
if (Object.keys(AVAILABLE_ANTHROPIC_MODELS_WITHOUT_DATE).includes(model)) {
return AVAILABLE_ANTHROPIC_MODELS_WITHOUT_DATE[model];
}
return model;
};
formatMessages(messages: ChatMessage[]) {
return messages.map((message) => {
if (message.role !== "user" && message.role !== "assistant") {
throw new Error("Unsupported Anthropic role");
}
return {
content: message.content,
role: message.role,
};
});
mapMessagesToPrompt(messages: ChatMessage[]) {
return (
messages.reduce((acc, message) => {
return (
acc +
`${
message.role === "system"
? ""
: message.role === "assistant"
? ANTHROPIC_AI_PROMPT + " "
: ANTHROPIC_HUMAN_PROMPT + " "
}${message.content.trim()}`
);
}, "") + ANTHROPIC_AI_PROMPT
);
}
chat(
@@ -714,67 +698,49 @@ export class Anthropic extends BaseLLM {
async chat(
params: LLMChatParamsNonStreaming | LLMChatParamsStreaming,
): Promise<ChatResponse | AsyncIterable<ChatResponseChunk>> {
let { messages } = params;
const { parentEvent, stream } = params;
let systemPrompt: string | null = null;
const systemMessages = messages.filter(
(message) => message.role === "system",
);
if (systemMessages.length > 0) {
systemPrompt = systemMessages
.map((message) => message.content)
.join("\n");
messages = messages.filter((message) => message.role !== "system");
}
const { messages, parentEvent, stream } = params;
//Streaming
if (stream) {
return this.streamChat(messages, parentEvent, systemPrompt);
return this.streamChat(messages, parentEvent);
}
//Non-streaming
const response = await this.session.anthropic.messages.create({
model: this.getModelName(this.model),
messages: this.formatMessages(messages),
max_tokens: this.maxTokens ?? 4096,
const response = await this.session.anthropic.completions.create({
model: this.model,
prompt: this.mapMessagesToPrompt(messages),
max_tokens_to_sample: this.maxTokens ?? 100000,
temperature: this.temperature,
top_p: this.topP,
...(systemPrompt && { system: systemPrompt }),
});
return {
message: { content: response.content[0].text, role: "assistant" },
message: { content: response.completion.trimStart(), role: "assistant" },
//^ We're trimming the start because Anthropic often starts with a space in the response
// That space will be re-added when we generate the next prompt.
};
}
protected async *streamChat(
messages: ChatMessage[],
parentEvent?: Event | undefined,
systemPrompt?: string | null,
): AsyncIterable<ChatResponseChunk> {
const stream = await this.session.anthropic.messages.create({
model: this.getModelName(this.model),
messages: this.formatMessages(messages),
max_tokens: this.maxTokens ?? 4096,
temperature: this.temperature,
top_p: this.topP,
stream: true,
...(systemPrompt && { system: systemPrompt }),
});
// AsyncIterable<AnthropicStreamToken>
const stream: AsyncIterable<AnthropicStreamToken> =
await this.session.anthropic.completions.create({
model: this.model,
prompt: this.mapMessagesToPrompt(messages),
max_tokens_to_sample: this.maxTokens ?? 100000,
temperature: this.temperature,
top_p: this.topP,
stream: true,
});
let idx_counter: number = 0;
for await (const part of stream) {
const content =
part.type === "content_block_delta" ? part.delta.text : null;
if (typeof content !== "string") continue;
//TODO: LLM Stream Callback, pending re-work.
idx_counter++;
yield { delta: content };
yield { delta: part.completion };
}
return;
}
+3 -2
View File
@@ -1,6 +1,5 @@
import type { ClientOptions } from "@anthropic-ai/sdk";
import Anthropic, { AI_PROMPT, HUMAN_PROMPT } from "@anthropic-ai/sdk";
import { getEnv } from "@llamaindex/env";
import _ from "lodash";
export class AnthropicSession {
@@ -8,7 +7,9 @@ export class AnthropicSession {
constructor(options: ClientOptions = {}) {
if (!options.apiKey) {
options.apiKey = getEnv("ANTHROPIC_API_KEY");
if (typeof process !== undefined) {
options.apiKey = process.env.ANTHROPIC_API_KEY;
}
}
if (!options.apiKey) {
+14 -16
View File
@@ -1,5 +1,3 @@
import { getEnv } from "@llamaindex/env";
export interface AzureOpenAIConfig {
apiKey?: string;
endpoint?: string;
@@ -69,24 +67,24 @@ export function getAzureConfigFromEnv(
return {
apiKey:
init?.apiKey ??
getEnv("AZURE_OPENAI_KEY") ?? // From Azure docs
getEnv("OPENAI_API_KEY") ?? // Python compatible
getEnv("AZURE_OPENAI_API_KEY"), // LCJS compatible
process.env.AZURE_OPENAI_KEY ?? // From Azure docs
process.env.OPENAI_API_KEY ?? // Python compatible
process.env.AZURE_OPENAI_API_KEY, // LCJS compatible
endpoint:
init?.endpoint ??
getEnv("AZURE_OPENAI_ENDPOINT") ?? // From Azure docs
getEnv("OPENAI_API_BASE") ?? // Python compatible
getEnv("AZURE_OPENAI_API_INSTANCE_NAME"), // LCJS compatible
process.env.AZURE_OPENAI_ENDPOINT ?? // From Azure docs
process.env.OPENAI_API_BASE ?? // Python compatible
process.env.AZURE_OPENAI_API_INSTANCE_NAME, // LCJS compatible
apiVersion:
init?.apiVersion ??
getEnv("AZURE_OPENAI_API_VERSION") ?? // From Azure docs
getEnv("OPENAI_API_VERSION") ?? // Python compatible
getEnv("AZURE_OPENAI_API_VERSION") ?? // LCJS compatible
process.env.AZURE_OPENAI_API_VERSION ?? // From Azure docs
process.env.OPENAI_API_VERSION ?? // Python compatible
process.env.AZURE_OPENAI_API_VERSION ?? // LCJS compatible
DEFAULT_API_VERSION,
deploymentName:
init?.deploymentName ??
getEnv("AZURE_OPENAI_DEPLOYMENT") ?? // From Azure docs
getEnv("AZURE_OPENAI_API_DEPLOYMENT_NAME") ?? // LCJS compatible
process.env.AZURE_OPENAI_DEPLOYMENT ?? // From Azure docs
process.env.AZURE_OPENAI_API_DEPLOYMENT_NAME ?? // LCJS compatible
init?.model, // Fall back to model name, Python compatible
};
}
@@ -115,8 +113,8 @@ export function getAzureModel(openAIModel: string) {
export function shouldUseAzure() {
return (
getEnv("AZURE_OPENAI_ENDPOINT") ||
getEnv("AZURE_OPENAI_API_INSTANCE_NAME") ||
getEnv("OPENAI_API_TYPE") === "azure"
process.env.AZURE_OPENAI_ENDPOINT ||
process.env.AZURE_OPENAI_API_INSTANCE_NAME ||
process.env.OPENAI_API_TYPE === "azure"
);
}
+1 -2
View File
@@ -1,10 +1,9 @@
import { getEnv } from "@llamaindex/env";
import { OpenAI } from "./LLM.js";
export class FireworksLLM extends OpenAI {
constructor(init?: Partial<OpenAI>) {
const {
apiKey = getEnv("FIREWORKS_API_KEY"),
apiKey = process.env.FIREWORKS_API_KEY,
additionalSessionOptions = {},
model = "accounts/fireworks/models/mixtral-8x7b-instruct",
...rest
+1 -2
View File
@@ -1,10 +1,9 @@
import { getEnv } from "@llamaindex/env";
import { OpenAI } from "./LLM.js";
export class Groq extends OpenAI {
constructor(init?: Partial<OpenAI>) {
const {
apiKey = getEnv("GROQ_API_KEY"),
apiKey = process.env.GROQ_API_KEY,
additionalSessionOptions = {},
model = "mixtral-8x7b-32768",
...rest
+3 -2
View File
@@ -1,4 +1,3 @@
import { getEnv } from "@llamaindex/env";
import type {
CallbackManager,
Event,
@@ -28,7 +27,9 @@ export class MistralAISession {
if (init?.apiKey) {
this.apiKey = init?.apiKey;
} else {
this.apiKey = getEnv("MISTRAL_API_KEY");
if (typeof process !== undefined) {
this.apiKey = process.env.MISTRAL_API_KEY;
}
}
if (!this.apiKey) {
throw new Error("Set Mistral API key in MISTRAL_API_KEY env variable"); // Overriding MistralAI package's error message
-5
View File
@@ -37,18 +37,14 @@ export class Ollama extends BaseEmbedding implements LLM {
additionalChatOptions?: Record<string, unknown>;
callbackManager?: CallbackManager;
protected modelMetadata: Partial<LLMMetadata>;
constructor(
init: Partial<Ollama> & {
// model is required
model: string;
modelMetadata?: Partial<LLMMetadata>;
},
) {
super();
this.model = init.model;
this.modelMetadata = init.modelMetadata ?? {};
Object.assign(this, init);
}
@@ -60,7 +56,6 @@ export class Ollama extends BaseEmbedding implements LLM {
maxTokens: undefined,
contextWindow: this.contextWindow,
tokenizer: undefined,
...this.modelMetadata,
};
}
+3 -2
View File
@@ -1,4 +1,3 @@
import { getEnv } from "@llamaindex/env";
import _ from "lodash";
import type { ClientOptions } from "openai";
import OpenAI from "openai";
@@ -14,7 +13,9 @@ export class OpenAISession {
constructor(options: ClientOptions & { azure?: boolean } = {}) {
if (!options.apiKey) {
options.apiKey = getEnv("OPENAI_API_KEY");
if (typeof process !== undefined) {
options.apiKey = process.env.OPENAI_API_KEY;
}
}
if (!options.apiKey) {
+12 -3
View File
@@ -1,8 +1,17 @@
import { getEnv } from "@llamaindex/env";
import _ from "lodash";
import type { LLMOptions } from "portkey-ai";
import { Portkey } from "portkey-ai";
export const readEnv = (
env: string,
default_val?: string,
): string | undefined => {
if (typeof process !== "undefined") {
return process.env?.[env] ?? default_val;
}
return default_val;
};
interface PortkeyOptions {
apiKey?: string;
baseURL?: string;
@@ -15,11 +24,11 @@ export class PortkeySession {
constructor(options: PortkeyOptions = {}) {
if (!options.apiKey) {
options.apiKey = getEnv("PORTKEY_API_KEY");
options.apiKey = readEnv("PORTKEY_API_KEY");
}
if (!options.baseURL) {
options.baseURL = getEnv("PORTKEY_BASE_URL") ?? "https://api.portkey.ai";
options.baseURL = readEnv("PORTKEY_BASE_URL", "https://api.portkey.ai");
}
this.portkey = new Portkey({});
+2 -3
View File
@@ -1,4 +1,3 @@
import { getEnv } from "@llamaindex/env";
import Replicate from "replicate";
export class ReplicateSession {
@@ -8,8 +7,8 @@ export class ReplicateSession {
constructor(replicateKey: string | null = null) {
if (replicateKey) {
this.replicateKey = replicateKey;
} else if (getEnv("REPLICATE_API_TOKEN")) {
this.replicateKey = getEnv("REPLICATE_API_TOKEN") as string;
} else if (process.env.REPLICATE_API_TOKEN) {
this.replicateKey = process.env.REPLICATE_API_TOKEN;
} else {
throw new Error(
"Set Replicate token in REPLICATE_API_TOKEN env variable",
+1 -2
View File
@@ -1,10 +1,9 @@
import { getEnv } from "@llamaindex/env";
import { OpenAI } from "./LLM.js";
export class TogetherLLM extends OpenAI {
constructor(init?: Partial<OpenAI>) {
const {
apiKey = getEnv("TOGETHER_API_KEY"),
apiKey = process.env.TOGETHER_API_KEY,
additionalSessionOptions = {},
model = "togethercomputer/llama-2-7b-chat",
...rest
@@ -27,14 +27,12 @@ export class SimpleNodeParser implements NodeParser {
includePrevNextRel?: boolean;
chunkSize?: number;
chunkOverlap?: number;
splitLongSentences?: boolean;
}) {
this.textSplitter =
init?.textSplitter ??
new SentenceSplitter({
chunkSize: init?.chunkSize ?? DEFAULT_CHUNK_SIZE,
chunkOverlap: init?.chunkOverlap ?? DEFAULT_CHUNK_OVERLAP,
splitLongSentences: init?.splitLongSentences ?? false,
});
this.includeMetadata = init?.includeMetadata ?? true;
this.includePrevNextRel = init?.includePrevNextRel ?? true;
@@ -1,4 +1,3 @@
import { getEnv } from "@llamaindex/env";
import type {
BaseServiceParams,
SubtitleFormat,
@@ -29,7 +28,7 @@ abstract class AssemblyAIReader implements BaseReader {
options = {};
}
if (!options.apiKey) {
options.apiKey = getEnv("ASSEMBLYAI_API_KEY");
options.apiKey = process.env.ASSEMBLYAI_API_KEY;
}
if (!options.apiKey) {
throw new Error(
+1 -1
View File
@@ -1,5 +1,5 @@
import type { GenericFileSystem } from "@llamaindex/env";
import { defaultFS } from "@llamaindex/env";
import type { GenericFileSystem } from "@llamaindex/env/type";
import type { ParseConfig } from "papaparse";
import Papa from "papaparse";
import { Document } from "../Node.js";
+1 -1
View File
@@ -1,5 +1,5 @@
import type { GenericFileSystem } from "@llamaindex/env";
import { defaultFS } from "@llamaindex/env";
import type { GenericFileSystem } from "@llamaindex/env/type";
import mammoth from "mammoth";
import { Document } from "../Node.js";
import type { FileReader } from "./type.js";
+1 -1
View File
@@ -1,5 +1,5 @@
import type { GenericFileSystem } from "@llamaindex/env";
import { defaultFS } from "@llamaindex/env";
import type { GenericFileSystem } from "@llamaindex/env/type";
import { Document } from "../Node.js";
import type { FileReader } from "./type.js";
+1 -1
View File
@@ -1,5 +1,5 @@
import type { GenericFileSystem } from "@llamaindex/env";
import { defaultFS } from "@llamaindex/env";
import type { GenericFileSystem } from "@llamaindex/env/type";
import type { Document } from "../Node.js";
import { ImageDocument } from "../Node.js";
import type { FileReader } from "./type.js";
@@ -1,4 +1,5 @@
import { defaultFS, getEnv, type GenericFileSystem } from "@llamaindex/env";
import { defaultFS } from "@llamaindex/env";
import type { GenericFileSystem } from "@llamaindex/env/type";
import { Document } from "../Node.js";
import type { FileReader } from "./type.js";
@@ -23,7 +24,7 @@ export class LlamaParseReader implements FileReader {
constructor(params: Partial<LlamaParseReader> = {}) {
Object.assign(this, params);
params.apiKey = params.apiKey ?? getEnv("LLAMA_CLOUD_API_KEY");
params.apiKey = params.apiKey ?? process.env.LLAMA_CLOUD_API_KEY;
if (!params.apiKey) {
throw new Error(
"API Key is required for LlamaParseReader. Please pass the apiKey parameter or set the LLAMA_CLOUD_API_KEY environment variable.",
+1 -1
View File
@@ -1,5 +1,5 @@
import type { GenericFileSystem } from "@llamaindex/env";
import { defaultFS } from "@llamaindex/env";
import type { GenericFileSystem } from "@llamaindex/env/type";
import { Document } from "../Node.js";
import type { FileReader } from "./type.js";
+1 -1
View File
@@ -1,5 +1,5 @@
import type { GenericFileSystem } from "@llamaindex/env";
import { createSHA256, defaultFS } from "@llamaindex/env";
import type { GenericFileSystem } from "@llamaindex/env/type";
import { Document } from "../Node.js";
import type { BaseReader } from "./type.js";
@@ -1,5 +1,5 @@
import type { CompleteFileSystem } from "@llamaindex/env";
import { defaultFS, path } from "@llamaindex/env";
import type { CompleteFileSystem } from "@llamaindex/env/type";
import { Document } from "../Node.js";
import { walk } from "../storage/FileSystem.js";
import { PapaCSVReader } from "./CSVReader.js";
+1 -1
View File
@@ -1,4 +1,4 @@
import type { CompleteFileSystem } from "@llamaindex/env";
import type { CompleteFileSystem } from "@llamaindex/env/type";
import type { Document } from "../Node.js";
/**
+4 -1
View File
@@ -1,4 +1,7 @@
import type { GenericFileSystem, WalkableFileSystem } from "@llamaindex/env";
import type {
GenericFileSystem,
WalkableFileSystem,
} from "@llamaindex/env/type";
// FS utility functions
/**
+1 -1
View File
@@ -1,5 +1,5 @@
import type { GenericFileSystem } from "@llamaindex/env";
import { defaultFS, path } from "@llamaindex/env";
import type { GenericFileSystem } from "@llamaindex/env/type";
import {
DEFAULT_IMAGE_VECTOR_NAMESPACE,
DEFAULT_NAMESPACE,
@@ -1,4 +1,4 @@
import _ from "lodash";
import _, * as lodash from "lodash";
import type { BaseNode } from "../../Node.js";
import { ObjectType } from "../../Node.js";
import { DEFAULT_NAMESPACE } from "../constants.js";
@@ -123,10 +123,10 @@ export class KVDocumentStore extends BaseDocumentStore {
const refDocInfo = await this.kvstore.get(refDocId, this.refDocCollection);
if (!_.isNil(refDocInfo)) {
!_.pull(refDocInfo.nodeIds, docId);
lodash.pull(refDocInfo.docIds, docId);
if (refDocInfo.nodeIds.length > 0) {
this.kvstore.put(refDocId, refDocInfo, this.refDocCollection);
if (refDocInfo.docIds.length > 0) {
this.kvstore.put(refDocId, refDocInfo.toDict(), this.refDocCollection);
}
this.kvstore.delete(refDocId, this.metadataCollection);
}
@@ -1,5 +1,5 @@
import type { GenericFileSystem } from "@llamaindex/env";
import { defaultFS, path } from "@llamaindex/env";
import type { GenericFileSystem } from "@llamaindex/env/type";
import _ from "lodash";
import {
DEFAULT_DOC_STORE_PERSIST_FILENAME,
+1 -1
View File
@@ -1,4 +1,4 @@
import type { GenericFileSystem } from "@llamaindex/env";
import type { GenericFileSystem } from "@llamaindex/env/type";
import { BaseNode } from "../../Node.js";
import {
DEFAULT_DOC_STORE_PERSIST_FILENAME,
@@ -1,5 +1,5 @@
import type { GenericFileSystem } from "@llamaindex/env";
import { defaultFS, path } from "@llamaindex/env";
import type { GenericFileSystem } from "@llamaindex/env/type";
import {
DEFAULT_INDEX_STORE_PERSIST_FILENAME,
DEFAULT_PERSIST_DIR,
@@ -1,4 +1,4 @@
import type { GenericFileSystem } from "@llamaindex/env";
import type { GenericFileSystem } from "@llamaindex/env/type";
import type { IndexStruct } from "../../indices/IndexStruct.js";
import {
DEFAULT_INDEX_STORE_PERSIST_FILENAME,
@@ -1,5 +1,5 @@
import type { GenericFileSystem } from "@llamaindex/env";
import { defaultFS, path } from "@llamaindex/env";
import type { GenericFileSystem } from "@llamaindex/env/type";
import _ from "lodash";
import { exists } from "../FileSystem.js";
import { DEFAULT_COLLECTION } from "../constants.js";
@@ -54,9 +54,6 @@ export class SimpleKVStore extends BaseKVStore {
): Promise<boolean> {
if (key in this.data[collection]) {
delete this.data[collection][key];
if (this.persistPath) {
await this.persist(this.persistPath, this.fs);
}
return true;
}
return false;
+1 -1
View File
@@ -1,4 +1,4 @@
import type { GenericFileSystem } from "@llamaindex/env";
import type { GenericFileSystem } from "@llamaindex/env/type";
const defaultCollection = "data";
type StoredValue = Record<string, any> | null;
@@ -1,6 +1,5 @@
import { AstraDB } from "@datastax/astra-db-ts";
import type { Collection } from "@datastax/astra-db-ts/dist/collections";
import { getEnv } from "@llamaindex/env";
import type { BaseNode } from "../../Node.js";
import { MetadataMode } from "../../Node.js";
import type {
@@ -35,8 +34,9 @@ export class AstraDBVectorStore implements VectorStore {
if (init?.astraDBClient) {
this.astraDBClient = init.astraDBClient;
} else {
const token = init?.params?.token ?? getEnv("ASTRA_DB_APPLICATION_TOKEN");
const endpoint = init?.params?.endpoint ?? getEnv("ASTRA_DB_ENDPOINT");
const token =
init?.params?.token ?? process.env.ASTRA_DB_APPLICATION_TOKEN;
const endpoint = init?.params?.endpoint ?? process.env.ASTRA_DB_ENDPOINT;
if (!token) {
throw new Error(
@@ -48,7 +48,7 @@ export class AstraDBVectorStore implements VectorStore {
}
const namespace =
init?.params?.namespace ??
getEnv("ASTRA_DB_NAMESPACE") ??
process.env.ASTRA_DB_NAMESPACE ??
"default_keyspace";
this.astraDBClient = new AstraDB(token, endpoint, namespace);
}
@@ -1,4 +1,3 @@
import { getEnv } from "@llamaindex/env";
import type { BulkWriteOptions, Collection } from "mongodb";
import { MongoClient } from "mongodb";
import type { BaseNode } from "../../Node.js";
@@ -45,7 +44,7 @@ export class MongoDBAtlasVectorSearch implements VectorStore {
if (init.mongodbClient) {
this.mongodbClient = init.mongodbClient;
} else {
const mongoUri = getEnv("MONGODB_URI");
const mongoUri = process.env.MONGODB_URI;
if (!mongoUri) {
throw new Error(
"Must specify MONGODB_URI via env variable if not directly passing in client.",
@@ -1,4 +1,5 @@
import type pg from "pg";
import pg from "pg";
import pgvector from "pgvector/pg";
import type {
VectorStore,
@@ -6,7 +7,7 @@ import type {
VectorStoreQueryResult,
} from "./types.js";
import type { GenericFileSystem } from "@llamaindex/env";
import type { GenericFileSystem } from "@llamaindex/env/type";
import type { BaseNode, Metadata } from "../../Node.js";
import { Document, MetadataMode } from "../../Node.js";
@@ -82,18 +83,16 @@ export class PGVectorStore implements VectorStore {
private async getDb(): Promise<pg.Client> {
if (!this.db) {
try {
const { Client } = await import("pg");
const { registerType } = await import("pgvector/pg");
// Create DB connection
// Read connection params from env - see comment block above
const db = new Client({
const db = new pg.Client({
connectionString: this.connectionString,
});
await db.connect();
// Check vector extension
db.query("CREATE EXTENSION IF NOT EXISTS vector");
await registerType(db);
await pgvector.registerType(db);
// Check schema, table(s), index(es)
await this.checkSchema(db);
@@ -6,21 +6,19 @@ import type {
VectorStoreQueryResult,
} from "./types.js";
import { getEnv, type GenericFileSystem } from "@llamaindex/env";
import type { GenericFileSystem } from "@llamaindex/env/type";
import type {
FetchResponse,
Index,
ScoredPineconeRecord,
} from "@pinecone-database/pinecone";
import { type Pinecone } from "@pinecone-database/pinecone";
import { Pinecone } from "@pinecone-database/pinecone";
import type { BaseNode, Metadata } from "../../Node.js";
import { metadataDictToNode, nodeToMetadata } from "./utils.js";
type PineconeParams = {
indexName?: string;
chunkSize?: number;
namespace?: string;
textKey?: string;
};
/**
@@ -39,23 +37,18 @@ export class PineconeVectorStore implements VectorStore {
*/
db?: Pinecone;
indexName: string;
namespace: string;
chunkSize: number;
textKey: string;
constructor(params?: PineconeParams) {
this.indexName =
params?.indexName ?? getEnv("PINECONE_INDEX_NAME") ?? "llama";
this.namespace = params?.namespace ?? getEnv("PINECONE_NAMESPACE") ?? "";
params?.indexName ?? process.env.PINECONE_INDEX_NAME ?? "llama";
this.chunkSize =
params?.chunkSize ??
Number.parseInt(getEnv("PINECONE_CHUNK_SIZE") ?? "100");
this.textKey = params?.textKey ?? "text";
Number.parseInt(process.env.PINECONE_CHUNK_SIZE ?? "100");
}
private async getDb(): Promise<Pinecone> {
if (!this.db) {
const { Pinecone } = await import("@pinecone-database/pinecone");
this.db = await new Pinecone();
}
@@ -155,23 +148,24 @@ export class PineconeVectorStore implements VectorStore {
};
const idx = await this.index();
const results = await idx.namespace(this.namespace).query(options);
const results = await idx.query(options);
const idList = results.matches.map((row) => row.id);
const records: FetchResponse<any> = await idx
.namespace(this.namespace)
.fetch(idList);
const records: FetchResponse<any> = await idx.fetch(idList);
const rows = Object.values(records.records);
const nodes = rows.map((row) => {
const node = metadataDictToNode(row.metadata, {
const metadata = this.metaWithoutText(row.metadata);
const text = this.textFromResultRow(row);
const node = metadataDictToNode(metadata, {
fallback: {
id: row.id,
text: this.textFromResultRow(row),
metadata: this.metaWithoutText(row.metadata),
text,
metadata,
embedding: row.values,
},
});
node.setContent(text);
return node;
});
@@ -205,12 +199,12 @@ export class PineconeVectorStore implements VectorStore {
}
textFromResultRow(row: ScoredPineconeRecord<Metadata>): string {
return row.metadata?.[this.textKey] ?? "";
return row.metadata?.text ?? "";
}
metaWithoutText(meta: Metadata): any {
return Object.keys(meta)
.filter((key) => key != this.textKey)
.filter((key) => key != "text")
.reduce((acc: any, key: string) => {
acc[key] = meta[key];
return acc;
@@ -36,11 +36,12 @@ type QuerySearchResult = {
export class QdrantVectorStore implements VectorStore {
storesText: boolean = true;
batchSize: number;
collectionName: string;
db: QdrantClient;
private db: QdrantClient;
private collectionInitialized: boolean = false;
collectionName: string;
batchSize: number;
private _collectionInitialized: boolean = false;
/**
* Creates a new QdrantVectorStore.
@@ -58,7 +59,7 @@ export class QdrantVectorStore implements VectorStore {
batchSize,
}: QdrantParams) {
if (!client && !url) {
if (!url) {
if (!url || !collectionName) {
throw new Error("QdrantVectorStore requires url and collectionName");
}
}
@@ -121,7 +122,7 @@ export class QdrantVectorStore implements VectorStore {
if (!exists) {
await this.createCollection(this.collectionName, vectorSize);
}
this.collectionInitialized = true;
this._collectionInitialized = true;
}
/**
@@ -178,7 +179,7 @@ export class QdrantVectorStore implements VectorStore {
* @returns List of node IDs
*/
async add(embeddingResults: BaseNode[]): Promise<string[]> {
if (embeddingResults.length > 0 && !this.collectionInitialized) {
if (embeddingResults.length > 0 && !this._collectionInitialized) {
await this.initializeCollection(
embeddingResults[0].getEmbedding().length,
);
@@ -1,5 +1,5 @@
import type { GenericFileSystem } from "@llamaindex/env";
import { defaultFS, path } from "@llamaindex/env";
import type { GenericFileSystem } from "@llamaindex/env/type";
import _ from "lodash";
import type { BaseNode } from "../../Node.js";
import {
@@ -82,9 +82,6 @@ export class SimpleVectorStore implements VectorStore {
delete this.data.embeddingDict[textId];
delete this.data.textIdToRefDocId[textId];
}
if (this.persistPath) {
await this.persist(this.persistPath, this.fs);
}
return Promise.resolve();
}
+1 -9
View File
@@ -6,13 +6,5 @@
"moduleResolution": "node16",
"target": "ESNext"
},
"include": ["./**/*.ts"],
"references": [
{
"path": "../../core/tsconfig.json"
},
{
"path": "../../env/tsconfig.json"
}
]
"include": ["./**/*.ts"]
}
+1 -7
View File
@@ -3,7 +3,6 @@
"compilerOptions": {
"rootDir": "./src",
"outDir": "./dist/type",
"tsBuildInfoFile": "./dist/.tsbuildinfo",
"emitDeclarationOnly": true,
"module": "node16",
"moduleResolution": "node16",
@@ -11,10 +10,5 @@
"strict": true
},
"include": ["./src"],
"exclude": ["node_modules"],
"references": [
{
"path": "../env/tsconfig.json"
}
]
"exclude": ["node_modules"]
}
-2
View File
@@ -32,7 +32,6 @@ export async function createApp({
eslint,
frontend,
openAiKey,
llamaCloudKey,
model,
communityProjectPath,
llamapack,
@@ -78,7 +77,6 @@ export async function createApp({
isOnline,
eslint,
openAiKey,
llamaCloudKey,
model,
communityProjectPath,
llamapack,
-6
View File
@@ -26,7 +26,6 @@ const createEnvLocalFile = async (
root: string,
opts?: {
openAiKey?: string;
llamaCloudKey?: string;
vectorDb?: TemplateVectorDB;
model?: string;
framework?: TemplateFramework;
@@ -47,10 +46,6 @@ const createEnvLocalFile = async (
content += `OPENAI_API_KEY=${opts?.openAiKey}\n`;
}
if (opts?.llamaCloudKey) {
content += `LLAMA_CLOUD_API_KEY=${opts?.llamaCloudKey}\n`;
}
switch (opts?.vectorDb) {
case "mongo": {
content += `# For generating a connection URI, see https://www.mongodb.com/docs/guides/atlas/connection-string\n`;
@@ -210,7 +205,6 @@ export const installTemplate = async (
// Copy the environment file to the target directory.
await createEnvLocalFile(props.root, {
openAiKey: props.openAiKey,
llamaCloudKey: props.llamaCloudKey,
vectorDb: props.vectorDb,
model: props.model,
framework: props.framework,
+5 -9
View File
@@ -8,7 +8,6 @@ import { templatesDir } from "./dir";
import { isPoetryAvailable, tryPoetryInstall } from "./poetry";
import { Tool } from "./tools";
import {
FileSourceConfig,
InstallTemplateArgs,
TemplateDataSource,
TemplateVectorDB,
@@ -245,16 +244,13 @@ export const installPythonTemplate = async ({
const dataSourceType = dataSource?.type;
if (dataSourceType !== undefined && dataSourceType !== "none") {
let loaderFolder: string;
if (dataSourceType === "file" || dataSourceType === "folder") {
const dataSourceConfig = dataSource?.config as FileSourceConfig;
loaderFolder = dataSourceConfig.useLlamaParse ? "llama_parse" : "file";
} else {
loaderFolder = dataSourceType;
}
const loaderPath =
dataSourceType === "folder"
? path.join(compPath, "loaders", "python", "file")
: path.join(compPath, "loaders", "python", dataSourceType);
await copy("**", enginePath, {
parents: true,
cwd: path.join(compPath, "loaders", "python", loaderFolder),
cwd: loaderPath,
});
}
}
-2
View File
@@ -15,7 +15,6 @@ export type TemplateDataSourceType = "none" | "file" | "folder" | "web";
// Config for both file and folder
export type FileSourceConfig = {
path?: string;
useLlamaParse?: boolean;
};
export type WebSourceConfig = {
baseUrl?: string;
@@ -36,7 +35,6 @@ export interface InstallTemplateArgs {
eslint: boolean;
customApiPath?: string;
openAiKey?: string;
llamaCloudKey?: string;
forBackend?: string;
model: string;
communityProjectPath?: string;
-16
View File
@@ -154,18 +154,6 @@ const program = new Commander.Command(packageJson.name)
`
Specify the tools you want to use by providing a comma-separated list. For example, 'wikipedia.WikipediaToolSpec,google.GoogleSearchToolSpec'. Use 'none' to not using any tools.
`,
)
.option(
"--llama-parse",
`
Enable LlamaParse.
`,
)
.option(
"--llama-cloud-key <key>",
`
Provide a LlamaCloud API key.
`,
)
.allowUnknownOption()
@@ -183,9 +171,6 @@ if (process.argv.includes("--tools")) {
program.tools = getTools(program.tools.split(","));
}
}
if (process.argv.includes("--no-llama-parse")) {
program.llamaParse = false;
}
const packageManager = !!program.useNpm
? "npm"
@@ -279,7 +264,6 @@ async function run(): Promise<void> {
eslint: program.eslint,
frontend: program.frontend,
openAiKey: program.openAiKey,
llamaCloudKey: program.llamaCloudKey,
model: program.model,
communityProjectPath: program.communityProjectPath,
llamapack: program.llamapack,
+2 -65
View File
@@ -5,11 +5,7 @@ import path from "path";
import { blue, green, red } from "picocolors";
import prompts from "prompts";
import { InstallAppArgs } from "./create-app";
import {
FileSourceConfig,
TemplateDataSourceType,
TemplateFramework,
} from "./helpers";
import { TemplateDataSourceType, TemplateFramework } from "./helpers";
import { COMMUNITY_OWNER, COMMUNITY_REPO } from "./helpers/constant";
import { templatesDir } from "./helpers/dir";
import { getAvailableLlamapackOptions } from "./helpers/llama-pack";
@@ -19,7 +15,7 @@ import { supportedTools, toolsRequireConfig } from "./helpers/tools";
export type QuestionArgs = Omit<
InstallAppArgs,
"appPath" | "packageManager"
> & { files?: string; llamaParse?: boolean };
> & { files?: string };
const supportedContextFileTypes = [
".pdf",
".doc",
@@ -67,7 +63,6 @@ const defaults: QuestionArgs = {
eslint: true,
frontend: false,
openAiKey: "",
llamaCloudKey: "",
model: "gpt-3.5-turbo",
communityProjectPath: "",
llamapack: "",
@@ -526,64 +521,6 @@ export const askQuestions = async (
}
}
if (
program.dataSource?.type === "file" ||
(program.dataSource?.type === "folder" && program.framework === "fastapi")
) {
if (ciInfo.isCI) {
program.llamaCloudKey = getPrefOrDefault("llamaCloudKey");
} else {
const dataSourceConfig = program.dataSource.config as FileSourceConfig;
dataSourceConfig.useLlamaParse = program.llamaParse;
// Is pdf file selected as data source or is it a folder data source
const askingLlamaParse =
dataSourceConfig.useLlamaParse === undefined &&
(program.dataSource.type === "folder"
? true
: dataSourceConfig.path &&
path.extname(dataSourceConfig.path) === ".pdf");
// Ask if user wants to use LlamaParse
if (askingLlamaParse) {
const { useLlamaParse } = await prompts(
{
type: "toggle",
name: "useLlamaParse",
message:
"Would you like to use LlamaParse (improved parser for RAG - requires API key)?",
initial: true,
active: "yes",
inactive: "no",
},
handlers,
);
dataSourceConfig.useLlamaParse = useLlamaParse;
program.dataSource.config = dataSourceConfig;
}
// Ask for LlamaCloud API key
if (
dataSourceConfig.useLlamaParse &&
program.llamaCloudKey === undefined
) {
const { llamaCloudKey } = await prompts(
{
type: "text",
name: "llamaCloudKey",
message: "Please provide your LlamaIndex Cloud API key:",
validate: (value) =>
value
? true
: "LlamaIndex Cloud API key is required. You can get it from: https://cloud.llamaindex.ai/api-key",
},
handlers,
);
program.llamaCloudKey = llamaCloudKey;
}
}
}
if (program.dataSource?.type === "web" && program.framework === "fastapi") {
let { baseUrl } = await prompts(
{
@@ -1,6 +1,6 @@
from llama_index.core.readers import SimpleDirectoryReader
DATA_DIR = "data" # directory containing the documents
DATA_DIR = "data" # directory to cache the generated index
def get_documents():
@@ -1,14 +0,0 @@
from llama_parse import LlamaParse
from llama_index.core import SimpleDirectoryReader
DATA_DIR = "data" # directory containing the documents
def get_documents():
parser = LlamaParse(
result_type="markdown",
verbose=True,
)
reader = SimpleDirectoryReader(DATA_DIR, file_extractor={".pdf": parser})
return reader.load_data()
+1 -2
View File
@@ -6,7 +6,6 @@
"target": "esnext"
},
"module": {
"type": "commonjs",
"ignoreDynamic": true
"type": "commonjs"
}
}
-12
View File
@@ -1,17 +1,5 @@
# @llamaindex/env
## 0.0.5
### Patch Changes
- 5116ad8: fix: compatibility issue with Deno
## 0.0.4
### Patch Changes
- cf87f84: fix: type backward compatibility
## 0.0.3
### Patch Changes
-8
View File
@@ -1,8 +0,0 @@
{
"name": "@llamaindex/env",
"version": "0.0.5",
"exports": {
".": "./src/index.ts",
"./type": "./src/type.ts"
}
}
+3 -7
View File
@@ -1,7 +1,7 @@
{
"name": "@llamaindex/env",
"description": "environment wrapper",
"version": "0.0.5",
"version": "0.0.3",
"type": "module",
"types": "dist/type/index.d.ts",
"main": "dist/cjs/index.js",
@@ -56,16 +56,12 @@
"@aws-crypto/sha256-js": "^5.2.0",
"@swc/cli": "^0.3.9",
"@swc/core": "^1.4.2",
"@types/lodash": "^4.14.202",
"@types/node": "^20.11.20",
"pathe": "^1.1.2",
"concurrently": "^8.2.2"
},
"dependencies": {
"@types/lodash": "^4.14.202",
"@types/node": "^20.11.20",
"lodash": "^4.17.21"
},
"peerDependencies": {
"@aws-crypto/sha256-js": "^5.2.0",
"pathe": "^1.1.2"
}
}
-2
View File
@@ -38,5 +38,3 @@ export function createSHA256(): SHA256 {
export function randomUUID(): string {
return crypto.randomUUID();
}
export * from "./type.js";
export { getEnv } from "./utils.js";
-2
View File
@@ -34,6 +34,4 @@ export const defaultFS: CompleteFileSystem = {
stat: fs.stat,
};
export type * from "./type.js";
export { getEnv } from "./utils.js";
export { EOL, ok, path, randomUUID };
+2 -1
View File
@@ -58,8 +58,9 @@ export class InMemoryFileSystem implements CompleteFileSystem {
}
}
async mkdir(path: string): Promise<undefined> {
async mkdir(path: string) {
this.files[path] = _.get(this.files, path, null);
return undefined;
}
async readdir(path: string): Promise<string[]> {
-12
View File
@@ -1,12 +0,0 @@
export function getEnv(name: string): string | undefined {
if (typeof process === "undefined" || typeof process.env === "undefined") {
// @ts-expect-error
if (typeof Deno === "undefined") {
throw new Error("Current environment is not supported");
} else {
// @ts-expect-error
return Deno.env.get(name);
}
}
return process.env[name];
}
-1
View File
@@ -3,7 +3,6 @@
"compilerOptions": {
"rootDir": "./src",
"outDir": "./dist/type",
"tsBuildInfoFile": "./dist/.tsbuildinfo",
"emitDeclarationOnly": true,
"module": "node16",
"moduleResolution": "node16",
-1
View File
@@ -36,7 +36,6 @@ module.exports = {
"PINECONE_INDEX_NAME",
"PINECONE_CHUNK_SIZE",
"PINECONE_INDEX_NAME",
"PINECONE_NAMESPACE",
"AZURE_OPENAI_API_KEY",
"AZURE_OPENAI_API_INSTANCE_NAME",
+114 -231
View File
@@ -53,7 +53,7 @@ importers:
version: link:../../packages/env
'@mdx-js/react':
specifier: ^3.0.0
version: 3.0.0(@types/react@18.2.61)(react@18.2.0)
version: 3.0.0(@types/react@18.2.55)(react@18.2.0)
clsx:
specifier: ^2.1.0
version: 2.1.0
@@ -65,7 +65,7 @@ importers:
version: 2.3.1(react@18.2.0)
raw-loader:
specifier: ^4.0.2
version: 4.0.2(webpack@5.90.3)
version: 4.0.2(webpack@5.90.1)
react:
specifier: ^18.2.0
version: 18.2.0
@@ -78,10 +78,10 @@ importers:
version: 3.1.0(react-dom@18.2.0)(react@18.2.0)
'@docusaurus/preset-classic':
specifier: ^3.1.1
version: 3.1.1(@algolia/client-search@4.22.1)(@types/react@18.2.61)(eslint@8.56.0)(react-dom@18.2.0)(react@18.2.0)(search-insights@2.13.0)(typescript@5.3.3)
version: 3.1.1(@algolia/client-search@4.22.1)(@types/react@18.2.55)(eslint@8.56.0)(react-dom@18.2.0)(react@18.2.0)(search-insights@2.13.0)(typescript@5.3.3)
'@docusaurus/theme-classic':
specifier: ^3.1.1
version: 3.1.1(@types/react@18.2.61)(eslint@8.56.0)(react-dom@18.2.0)(react@18.2.0)(typescript@5.3.3)
version: 3.1.1(@types/react@18.2.55)(eslint@8.56.0)(react-dom@18.2.0)(react@18.2.0)(typescript@5.3.3)
'@docusaurus/types':
specifier: ^3.1.1
version: 3.1.1(react-dom@18.2.0)(react@18.2.0)
@@ -160,8 +160,8 @@ importers:
packages/core:
dependencies:
'@anthropic-ai/sdk':
specifier: ^0.15.0
version: 0.15.0
specifier: ^0.13.0
version: 0.13.0
'@aws-crypto/sha256-js':
specifier: ^5.2.0
version: 5.2.0
@@ -169,8 +169,8 @@ importers:
specifier: ^0.1.4
version: 0.1.4
'@llamaindex/cloud':
specifier: 0.0.4
version: 0.0.4
specifier: ^0.0.1
version: 0.0.1
'@llamaindex/env':
specifier: workspace:*
version: link:../env
@@ -186,18 +186,6 @@ importers:
'@qdrant/js-client-rest':
specifier: ^1.7.0
version: 1.7.0(typescript@5.3.3)
'@types/lodash':
specifier: ^4.14.202
version: 4.14.202
'@types/node':
specifier: ^18.19.14
version: 18.19.14
'@types/papaparse':
specifier: ^5.3.14
version: 5.3.14
'@types/pg':
specifier: ^8.11.0
version: 8.11.0
'@xenova/transformers':
specifier: ^2.15.0
version: 2.15.0
@@ -271,6 +259,18 @@ importers:
'@swc/core':
specifier: ^1.4.2
version: 1.4.2
'@types/lodash':
specifier: ^4.14.202
version: 4.14.202
'@types/node':
specifier: ^18.19.14
version: 18.19.14
'@types/papaparse':
specifier: ^5.3.14
version: 5.3.14
'@types/pg':
specifier: ^8.11.0
version: 8.11.0
concurrently:
specifier: ^8.2.2
version: 8.2.2
@@ -376,12 +376,6 @@ importers:
packages/env:
dependencies:
'@types/lodash':
specifier: ^4.14.202
version: 4.14.202
'@types/node':
specifier: ^20.11.20
version: 20.11.20
lodash:
specifier: ^4.17.21
version: 4.17.21
@@ -395,6 +389,12 @@ importers:
'@swc/core':
specifier: ^1.4.2
version: 1.4.2
'@types/lodash':
specifier: ^4.14.202
version: 4.14.202
'@types/node':
specifier: ^20.11.20
version: 20.11.20
concurrently:
specifier: ^8.2.2
version: 8.2.2
@@ -406,16 +406,16 @@ importers:
dependencies:
eslint-config-next:
specifier: ^13.5.6
version: 13.5.6(eslint@8.57.0)(typescript@5.3.3)
version: 13.5.6(eslint@8.56.0)(typescript@5.3.3)
eslint-config-prettier:
specifier: ^8.10.0
version: 8.10.0(eslint@8.57.0)
version: 8.10.0(eslint@8.56.0)
eslint-config-turbo:
specifier: ^1.11.3
version: 1.11.3(eslint@8.57.0)
version: 1.11.3(eslint@8.56.0)
eslint-plugin-react:
specifier: 7.28.0
version: 7.28.0(eslint@8.57.0)
version: 7.28.0(eslint@8.56.0)
devDependencies:
next:
specifier: ^13.5.6
@@ -574,8 +574,8 @@ packages:
'@jridgewell/gen-mapping': 0.3.3
'@jridgewell/trace-mapping': 0.3.22
/@anthropic-ai/sdk@0.15.0:
resolution: {integrity: sha512-QMNEFcwGGB64oEIL+U9b+mxSbat5TCdNxvQVV0qCNGQvg/nlnbOmq2/x/0mKhuKD0n5bioL75oCkTbQaAgyYtw==}
/@anthropic-ai/sdk@0.13.0:
resolution: {integrity: sha512-wn315W4tCfCO+Z6FMa/67HgdgaWbjs4ie0Zbx5A6lq8RPEA3sEDknYzw0gCIrSlnSgRHxvUP/bT9KncFmOrmTg==}
dependencies:
'@types/node': 18.19.14
'@types/node-fetch': 2.6.9
@@ -2055,7 +2055,7 @@ packages:
resolution: {integrity: sha512-SPiDHaWKQZpwR2siD0KQUwlStvIAnEyK6tAE2h2Wuoq8ue9skzhlyVQ1ddzOxX6khULnAALDiR/isSF3bnuciA==}
dev: true
/@docsearch/react@3.5.2(@algolia/client-search@4.22.1)(@types/react@18.2.61)(react-dom@18.2.0)(react@18.2.0)(search-insights@2.13.0):
/@docsearch/react@3.5.2(@algolia/client-search@4.22.1)(@types/react@18.2.55)(react-dom@18.2.0)(react@18.2.0)(search-insights@2.13.0):
resolution: {integrity: sha512-9Ahcrs5z2jq/DcAvYtvlqEBHImbm4YJI8M9y0x6Tqg598P40HTEkX7hsMcIuThI+hTFxRGZ9hll0Wygm2yEjng==}
peerDependencies:
'@types/react': '>= 16.8.0 < 19.0.0'
@@ -2075,7 +2075,7 @@ packages:
'@algolia/autocomplete-core': 1.9.3(@algolia/client-search@4.22.1)(algoliasearch@4.22.1)(search-insights@2.13.0)
'@algolia/autocomplete-preset-algolia': 1.9.3(@algolia/client-search@4.22.1)(algoliasearch@4.22.1)
'@docsearch/css': 3.5.2
'@types/react': 18.2.61
'@types/react': 18.2.55
algoliasearch: 4.22.1
react: 18.2.0
react-dom: 18.2.0(react@18.2.0)
@@ -2581,7 +2581,7 @@ packages:
- webpack-cli
dev: true
/@docusaurus/preset-classic@3.1.1(@algolia/client-search@4.22.1)(@types/react@18.2.61)(eslint@8.56.0)(react-dom@18.2.0)(react@18.2.0)(search-insights@2.13.0)(typescript@5.3.3):
/@docusaurus/preset-classic@3.1.1(@algolia/client-search@4.22.1)(@types/react@18.2.55)(eslint@8.56.0)(react-dom@18.2.0)(react@18.2.0)(search-insights@2.13.0)(typescript@5.3.3):
resolution: {integrity: sha512-jG4ys/hWYf69iaN/xOmF+3kjs4Nnz1Ay3CjFLDtYa8KdxbmUhArA9HmP26ru5N0wbVWhY+6kmpYhTJpez5wTyg==}
engines: {node: '>=18.0'}
peerDependencies:
@@ -2597,9 +2597,9 @@ packages:
'@docusaurus/plugin-google-gtag': 3.1.1(eslint@8.56.0)(react-dom@18.2.0)(react@18.2.0)(typescript@5.3.3)
'@docusaurus/plugin-google-tag-manager': 3.1.1(eslint@8.56.0)(react-dom@18.2.0)(react@18.2.0)(typescript@5.3.3)
'@docusaurus/plugin-sitemap': 3.1.1(eslint@8.56.0)(react-dom@18.2.0)(react@18.2.0)(typescript@5.3.3)
'@docusaurus/theme-classic': 3.1.1(@types/react@18.2.61)(eslint@8.56.0)(react-dom@18.2.0)(react@18.2.0)(typescript@5.3.3)
'@docusaurus/theme-classic': 3.1.1(@types/react@18.2.55)(eslint@8.56.0)(react-dom@18.2.0)(react@18.2.0)(typescript@5.3.3)
'@docusaurus/theme-common': 3.1.1(@docusaurus/types@3.1.1)(eslint@8.56.0)(react-dom@18.2.0)(react@18.2.0)(typescript@5.3.3)
'@docusaurus/theme-search-algolia': 3.1.1(@algolia/client-search@4.22.1)(@docusaurus/types@3.1.1)(@types/react@18.2.61)(eslint@8.56.0)(react-dom@18.2.0)(react@18.2.0)(search-insights@2.13.0)(typescript@5.3.3)
'@docusaurus/theme-search-algolia': 3.1.1(@algolia/client-search@4.22.1)(@docusaurus/types@3.1.1)(@types/react@18.2.55)(eslint@8.56.0)(react-dom@18.2.0)(react@18.2.0)(search-insights@2.13.0)(typescript@5.3.3)
'@docusaurus/types': 3.1.1(react-dom@18.2.0)(react@18.2.0)
react: 18.2.0
react-dom: 18.2.0(react@18.2.0)
@@ -2630,7 +2630,7 @@ packages:
peerDependencies:
react: '*'
dependencies:
'@types/react': 18.2.48
'@types/react': 18.2.55
prop-types: 15.8.1
react: 18.2.0
@@ -2647,7 +2647,7 @@ packages:
- supports-color
dev: false
/@docusaurus/theme-classic@3.1.1(@types/react@18.2.61)(eslint@8.56.0)(react-dom@18.2.0)(react@18.2.0)(typescript@5.3.3):
/@docusaurus/theme-classic@3.1.1(@types/react@18.2.55)(eslint@8.56.0)(react-dom@18.2.0)(react@18.2.0)(typescript@5.3.3):
resolution: {integrity: sha512-GiPE/jbWM8Qv1A14lk6s9fhc0LhPEQ00eIczRO4QL2nAQJZXkjPG6zaVx+1cZxPFWbAsqSjKe2lqkwF3fGkQ7Q==}
engines: {node: '>=18.0'}
peerDependencies:
@@ -2666,7 +2666,7 @@ packages:
'@docusaurus/utils': 3.1.1(@docusaurus/types@3.1.1)
'@docusaurus/utils-common': 3.1.1(@docusaurus/types@3.1.1)
'@docusaurus/utils-validation': 3.1.1(@docusaurus/types@3.1.1)
'@mdx-js/react': 3.0.0(@types/react@18.2.61)(react@18.2.0)
'@mdx-js/react': 3.0.0(@types/react@18.2.55)(react@18.2.0)
clsx: 2.1.0
copy-text-to-clipboard: 3.2.0
infima: 0.2.0-alpha.43
@@ -2745,14 +2745,14 @@ packages:
- webpack-cli
dev: true
/@docusaurus/theme-search-algolia@3.1.1(@algolia/client-search@4.22.1)(@docusaurus/types@3.1.1)(@types/react@18.2.61)(eslint@8.56.0)(react-dom@18.2.0)(react@18.2.0)(search-insights@2.13.0)(typescript@5.3.3):
/@docusaurus/theme-search-algolia@3.1.1(@algolia/client-search@4.22.1)(@docusaurus/types@3.1.1)(@types/react@18.2.55)(eslint@8.56.0)(react-dom@18.2.0)(react@18.2.0)(search-insights@2.13.0)(typescript@5.3.3):
resolution: {integrity: sha512-tBH9VY5EpRctVdaAhT+b1BY8y5dyHVZGFXyCHgTrvcXQy5CV4q7serEX7U3SveNT9zksmchPyct6i1sFDC4Z5g==}
engines: {node: '>=18.0'}
peerDependencies:
react: ^18.0.0
react-dom: ^18.0.0
dependencies:
'@docsearch/react': 3.5.2(@algolia/client-search@4.22.1)(@types/react@18.2.61)(react-dom@18.2.0)(react@18.2.0)(search-insights@2.13.0)
'@docsearch/react': 3.5.2(@algolia/client-search@4.22.1)(@types/react@18.2.55)(react-dom@18.2.0)(react@18.2.0)(search-insights@2.13.0)
'@docusaurus/core': 3.1.1(@docusaurus/types@3.1.1)(eslint@8.56.0)(react-dom@18.2.0)(react@18.2.0)(typescript@5.3.3)
'@docusaurus/logger': 3.1.1
'@docusaurus/plugin-content-docs': 3.1.1(eslint@8.56.0)(react-dom@18.2.0)(react@18.2.0)(typescript@5.3.3)
@@ -3129,16 +3129,6 @@ packages:
eslint: 8.56.0
eslint-visitor-keys: 3.4.3
/@eslint-community/eslint-utils@4.4.0(eslint@8.57.0):
resolution: {integrity: sha512-1/sA4dwrzBAyeUoQ6oxahHKmrZvsnLCg4RfxW3ZFGGmQkSNQPFNLV9CUEFQP1x9EYXHTo5p6xdhZM1Ne9p/AfA==}
engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0}
peerDependencies:
eslint: ^6.0.0 || ^7.0.0 || >=8.0.0
dependencies:
eslint: 8.57.0
eslint-visitor-keys: 3.4.3
dev: false
/@eslint-community/regexpp@4.10.0:
resolution: {integrity: sha512-Cu96Sd2By9mCNTx2iyKOmq10v22jUVQv0lQnlGNy16oE9589yE+QADPbrMGCkA51cKZSg3Pu/aTJVTGfL/qjUA==}
engines: {node: ^12.0.0 || ^14.0.0 || >=16.0.0}
@@ -3163,11 +3153,6 @@ packages:
resolution: {integrity: sha512-gMsVel9D7f2HLkBma9VbtzZRehRogVRfbr++f06nL2vnCGCNlzOD+/MUov/F4p8myyAHspEhVobgjpX64q5m6A==}
engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0}
/@eslint/js@8.57.0:
resolution: {integrity: sha512-Ys+3g2TaW7gADOJzPt83SJtCDhMjndcDMFVQ/Tj9iA1BfJzFKD9mAUXT3OenpuPHbI6P/myECxRJrofUsDx/5g==}
engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0}
dev: false
/@fastify/busboy@2.1.0:
resolution: {integrity: sha512-+KpH+QxZU7O4675t3mnkQKcZZg56u+K/Ct2K+N2AZYNVK8kyeo/bI18tI8aPm3tvNNRyTWfj6s5tnGNlcbQRsA==}
engines: {node: '>=14'}
@@ -3228,7 +3213,7 @@ packages:
'@jest/schemas': 29.6.3
'@types/istanbul-lib-coverage': 2.0.6
'@types/istanbul-reports': 3.0.4
'@types/node': 20.11.20
'@types/node': 20.11.17
'@types/yargs': 17.0.32
chalk: 4.1.2
@@ -3273,18 +3258,8 @@ packages:
/@leichtgewicht/ip-codec@2.0.4:
resolution: {integrity: sha512-Hcv+nVC0kZnQ3tD9GVu5xSMR4VVYOteQIr/hwFPVEvPdlXqgGEuRjiheChHgdM+JyqdgNcmzZOX/tnl0JOiI7A==}
/@llamaindex/cloud@0.0.4:
resolution: {integrity: sha512-ufu8sASmttGQZBrDVt5XHF+Lf7ZFImMe/bCwqfoGiywJUchc88igxhP0xF5iUpthyQr2/0nAhH117owj5+GF3A==}
peerDependencies:
node-fetch: ^3.3.2
peerDependenciesMeta:
node-fetch:
optional: true
dependencies:
'@types/qs': 6.9.12
form-data: 4.0.0
js-base64: 3.7.7
qs: 6.11.2
/@llamaindex/cloud@0.0.1:
resolution: {integrity: sha512-7FrLAbY459B4rcG4NaqANatDT5zKvZxIRyrY+nnTSXqu9ZMzkm1Co8IIRYx2/9feps/OLOhXsv7VKGGUr7scNQ==}
dev: false
/@manypkg/find-root@1.1.0:
@@ -3336,14 +3311,14 @@ packages:
transitivePeerDependencies:
- supports-color
/@mdx-js/react@3.0.0(@types/react@18.2.61)(react@18.2.0):
/@mdx-js/react@3.0.0(@types/react@18.2.55)(react@18.2.0):
resolution: {integrity: sha512-nDctevR9KyYFyV+m+/+S4cpzCWHqj+iHDHq3QrsWezcC+B17uZdIWgCguESUkwFhM3n/56KxWVE3V6EokrmONQ==}
peerDependencies:
'@types/react': '>=16'
react: '>=16'
dependencies:
'@types/mdx': 2.0.10
'@types/react': 18.2.61
'@types/react': 18.2.55
react: 18.2.0
/@mistralai/mistralai@0.0.10:
@@ -4168,7 +4143,7 @@ packages:
/@types/connect@3.4.38:
resolution: {integrity: sha512-K6uROf1LD88uDQqJCktA4yzL1YYAK6NgfsI0v/mTgyPKWsX1CnJ0XPSDhViejru1GcRkLWb8RlzFYJRqGUbaug==}
dependencies:
'@types/node': 20.11.20
'@types/node': 20.11.17
/@types/cross-spawn@6.0.0:
resolution: {integrity: sha512-evp2ZGsFw9YKprDbg8ySgC9NA15g3YgiI8ANkGmKKvvi0P2aDGYLPxQIC5qfeKNUOe3TjABVGuah6omPRpIYhg==}
@@ -4205,7 +4180,7 @@ packages:
resolution: {integrity: sha512-ckM3jm2bf/MfB3+spLPWYPUH573plBFwpOhqQ2WottxYV85j1HQFlxmnTq57X1yHY9awZPig06hL/cLMgNWHIQ==}
dependencies:
'@types/node': 20.11.17
'@types/qs': 6.9.12
'@types/qs': 6.9.11
'@types/range-parser': 1.2.7
'@types/send': 0.17.4
@@ -4214,7 +4189,7 @@ packages:
dependencies:
'@types/body-parser': 1.19.5
'@types/express-serve-static-core': 4.17.42
'@types/qs': 6.9.12
'@types/qs': 6.9.11
'@types/serve-static': 1.15.5
/@types/gtag.js@0.0.12:
@@ -4279,7 +4254,6 @@ packages:
/@types/lodash@4.14.202:
resolution: {integrity: sha512-OvlIYQK9tNneDlS0VN54LLd5uiPCBOp7gS5Z0f1mjoJYBrtStzgmJBxONW3U6OZqdtNzZPmn9BS/7WI7BFFcFQ==}
dev: false
/@types/long@4.0.2:
resolution: {integrity: sha512-MqTGEo5bj5t157U6fA/BiDynNkn0YknVdh48CMPkTSpFTVmvao5UQmm7uEF6xBEo7qIMAlY/JSleYaE6VOdpaA==}
@@ -4336,7 +4310,6 @@ packages:
resolution: {integrity: sha512-EnQ4Us2rmOS64nHDWr0XqAD8DsO6f3XR6lf9UIIrZQpUzPVdN/oPuEzfDWNHSyXLvoGgjuEm/sPwFGSSs35Wtg==}
dependencies:
undici-types: 5.26.5
dev: false
/@types/node@20.11.14:
resolution: {integrity: sha512-w3yWCcwULefjP9DmDDsgUskrMoOy5Z8MiwKHr1FvqGPtx7CvJzQvxD7eKpxNtklQxLruxSXWddyeRtyud0RcXQ==}
@@ -4353,6 +4326,7 @@ packages:
resolution: {integrity: sha512-7/rR21OS+fq8IyHTgtLkDK949uzsa6n8BkziAKtPVpugIkO6D+/ooXMvzXxDnZrmtXVfjb1bKQafYpb8s89LOg==}
dependencies:
undici-types: 5.26.5
dev: true
/@types/node@20.11.7:
resolution: {integrity: sha512-GPmeN1C3XAyV5uybAf4cMLWT9fDWcmQhZVtMFu7OR32WjrqGG+Wnk2V1d0bmtUyE/Zy1QJ9BxyiTih9z8Oks8A==}
@@ -4368,7 +4342,7 @@ packages:
resolution: {integrity: sha512-LxJ4iEFcpqc6METwp9f6BV6VVc43m6MfH0VqFosHvrUgfXiFe6ww7R3itkOQ+TCK6Y+Iv/+RnnvtRZnkc5Kc9g==}
dependencies:
'@types/node': 20.11.17
dev: false
dev: true
/@types/parse-json@4.0.2:
resolution: {integrity: sha512-dISoDXWWQwUquiKsyZ4Ng+HX2KsPL7LyHKHQwgGFEA3IaKac4Obd+h2a/a6waisAoepJlBcx9paWqjA8/HVjCw==}
@@ -4379,7 +4353,7 @@ packages:
'@types/node': 20.11.17
pg-protocol: 1.6.0
pg-types: 4.0.1
dev: false
dev: true
/@types/prismjs@1.26.3:
resolution: {integrity: sha512-A0D0aTXvjlqJ5ZILMz3rNfDBOx9hHxLZYv2by47Sm/pqW35zzjusrZTryatjN/Rf8Us2gZrJD+KeHbUSTux1Cw==}
@@ -4394,8 +4368,8 @@ packages:
/@types/prop-types@15.7.8:
resolution: {integrity: sha512-kMpQpfZKSCBqltAJwskgePRaYRFukDkm1oItcAbC3gNELR20XIBcN9VRgg4+m8DKsTfkWeA4m4Imp4DDuWy7FQ==}
/@types/qs@6.9.12:
resolution: {integrity: sha512-bZcOkJ6uWrL0Qb2NAWKa7TBU+mJHPzhx9jjLL1KHF+XpzEcR7EXHvjbHlGtR/IsP1vyPrehuS6XqkmaePy//mg==}
/@types/qs@6.9.11:
resolution: {integrity: sha512-oGk0gmhnEJK4Yyk+oI7EfXsLayXatCWPHary1MtcmbAifkobT9cM9yutG/hZKIseOU0MqbIwQ/u2nn/Gb+ltuQ==}
/@types/range-parser@1.2.7:
resolution: {integrity: sha512-hKormJbkJqzQGhziax5PItDUTMAM9uE2XXQmM37dyd4hVM+5aVl7oVxMVUiVQn2oCQFN/LKCZdvSM0pFRqbSmQ==}
@@ -4404,7 +4378,7 @@ packages:
resolution: {integrity: sha512-WmSAg7WgqW7m4x8Mt4N6ZyKz0BubSj/2tVUMsAHp+Yd2AMwcSbeFq9WympT19p5heCFmF97R9eD5uUR/t4HEqw==}
dependencies:
'@types/history': 4.7.11
'@types/react': 18.2.61
'@types/react': 18.2.55
'@types/react-router': 5.1.20
dev: true
@@ -4428,7 +4402,7 @@ packages:
resolution: {integrity: sha512-jGjmu/ZqS7FjSH6owMcD5qpq19+1RS9DeVRqfl1FeBMxTDQAGwlMWOcs52NDoXaNKyG3d1cYQFMs9rCrb88o9Q==}
dependencies:
'@types/history': 4.7.11
'@types/react': 18.2.48
'@types/react': 18.2.55
dev: true
/@types/react@18.2.48:
@@ -4438,8 +4412,8 @@ packages:
'@types/scheduler': 0.16.4
csstype: 3.1.2
/@types/react@18.2.61:
resolution: {integrity: sha512-NURTN0qNnJa7O/k4XUkEW2yfygA+NxS0V5h1+kp9jPwhzZy95q3ADoGMP0+JypMhrZBTTgjKAUlTctde1zzeQA==}
/@types/react@18.2.55:
resolution: {integrity: sha512-Y2Tz5P4yz23brwm2d7jNon39qoAtMMmalOQv6+fEFt1mT+FcM3D841wDpoUvFXhaYenuROCy3FZYqdTjM7qVyA==}
dependencies:
'@types/prop-types': 15.7.11
'@types/scheduler': 0.16.8
@@ -4478,7 +4452,7 @@ packages:
resolution: {integrity: sha512-x2EM6TJOybec7c52BX0ZspPodMsQUd5L6PRwOunVyVUhXiBSKf3AezDL8Dgvgt5o0UfKNfuA0eMLr2wLT4AiBA==}
dependencies:
'@types/mime': 1.3.5
'@types/node': 20.11.20
'@types/node': 20.11.17
/@types/serve-index@1.9.4:
resolution: {integrity: sha512-qLpGZ/c2fhSs5gnYsQxtDEq3Oy8SXPClIXkW5ghvAvsNuVSA8k+gCONcUCS/UjLEYvYps+e8uBtfgXgvhwfNug==}
@@ -4541,7 +4515,7 @@ packages:
dependencies:
'@types/yargs-parser': 21.0.3
/@typescript-eslint/parser@6.19.1(eslint@8.57.0)(typescript@5.3.3):
/@typescript-eslint/parser@6.19.1(eslint@8.56.0)(typescript@5.3.3):
resolution: {integrity: sha512-WEfX22ziAh6pRE9jnbkkLGp/4RhTpffr2ZK5bJ18M8mIfA8A+k97U9ZyaXCEJRlmMHh7R9MJZWXp/r73DzINVQ==}
engines: {node: ^16.0.0 || >=18.0.0}
peerDependencies:
@@ -4556,7 +4530,7 @@ packages:
'@typescript-eslint/typescript-estree': 6.19.1(typescript@5.3.3)
'@typescript-eslint/visitor-keys': 6.19.1
debug: 4.3.4
eslint: 8.57.0
eslint: 8.56.0
typescript: 5.3.3
transitivePeerDependencies:
- supports-color
@@ -5476,17 +5450,6 @@ packages:
node-releases: 2.0.14
update-browserslist-db: 1.0.13(browserslist@4.22.3)
/browserslist@4.23.0:
resolution: {integrity: sha512-QW8HiM1shhT2GuzkvklfjcKDiWFXHOeFCIA/huJPwHsslwcydgk7X+z2zXpEijP98UCY7HbubZt5J2Zgvf0CaQ==}
engines: {node: ^6 || ^7 || ^8 || ^9 || ^10 || ^11 || ^12 || >=13.7}
hasBin: true
dependencies:
caniuse-lite: 1.0.30001593
electron-to-chromium: 1.4.690
node-releases: 2.0.14
update-browserslist-db: 1.0.13(browserslist@4.23.0)
dev: false
/bson@6.2.0:
resolution: {integrity: sha512-ID1cI+7bazPDyL9wYy9GaQ8gEEohWvcUl/Yf0dIdutJxnmInEEyCsb4awy/OiBfall7zBA179Pahi3vCdFze3Q==}
engines: {node: '>=16.20.1'}
@@ -5631,10 +5594,6 @@ packages:
/caniuse-lite@1.0.30001580:
resolution: {integrity: sha512-mtj5ur2FFPZcCEpXFy8ADXbDACuNFXg6mxVDqp7tqooX6l3zwm+d8EPoeOSIFRDvHs8qu7/SLFOGniULkcH2iA==}
/caniuse-lite@1.0.30001593:
resolution: {integrity: sha512-UWM1zlo3cZfkpBysd7AS+z+v007q9G1+fLTUU42rQnY6t2axoogPW/xol6T7juU5EUoOhML4WgBIdG+9yYqAjQ==}
dev: false
/ccount@2.0.1:
resolution: {integrity: sha512-eyrF0jiFpY+3drT6383f1qhkbGsLSifNAjA61IUjZjmLCWjItY6LB9ft9YhoDgwfmclB2zhu51Lc7+95b8NRAg==}
@@ -6961,10 +6920,6 @@ packages:
/electron-to-chromium@1.4.648:
resolution: {integrity: sha512-EmFMarXeqJp9cUKu/QEciEApn0S/xRcpZWuAm32U7NgoZCimjsilKXHRO9saeEW55eHZagIDg6XTUOv32w9pjg==}
/electron-to-chromium@1.4.690:
resolution: {integrity: sha512-+2OAGjUx68xElQhydpcbqH50hE8Vs2K6TkAeLhICYfndb67CVH0UsZaijmRUE3rHlIxU1u0jxwhgVe6fK3YANA==}
dev: false
/emoji-regex@10.3.0:
resolution: {integrity: sha512-QpLs9D9v9kArv4lfDEgg1X/gN5XLnf/A6l9cs8SPZLRZR3ZkY9+kwIQTxm+fsSej5UMYGE8fdoaZVIBlqG0XTw==}
dev: true
@@ -7011,14 +6966,6 @@ packages:
graceful-fs: 4.2.11
tapable: 2.2.1
/enhanced-resolve@5.15.1:
resolution: {integrity: sha512-3d3JRbwsCLJsYgvb6NuWEG44jjPSOMuS73L/6+7BZuoKm3W+qXnSoIYVHi8dG7Qcg4inAY4jbzkZ7MnskePeDg==}
engines: {node: '>=10.13.0'}
dependencies:
graceful-fs: 4.2.11
tapable: 2.2.1
dev: false
/enquirer@2.4.1:
resolution: {integrity: sha512-rRqJg/6gd538VHvR3PSrdRBb/1Vy2YfzHqzvbhGIQpDRKIa4FgV/54b5Q1xYSxOOwKvjXweS26E0Q+nAMwp2pQ==}
engines: {node: '>=8.6'}
@@ -7257,7 +7204,7 @@ packages:
source-map: 0.6.1
dev: true
/eslint-config-next@13.5.6(eslint@8.57.0)(typescript@5.3.3):
/eslint-config-next@13.5.6(eslint@8.56.0)(typescript@5.3.3):
resolution: {integrity: sha512-o8pQsUHTo9aHqJ2YiZDym5gQAMRf7O2HndHo/JZeY7TDD+W4hk6Ma8Vw54RHiBeb7OWWO5dPirQB+Is/aVQ7Kg==}
peerDependencies:
eslint: ^7.23.0 || ^8.0.0
@@ -7268,36 +7215,36 @@ packages:
dependencies:
'@next/eslint-plugin-next': 13.5.6
'@rushstack/eslint-patch': 1.7.2
'@typescript-eslint/parser': 6.19.1(eslint@8.57.0)(typescript@5.3.3)
eslint: 8.57.0
'@typescript-eslint/parser': 6.19.1(eslint@8.56.0)(typescript@5.3.3)
eslint: 8.56.0
eslint-import-resolver-node: 0.3.9
eslint-import-resolver-typescript: 3.6.1(@typescript-eslint/parser@6.19.1)(eslint-import-resolver-node@0.3.9)(eslint-plugin-import@2.29.1)(eslint@8.57.0)
eslint-plugin-import: 2.29.1(@typescript-eslint/parser@6.19.1)(eslint-import-resolver-typescript@3.6.1)(eslint@8.57.0)
eslint-plugin-jsx-a11y: 6.8.0(eslint@8.57.0)
eslint-plugin-react: 7.33.2(eslint@8.57.0)
eslint-plugin-react-hooks: 4.6.0(eslint@8.57.0)
eslint-import-resolver-typescript: 3.6.1(@typescript-eslint/parser@6.19.1)(eslint-import-resolver-node@0.3.9)(eslint-plugin-import@2.29.1)(eslint@8.56.0)
eslint-plugin-import: 2.29.1(@typescript-eslint/parser@6.19.1)(eslint-import-resolver-typescript@3.6.1)(eslint@8.56.0)
eslint-plugin-jsx-a11y: 6.8.0(eslint@8.56.0)
eslint-plugin-react: 7.33.2(eslint@8.56.0)
eslint-plugin-react-hooks: 4.6.0(eslint@8.56.0)
typescript: 5.3.3
transitivePeerDependencies:
- eslint-import-resolver-webpack
- supports-color
dev: false
/eslint-config-prettier@8.10.0(eslint@8.57.0):
/eslint-config-prettier@8.10.0(eslint@8.56.0):
resolution: {integrity: sha512-SM8AMJdeQqRYT9O9zguiruQZaN7+z+E4eAP9oiLNGKMtomwaB1E9dcgUD6ZAn/eQAb52USbvezbiljfZUhbJcg==}
hasBin: true
peerDependencies:
eslint: '>=7.0.0'
dependencies:
eslint: 8.57.0
eslint: 8.56.0
dev: false
/eslint-config-turbo@1.11.3(eslint@8.57.0):
/eslint-config-turbo@1.11.3(eslint@8.56.0):
resolution: {integrity: sha512-v7CHpAHodBKlj+r+R3B2DJlZbCjpZLnK7gO/vCRk/Lc+tlD/f04wM6rmHlerevOlchtmwARilRLBnmzNLffTyQ==}
peerDependencies:
eslint: '>6.6.0'
dependencies:
eslint: 8.57.0
eslint-plugin-turbo: 1.11.3(eslint@8.57.0)
eslint: 8.56.0
eslint-plugin-turbo: 1.11.3(eslint@8.56.0)
dev: false
/eslint-import-resolver-node@0.3.9:
@@ -7310,7 +7257,7 @@ packages:
- supports-color
dev: false
/eslint-import-resolver-typescript@3.6.1(@typescript-eslint/parser@6.19.1)(eslint-import-resolver-node@0.3.9)(eslint-plugin-import@2.29.1)(eslint@8.57.0):
/eslint-import-resolver-typescript@3.6.1(@typescript-eslint/parser@6.19.1)(eslint-import-resolver-node@0.3.9)(eslint-plugin-import@2.29.1)(eslint@8.56.0):
resolution: {integrity: sha512-xgdptdoi5W3niYeuQxKmzVDTATvLYqhpwmykwsh7f6HIOStGWEIL9iqZgQDF9u9OEzrRwR8no5q2VT+bjAujTg==}
engines: {node: ^14.18.0 || >=16.0.0}
peerDependencies:
@@ -7319,9 +7266,9 @@ packages:
dependencies:
debug: 4.3.4
enhanced-resolve: 5.15.0
eslint: 8.57.0
eslint-module-utils: 2.8.0(@typescript-eslint/parser@6.19.1)(eslint-import-resolver-node@0.3.9)(eslint-import-resolver-typescript@3.6.1)(eslint@8.57.0)
eslint-plugin-import: 2.29.1(@typescript-eslint/parser@6.19.1)(eslint-import-resolver-typescript@3.6.1)(eslint@8.57.0)
eslint: 8.56.0
eslint-module-utils: 2.8.0(@typescript-eslint/parser@6.19.1)(eslint-import-resolver-node@0.3.9)(eslint-import-resolver-typescript@3.6.1)(eslint@8.56.0)
eslint-plugin-import: 2.29.1(@typescript-eslint/parser@6.19.1)(eslint-import-resolver-typescript@3.6.1)(eslint@8.56.0)
fast-glob: 3.3.2
get-tsconfig: 4.7.2
is-core-module: 2.13.1
@@ -7333,7 +7280,7 @@ packages:
- supports-color
dev: false
/eslint-module-utils@2.8.0(@typescript-eslint/parser@6.19.1)(eslint-import-resolver-node@0.3.9)(eslint-import-resolver-typescript@3.6.1)(eslint@8.57.0):
/eslint-module-utils@2.8.0(@typescript-eslint/parser@6.19.1)(eslint-import-resolver-node@0.3.9)(eslint-import-resolver-typescript@3.6.1)(eslint@8.56.0):
resolution: {integrity: sha512-aWajIYfsqCKRDgUfjEXNN/JlrzauMuSEy5sbd7WXbtW3EH6A6MpwEh42c7qD+MqQo9QMJ6fWLAeIJynx0g6OAw==}
engines: {node: '>=4'}
peerDependencies:
@@ -7354,16 +7301,16 @@ packages:
eslint-import-resolver-webpack:
optional: true
dependencies:
'@typescript-eslint/parser': 6.19.1(eslint@8.57.0)(typescript@5.3.3)
'@typescript-eslint/parser': 6.19.1(eslint@8.56.0)(typescript@5.3.3)
debug: 3.2.7
eslint: 8.57.0
eslint: 8.56.0
eslint-import-resolver-node: 0.3.9
eslint-import-resolver-typescript: 3.6.1(@typescript-eslint/parser@6.19.1)(eslint-import-resolver-node@0.3.9)(eslint-plugin-import@2.29.1)(eslint@8.57.0)
eslint-import-resolver-typescript: 3.6.1(@typescript-eslint/parser@6.19.1)(eslint-import-resolver-node@0.3.9)(eslint-plugin-import@2.29.1)(eslint@8.56.0)
transitivePeerDependencies:
- supports-color
dev: false
/eslint-plugin-import@2.29.1(@typescript-eslint/parser@6.19.1)(eslint-import-resolver-typescript@3.6.1)(eslint@8.57.0):
/eslint-plugin-import@2.29.1(@typescript-eslint/parser@6.19.1)(eslint-import-resolver-typescript@3.6.1)(eslint@8.56.0):
resolution: {integrity: sha512-BbPC0cuExzhiMo4Ff1BTVwHpjjv28C5R+btTOGaCRC7UEz801up0JadwkeSk5Ued6TG34uaczuVuH6qyy5YUxw==}
engines: {node: '>=4'}
peerDependencies:
@@ -7373,16 +7320,16 @@ packages:
'@typescript-eslint/parser':
optional: true
dependencies:
'@typescript-eslint/parser': 6.19.1(eslint@8.57.0)(typescript@5.3.3)
'@typescript-eslint/parser': 6.19.1(eslint@8.56.0)(typescript@5.3.3)
array-includes: 3.1.7
array.prototype.findlastindex: 1.2.3
array.prototype.flat: 1.3.2
array.prototype.flatmap: 1.3.2
debug: 3.2.7
doctrine: 2.1.0
eslint: 8.57.0
eslint: 8.56.0
eslint-import-resolver-node: 0.3.9
eslint-module-utils: 2.8.0(@typescript-eslint/parser@6.19.1)(eslint-import-resolver-node@0.3.9)(eslint-import-resolver-typescript@3.6.1)(eslint@8.57.0)
eslint-module-utils: 2.8.0(@typescript-eslint/parser@6.19.1)(eslint-import-resolver-node@0.3.9)(eslint-import-resolver-typescript@3.6.1)(eslint@8.56.0)
hasown: 2.0.0
is-core-module: 2.13.1
is-glob: 4.0.3
@@ -7398,7 +7345,7 @@ packages:
- supports-color
dev: false
/eslint-plugin-jsx-a11y@6.8.0(eslint@8.57.0):
/eslint-plugin-jsx-a11y@6.8.0(eslint@8.56.0):
resolution: {integrity: sha512-Hdh937BS3KdwwbBaKd5+PLCOmYY6U4f2h9Z2ktwtNKvIdIEu137rjYbcb9ApSbVJfWxANNuiKTD/9tOKjK9qOA==}
engines: {node: '>=4.0'}
peerDependencies:
@@ -7414,7 +7361,7 @@ packages:
damerau-levenshtein: 1.0.8
emoji-regex: 9.2.2
es-iterator-helpers: 1.0.15
eslint: 8.57.0
eslint: 8.56.0
hasown: 2.0.0
jsx-ast-utils: 3.3.5
language-tags: 1.0.9
@@ -7423,16 +7370,16 @@ packages:
object.fromentries: 2.0.7
dev: false
/eslint-plugin-react-hooks@4.6.0(eslint@8.57.0):
/eslint-plugin-react-hooks@4.6.0(eslint@8.56.0):
resolution: {integrity: sha512-oFc7Itz9Qxh2x4gNHStv3BqJq54ExXmfC+a1NjAta66IAN87Wu0R/QArgIS9qKzX3dXKPI9H5crl9QchNMY9+g==}
engines: {node: '>=10'}
peerDependencies:
eslint: ^3.0.0 || ^4.0.0 || ^5.0.0 || ^6.0.0 || ^7.0.0 || ^8.0.0-0
dependencies:
eslint: 8.57.0
eslint: 8.56.0
dev: false
/eslint-plugin-react@7.28.0(eslint@8.57.0):
/eslint-plugin-react@7.28.0(eslint@8.56.0):
resolution: {integrity: sha512-IOlFIRHzWfEQQKcAD4iyYDndHwTQiCMcJVJjxempf203jnNLUnW34AXLrV33+nEXoifJE2ZEGmcjKPL8957eSw==}
engines: {node: '>=4'}
peerDependencies:
@@ -7441,7 +7388,7 @@ packages:
array-includes: 3.1.6
array.prototype.flatmap: 1.3.1
doctrine: 2.1.0
eslint: 8.57.0
eslint: 8.56.0
estraverse: 5.3.0
jsx-ast-utils: 3.3.3
minimatch: 3.1.2
@@ -7455,7 +7402,7 @@ packages:
string.prototype.matchall: 4.0.8
dev: false
/eslint-plugin-react@7.33.2(eslint@8.57.0):
/eslint-plugin-react@7.33.2(eslint@8.56.0):
resolution: {integrity: sha512-73QQMKALArI8/7xGLNI/3LylrEYrlKZSb5C9+q3OtOewTnMQi5cT+aE9E41sLCmli3I9PGGmD1yiZydyo4FEPw==}
engines: {node: '>=4'}
peerDependencies:
@@ -7466,7 +7413,7 @@ packages:
array.prototype.tosorted: 1.1.2
doctrine: 2.1.0
es-iterator-helpers: 1.0.15
eslint: 8.57.0
eslint: 8.56.0
estraverse: 5.3.0
jsx-ast-utils: 3.3.5
minimatch: 3.1.2
@@ -7480,13 +7427,13 @@ packages:
string.prototype.matchall: 4.0.10
dev: false
/eslint-plugin-turbo@1.11.3(eslint@8.57.0):
/eslint-plugin-turbo@1.11.3(eslint@8.56.0):
resolution: {integrity: sha512-R5ftTTWQzEYaKzF5g6m/MInCU8pIN+2TLL+S50AYBr1enwUovdZmnZ1HDwFMaxIjJ8x5ah+jvAzql5IJE9VWaA==}
peerDependencies:
eslint: '>6.6.0'
dependencies:
dotenv: 16.0.3
eslint: 8.57.0
eslint: 8.56.0
dev: false
/eslint-scope@5.1.1:
@@ -7558,53 +7505,6 @@ packages:
transitivePeerDependencies:
- supports-color
/eslint@8.57.0:
resolution: {integrity: sha512-dZ6+mexnaTIbSBZWgou51U6OmzIhYM2VcNdtiTtI7qPNZm35Akpr0f6vtw3w1Kmn5PYo+tZVfh13WrhpS6oLqQ==}
engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0}
hasBin: true
dependencies:
'@eslint-community/eslint-utils': 4.4.0(eslint@8.57.0)
'@eslint-community/regexpp': 4.10.0
'@eslint/eslintrc': 2.1.4
'@eslint/js': 8.57.0
'@humanwhocodes/config-array': 0.11.14
'@humanwhocodes/module-importer': 1.0.1
'@nodelib/fs.walk': 1.2.8
'@ungap/structured-clone': 1.2.0
ajv: 6.12.6
chalk: 4.1.2
cross-spawn: 7.0.3
debug: 4.3.4
doctrine: 3.0.0
escape-string-regexp: 4.0.0
eslint-scope: 7.2.2
eslint-visitor-keys: 3.4.3
espree: 9.6.1
esquery: 1.5.0
esutils: 2.0.3
fast-deep-equal: 3.1.3
file-entry-cache: 6.0.1
find-up: 5.0.0
glob-parent: 6.0.2
globals: 13.24.0
graphemer: 1.4.0
ignore: 5.3.1
imurmurhash: 0.1.4
is-glob: 4.0.3
is-path-inside: 3.0.3
js-yaml: 4.1.0
json-stable-stringify-without-jsonify: 1.0.1
levn: 0.4.1
lodash.merge: 4.6.2
minimatch: 3.1.2
natural-compare: 1.4.0
optionator: 0.9.3
strip-ansi: 6.0.1
text-table: 0.2.0
transitivePeerDependencies:
- supports-color
dev: false
/espree@9.6.1:
resolution: {integrity: sha512-oruZaFkjorTpF32kDSI5/75ViwGeZginGGy2NoOSg3Q9bnwlnmDm4HLnkl0RE3n+njDXR037aY1+x58Z/zFdwQ==}
engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0}
@@ -9493,10 +9393,6 @@ packages:
resolution: {integrity: sha512-NnRs6dsyqUXejqk/yv2aiXlAvOs56sLkX6nUdeaNezI5LFFLlsZjOThmwnrcwh5ZZRwZlCMnVAY3CvhIhoVEKQ==}
dev: false
/js-base64@3.7.7:
resolution: {integrity: sha512-7rCnleh0z2CkXhH67J8K1Ytz0b2Y+yxTPL+/KOJoa20hfnVQ/3/T6W/KflYI4bRHRagNeXeU2bkNGI3v1oS/lw==}
dev: false
/js-tiktoken@1.0.10:
resolution: {integrity: sha512-ZoSxbGjvGyMT13x6ACo9ebhDha/0FHdKA+OsQcMOWcm1Zs7r90Rhk5lhERLzji+3rA7EKpXCgwXcM5fF3DMpdA==}
dependencies:
@@ -11595,12 +11491,11 @@ packages:
/pg-int8@1.0.1:
resolution: {integrity: sha512-WCtabS6t3c8SkpDBUlb1kjOs7l66xsGdKpIPZsg4wR+B3+u9UAum2odSsF9tnvxg80h4ZxLWMy4pRjOsFIqQpw==}
engines: {node: '>=4.0.0'}
dev: false
/pg-numeric@1.0.2:
resolution: {integrity: sha512-BM/Thnrw5jm2kKLE5uJkXqqExRUY/toLHda65XgFTBTFYZyopbKjBe29Ii3RbkvlsMoFwD+tHeGaCjjv0gHlyw==}
engines: {node: '>=4'}
dev: false
dev: true
/pg-pool@3.6.1(pg@8.11.3):
resolution: {integrity: sha512-jizsIzhkIitxCGfPRzJn1ZdcosIt3pz9Sh3V01fm1vZnbnCMgmGl5wvGGdNN2EL9Rmb0EcFoCkixH4Pu+sP9Og==}
@@ -11612,7 +11507,6 @@ packages:
/pg-protocol@1.6.0:
resolution: {integrity: sha512-M+PDm637OY5WM307051+bsDia5Xej6d9IR4GwJse1qA1DIhiKlksvrneZOYQq42OM+spubpcNYEo2FcKQrDk+Q==}
dev: false
/pg-types@2.2.0:
resolution: {integrity: sha512-qTAAlrEsl8s4OiEQY69wDvcMIdQN6wdz5ojQiOy6YRMuynxenON0O5oCpJI6lshc6scgAY8qvJ2On/p+CXY0GA==}
@@ -11636,7 +11530,7 @@ packages:
postgres-date: 2.0.1
postgres-interval: 3.0.0
postgres-range: 1.1.3
dev: false
dev: true
/pg@8.11.3:
resolution: {integrity: sha512-+9iuvG8QfaaUrrph+kpF24cXkH1YOOUeArRNYIxq1viYHZagBxrTno7cecY1Fa44tJeZvaoG+Djpkc3JwehN5g==}
@@ -12173,7 +12067,7 @@ packages:
/postgres-array@3.0.2:
resolution: {integrity: sha512-6faShkdFugNQCLwucjPcY5ARoW1SlbnrZjmGl0IrrqewpvxvhSLHimCVzqeuULCbG0fQv7Dtk1yDbG3xv7Veog==}
engines: {node: '>=12'}
dev: false
dev: true
/postgres-bytea@1.0.0:
resolution: {integrity: sha512-xy3pmLuQqRBZBXDULy7KbaitYqLcmxigw14Q5sj8QBVLqEwXfeybIKVWiqAXTlcvdvb0+xkOtDbfQMOf4lST1w==}
@@ -12185,7 +12079,7 @@ packages:
engines: {node: '>= 6'}
dependencies:
obuf: 1.1.2
dev: false
dev: true
/postgres-date@1.0.7:
resolution: {integrity: sha512-suDmjLVQg78nMK2UZ454hAG+OAW+HQPZ6n++TNDUX+L0+uUlLywnoxJKDou51Zm+zTCjrCl0Nq6J9C5hP9vK/Q==}
@@ -12195,7 +12089,7 @@ packages:
/postgres-date@2.0.1:
resolution: {integrity: sha512-YtMKdsDt5Ojv1wQRvUhnyDJNSr2dGIC96mQVKz7xufp07nfuFONzdaowrMHjlAzY6GDLd4f+LUHHAAM1h4MdUw==}
engines: {node: '>=12'}
dev: false
dev: true
/postgres-interval@1.2.0:
resolution: {integrity: sha512-9ZhXKM/rw350N1ovuWHbGxnGh/SNJ4cnxHiM0rxE4VN41wsg8P8zWn9hv/buK00RP4WvlOyr/RBDiptyxVbkZQ==}
@@ -12207,11 +12101,11 @@ packages:
/postgres-interval@3.0.0:
resolution: {integrity: sha512-BSNDnbyZCXSxgA+1f5UU2GmwhoI0aU5yMxRGO8CdFEcY2BQF9xm/7MqKnYoM1nJDk8nONNWDk9WeSmePFhQdlw==}
engines: {node: '>=12'}
dev: false
dev: true
/postgres-range@1.1.3:
resolution: {integrity: sha512-VdlZoocy5lCP0c/t66xAfclglEapXPCIVhqqJRncYpvbCgImF0w67aPKfbqUMr72tO2k5q0TdTZwCLjPTI6C9g==}
dev: false
dev: true
/prebuild-install@7.1.1:
resolution: {integrity: sha512-jAXscXWMcCK8GgCoHOfIr0ODh5ai8mj63L2nWrjuAgXE6tDyYGnx4/8o/rCgU+B4JSyZBKbeZqzhtwtC3ovxjw==}
@@ -12412,7 +12306,7 @@ packages:
'@protobufjs/pool': 1.1.0
'@protobufjs/utf8': 1.1.0
'@types/long': 4.0.2
'@types/node': 20.11.20
'@types/node': 20.11.17
long: 4.0.0
dev: false
@@ -12548,7 +12442,7 @@ packages:
iconv-lite: 0.4.24
unpipe: 1.0.0
/raw-loader@4.0.2(webpack@5.90.3):
/raw-loader@4.0.2(webpack@5.90.1):
resolution: {integrity: sha512-ZnScIV3ag9A4wPX/ZayxL/jZH+euYb6FcUinPcgiQW0+UBtEv0O6Q3lGd3cqJ+GHH+rksEv3Pj99oxJ3u3VIKA==}
engines: {node: '>= 10.13.0'}
peerDependencies:
@@ -12556,7 +12450,7 @@ packages:
dependencies:
loader-utils: 2.0.4
schema-utils: 3.3.0
webpack: 5.90.3
webpack: 5.90.1
dev: false
/rc@1.2.8:
@@ -14198,7 +14092,7 @@ packages:
terser: 5.27.0
webpack: 5.90.0
/terser-webpack-plugin@5.3.10(webpack@5.90.3):
/terser-webpack-plugin@5.3.10(webpack@5.90.1):
resolution: {integrity: sha512-BKFPWlPDndPs+NGGCr1U59t0XScL5317Y0UReNrHaw9/FwhPENlq6bfgs+4yPfyP51vqC1bQ4rp1EfXW5ZSH9w==}
engines: {node: '>= 10.13.0'}
peerDependencies:
@@ -14219,7 +14113,7 @@ packages:
schema-utils: 3.3.0
serialize-javascript: 6.0.2
terser: 5.27.0
webpack: 5.90.3
webpack: 5.90.1
dev: false
/terser@5.27.0:
@@ -14826,17 +14720,6 @@ packages:
escalade: 3.1.1
picocolors: 1.0.0
/update-browserslist-db@1.0.13(browserslist@4.23.0):
resolution: {integrity: sha512-xebP81SNcPuNpPP3uzeW1NYXxI3rxyJzF3pD6sH4jE7o/IX+WtSpwnVU+qIsDPyk0d3hmFQ7mjqc6AtV604hbg==}
hasBin: true
peerDependencies:
browserslist: '>= 4.21.0'
dependencies:
browserslist: 4.23.0
escalade: 3.1.1
picocolors: 1.0.0
dev: false
/update-check@1.5.4:
resolution: {integrity: sha512-5YHsflzHP4t1G+8WGPlvKbJEbAJGCgw+Em+dGR1KmBUbr1J36SJBqlHLjR7oob7sco5hWHGQVcr9B2poIVDDTQ==}
dependencies:
@@ -15261,8 +15144,8 @@ packages:
- esbuild
- uglify-js
/webpack@5.90.3:
resolution: {integrity: sha512-h6uDYlWCctQRuXBs1oYpVe6sFcWedl0dpcVaTf/YF67J9bKvwJajFulMVSYKHrksMB3I/pIagRzDxwxkebuzKA==}
/webpack@5.90.1:
resolution: {integrity: sha512-SstPdlAC5IvgFnhiRok8hqJo/+ArAbNv7rhU4fnWGHNVfN59HSQFaxZDSAL3IFG2YmqxuRs+IU33milSxbPlog==}
engines: {node: '>=10.13.0'}
hasBin: true
peerDependencies:
@@ -15278,9 +15161,9 @@ packages:
'@webassemblyjs/wasm-parser': 1.11.6
acorn: 8.11.3
acorn-import-assertions: 1.9.0(acorn@8.11.3)
browserslist: 4.23.0
browserslist: 4.22.3
chrome-trace-event: 1.0.3
enhanced-resolve: 5.15.1
enhanced-resolve: 5.15.0
es-module-lexer: 1.4.1
eslint-scope: 5.1.1
events: 3.3.0
@@ -15292,7 +15175,7 @@ packages:
neo-async: 2.6.2
schema-utils: 3.3.0
tapable: 2.2.1
terser-webpack-plugin: 5.3.10(webpack@5.90.3)
terser-webpack-plugin: 5.3.10(webpack@5.90.1)
watchpack: 2.4.0
webpack-sources: 3.2.3
transitivePeerDependencies:
+1 -7
View File
@@ -11,13 +11,7 @@
"outDir": "./lib",
"tsBuildInfoFile": "./lib/.tsbuildinfo",
"incremental": true,
"composite": true,
"paths": {
"llamaindex": ["./packages/core/src/index.ts"],
"llamaindex/*": ["./packages/core/src/*.ts"],
"@llamaindex/env": ["./packages/env/src/index.ts"],
"@llamaindex/env/*": ["./packages/env/src/*.ts"]
}
"composite": true
},
"files": [],
"references": [