mirror of
https://github.com/run-llama/LlamaIndexTS.git
synced 2026-07-16 07:14:29 -04:00
Compare commits
11 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 038d015601 | |||
| 2340f47c80 | |||
| 6381ae9442 | |||
| 4ed915ff29 | |||
| 74b336f05f | |||
| f3fdf6a177 | |||
| c5bf2630c0 | |||
| 5ee5c98bcc | |||
| 1f53819b64 | |||
| d211b7ab13 | |||
| 057ee146bd |
@@ -0,0 +1,7 @@
|
||||
---
|
||||
"@llamaindex/anthropic": patch
|
||||
"llamaindex": patch
|
||||
"@llamaindex/core": patch
|
||||
---
|
||||
|
||||
added support for tool calls with results in message history for athropic agent
|
||||
@@ -0,0 +1,5 @@
|
||||
---
|
||||
"llamaindex": patch
|
||||
---
|
||||
|
||||
fix: clean up docstore when generating embedding fail
|
||||
@@ -33,7 +33,8 @@
|
||||
"typescript": "^5.7.2"
|
||||
},
|
||||
"scripts": {
|
||||
"lint": "eslint ."
|
||||
"lint": "eslint .",
|
||||
"start": "tsx ./starter.ts"
|
||||
},
|
||||
"stackblitz": {
|
||||
"startCommand": "npm start"
|
||||
|
||||
+11
-5
@@ -1,16 +1,22 @@
|
||||
import { SimpleDirectoryReader, VectorStoreIndex } from "llamaindex";
|
||||
import { Document, VectorStoreIndex } from "llamaindex";
|
||||
import fs from "node:fs/promises";
|
||||
import { createInterface } from "node:readline/promises";
|
||||
|
||||
async function main() {
|
||||
const reader = new SimpleDirectoryReader();
|
||||
const path = "node_modules/llamaindex/examples/abramov.txt";
|
||||
const essay = await fs.readFile(path, "utf-8");
|
||||
const document = new Document({ text: essay, id_: path });
|
||||
|
||||
const documents = await reader.loadData("./data");
|
||||
|
||||
const index = await VectorStoreIndex.fromDocuments(documents);
|
||||
const index = await VectorStoreIndex.fromDocuments([document]);
|
||||
const queryEngine = index.asQueryEngine();
|
||||
|
||||
const rl = createInterface({ input: process.stdin, output: process.stdout });
|
||||
|
||||
console.log(
|
||||
"Try asking a question about the essay: https://github.com/run-llama/LlamaIndexTS/blob/main/packages/llamaindex/examples/abramov.txt",
|
||||
"\nExample: When did the author graduate from high school?",
|
||||
"\n==============================\n",
|
||||
);
|
||||
while (true) {
|
||||
const query = await rl.question("Query: ");
|
||||
const response = await queryEngine.query({
|
||||
|
||||
@@ -70,7 +70,7 @@
|
||||
"@swc/types": "^0.1.12",
|
||||
"@types/json-schema": "^7.0.15",
|
||||
"@types/node": "^22.9.0",
|
||||
"bunchee": "6.0.3",
|
||||
"bunchee": "6.2.0",
|
||||
"llamaindex": "workspace:*",
|
||||
"next": "15.0.3",
|
||||
"rollup": "^4.28.1",
|
||||
|
||||
@@ -54,7 +54,7 @@
|
||||
"@hey-api/openapi-ts": "^0.56.0",
|
||||
"@llamaindex/core": "workspace:*",
|
||||
"@llamaindex/env": "workspace:*",
|
||||
"bunchee": "6.0.3"
|
||||
"bunchee": "6.2.0"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"@llamaindex/core": "workspace:*",
|
||||
|
||||
@@ -43,7 +43,7 @@
|
||||
},
|
||||
"devDependencies": {
|
||||
"@types/node": "^22.9.0",
|
||||
"bunchee": "6.0.3"
|
||||
"bunchee": "6.2.0"
|
||||
},
|
||||
"dependencies": {
|
||||
"@aws-sdk/client-bedrock-agent-runtime": "^3.706.0",
|
||||
|
||||
@@ -391,7 +391,7 @@
|
||||
"devDependencies": {
|
||||
"@edge-runtime/vm": "^4.0.4",
|
||||
"ajv": "^8.17.1",
|
||||
"bunchee": "6.0.3",
|
||||
"bunchee": "6.2.0",
|
||||
"happy-dom": "^15.11.6",
|
||||
"natural": "^8.0.1"
|
||||
},
|
||||
|
||||
Vendored
+1
-1
@@ -125,7 +125,7 @@
|
||||
"@huggingface/transformers": "^3.0.2",
|
||||
"@types/node": "^22.9.0",
|
||||
"@types/readable-stream": "^4.0.15",
|
||||
"bunchee": "6.0.3",
|
||||
"bunchee": "6.2.0",
|
||||
"gpt-tokenizer": "^2.6.2",
|
||||
"pathe": "^1.1.2",
|
||||
"vitest": "^2.1.5"
|
||||
|
||||
@@ -237,7 +237,12 @@ export class VectorStoreIndex extends BaseIndex<IndexDict> {
|
||||
if (args.logProgress) {
|
||||
console.log("Finished parsing documents.");
|
||||
}
|
||||
return await this.init(args);
|
||||
try {
|
||||
return await this.init(args);
|
||||
} catch (error) {
|
||||
await docStoreStrategy.rollback(args.nodes);
|
||||
throw error;
|
||||
}
|
||||
}
|
||||
|
||||
static async fromVectorStores(
|
||||
|
||||
@@ -1,10 +1,11 @@
|
||||
import { BaseNode, TransformComponent } from "@llamaindex/core/schema";
|
||||
import { BaseNode } from "@llamaindex/core/schema";
|
||||
import type { BaseDocumentStore } from "@llamaindex/core/storage/doc-store";
|
||||
import { RollbackableTransformComponent } from "./rollback.js";
|
||||
|
||||
/**
|
||||
* Handle doc store duplicates by checking all hashes.
|
||||
*/
|
||||
export class DuplicatesStrategy extends TransformComponent {
|
||||
export class DuplicatesStrategy extends RollbackableTransformComponent {
|
||||
private docStore: BaseDocumentStore;
|
||||
|
||||
constructor(docStore: BaseDocumentStore) {
|
||||
@@ -27,4 +28,12 @@ export class DuplicatesStrategy extends TransformComponent {
|
||||
});
|
||||
this.docStore = docStore;
|
||||
}
|
||||
|
||||
public async rollback(addedNodes: BaseNode[]) {
|
||||
// Remove the docs that were added
|
||||
for (const node of addedNodes) {
|
||||
await this.docStore.deleteDocument(node.id_, false);
|
||||
}
|
||||
this.docStore.persist();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,13 +1,14 @@
|
||||
import { BaseNode, TransformComponent } from "@llamaindex/core/schema";
|
||||
import { BaseNode } from "@llamaindex/core/schema";
|
||||
import type { BaseDocumentStore } from "@llamaindex/core/storage/doc-store";
|
||||
import type { BaseVectorStore } from "../../vector-store/types.js";
|
||||
import { classify } from "./classify.js";
|
||||
import { RollbackableTransformComponent } from "./rollback.js";
|
||||
|
||||
/**
|
||||
* Handle docstore upserts by checking hashes and ids.
|
||||
* Identify missing docs and delete them from docstore and vector store
|
||||
*/
|
||||
export class UpsertsAndDeleteStrategy extends TransformComponent {
|
||||
export class UpsertsAndDeleteStrategy extends RollbackableTransformComponent {
|
||||
protected docStore: BaseDocumentStore;
|
||||
protected vectorStores: BaseVectorStore[] | undefined;
|
||||
|
||||
@@ -45,4 +46,17 @@ export class UpsertsAndDeleteStrategy extends TransformComponent {
|
||||
this.docStore = docStore;
|
||||
this.vectorStores = vectorStores;
|
||||
}
|
||||
|
||||
public async rollback(addedNodes: BaseNode[]) {
|
||||
// TODO: Re-add unused docs has been cleaned up
|
||||
|
||||
// TODO: Re-add missing docs has been cleaned up
|
||||
|
||||
// Remove the docs that were added
|
||||
for (const node of addedNodes) {
|
||||
await this.docStore.deleteRefDoc(node.id_, false);
|
||||
}
|
||||
|
||||
this.docStore.persist();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,12 +1,13 @@
|
||||
import { BaseNode, TransformComponent } from "@llamaindex/core/schema";
|
||||
import { BaseNode } from "@llamaindex/core/schema";
|
||||
import type { BaseDocumentStore } from "@llamaindex/core/storage/doc-store";
|
||||
import type { BaseVectorStore } from "../../vector-store/types.js";
|
||||
import { classify } from "./classify.js";
|
||||
import { RollbackableTransformComponent } from "./rollback.js";
|
||||
|
||||
/**
|
||||
* Handles doc store upserts by checking hashes and ids.
|
||||
*/
|
||||
export class UpsertsStrategy extends TransformComponent {
|
||||
export class UpsertsStrategy extends RollbackableTransformComponent {
|
||||
protected docStore: BaseDocumentStore;
|
||||
protected vectorStores: BaseVectorStore[] | undefined;
|
||||
|
||||
@@ -29,4 +30,15 @@ export class UpsertsStrategy extends TransformComponent {
|
||||
this.docStore = docStore;
|
||||
this.vectorStores = vectorStores;
|
||||
}
|
||||
|
||||
public async rollback(addedNodes: BaseNode[]) {
|
||||
// TODO: Re-add unused docs has been cleaned up
|
||||
|
||||
// Remove the docs that were added
|
||||
for (const node of addedNodes) {
|
||||
await this.docStore.deleteRefDoc(node.id_, false);
|
||||
}
|
||||
|
||||
this.docStore.persist();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
import { TransformComponent } from "@llamaindex/core/schema";
|
||||
import type { BaseDocumentStore } from "@llamaindex/core/storage/doc-store";
|
||||
import type { BaseVectorStore } from "../../vector-store/types.js";
|
||||
import { DuplicatesStrategy } from "./DuplicatesStrategy.js";
|
||||
import { UpsertsAndDeleteStrategy } from "./UpsertsAndDeleteStrategy.js";
|
||||
import { UpsertsStrategy } from "./UpsertsStrategy.js";
|
||||
import { RollbackableTransformComponent } from "./rollback.js";
|
||||
|
||||
/**
|
||||
* Document de-deduplication strategies work by comparing the hashes or ids stored in the document store.
|
||||
@@ -19,7 +19,7 @@ export enum DocStoreStrategy {
|
||||
NONE = "none", // no-op strategy
|
||||
}
|
||||
|
||||
class NoOpStrategy extends TransformComponent {
|
||||
class NoOpStrategy extends RollbackableTransformComponent {
|
||||
constructor() {
|
||||
super(async (nodes) => nodes);
|
||||
}
|
||||
@@ -29,7 +29,7 @@ export function createDocStoreStrategy(
|
||||
docStoreStrategy: DocStoreStrategy,
|
||||
docStore?: BaseDocumentStore,
|
||||
vectorStores: BaseVectorStore[] = [],
|
||||
): TransformComponent {
|
||||
): RollbackableTransformComponent {
|
||||
if (docStoreStrategy === DocStoreStrategy.NONE) {
|
||||
return new NoOpStrategy();
|
||||
}
|
||||
|
||||
@@ -0,0 +1,7 @@
|
||||
import { TransformComponent, type BaseNode } from "@llamaindex/core/schema";
|
||||
|
||||
export class RollbackableTransformComponent extends TransformComponent {
|
||||
public async rollback(nodes: BaseNode[]): Promise<void> {
|
||||
return Promise.resolve();
|
||||
}
|
||||
}
|
||||
@@ -1,5 +1,6 @@
|
||||
import type { MessageParam } from "@anthropic-ai/sdk/resources/messages";
|
||||
import { setEnvs } from "@llamaindex/env";
|
||||
import { Anthropic } from "llamaindex";
|
||||
import { Anthropic, OpenAI, type ChatMessage } from "llamaindex";
|
||||
import { beforeAll, describe, expect, test } from "vitest";
|
||||
|
||||
beforeAll(() => {
|
||||
@@ -8,11 +9,25 @@ beforeAll(() => {
|
||||
});
|
||||
});
|
||||
|
||||
describe("Anthropic llm", () => {
|
||||
test("format messages", () => {
|
||||
const anthropic = new Anthropic();
|
||||
expect(
|
||||
anthropic.formatMessages([
|
||||
describe("Message Formatting", () => {
|
||||
describe("Basic Message Formatting", () => {
|
||||
test("OpenAI formats basic user and assistant messages correctly", () => {
|
||||
const inputMessages: ChatMessage[] = [
|
||||
{ content: "Hello", role: "user" },
|
||||
{ content: "Hi there!", role: "assistant" },
|
||||
{ content: "Be helpful", role: "system" },
|
||||
];
|
||||
const expectedOutput = [
|
||||
{ role: "user", content: "Hello" },
|
||||
{ role: "assistant", content: "Hi there!" },
|
||||
{ role: "system", content: "Be helpful" },
|
||||
];
|
||||
expect(OpenAI.toOpenAIMessage(inputMessages)).toEqual(expectedOutput);
|
||||
});
|
||||
|
||||
test("Anthropic formats basic messages correctly", () => {
|
||||
const anthropic = new Anthropic();
|
||||
const inputMessages: ChatMessage[] = [
|
||||
{
|
||||
content: "You are a helpful assistant.",
|
||||
role: "assistant",
|
||||
@@ -21,20 +36,53 @@ describe("Anthropic llm", () => {
|
||||
content: "Hello?",
|
||||
role: "user",
|
||||
},
|
||||
]),
|
||||
).toEqual([
|
||||
{
|
||||
content: "You are a helpful assistant.",
|
||||
role: "assistant",
|
||||
},
|
||||
{
|
||||
content: "Hello?",
|
||||
role: "user",
|
||||
},
|
||||
]);
|
||||
];
|
||||
const expectedOutput: MessageParam[] = [
|
||||
{
|
||||
content: "You are a helpful assistant.",
|
||||
role: "assistant",
|
||||
},
|
||||
{
|
||||
content: "Hello?",
|
||||
role: "user",
|
||||
},
|
||||
];
|
||||
|
||||
expect(
|
||||
anthropic.formatMessages([
|
||||
expect(anthropic.formatMessages(inputMessages)).toEqual(expectedOutput);
|
||||
});
|
||||
|
||||
test("OpenAI handles system messages correctly", () => {
|
||||
const inputMessages: ChatMessage[] = [
|
||||
{ content: "You are a coding assistant", role: "system" },
|
||||
{ content: "Hello", role: "user" },
|
||||
];
|
||||
const expectedOutput = [
|
||||
{ role: "system", content: "You are a coding assistant" },
|
||||
{ role: "user", content: "Hello" },
|
||||
];
|
||||
expect(OpenAI.toOpenAIMessage(inputMessages)).toEqual(expectedOutput);
|
||||
});
|
||||
|
||||
test("Anthropic handles multi-turn conversation correctly", () => {
|
||||
const anthropic = new Anthropic();
|
||||
const inputMessages: ChatMessage[] = [
|
||||
{ content: "Hi", role: "user" },
|
||||
{ content: "Hello! How can I help?", role: "assistant" },
|
||||
{ content: "What's the weather?", role: "user" },
|
||||
];
|
||||
const expectedOutput: MessageParam[] = [
|
||||
{ content: "Hi", role: "user" },
|
||||
{ content: "Hello! How can I help?", role: "assistant" },
|
||||
{ content: "What's the weather?", role: "user" },
|
||||
];
|
||||
expect(anthropic.formatMessages(inputMessages)).toEqual(expectedOutput);
|
||||
});
|
||||
});
|
||||
|
||||
describe("Advanced Message Formatting", () => {
|
||||
test("Anthropic filters out system messages", () => {
|
||||
const anthropic = new Anthropic();
|
||||
const inputMessages: ChatMessage[] = [
|
||||
{
|
||||
content: "You are a helpful assistant.",
|
||||
role: "assistant",
|
||||
@@ -51,24 +99,58 @@ describe("Anthropic llm", () => {
|
||||
content: "What is your name?",
|
||||
role: "user",
|
||||
},
|
||||
]),
|
||||
).toEqual([
|
||||
{
|
||||
content: "You are a helpful assistant.",
|
||||
role: "assistant",
|
||||
},
|
||||
{
|
||||
content: "Hello?\nWhat is your name?",
|
||||
role: "user",
|
||||
},
|
||||
]);
|
||||
|
||||
expect(
|
||||
anthropic.formatMessages([
|
||||
];
|
||||
const expectedOutput: MessageParam[] = [
|
||||
{
|
||||
content: "You are a helpful assistant.",
|
||||
role: "assistant",
|
||||
},
|
||||
{
|
||||
content: "Hello?\nWhat is your name?",
|
||||
role: "user",
|
||||
},
|
||||
];
|
||||
|
||||
expect(anthropic.formatMessages(inputMessages)).toEqual(expectedOutput);
|
||||
});
|
||||
|
||||
test("Anthropic merges consecutive messages from the same role", () => {
|
||||
const anthropic = new Anthropic();
|
||||
const inputMessages: ChatMessage[] = [
|
||||
{
|
||||
content: "Hello?",
|
||||
role: "user",
|
||||
},
|
||||
{
|
||||
content: "How are you?",
|
||||
role: "user",
|
||||
},
|
||||
{
|
||||
content: "I am fine, thank you!",
|
||||
role: "assistant",
|
||||
},
|
||||
{
|
||||
content: "And you?",
|
||||
role: "assistant",
|
||||
},
|
||||
];
|
||||
const expectedOutput: MessageParam[] = [
|
||||
{
|
||||
content: "Hello?\nHow are you?",
|
||||
role: "user",
|
||||
},
|
||||
{
|
||||
content: "I am fine, thank you!\nAnd you?",
|
||||
role: "assistant",
|
||||
},
|
||||
];
|
||||
|
||||
expect(anthropic.formatMessages(inputMessages)).toEqual(expectedOutput);
|
||||
});
|
||||
|
||||
test("Anthropic handles image content", () => {
|
||||
const anthropic = new Anthropic();
|
||||
const inputMessages: ChatMessage[] = [
|
||||
{
|
||||
content: [
|
||||
{
|
||||
@@ -84,29 +166,180 @@ describe("Anthropic llm", () => {
|
||||
],
|
||||
role: "user",
|
||||
},
|
||||
]),
|
||||
).toEqual([
|
||||
{
|
||||
content: "You are a helpful assistant.",
|
||||
role: "assistant",
|
||||
},
|
||||
{
|
||||
content: [
|
||||
{
|
||||
text: "What do you see in the image?",
|
||||
type: "text",
|
||||
},
|
||||
{
|
||||
source: {
|
||||
data: "/9j/4AAQSkZJRgABAQEASABIAAD/2wBDAAQDAwQDAwQEAwQFBAQFBgoHBgYGBg0JCggKDw0QEA8NDw4RExgUERIXEg4PFRwVFxkZGxsbEBQdHx0aHxgaGxr/2wBDAQQFBQYFBgwHBwwaEQ8RGhoaGhoaGhoaGhoaGhoaGhoaGhoaGhoaGhoaGhoaGhoaGhoaGhoaGhoaGhoaGhoaGhr/wAARCAAgACADASIAAhEBAxEB/8QAGAABAAMBAAAAAAAAAAAAAAAACAQHCQb/xAAvEAABAgUCBAUDBQEAAAAAAAACAQMEBQYHERIhAAgTYSIxMkJxI2KCFBVBUVKh/8QAGAEAAwEBAAAAAAAAAAAAAAAAAwQFAQL/xAAnEQABBAECAwkAAAAAAAAAAAACAQMEEQAFMiExYRITFCJBcXKBof/aAAwDAQACEQMRAD8Aufmb5mnbWREFRdvIMZ3cWcaBh2NHUGEFwtIKQp63CX0h+S7YQgRzGSq6kgqGAS8NQRc6fmkIMWwSxJEyP+m0bwggQr5iIom6KnnxXty61jK+uJUVUxzxm/M5g5EASr6G9WGwTsIIIp2FOHJfi0kyvzS9Cv0zGwEF+2whOAUY4a6mnm2lREURLPoTggNG5tS6xpmOT4GQptwNUZc6sbexzcZRVSTKTOgudMPEL0j7E2uQNOxIqcaYcqXNaxe2HKnauBiAraDZ6n0k0tTBpPNwE9pptqDP3DtlBC1Q8qNw5K4AwLEunYkWMwcYg6fnqoH/ADPHA2/qeZWquhJJ3pODmEhmg/qGl2XAloebL5HWK/K8dOMOM7xVPfJrMhmQiq0SFXOlyPc+jIq3lwakpeYNq27K491kfvbzls07ECiSdlThhWKvj1LLx0VVLWGqSBuFJ1jc3WBEUb8K4TUieHz3xni7ea3lSZvZDhUVImxAVtBso39VdLUe0nk2a+0030n+K7YUc95/J66tRIp3SVXUpGyUI7wvPxDBoJ/UaLIuIqtuInRwiiqp4z3XbBYr3cGp9P30zJXiSjk1HLsqdIvxvzV1q8ZtB3ppa5bkwZkDz7LsF09Qxgi0Roa6UUU1LnxYH5JP74D1LUjNrkXigabc6kZM5vPFZi3NPi3dVXnFT+EQUM17IvEi1tL1xUkcEHb+lo6duvRUO644wwSDpaPWgG7sAApIKqqqm4jvxo1yvcrjdoTiqtrQ2I+u5nr19ItbUA2a5IAX3GvuP8U2ypMS5pSwFC5peTtM0lnSkMWVVUJb48a+8//Z",
|
||||
media_type: "image/jpeg",
|
||||
type: "base64",
|
||||
];
|
||||
const expectedOutput: MessageParam[] = [
|
||||
{
|
||||
role: "user",
|
||||
content: [
|
||||
{
|
||||
type: "text",
|
||||
text: "What do you see in the image?",
|
||||
},
|
||||
type: "image",
|
||||
},
|
||||
],
|
||||
{
|
||||
type: "image",
|
||||
source: {
|
||||
type: "base64",
|
||||
media_type: "image/jpeg",
|
||||
data: "/9j/4AAQSkZJRgABAQEASABIAAD/2wBDAAQDAwQDAwQEAwQFBAQFBgoHBgYGBg0JCggKDw0QEA8NDw4RExgUERIXEg4PFRwVFxkZGxsbEBQdHx0aHxgaGxr/2wBDAQQFBQYFBgwHBwwaEQ8RGhoaGhoaGhoaGhoaGhoaGhoaGhoaGhoaGhoaGhoaGhoaGhoaGhoaGhoaGhoaGhoaGhr/wAARCAAgACADASIAAhEBAxEB/8QAGAABAAMBAAAAAAAAAAAAAAAACAQHCQb/xAAvEAABAgUCBAUDBQEAAAAAAAACAQMEBQYHERIhAAgTYSIxMkJxI2KCFBVBUVKh/8QAGAEAAwEBAAAAAAAAAAAAAAAAAwQFAQL/xAAnEQABBAECAwkAAAAAAAAAAAACAQMEEQAFMiExYRITFCJBcXKBof/aAAwDAQACEQMRAD8Aufmb5mnbWREFRdvIMZ3cWcaBh2NHUGEFwtIKQp63CX0h+S7YQgRzGSq6kgqGAS8NQRc6fmkIMWwSxJEyP+m0bwggQr5iIom6KnnxXty61jK+uJUVUxzxm/M5g5EASr6G9WGwTsIIIp2FOHJfi0kyvzS9Cv0zGwEF+2whOAUY4a6mnm2lREURLPoTggNG5tS6xpmOT4GQptwNUZc6sbexzcZRVSTKTOgudMPEL0j7E2uQNOxIqcaYcqXNaxe2HKnauBiAraDZ6n0k0tTBpPNwE9pptqDP3DtlBC1Q8qNw5K4AwLEunYkWMwcYg6fnqoH/ADPHA2/qeZWquhJJ3pODmEhmg/qGl2XAloebL5HWK/K8dOMOM7xVPfJrMhmQiq0SFXOlyPc+jIq3lwakpeYNq27K491kfvbzls07ECiSdlThhWKvj1LLx0VVLWGqSBuFJ1jc3WBEUb8K4TUieHz3xni7ea3lSZvZDhUVImxAVtBso39VdLUe0nk2a+0030n+K7YUc95/J66tRIp3SVXUpGyUI7wvPxDBoJ/UaLIuIqtuInRwiiqp4z3XbBYr3cGp9P30zJXiSjk1HLsqdIvxvzV1q8ZtB3ppa5bkwZkDz7LsF09Qxgi0Roa6UUU1LnxYH5JP74D1LUjNrkXigabc6kZM5vPFZi3NPi3dVXnFT+EQUM17IvEi1tL1xUkcEHb+lo6duvRUO644wwSDpaPWgG7sAApIKqqqm4jvxo1yvcrjdoTiqtrQ2I+u5nr19ItbUA2a5IAX3GvuP8U2ypMS5pSwFC5peTtM0lnSkMWVVUJb48a+8//Z",
|
||||
},
|
||||
},
|
||||
],
|
||||
},
|
||||
];
|
||||
|
||||
expect(anthropic.formatMessages(inputMessages)).toEqual(expectedOutput);
|
||||
});
|
||||
});
|
||||
|
||||
describe("Tool Message Formatting", () => {
|
||||
const toolCallMessages: ChatMessage[] = [
|
||||
{
|
||||
role: "user",
|
||||
content: "What's the weather in London?",
|
||||
},
|
||||
]);
|
||||
{
|
||||
role: "assistant",
|
||||
content: "Let me check the weather.",
|
||||
options: {
|
||||
toolCall: [
|
||||
{
|
||||
id: "call_123",
|
||||
name: "weather",
|
||||
input: JSON.stringify({ location: "London" }),
|
||||
},
|
||||
],
|
||||
},
|
||||
},
|
||||
{
|
||||
role: "assistant",
|
||||
content: "The weather in London is sunny, +20°C",
|
||||
options: {
|
||||
toolResult: {
|
||||
id: "call_123",
|
||||
},
|
||||
},
|
||||
},
|
||||
];
|
||||
|
||||
test("OpenAI formats tool calls correctly", () => {
|
||||
const expectedOutput = [
|
||||
{
|
||||
role: "user",
|
||||
content: "What's the weather in London?",
|
||||
},
|
||||
{
|
||||
role: "assistant",
|
||||
content: "Let me check the weather.",
|
||||
tool_calls: [
|
||||
{
|
||||
id: "call_123",
|
||||
type: "function",
|
||||
function: {
|
||||
name: "weather",
|
||||
arguments: JSON.stringify({ location: "London" }),
|
||||
},
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
role: "tool",
|
||||
content: "The weather in London is sunny, +20°C",
|
||||
tool_call_id: "call_123",
|
||||
},
|
||||
];
|
||||
|
||||
expect(OpenAI.toOpenAIMessage(toolCallMessages)).toEqual(expectedOutput);
|
||||
});
|
||||
|
||||
test("Anthropic formats tool calls correctly", () => {
|
||||
const anthropic = new Anthropic();
|
||||
const expectedOutput: MessageParam[] = [
|
||||
{
|
||||
role: "user",
|
||||
content: "What's the weather in London?",
|
||||
},
|
||||
{
|
||||
role: "assistant",
|
||||
content: [
|
||||
{
|
||||
type: "text",
|
||||
text: "Let me check the weather.",
|
||||
},
|
||||
{
|
||||
type: "tool_use",
|
||||
id: "call_123",
|
||||
name: "weather",
|
||||
input: {
|
||||
location: "London",
|
||||
},
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
role: "user", // anthropic considers all that comes not from their inference API is user role
|
||||
content: [
|
||||
{
|
||||
type: "tool_result",
|
||||
tool_use_id: "call_123",
|
||||
content: "The weather in London is sunny, +20°C",
|
||||
},
|
||||
],
|
||||
},
|
||||
];
|
||||
|
||||
expect(anthropic.formatMessages(toolCallMessages)).toEqual(
|
||||
expectedOutput,
|
||||
);
|
||||
});
|
||||
|
||||
test("OpenAI formats multiple tool calls correctly", () => {
|
||||
const multiToolMessages: ChatMessage[] = [
|
||||
{
|
||||
role: "assistant",
|
||||
content: "Let me check both weather and time.",
|
||||
options: {
|
||||
toolCall: [
|
||||
{
|
||||
id: "weather_123",
|
||||
name: "weather",
|
||||
input: JSON.stringify({ location: "London" }),
|
||||
},
|
||||
{
|
||||
id: "time_456",
|
||||
name: "time",
|
||||
input: JSON.stringify({ timezone: "GMT" }),
|
||||
},
|
||||
],
|
||||
},
|
||||
},
|
||||
];
|
||||
|
||||
const expectedOutput = [
|
||||
{
|
||||
role: "assistant",
|
||||
content: "Let me check both weather and time.",
|
||||
tool_calls: [
|
||||
{
|
||||
id: "weather_123",
|
||||
type: "function",
|
||||
function: {
|
||||
name: "weather",
|
||||
arguments: JSON.stringify({ location: "London" }),
|
||||
},
|
||||
},
|
||||
{
|
||||
id: "time_456",
|
||||
type: "function",
|
||||
function: {
|
||||
name: "time",
|
||||
arguments: JSON.stringify({ timezone: "GMT" }),
|
||||
},
|
||||
},
|
||||
],
|
||||
},
|
||||
];
|
||||
|
||||
expect(OpenAI.toOpenAIMessage(multiToolMessages)).toEqual(expectedOutput);
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
@@ -43,7 +43,7 @@
|
||||
"@llamaindex/env": "workspace:*",
|
||||
"@types/html-to-text": "^9.0.4",
|
||||
"@types/node": "^22.9.0",
|
||||
"bunchee": "6.0.3",
|
||||
"bunchee": "6.2.0",
|
||||
"tree-sitter": "^0.22.1",
|
||||
"web-tree-sitter": "^0.24.4"
|
||||
},
|
||||
|
||||
@@ -30,7 +30,7 @@
|
||||
"dev": "bunchee --watch"
|
||||
},
|
||||
"devDependencies": {
|
||||
"bunchee": "6.0.3"
|
||||
"bunchee": "6.2.0"
|
||||
},
|
||||
"dependencies": {
|
||||
"@anthropic-ai/sdk": "0.32.1",
|
||||
|
||||
@@ -4,19 +4,12 @@ import type {
|
||||
BetaCacheControlEphemeral,
|
||||
BetaTextBlockParam,
|
||||
} from "@anthropic-ai/sdk/resources/beta/index";
|
||||
import type { TextBlock } from "@anthropic-ai/sdk/resources/index";
|
||||
import type {
|
||||
TextBlock,
|
||||
TextBlockParam,
|
||||
} from "@anthropic-ai/sdk/resources/index";
|
||||
import type {
|
||||
ImageBlockParam,
|
||||
MessageCreateParamsNonStreaming,
|
||||
MessageParam,
|
||||
Model,
|
||||
Tool,
|
||||
ToolResultBlockParam,
|
||||
ToolUseBlock,
|
||||
ToolUseBlockParam,
|
||||
} from "@anthropic-ai/sdk/resources/messages";
|
||||
import { wrapLLMEvent } from "@llamaindex/core/decorator";
|
||||
import type {
|
||||
@@ -193,99 +186,128 @@ export class Anthropic extends ToolCallLLM<
|
||||
formatMessages(
|
||||
messages: ChatMessage<ToolCallLLMMessageOptions>[],
|
||||
): MessageParam[] {
|
||||
const result: MessageParam[] = messages
|
||||
.filter(
|
||||
(message) => message.role === "user" || message.role === "assistant",
|
||||
)
|
||||
.map((message) => {
|
||||
const options = message.options ?? {};
|
||||
if ("toolResult" in options) {
|
||||
const { id, isError } = options.toolResult;
|
||||
return {
|
||||
role: "user",
|
||||
content: [
|
||||
{
|
||||
type: "tool_result",
|
||||
is_error: isError,
|
||||
content: [
|
||||
{
|
||||
type: "text",
|
||||
text: extractText(message.content),
|
||||
},
|
||||
],
|
||||
tool_use_id: id,
|
||||
},
|
||||
] satisfies ToolResultBlockParam[],
|
||||
} satisfies MessageParam;
|
||||
} else if ("toolCall" in options) {
|
||||
const aiThinkingText = extractText(message.content);
|
||||
return {
|
||||
role: "assistant",
|
||||
content: [
|
||||
// this could be empty when you call two tools in one query
|
||||
...(aiThinkingText.trim()
|
||||
? [
|
||||
{
|
||||
type: "text",
|
||||
text: aiThinkingText,
|
||||
} satisfies TextBlockParam,
|
||||
]
|
||||
: []),
|
||||
...options.toolCall.map(
|
||||
(toolCall) =>
|
||||
({
|
||||
type: "tool_use",
|
||||
id: toolCall.id,
|
||||
name: toolCall.name,
|
||||
input: toolCall.input,
|
||||
}) satisfies ToolUseBlockParam,
|
||||
),
|
||||
],
|
||||
} satisfies MessageParam;
|
||||
}
|
||||
const formattedMessages = messages.flatMap((message) => {
|
||||
const options = message.options ?? {};
|
||||
if (message.role === "system") {
|
||||
// Skip system messages
|
||||
return [];
|
||||
}
|
||||
|
||||
if ("toolCall" in options) {
|
||||
const formattedMessage: MessageParam = {
|
||||
role: "assistant",
|
||||
content: [
|
||||
{
|
||||
type: "text" as const,
|
||||
text: extractText(message.content),
|
||||
},
|
||||
...options.toolCall.map((tool) => ({
|
||||
type: "tool_use" as const,
|
||||
id: tool.id,
|
||||
name: tool.name,
|
||||
input:
|
||||
typeof tool.input === "string"
|
||||
? JSON.parse(tool.input)
|
||||
: tool.input,
|
||||
})),
|
||||
],
|
||||
};
|
||||
|
||||
return formattedMessage;
|
||||
}
|
||||
|
||||
// Handle tool results
|
||||
if ("toolResult" in options) {
|
||||
const formattedMessage: MessageParam = {
|
||||
role: "user",
|
||||
content: [
|
||||
{
|
||||
type: "tool_result" as const,
|
||||
tool_use_id: options.toolResult.id,
|
||||
content: extractText(message.content),
|
||||
},
|
||||
],
|
||||
};
|
||||
|
||||
return formattedMessage;
|
||||
}
|
||||
|
||||
// Handle regular messages
|
||||
if (typeof message.content === "string") {
|
||||
const role: "user" | "assistant" =
|
||||
message.role === "assistant" ? "assistant" : "user";
|
||||
|
||||
return {
|
||||
content:
|
||||
typeof message.content === "string"
|
||||
? message.content
|
||||
: message.content.map(
|
||||
(content): TextBlockParam | ImageBlockParam =>
|
||||
content.type === "text"
|
||||
? {
|
||||
type: "text",
|
||||
text: content.text,
|
||||
}
|
||||
: {
|
||||
type: "image",
|
||||
source: {
|
||||
data: content.image_url.url.substring(
|
||||
content.image_url.url.indexOf(",") + 1,
|
||||
),
|
||||
media_type:
|
||||
`image/${content.image_url.url.substring("data:image/".length, content.image_url.url.indexOf(";base64"))}` as
|
||||
| "image/jpeg"
|
||||
| "image/png"
|
||||
| "image/gif"
|
||||
| "image/webp",
|
||||
type: "base64",
|
||||
},
|
||||
},
|
||||
),
|
||||
role: message.role as "user" | "assistant",
|
||||
role,
|
||||
content: message.content,
|
||||
} satisfies MessageParam;
|
||||
});
|
||||
// merge messages with the same role
|
||||
// in case of 'messages: roles must alternate between "user" and "assistant", but found multiple "user" roles in a row'
|
||||
const realResult: MessageParam[] = [];
|
||||
for (let i = 0; i < result.length; i++) {
|
||||
}
|
||||
|
||||
// Handle multi-modal content
|
||||
const role: "user" | "assistant" =
|
||||
message.role === "assistant" ? "assistant" : "user";
|
||||
|
||||
return {
|
||||
role,
|
||||
content: message.content.map((content) => {
|
||||
if (content.type === "text") {
|
||||
return {
|
||||
type: "text" as const,
|
||||
text: content.text,
|
||||
};
|
||||
}
|
||||
return {
|
||||
type: "image" as const,
|
||||
source: {
|
||||
type: "base64" as const,
|
||||
media_type: `image/${content.image_url.url.substring(
|
||||
"data:image/".length,
|
||||
content.image_url.url.indexOf(";base64"),
|
||||
)}` as "image/jpeg" | "image/png" | "image/gif" | "image/webp",
|
||||
data: content.image_url.url.substring(
|
||||
content.image_url.url.indexOf(",") + 1,
|
||||
),
|
||||
},
|
||||
};
|
||||
}),
|
||||
} satisfies MessageParam;
|
||||
});
|
||||
|
||||
return this.mergeConsecutiveMessages(formattedMessages);
|
||||
}
|
||||
|
||||
// Add helper method to prepare tools for API call
|
||||
private prepareToolsForAPI(tools: BaseTool[]): Tool[] {
|
||||
return tools.map((tool) => {
|
||||
if (tool.metadata.parameters?.type !== "object") {
|
||||
throw new TypeError("Tool parameters must be an object");
|
||||
}
|
||||
return {
|
||||
input_schema: {
|
||||
type: "object",
|
||||
properties: tool.metadata.parameters.properties,
|
||||
required: tool.metadata.parameters.required,
|
||||
},
|
||||
name: tool.metadata.name,
|
||||
description: tool.metadata.description,
|
||||
};
|
||||
});
|
||||
}
|
||||
|
||||
private mergeConsecutiveMessages(messages: MessageParam[]): MessageParam[] {
|
||||
const result: MessageParam[] = [];
|
||||
|
||||
for (let i = 0; i < messages.length; i++) {
|
||||
if (i === 0) {
|
||||
realResult.push(result[i]!);
|
||||
result.push(messages[i]!);
|
||||
continue;
|
||||
}
|
||||
const current = result[i]!;
|
||||
const previous = result[i - 1]!;
|
||||
|
||||
const current = messages[i]!;
|
||||
const previous = result[result.length - 1]!;
|
||||
|
||||
if (current.role === previous.role) {
|
||||
// merge two messages with the same role
|
||||
// Merge content based on type
|
||||
if (Array.isArray(previous.content)) {
|
||||
if (Array.isArray(current.content)) {
|
||||
previous.content.push(...current.content);
|
||||
@@ -298,25 +320,19 @@ export class Anthropic extends ToolCallLLM<
|
||||
} else {
|
||||
if (Array.isArray(current.content)) {
|
||||
previous.content = [
|
||||
{
|
||||
type: "text",
|
||||
text: previous.content,
|
||||
},
|
||||
{ type: "text", text: previous.content },
|
||||
...current.content,
|
||||
];
|
||||
} else {
|
||||
previous.content += `\n${current.content}`;
|
||||
previous.content = `${previous.content}\n${current.content}`;
|
||||
}
|
||||
}
|
||||
// no need to push the message
|
||||
}
|
||||
// if the roles are different, just push the message
|
||||
else {
|
||||
realResult.push(current);
|
||||
} else {
|
||||
result.push(current);
|
||||
}
|
||||
}
|
||||
|
||||
return realResult;
|
||||
return result;
|
||||
}
|
||||
|
||||
chat(
|
||||
@@ -336,130 +352,104 @@ export class Anthropic extends ToolCallLLM<
|
||||
@wrapLLMEvent
|
||||
async chat(
|
||||
params:
|
||||
| LLMChatParamsNonStreaming<
|
||||
AnthropicAdditionalChatOptions,
|
||||
AnthropicToolCallLLMMessageOptions
|
||||
>
|
||||
| LLMChatParamsStreaming<
|
||||
AnthropicAdditionalChatOptions,
|
||||
AnthropicToolCallLLMMessageOptions
|
||||
>,
|
||||
| LLMChatParamsNonStreaming<AnthropicToolCallLLMMessageOptions>
|
||||
| LLMChatParamsStreaming<AnthropicToolCallLLMMessageOptions>,
|
||||
): Promise<
|
||||
| ChatResponse<AnthropicToolCallLLMMessageOptions>
|
||||
| AsyncIterable<ChatResponseChunk<AnthropicToolCallLLMMessageOptions>>
|
||||
> {
|
||||
let { messages } = params;
|
||||
|
||||
const { stream, tools } = params;
|
||||
|
||||
let systemPrompt: string | Array<BetaTextBlockParam> | null = null;
|
||||
const { messages, stream, tools } = params;
|
||||
|
||||
// Handle system messages
|
||||
let systemPrompt: string | BetaTextBlockParam[] | null = null;
|
||||
const systemMessages = messages.filter(
|
||||
(message) => message.role === "system",
|
||||
);
|
||||
|
||||
if (systemMessages.length > 0) {
|
||||
systemPrompt = systemMessages.map((message) =>
|
||||
message.options && "cache_control" in message.options
|
||||
? {
|
||||
type: "text",
|
||||
text: extractText(message.content),
|
||||
cache_control: message.options.cache_control,
|
||||
}
|
||||
: {
|
||||
type: "text",
|
||||
text: extractText(message.content),
|
||||
},
|
||||
);
|
||||
messages = messages.filter((message) => message.role !== "system");
|
||||
systemPrompt = systemMessages.map((message): BetaTextBlockParam => {
|
||||
const textContent = extractText(message.content);
|
||||
if (message.options && "cache_control" in message.options) {
|
||||
return {
|
||||
type: "text" as const,
|
||||
text: textContent,
|
||||
cache_control: message.options
|
||||
.cache_control as BetaCacheControlEphemeral,
|
||||
};
|
||||
}
|
||||
return {
|
||||
type: "text" as const,
|
||||
text: textContent,
|
||||
};
|
||||
});
|
||||
}
|
||||
const beta =
|
||||
systemPrompt?.find((message) => "cache_control" in message) !== undefined;
|
||||
|
||||
// case: Non-streaming
|
||||
const beta =
|
||||
Array.isArray(systemPrompt) &&
|
||||
systemPrompt.some((message) => "cache_control" in message);
|
||||
|
||||
let anthropic = this.session.anthropic;
|
||||
if (beta) {
|
||||
// @ts-expect-error type casting
|
||||
anthropic = anthropic.beta.promptCaching;
|
||||
}
|
||||
|
||||
// case: Streaming
|
||||
if (stream) {
|
||||
if (tools) {
|
||||
console.error("Tools are not supported in streaming mode");
|
||||
}
|
||||
return this.streamChat(messages, systemPrompt, anthropic);
|
||||
}
|
||||
|
||||
if (tools) {
|
||||
const params: MessageCreateParamsNonStreaming = {
|
||||
messages: this.formatMessages(messages),
|
||||
tools: tools.map(Anthropic.toTool),
|
||||
model: this.getModelName(this.model),
|
||||
temperature: this.temperature,
|
||||
max_tokens: this.maxTokens ?? 4096,
|
||||
top_p: this.topP,
|
||||
...(systemPrompt && { system: systemPrompt }),
|
||||
};
|
||||
// Remove tools if there are none, as it will cause an error
|
||||
if (tools.length === 0) {
|
||||
delete params.tools;
|
||||
}
|
||||
const response = await anthropic.messages.create(params);
|
||||
|
||||
const toolUseBlock = response.content.filter(
|
||||
(content): content is ToolUseBlock => content.type === "tool_use",
|
||||
return this.streamChat(
|
||||
messages.filter((m) => m.role !== "system"),
|
||||
systemPrompt,
|
||||
anthropic,
|
||||
);
|
||||
|
||||
return {
|
||||
raw: response,
|
||||
message: {
|
||||
content: response.content
|
||||
.filter((content): content is TextBlock => content.type === "text")
|
||||
.map((content) => ({
|
||||
type: "text",
|
||||
text: content.text,
|
||||
})),
|
||||
role: "assistant",
|
||||
options:
|
||||
toolUseBlock.length > 0
|
||||
? {
|
||||
toolCall: toolUseBlock.map((block) => ({
|
||||
id: block.id,
|
||||
name: block.name,
|
||||
input:
|
||||
typeof block.input === "object"
|
||||
? JSON.stringify(block.input)
|
||||
: `${block.input}`,
|
||||
})),
|
||||
}
|
||||
: {},
|
||||
},
|
||||
};
|
||||
} else {
|
||||
const response = await anthropic.messages.create({
|
||||
model: this.getModelName(this.model),
|
||||
messages: this.formatMessages(messages),
|
||||
max_tokens: this.maxTokens ?? 4096,
|
||||
temperature: this.temperature,
|
||||
top_p: this.topP,
|
||||
...(systemPrompt && { system: systemPrompt }),
|
||||
});
|
||||
|
||||
return {
|
||||
raw: response,
|
||||
message: {
|
||||
content: response.content
|
||||
.filter((content): content is TextBlock => content.type === "text")
|
||||
.map((content) => ({
|
||||
type: "text",
|
||||
text: content.text,
|
||||
})),
|
||||
role: "assistant",
|
||||
options: {},
|
||||
},
|
||||
};
|
||||
}
|
||||
|
||||
const apiParams = {
|
||||
model: this.getModelName(this.model),
|
||||
messages: this.mergeConsecutiveMessages(
|
||||
this.formatMessages(messages.filter((m) => m.role !== "system")),
|
||||
),
|
||||
max_tokens: this.maxTokens ?? 4096,
|
||||
temperature: this.temperature,
|
||||
top_p: this.topP,
|
||||
...(systemPrompt && { system: systemPrompt }),
|
||||
};
|
||||
|
||||
if (tools?.length) {
|
||||
Object.assign(apiParams, {
|
||||
tools: this.prepareToolsForAPI(tools),
|
||||
});
|
||||
}
|
||||
|
||||
const response = await anthropic.messages.create(apiParams);
|
||||
|
||||
const toolUseBlock = response.content.filter(
|
||||
(content): content is ToolUseBlock => content.type === "tool_use",
|
||||
);
|
||||
|
||||
return {
|
||||
raw: response,
|
||||
message: {
|
||||
content: response.content
|
||||
.filter((content): content is TextBlock => content.type === "text")
|
||||
.map((content) => ({
|
||||
type: "text" as const,
|
||||
text: content.text,
|
||||
})),
|
||||
role: "assistant",
|
||||
options:
|
||||
toolUseBlock.length > 0
|
||||
? {
|
||||
toolCall: toolUseBlock.map((block) => ({
|
||||
id: block.id,
|
||||
name: block.name,
|
||||
input: JSON.stringify(block.input),
|
||||
})),
|
||||
}
|
||||
: {},
|
||||
},
|
||||
};
|
||||
}
|
||||
|
||||
protected async *streamChat(
|
||||
|
||||
@@ -39,7 +39,7 @@
|
||||
"dev": "bunchee --watch"
|
||||
},
|
||||
"devDependencies": {
|
||||
"bunchee": "6.0.3"
|
||||
"bunchee": "6.2.0"
|
||||
},
|
||||
"dependencies": {
|
||||
"@huggingface/transformers": "^3.0.2",
|
||||
|
||||
@@ -30,7 +30,7 @@
|
||||
"dev": "bunchee --watch"
|
||||
},
|
||||
"devDependencies": {
|
||||
"bunchee": "6.0.3"
|
||||
"bunchee": "6.2.0"
|
||||
},
|
||||
"dependencies": {
|
||||
"@llamaindex/core": "workspace:*",
|
||||
|
||||
@@ -30,7 +30,7 @@
|
||||
"dev": "bunchee --watch"
|
||||
},
|
||||
"devDependencies": {
|
||||
"bunchee": "6.0.3"
|
||||
"bunchee": "6.2.0"
|
||||
},
|
||||
"dependencies": {
|
||||
"@llamaindex/env": "workspace:*",
|
||||
|
||||
@@ -39,7 +39,7 @@
|
||||
"dev": "bunchee --watch"
|
||||
},
|
||||
"devDependencies": {
|
||||
"bunchee": "6.0.3"
|
||||
"bunchee": "6.2.0"
|
||||
},
|
||||
"dependencies": {
|
||||
"@huggingface/inference": "^2.8.1",
|
||||
|
||||
@@ -30,7 +30,7 @@
|
||||
"dev": "bunchee --watch"
|
||||
},
|
||||
"devDependencies": {
|
||||
"bunchee": "6.0.3"
|
||||
"bunchee": "6.2.0"
|
||||
},
|
||||
"dependencies": {
|
||||
"@llamaindex/core": "workspace:*",
|
||||
|
||||
@@ -30,7 +30,7 @@
|
||||
"dev": "bunchee --watch"
|
||||
},
|
||||
"devDependencies": {
|
||||
"bunchee": "6.0.3"
|
||||
"bunchee": "6.2.0"
|
||||
},
|
||||
"dependencies": {
|
||||
"@llamaindex/core": "workspace:*",
|
||||
|
||||
@@ -30,7 +30,7 @@
|
||||
"dev": "bunchee --watch"
|
||||
},
|
||||
"devDependencies": {
|
||||
"bunchee": "6.0.3"
|
||||
"bunchee": "6.2.0"
|
||||
},
|
||||
"dependencies": {
|
||||
"@llamaindex/core": "workspace:*",
|
||||
|
||||
@@ -38,7 +38,7 @@
|
||||
"dev": "bunchee --watch"
|
||||
},
|
||||
"devDependencies": {
|
||||
"bunchee": "6.0.3"
|
||||
"bunchee": "6.2.0"
|
||||
},
|
||||
"dependencies": {
|
||||
"@llamaindex/core": "workspace:*",
|
||||
|
||||
@@ -38,7 +38,7 @@
|
||||
"dev": "bunchee --watch"
|
||||
},
|
||||
"devDependencies": {
|
||||
"bunchee": "6.0.3"
|
||||
"bunchee": "6.2.0"
|
||||
},
|
||||
"dependencies": {
|
||||
"@llamaindex/core": "workspace:*",
|
||||
|
||||
@@ -30,7 +30,7 @@
|
||||
"dev": "bunchee --watch"
|
||||
},
|
||||
"devDependencies": {
|
||||
"bunchee": "6.0.3"
|
||||
"bunchee": "6.2.0"
|
||||
},
|
||||
"dependencies": {
|
||||
"@llamaindex/openai": "workspace:*"
|
||||
|
||||
@@ -212,7 +212,7 @@
|
||||
"@llamaindex/core": "workspace:*",
|
||||
"@llamaindex/env": "workspace:*",
|
||||
"@types/node": "^22.9.0",
|
||||
"bunchee": "6.0.3",
|
||||
"bunchee": "6.2.0",
|
||||
"p-limit": "^6.1.0",
|
||||
"string-strip-html": "^13.4.8"
|
||||
},
|
||||
|
||||
@@ -56,7 +56,7 @@
|
||||
"devDependencies": {
|
||||
"@llamaindex/env": "workspace:*",
|
||||
"@types/node": "^22.9.0",
|
||||
"bunchee": "6.0.3"
|
||||
"bunchee": "6.2.0"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"@llamaindex/env": "workspace:*"
|
||||
|
||||
Generated
+130
-112
@@ -666,8 +666,8 @@ importers:
|
||||
specifier: ^22.9.0
|
||||
version: 22.9.0
|
||||
bunchee:
|
||||
specifier: 6.0.3
|
||||
version: 6.0.3(typescript@5.7.2)
|
||||
specifier: 6.2.0
|
||||
version: 6.2.0(typescript@5.7.2)
|
||||
llamaindex:
|
||||
specifier: workspace:*
|
||||
version: link:../llamaindex
|
||||
@@ -794,8 +794,8 @@ importers:
|
||||
specifier: workspace:*
|
||||
version: link:../env
|
||||
bunchee:
|
||||
specifier: 6.0.3
|
||||
version: 6.0.3(typescript@5.7.2)
|
||||
specifier: 6.2.0
|
||||
version: 6.2.0(typescript@5.7.2)
|
||||
|
||||
packages/community:
|
||||
dependencies:
|
||||
@@ -816,8 +816,8 @@ importers:
|
||||
specifier: ^22.9.0
|
||||
version: 22.9.0
|
||||
bunchee:
|
||||
specifier: 6.0.3
|
||||
version: 6.0.3(typescript@5.7.2)
|
||||
specifier: 6.2.0
|
||||
version: 6.2.0(typescript@5.7.2)
|
||||
|
||||
packages/core:
|
||||
dependencies:
|
||||
@@ -844,8 +844,8 @@ importers:
|
||||
specifier: ^8.17.1
|
||||
version: 8.17.1
|
||||
bunchee:
|
||||
specifier: 6.0.3
|
||||
version: 6.0.3(typescript@5.7.2)
|
||||
specifier: 6.2.0
|
||||
version: 6.2.0(typescript@5.7.2)
|
||||
happy-dom:
|
||||
specifier: ^15.11.6
|
||||
version: 15.11.6
|
||||
@@ -881,8 +881,8 @@ importers:
|
||||
specifier: ^4.0.15
|
||||
version: 4.0.15
|
||||
bunchee:
|
||||
specifier: 6.0.3
|
||||
version: 6.0.3(typescript@5.7.2)
|
||||
specifier: 6.2.0
|
||||
version: 6.2.0(typescript@5.7.2)
|
||||
gpt-tokenizer:
|
||||
specifier: ^2.6.2
|
||||
version: 2.6.2
|
||||
@@ -1157,8 +1157,8 @@ importers:
|
||||
specifier: ^22.9.0
|
||||
version: 22.9.0
|
||||
bunchee:
|
||||
specifier: 6.0.3
|
||||
version: 6.0.3(typescript@5.7.2)
|
||||
specifier: 6.2.0
|
||||
version: 6.2.0(typescript@5.7.2)
|
||||
tree-sitter:
|
||||
specifier: ^0.22.1
|
||||
version: 0.22.1
|
||||
@@ -1182,8 +1182,8 @@ importers:
|
||||
version: 2.17.3
|
||||
devDependencies:
|
||||
bunchee:
|
||||
specifier: 6.0.3
|
||||
version: 6.0.3(typescript@5.7.2)
|
||||
specifier: 6.2.0
|
||||
version: 6.2.0(typescript@5.7.2)
|
||||
|
||||
packages/providers/clip:
|
||||
dependencies:
|
||||
@@ -1201,8 +1201,8 @@ importers:
|
||||
version: link:../openai
|
||||
devDependencies:
|
||||
bunchee:
|
||||
specifier: 6.0.3
|
||||
version: 6.0.3(typescript@5.7.2)
|
||||
specifier: 6.2.0
|
||||
version: 6.2.0(typescript@5.7.2)
|
||||
|
||||
packages/providers/deepinfra:
|
||||
dependencies:
|
||||
@@ -1217,8 +1217,8 @@ importers:
|
||||
version: link:../openai
|
||||
devDependencies:
|
||||
bunchee:
|
||||
specifier: 6.0.3
|
||||
version: 6.0.3(typescript@5.7.2)
|
||||
specifier: 6.2.0
|
||||
version: 6.2.0(typescript@5.7.2)
|
||||
|
||||
packages/providers/groq:
|
||||
dependencies:
|
||||
@@ -1233,8 +1233,8 @@ importers:
|
||||
version: 0.8.0(encoding@0.1.13)
|
||||
devDependencies:
|
||||
bunchee:
|
||||
specifier: 6.0.3
|
||||
version: 6.0.3(typescript@5.7.2)
|
||||
specifier: 6.2.0
|
||||
version: 6.2.0(typescript@5.7.2)
|
||||
|
||||
packages/providers/huggingface:
|
||||
dependencies:
|
||||
@@ -1255,8 +1255,8 @@ importers:
|
||||
version: link:../openai
|
||||
devDependencies:
|
||||
bunchee:
|
||||
specifier: 6.0.3
|
||||
version: 6.0.3(typescript@5.7.2)
|
||||
specifier: 6.2.0
|
||||
version: 6.2.0(typescript@5.7.2)
|
||||
|
||||
packages/providers/ollama:
|
||||
dependencies:
|
||||
@@ -1274,8 +1274,8 @@ importers:
|
||||
version: 2.17.3
|
||||
devDependencies:
|
||||
bunchee:
|
||||
specifier: 6.0.3
|
||||
version: 6.0.3(typescript@5.7.2)
|
||||
specifier: 6.2.0
|
||||
version: 6.2.0(typescript@5.7.2)
|
||||
|
||||
packages/providers/openai:
|
||||
dependencies:
|
||||
@@ -1290,8 +1290,8 @@ importers:
|
||||
version: 4.73.1(encoding@0.1.13)(zod@3.24.1)
|
||||
devDependencies:
|
||||
bunchee:
|
||||
specifier: 6.0.3
|
||||
version: 6.0.3(typescript@5.7.2)
|
||||
specifier: 6.2.0
|
||||
version: 6.2.0(typescript@5.7.2)
|
||||
|
||||
packages/providers/portkey-ai:
|
||||
dependencies:
|
||||
@@ -1309,8 +1309,8 @@ importers:
|
||||
version: 2.17.3
|
||||
devDependencies:
|
||||
bunchee:
|
||||
specifier: 6.0.3
|
||||
version: 6.0.3(typescript@5.7.2)
|
||||
specifier: 6.2.0
|
||||
version: 6.2.0(typescript@5.7.2)
|
||||
|
||||
packages/providers/replicate:
|
||||
dependencies:
|
||||
@@ -1325,8 +1325,8 @@ importers:
|
||||
version: 1.0.1
|
||||
devDependencies:
|
||||
bunchee:
|
||||
specifier: 6.0.3
|
||||
version: 6.0.3(typescript@5.7.2)
|
||||
specifier: 6.2.0
|
||||
version: 6.2.0(typescript@5.7.2)
|
||||
|
||||
packages/providers/vercel:
|
||||
dependencies:
|
||||
@@ -1341,8 +1341,8 @@ importers:
|
||||
version: 3.23.8
|
||||
devDependencies:
|
||||
bunchee:
|
||||
specifier: 6.0.3
|
||||
version: 6.0.3(typescript@5.7.2)
|
||||
specifier: 6.2.0
|
||||
version: 6.2.0(typescript@5.7.2)
|
||||
|
||||
packages/providers/vllm:
|
||||
dependencies:
|
||||
@@ -1351,8 +1351,8 @@ importers:
|
||||
version: link:../openai
|
||||
devDependencies:
|
||||
bunchee:
|
||||
specifier: 6.0.3
|
||||
version: 6.0.3(typescript@5.7.2)
|
||||
specifier: 6.2.0
|
||||
version: 6.2.0(typescript@5.7.2)
|
||||
|
||||
packages/readers:
|
||||
dependencies:
|
||||
@@ -1400,8 +1400,8 @@ importers:
|
||||
specifier: ^22.9.0
|
||||
version: 22.9.0
|
||||
bunchee:
|
||||
specifier: 6.0.3
|
||||
version: 6.0.3(typescript@5.7.2)
|
||||
specifier: 6.2.0
|
||||
version: 6.2.0(typescript@5.7.2)
|
||||
p-limit:
|
||||
specifier: ^6.1.0
|
||||
version: 6.1.0
|
||||
@@ -1440,8 +1440,8 @@ importers:
|
||||
specifier: ^22.9.0
|
||||
version: 22.9.0
|
||||
bunchee:
|
||||
specifier: 6.0.3
|
||||
version: 6.0.3(typescript@5.7.2)
|
||||
specifier: 6.2.0
|
||||
version: 6.2.0(typescript@5.7.2)
|
||||
|
||||
unit:
|
||||
dependencies:
|
||||
@@ -4609,8 +4609,8 @@ packages:
|
||||
chokidar:
|
||||
optional: true
|
||||
|
||||
'@swc/core-darwin-arm64@1.10.1':
|
||||
resolution: {integrity: sha512-NyELPp8EsVZtxH/mEqvzSyWpfPJ1lugpTQcSlMduZLj1EASLO4sC8wt8hmL1aizRlsbjCX+r0PyL+l0xQ64/6Q==}
|
||||
'@swc/core-darwin-arm64@1.10.4':
|
||||
resolution: {integrity: sha512-sV/eurLhkjn/197y48bxKP19oqcLydSel42Qsy2zepBltqUx+/zZ8+/IS0Bi7kaWVFxerbW1IPB09uq8Zuvm3g==}
|
||||
engines: {node: '>=10'}
|
||||
cpu: [arm64]
|
||||
os: [darwin]
|
||||
@@ -4627,8 +4627,8 @@ packages:
|
||||
cpu: [arm64]
|
||||
os: [darwin]
|
||||
|
||||
'@swc/core-darwin-x64@1.10.1':
|
||||
resolution: {integrity: sha512-L4BNt1fdQ5ZZhAk5qoDfUnXRabDOXKnXBxMDJ+PWLSxOGBbWE6aJTnu4zbGjJvtot0KM46m2LPAPY8ttknqaZA==}
|
||||
'@swc/core-darwin-x64@1.10.4':
|
||||
resolution: {integrity: sha512-gjYNU6vrAUO4+FuovEo9ofnVosTFXkF0VDuo1MKPItz6e2pxc2ale4FGzLw0Nf7JB1sX4a8h06CN16/pLJ8Q2w==}
|
||||
engines: {node: '>=10'}
|
||||
cpu: [x64]
|
||||
os: [darwin]
|
||||
@@ -4645,8 +4645,8 @@ packages:
|
||||
cpu: [x64]
|
||||
os: [darwin]
|
||||
|
||||
'@swc/core-linux-arm-gnueabihf@1.10.1':
|
||||
resolution: {integrity: sha512-Y1u9OqCHgvVp2tYQAJ7hcU9qO5brDMIrA5R31rwWQIAKDkJKtv3IlTHF0hrbWk1wPR0ZdngkQSJZple7G+Grvw==}
|
||||
'@swc/core-linux-arm-gnueabihf@1.10.4':
|
||||
resolution: {integrity: sha512-zd7fXH5w8s+Sfvn2oO464KDWl+ZX1MJiVmE4Pdk46N3PEaNwE0koTfgx2vQRqRG4vBBobzVvzICC3618WcefOA==}
|
||||
engines: {node: '>=10'}
|
||||
cpu: [arm]
|
||||
os: [linux]
|
||||
@@ -4663,8 +4663,8 @@ packages:
|
||||
cpu: [arm]
|
||||
os: [linux]
|
||||
|
||||
'@swc/core-linux-arm64-gnu@1.10.1':
|
||||
resolution: {integrity: sha512-tNQHO/UKdtnqjc7o04iRXng1wTUXPgVd8Y6LI4qIbHVoVPwksZydISjMcilKNLKIwOoUQAkxyJ16SlOAeADzhQ==}
|
||||
'@swc/core-linux-arm64-gnu@1.10.4':
|
||||
resolution: {integrity: sha512-+UGfoHDxsMZgFD3tABKLeEZHqLNOkxStu+qCG7atGBhS4Slri6h6zijVvf4yI5X3kbXdvc44XV/hrP/Klnui2A==}
|
||||
engines: {node: '>=10'}
|
||||
cpu: [arm64]
|
||||
os: [linux]
|
||||
@@ -4681,8 +4681,8 @@ packages:
|
||||
cpu: [arm64]
|
||||
os: [linux]
|
||||
|
||||
'@swc/core-linux-arm64-musl@1.10.1':
|
||||
resolution: {integrity: sha512-x0L2Pd9weQ6n8dI1z1Isq00VHFvpBClwQJvrt3NHzmR+1wCT/gcYl1tp9P5xHh3ldM8Cn4UjWCw+7PaUgg8FcQ==}
|
||||
'@swc/core-linux-arm64-musl@1.10.4':
|
||||
resolution: {integrity: sha512-cDDj2/uYsOH0pgAnDkovLZvKJpFmBMyXkxEG6Q4yw99HbzO6QzZ5HDGWGWVq/6dLgYKlnnmpjZCPPQIu01mXEg==}
|
||||
engines: {node: '>=10'}
|
||||
cpu: [arm64]
|
||||
os: [linux]
|
||||
@@ -4699,8 +4699,8 @@ packages:
|
||||
cpu: [arm64]
|
||||
os: [linux]
|
||||
|
||||
'@swc/core-linux-x64-gnu@1.10.1':
|
||||
resolution: {integrity: sha512-yyYEwQcObV3AUsC79rSzN9z6kiWxKAVJ6Ntwq2N9YoZqSPYph+4/Am5fM1xEQYf/kb99csj0FgOelomJSobxQA==}
|
||||
'@swc/core-linux-x64-gnu@1.10.4':
|
||||
resolution: {integrity: sha512-qJXh9D6Kf5xSdGWPINpLGixAbB5JX8JcbEJpRamhlDBoOcQC79dYfOMEIxWPhTS1DGLyFakAx2FX/b2VmQmj0g==}
|
||||
engines: {node: '>=10'}
|
||||
cpu: [x64]
|
||||
os: [linux]
|
||||
@@ -4717,8 +4717,8 @@ packages:
|
||||
cpu: [x64]
|
||||
os: [linux]
|
||||
|
||||
'@swc/core-linux-x64-musl@1.10.1':
|
||||
resolution: {integrity: sha512-tcaS43Ydd7Fk7sW5ROpaf2Kq1zR+sI5K0RM+0qYLYYurvsJruj3GhBCaiN3gkzd8m/8wkqNqtVklWaQYSDsyqA==}
|
||||
'@swc/core-linux-x64-musl@1.10.4':
|
||||
resolution: {integrity: sha512-A76lIAeyQnHCVt0RL/pG+0er8Qk9+acGJqSZOZm67Ve3B0oqMd871kPtaHBM0BW3OZAhoILgfHW3Op9Q3mx3Cw==}
|
||||
engines: {node: '>=10'}
|
||||
cpu: [x64]
|
||||
os: [linux]
|
||||
@@ -4735,8 +4735,8 @@ packages:
|
||||
cpu: [x64]
|
||||
os: [linux]
|
||||
|
||||
'@swc/core-win32-arm64-msvc@1.10.1':
|
||||
resolution: {integrity: sha512-D3Qo1voA7AkbOzQ2UGuKNHfYGKL6eejN8VWOoQYtGHHQi1p5KK/Q7V1ku55oxXBsj79Ny5FRMqiRJpVGad7bjQ==}
|
||||
'@swc/core-win32-arm64-msvc@1.10.4':
|
||||
resolution: {integrity: sha512-e6j5kBu4fIY7fFxFxnZI0MlEovRvp50Lg59Fw+DVbtqHk3C85dckcy5xKP+UoXeuEmFceauQDczUcGs19SRGSQ==}
|
||||
engines: {node: '>=10'}
|
||||
cpu: [arm64]
|
||||
os: [win32]
|
||||
@@ -4753,8 +4753,8 @@ packages:
|
||||
cpu: [arm64]
|
||||
os: [win32]
|
||||
|
||||
'@swc/core-win32-ia32-msvc@1.10.1':
|
||||
resolution: {integrity: sha512-WalYdFoU3454Og+sDKHM1MrjvxUGwA2oralknXkXL8S0I/8RkWZOB++p3pLaGbTvOO++T+6znFbQdR8KRaa7DA==}
|
||||
'@swc/core-win32-ia32-msvc@1.10.4':
|
||||
resolution: {integrity: sha512-RSYHfdKgNXV/amY5Tqk1EWVsyQnhlsM//jeqMLw5Fy9rfxP592W9UTumNikNRPdjI8wKKzNMXDb1U29tQjN0dg==}
|
||||
engines: {node: '>=10'}
|
||||
cpu: [ia32]
|
||||
os: [win32]
|
||||
@@ -4771,8 +4771,8 @@ packages:
|
||||
cpu: [ia32]
|
||||
os: [win32]
|
||||
|
||||
'@swc/core-win32-x64-msvc@1.10.1':
|
||||
resolution: {integrity: sha512-JWobfQDbTnoqaIwPKQ3DVSywihVXlQMbDuwik/dDWlj33A8oEHcjPOGs4OqcA3RHv24i+lfCQpM3Mn4FAMfacA==}
|
||||
'@swc/core-win32-x64-msvc@1.10.4':
|
||||
resolution: {integrity: sha512-1ujYpaqfqNPYdwKBlvJnOqcl+Syn3UrQ4XE0Txz6zMYgyh6cdU6a3pxqLqIUSJ12MtXRA9ZUhEz1ekU3LfLWXw==}
|
||||
engines: {node: '>=10'}
|
||||
cpu: [x64]
|
||||
os: [win32]
|
||||
@@ -4789,8 +4789,8 @@ packages:
|
||||
cpu: [x64]
|
||||
os: [win32]
|
||||
|
||||
'@swc/core@1.10.1':
|
||||
resolution: {integrity: sha512-rQ4dS6GAdmtzKiCRt3LFVxl37FaY1cgL9kSUTnhQ2xc3fmHOd7jdJK/V4pSZMG1ruGTd0bsi34O2R0Olg9Zo/w==}
|
||||
'@swc/core@1.10.4':
|
||||
resolution: {integrity: sha512-ut3zfiTLORMxhr6y/GBxkHmzcGuVpwJYX4qyXWuBKkpw/0g0S5iO1/wW7RnLnZbAi8wS/n0atRZoaZlXWBkeJg==}
|
||||
engines: {node: '>=10'}
|
||||
peerDependencies:
|
||||
'@swc/helpers': '*'
|
||||
@@ -5466,8 +5466,8 @@ packages:
|
||||
resolution: {integrity: sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==}
|
||||
engines: {node: '>=8'}
|
||||
|
||||
ansi-regex@6.0.1:
|
||||
resolution: {integrity: sha512-n5M855fKb2SsfMIiFFoVrABHJC8QtHwVx+mHWP3QcEqBHYienj5dHSgjbxtC0WEZXYt4wcD6zrQElDPhFuZgfA==}
|
||||
ansi-regex@6.1.0:
|
||||
resolution: {integrity: sha512-7HSX4QQb4CspciLpVFwyRe79O3xsIZDDLER21kERQ71oaPodF8jL725AgJMFAYbooIqolJoRLuM81SpeUkpkvA==}
|
||||
engines: {node: '>=12'}
|
||||
|
||||
ansi-styles@3.2.1:
|
||||
@@ -5759,8 +5759,8 @@ packages:
|
||||
resolution: {integrity: sha512-4T53u4PdgsXqKaIctwF8ifXlRTTmEPJ8iEPWFdGZvcf7sbwYo6FKFEX9eNNAnzFZ7EzJAQ3CJeOtCRA4rDp7Pw==}
|
||||
engines: {node: '>=6.14.2'}
|
||||
|
||||
bunchee@6.0.3:
|
||||
resolution: {integrity: sha512-Yq/srd3ocXPAHv0KEdJvhFMNUOOVVqy0kNzaGVCirk/+MfnLdvZO5uf5BHugIHe/qSvWUQTJZ3SAfB/VABONeQ==}
|
||||
bunchee@6.2.0:
|
||||
resolution: {integrity: sha512-kdZrbi+JFFm5ZsOqwXoYFG/783oiJc7gYAOiHrMr1r0NQJdmcDwadX+HHoczti3+VjLKmBqf+lzyvbDruG5f/Q==}
|
||||
engines: {node: '>= 18.0.0'}
|
||||
hasBin: true
|
||||
peerDependencies:
|
||||
@@ -5864,6 +5864,10 @@ packages:
|
||||
resolution: {integrity: sha512-dLitG79d+GV1Nb/VYcCDFivJeK1hiukt9QjRNVOsUtTy1rR1YJsmpGGTZ3qJos+uw7WmWF4wUwBd9jxjocFC2w==}
|
||||
engines: {node: ^12.17.0 || ^14.13 || >=16.0.0}
|
||||
|
||||
chalk@5.4.1:
|
||||
resolution: {integrity: sha512-zgVZuo2WcZgfUEmsn6eO3kINexW8RAE4maiQ8QNs8CtpPCSyMiYsULR3HQYkm3w8FIA3SberyMJMSldGsW+U3w==}
|
||||
engines: {node: ^12.17.0 || ^14.13 || >=16.0.0}
|
||||
|
||||
character-entities-html4@2.1.0:
|
||||
resolution: {integrity: sha512-1v7fgQRj6hnSwFpq1Eu0ynr/CDEw0rXo2B61qXrLNdHZmPKgb7fqS1a2JwF0rISo9q77jDI8VMEHoApn8qDoZA==}
|
||||
|
||||
@@ -6573,10 +6577,6 @@ packages:
|
||||
engines: {node: '>=18'}
|
||||
hasBin: true
|
||||
|
||||
escalade@3.1.1:
|
||||
resolution: {integrity: sha512-k0er2gUkLf8O0zKJiAhmkTnJlTvINGv7ygDNPbeIsX/TJjGJZHuh9B2UxbsaEkmlEo9MfhrSzmhIlhRlI2GXnw==}
|
||||
engines: {node: '>=6'}
|
||||
|
||||
escalade@3.2.0:
|
||||
resolution: {integrity: sha512-WUj2qlxaQtO4g6Pq5c29GTcWGDyd8itL8zTlipgECz3JesAiiOKotd8JU6otB3PACgG6xkJUyVhboMS+bje/jA==}
|
||||
engines: {node: '>=6'}
|
||||
@@ -6762,8 +6762,8 @@ packages:
|
||||
resolution: {integrity: sha512-YQLXUplAwJgCydQ78IMJywZCceoqk1oH01OERdSAJc/7U2AylwjhSCLDEtqwg811idIS/9fIU5GjG73IgjKMVg==}
|
||||
engines: {node: '>=0.10'}
|
||||
|
||||
esrap@1.3.1:
|
||||
resolution: {integrity: sha512-KpAH3+QsDmtOP1KOW04CbD1PgzWsIHjB8tOCk3PCb8xzNGn8XkjI8zl80i09fmXdzQyaS8tcsKCCDzHF7AcowA==}
|
||||
esrap@1.3.2:
|
||||
resolution: {integrity: sha512-C4PXusxYhFT98GjLSmb20k9PREuUdporer50dhzGuJu9IJXktbMddVCMLAERl5dAHyAi73GWWCE4FVHGP1794g==}
|
||||
|
||||
esrecurse@4.3.0:
|
||||
resolution: {integrity: sha512-KmfKL3b6G+RXvP8N1vr3Tq1kL/oCFgn2NYXEtqP8/L3pKapUA4G8cFVaoF3SU323CD4XypR/ffioHmkti6/Tag==}
|
||||
@@ -7723,6 +7723,10 @@ packages:
|
||||
resolution: {integrity: sha512-urTSINYfAYgcbLb0yDQ6egFm6h3Mo1DcF9EkyXSRjjzdHbsulg01qhwWuXdOoUBuTkbQ80KDboXa0vFJ+BDH+g==}
|
||||
engines: {node: '>= 0.4'}
|
||||
|
||||
is-core-module@2.16.1:
|
||||
resolution: {integrity: sha512-UfoeMA6fIJ8wTYFEUjelnaGI67v6+N7qXJEvQuIGa99l4xsCruSYOVSQ0uPANn4dAzm8lkYPaKLrrijLq7x23w==}
|
||||
engines: {node: '>= 0.4'}
|
||||
|
||||
is-data-view@1.0.2:
|
||||
resolution: {integrity: sha512-RKtWF8pGmS87i2D6gqQu/l7EYRlVdfzemCJN/P3UOs//x1QE7mfhvzHIApBTRf7axvT6DMGwSwBXYCT0nfB9xw==}
|
||||
engines: {node: '>= 0.4'}
|
||||
@@ -10144,6 +10148,11 @@ packages:
|
||||
resolution: {integrity: sha512-X2UW6Nw3n/aMgDVy+0rSqgHlv39WZAlZrXCdnbyEiKm17DSqHX4MmQMaST3FbeWR5FTuRcUwYAziZajji0Y7mg==}
|
||||
engines: {node: '>=10'}
|
||||
|
||||
resolve@1.22.10:
|
||||
resolution: {integrity: sha512-NPRy+/ncIMeDlTAsuqwKIiferiawhefFJtkNSW0qZJEqMEb+qBt/77B/jGeeek+F0uOeN05CDa6HXbbIgtVX4w==}
|
||||
engines: {node: '>= 0.4'}
|
||||
hasBin: true
|
||||
|
||||
resolve@1.22.2:
|
||||
resolution: {integrity: sha512-Sb+mjNHOULsBv818T40qSPeRiuWLyaGMa5ewydRLFimneixmVy2zdivRl+AF6jaYPC8ERxGDmFSiqui6SfPd+g==}
|
||||
hasBin: true
|
||||
@@ -13434,7 +13443,7 @@ snapshots:
|
||||
dependencies:
|
||||
'@babel/helper-validator-identifier': 7.25.9
|
||||
js-tokens: 4.0.0
|
||||
picocolors: 1.0.0
|
||||
picocolors: 1.1.1
|
||||
|
||||
'@babel/compat-data@7.26.3': {}
|
||||
|
||||
@@ -14740,7 +14749,7 @@ snapshots:
|
||||
fast-glob: 3.3.2
|
||||
is-glob: 4.0.3
|
||||
open: 9.1.0
|
||||
picocolors: 1.0.0
|
||||
picocolors: 1.1.1
|
||||
tslib: 2.8.1
|
||||
|
||||
'@protobufjs/aspromise@1.1.2': {}
|
||||
@@ -15428,7 +15437,7 @@ snapshots:
|
||||
'@types/resolve': 1.20.2
|
||||
deepmerge: 4.3.1
|
||||
is-module: 1.0.0
|
||||
resolve: 1.22.2
|
||||
resolve: 1.22.10
|
||||
optionalDependencies:
|
||||
rollup: 4.28.1
|
||||
|
||||
@@ -15977,7 +15986,7 @@ snapshots:
|
||||
optionalDependencies:
|
||||
chokidar: 3.6.0
|
||||
|
||||
'@swc/core-darwin-arm64@1.10.1':
|
||||
'@swc/core-darwin-arm64@1.10.4':
|
||||
optional: true
|
||||
|
||||
'@swc/core-darwin-arm64@1.9.1':
|
||||
@@ -15986,7 +15995,7 @@ snapshots:
|
||||
'@swc/core-darwin-arm64@1.9.2':
|
||||
optional: true
|
||||
|
||||
'@swc/core-darwin-x64@1.10.1':
|
||||
'@swc/core-darwin-x64@1.10.4':
|
||||
optional: true
|
||||
|
||||
'@swc/core-darwin-x64@1.9.1':
|
||||
@@ -15995,7 +16004,7 @@ snapshots:
|
||||
'@swc/core-darwin-x64@1.9.2':
|
||||
optional: true
|
||||
|
||||
'@swc/core-linux-arm-gnueabihf@1.10.1':
|
||||
'@swc/core-linux-arm-gnueabihf@1.10.4':
|
||||
optional: true
|
||||
|
||||
'@swc/core-linux-arm-gnueabihf@1.9.1':
|
||||
@@ -16004,7 +16013,7 @@ snapshots:
|
||||
'@swc/core-linux-arm-gnueabihf@1.9.2':
|
||||
optional: true
|
||||
|
||||
'@swc/core-linux-arm64-gnu@1.10.1':
|
||||
'@swc/core-linux-arm64-gnu@1.10.4':
|
||||
optional: true
|
||||
|
||||
'@swc/core-linux-arm64-gnu@1.9.1':
|
||||
@@ -16013,7 +16022,7 @@ snapshots:
|
||||
'@swc/core-linux-arm64-gnu@1.9.2':
|
||||
optional: true
|
||||
|
||||
'@swc/core-linux-arm64-musl@1.10.1':
|
||||
'@swc/core-linux-arm64-musl@1.10.4':
|
||||
optional: true
|
||||
|
||||
'@swc/core-linux-arm64-musl@1.9.1':
|
||||
@@ -16022,7 +16031,7 @@ snapshots:
|
||||
'@swc/core-linux-arm64-musl@1.9.2':
|
||||
optional: true
|
||||
|
||||
'@swc/core-linux-x64-gnu@1.10.1':
|
||||
'@swc/core-linux-x64-gnu@1.10.4':
|
||||
optional: true
|
||||
|
||||
'@swc/core-linux-x64-gnu@1.9.1':
|
||||
@@ -16031,7 +16040,7 @@ snapshots:
|
||||
'@swc/core-linux-x64-gnu@1.9.2':
|
||||
optional: true
|
||||
|
||||
'@swc/core-linux-x64-musl@1.10.1':
|
||||
'@swc/core-linux-x64-musl@1.10.4':
|
||||
optional: true
|
||||
|
||||
'@swc/core-linux-x64-musl@1.9.1':
|
||||
@@ -16040,7 +16049,7 @@ snapshots:
|
||||
'@swc/core-linux-x64-musl@1.9.2':
|
||||
optional: true
|
||||
|
||||
'@swc/core-win32-arm64-msvc@1.10.1':
|
||||
'@swc/core-win32-arm64-msvc@1.10.4':
|
||||
optional: true
|
||||
|
||||
'@swc/core-win32-arm64-msvc@1.9.1':
|
||||
@@ -16049,7 +16058,7 @@ snapshots:
|
||||
'@swc/core-win32-arm64-msvc@1.9.2':
|
||||
optional: true
|
||||
|
||||
'@swc/core-win32-ia32-msvc@1.10.1':
|
||||
'@swc/core-win32-ia32-msvc@1.10.4':
|
||||
optional: true
|
||||
|
||||
'@swc/core-win32-ia32-msvc@1.9.1':
|
||||
@@ -16058,7 +16067,7 @@ snapshots:
|
||||
'@swc/core-win32-ia32-msvc@1.9.2':
|
||||
optional: true
|
||||
|
||||
'@swc/core-win32-x64-msvc@1.10.1':
|
||||
'@swc/core-win32-x64-msvc@1.10.4':
|
||||
optional: true
|
||||
|
||||
'@swc/core-win32-x64-msvc@1.9.1':
|
||||
@@ -16067,21 +16076,21 @@ snapshots:
|
||||
'@swc/core-win32-x64-msvc@1.9.2':
|
||||
optional: true
|
||||
|
||||
'@swc/core@1.10.1(@swc/helpers@0.5.15)':
|
||||
'@swc/core@1.10.4(@swc/helpers@0.5.15)':
|
||||
dependencies:
|
||||
'@swc/counter': 0.1.3
|
||||
'@swc/types': 0.1.17
|
||||
optionalDependencies:
|
||||
'@swc/core-darwin-arm64': 1.10.1
|
||||
'@swc/core-darwin-x64': 1.10.1
|
||||
'@swc/core-linux-arm-gnueabihf': 1.10.1
|
||||
'@swc/core-linux-arm64-gnu': 1.10.1
|
||||
'@swc/core-linux-arm64-musl': 1.10.1
|
||||
'@swc/core-linux-x64-gnu': 1.10.1
|
||||
'@swc/core-linux-x64-musl': 1.10.1
|
||||
'@swc/core-win32-arm64-msvc': 1.10.1
|
||||
'@swc/core-win32-ia32-msvc': 1.10.1
|
||||
'@swc/core-win32-x64-msvc': 1.10.1
|
||||
'@swc/core-darwin-arm64': 1.10.4
|
||||
'@swc/core-darwin-x64': 1.10.4
|
||||
'@swc/core-linux-arm-gnueabihf': 1.10.4
|
||||
'@swc/core-linux-arm64-gnu': 1.10.4
|
||||
'@swc/core-linux-arm64-musl': 1.10.4
|
||||
'@swc/core-linux-x64-gnu': 1.10.4
|
||||
'@swc/core-linux-x64-musl': 1.10.4
|
||||
'@swc/core-win32-arm64-msvc': 1.10.4
|
||||
'@swc/core-win32-ia32-msvc': 1.10.4
|
||||
'@swc/core-win32-x64-msvc': 1.10.4
|
||||
'@swc/helpers': 0.5.15
|
||||
|
||||
'@swc/core@1.9.1(@swc/helpers@0.5.15)':
|
||||
@@ -16944,7 +16953,7 @@ snapshots:
|
||||
|
||||
ansi-regex@5.0.1: {}
|
||||
|
||||
ansi-regex@6.0.1: {}
|
||||
ansi-regex@6.1.0: {}
|
||||
|
||||
ansi-styles@3.2.1:
|
||||
dependencies:
|
||||
@@ -17265,7 +17274,7 @@ snapshots:
|
||||
dependencies:
|
||||
node-gyp-build: 4.8.4
|
||||
|
||||
bunchee@6.0.3(typescript@5.7.2):
|
||||
bunchee@6.2.0(typescript@5.7.2):
|
||||
dependencies:
|
||||
'@rollup/plugin-commonjs': 28.0.2(rollup@4.28.1)
|
||||
'@rollup/plugin-json': 6.1.0(rollup@4.28.1)
|
||||
@@ -17273,7 +17282,7 @@ snapshots:
|
||||
'@rollup/plugin-replace': 6.0.2(rollup@4.28.1)
|
||||
'@rollup/plugin-wasm': 6.2.2(rollup@4.28.1)
|
||||
'@rollup/pluginutils': 5.1.4(rollup@4.28.1)
|
||||
'@swc/core': 1.10.1(@swc/helpers@0.5.15)
|
||||
'@swc/core': 1.10.4(@swc/helpers@0.5.15)
|
||||
'@swc/helpers': 0.5.15
|
||||
clean-css: 5.3.3
|
||||
glob: 11.0.0
|
||||
@@ -17283,7 +17292,7 @@ snapshots:
|
||||
pretty-bytes: 5.6.0
|
||||
rollup: 4.28.1
|
||||
rollup-plugin-dts: 6.1.1(rollup@4.28.1)(typescript@5.7.2)
|
||||
rollup-plugin-swc3: 0.11.2(@swc/core@1.10.1(@swc/helpers@0.5.15))(rollup@4.28.1)
|
||||
rollup-plugin-swc3: 0.11.2(@swc/core@1.10.4(@swc/helpers@0.5.15))(rollup@4.28.1)
|
||||
rollup-preserve-directives: 1.1.3(rollup@4.28.1)
|
||||
tslib: 2.8.1
|
||||
yargs: 17.7.2
|
||||
@@ -17407,6 +17416,8 @@ snapshots:
|
||||
|
||||
chalk@5.3.0: {}
|
||||
|
||||
chalk@5.4.1: {}
|
||||
|
||||
character-entities-html4@2.1.0: {}
|
||||
|
||||
character-entities-legacy@1.1.4: {}
|
||||
@@ -18301,8 +18312,6 @@ snapshots:
|
||||
'@esbuild/win32-ia32': 0.24.0
|
||||
'@esbuild/win32-x64': 0.24.0
|
||||
|
||||
escalade@3.1.1: {}
|
||||
|
||||
escalade@3.2.0: {}
|
||||
|
||||
escape-string-regexp@1.0.5: {}
|
||||
@@ -18368,7 +18377,7 @@ snapshots:
|
||||
dependencies:
|
||||
debug: 3.2.7
|
||||
is-core-module: 2.16.0
|
||||
resolve: 1.22.9
|
||||
resolve: 1.22.10
|
||||
transitivePeerDependencies:
|
||||
- supports-color
|
||||
|
||||
@@ -18564,10 +18573,9 @@ snapshots:
|
||||
dependencies:
|
||||
estraverse: 5.3.0
|
||||
|
||||
esrap@1.3.1:
|
||||
esrap@1.3.2:
|
||||
dependencies:
|
||||
'@jridgewell/sourcemap-codec': 1.5.0
|
||||
'@typescript-eslint/types': 8.18.1
|
||||
|
||||
esrecurse@4.3.0:
|
||||
dependencies:
|
||||
@@ -18794,7 +18802,7 @@ snapshots:
|
||||
enhanced-resolve: 5.17.1
|
||||
module-definition: 6.0.0
|
||||
module-lookup-amd: 9.0.2
|
||||
resolve: 1.22.9
|
||||
resolve: 1.22.10
|
||||
resolve-dependency-path: 4.0.0
|
||||
sass-lookup: 6.0.1
|
||||
stylus-lookup: 6.0.0
|
||||
@@ -19790,6 +19798,10 @@ snapshots:
|
||||
dependencies:
|
||||
hasown: 2.0.2
|
||||
|
||||
is-core-module@2.16.1:
|
||||
dependencies:
|
||||
hasown: 2.0.2
|
||||
|
||||
is-data-view@1.0.2:
|
||||
dependencies:
|
||||
call-bound: 1.0.3
|
||||
@@ -20284,7 +20296,7 @@ snapshots:
|
||||
|
||||
log-symbols@6.0.0:
|
||||
dependencies:
|
||||
chalk: 5.3.0
|
||||
chalk: 5.4.1
|
||||
is-unicode-supported: 1.3.0
|
||||
|
||||
log-update@6.1.0:
|
||||
@@ -21643,7 +21655,7 @@ snapshots:
|
||||
normalize-package-data@2.5.0:
|
||||
dependencies:
|
||||
hosted-git-info: 2.8.9
|
||||
resolve: 1.22.2
|
||||
resolve: 1.22.10
|
||||
semver: 5.7.2
|
||||
validate-npm-package-license: 3.0.4
|
||||
|
||||
@@ -21911,7 +21923,7 @@ snapshots:
|
||||
|
||||
ora@8.1.1:
|
||||
dependencies:
|
||||
chalk: 5.3.0
|
||||
chalk: 5.4.1
|
||||
cli-cursor: 5.0.0
|
||||
cli-spinners: 2.9.2
|
||||
is-interactive: 2.0.0
|
||||
@@ -22936,6 +22948,12 @@ snapshots:
|
||||
|
||||
resolve.exports@2.0.2: {}
|
||||
|
||||
resolve@1.22.10:
|
||||
dependencies:
|
||||
is-core-module: 2.16.1
|
||||
path-parse: 1.0.7
|
||||
supports-preserve-symlinks-flag: 1.0.0
|
||||
|
||||
resolve@1.22.2:
|
||||
dependencies:
|
||||
is-core-module: 2.12.1
|
||||
@@ -23004,11 +23022,11 @@ snapshots:
|
||||
dependencies:
|
||||
rollup-plugin-inject: 3.0.2
|
||||
|
||||
rollup-plugin-swc3@0.11.2(@swc/core@1.10.1(@swc/helpers@0.5.15))(rollup@4.28.1):
|
||||
rollup-plugin-swc3@0.11.2(@swc/core@1.10.4(@swc/helpers@0.5.15))(rollup@4.28.1):
|
||||
dependencies:
|
||||
'@fastify/deepmerge': 1.3.0
|
||||
'@rollup/pluginutils': 5.1.4(rollup@4.28.1)
|
||||
'@swc/core': 1.10.1(@swc/helpers@0.5.15)
|
||||
'@swc/core': 1.10.4(@swc/helpers@0.5.15)
|
||||
get-tsconfig: 4.8.1
|
||||
rollup: 4.28.1
|
||||
rollup-preserve-directives: 1.1.3(rollup@4.28.1)
|
||||
@@ -23587,7 +23605,7 @@ snapshots:
|
||||
|
||||
strip-ansi@7.1.0:
|
||||
dependencies:
|
||||
ansi-regex: 6.0.1
|
||||
ansi-regex: 6.1.0
|
||||
|
||||
strip-bom-string@1.0.0: {}
|
||||
|
||||
@@ -23676,7 +23694,7 @@ snapshots:
|
||||
aria-query: 5.3.2
|
||||
axobject-query: 4.1.0
|
||||
esm-env: 1.2.1
|
||||
esrap: 1.3.1
|
||||
esrap: 1.3.2
|
||||
is-reference: 3.0.3
|
||||
locate-character: 3.0.0
|
||||
magic-string: 0.30.17
|
||||
@@ -24887,7 +24905,7 @@ snapshots:
|
||||
yargs@17.7.2:
|
||||
dependencies:
|
||||
cliui: 8.0.1
|
||||
escalade: 3.1.1
|
||||
escalade: 3.2.0
|
||||
get-caller-file: 2.0.5
|
||||
require-directory: 2.1.1
|
||||
string-width: 4.2.3
|
||||
|
||||
Reference in New Issue
Block a user