Compare commits

...

7 Commits

Author SHA1 Message Date
Marcus Schiesser 701e0ac2be release 0.2.8 2024-04-12 12:43:45 +08:00
Alex Yang a285f8ba3a feat: improve ToolsFactory type (#713) 2024-04-11 21:26:14 -05:00
Alex Yang 663821cdf6 test: add openai agent stream chat (#712) 2024-04-11 19:21:02 -05:00
Alex Yang c4b95494ac fix: memory type (#711) 2024-04-11 18:11:33 -05:00
Marcus Schiesser 980fb4e5a3 release llamaindex@0.2.7 2024-04-11 14:57:01 +08:00
Alex Yang 96f8f40291 fix: agent stream (#710) 2024-04-10 23:22:11 -05:00
Alex Yang 1c698df6e0 fix: package.json version 2024-04-10 19:49:16 -05:00
34 changed files with 2750 additions and 180 deletions
-5
View File
@@ -1,5 +0,0 @@
---
"llamaindex": patch
---
Fix agent streaming with new OpenAI models
+2 -1
View File
@@ -10,8 +10,9 @@
"name": "Debug Example",
"skipFiles": ["<node_internals>/**"],
"runtimeExecutable": "pnpm",
"console": "integratedTerminal",
"cwd": "${workspaceFolder}/examples",
"runtimeArgs": ["ts-node", "${fileBasename}"]
"runtimeArgs": ["npx", "tsx", "${file}"]
}
]
}
+1 -1
View File
@@ -32,7 +32,7 @@
"@docusaurus/theme-classic": "^3.2.1",
"@docusaurus/types": "^3.2.1",
"@tsconfig/docusaurus": "^2.0.3",
"@types/node": "^18.19.31",
"@types/node": "^20.12.7",
"docusaurus-plugin-typedoc": "^0.22.0",
"typedoc": "^0.25.13",
"typedoc-plugin-markdown": "^3.17.1",
+2 -2
View File
@@ -12,12 +12,12 @@
"commander": "^11.1.0",
"dotenv": "^16.4.5",
"js-tiktoken": "^1.0.10",
"llamaindex": "workspace:latest",
"llamaindex": "latest",
"mongodb": "^6.5.0",
"pathe": "^1.1.2"
},
"devDependencies": {
"@types/node": "^18.19.31",
"@types/node": "^20.12.7",
"ts-node": "^10.9.2",
"tsx": "^4.7.2",
"typescript": "^5.4.5"
+1 -1
View File
@@ -15,7 +15,7 @@
"llamaindex": "latest"
},
"devDependencies": {
"@types/node": "^20.11.14",
"@types/node": "^20.12.7",
"ts-node": "^10.9.2",
"typescript": "^5.4.3"
}
+20
View File
@@ -1,5 +1,25 @@
# llamaindex
## 0.2.8
### Patch Changes
- Add ToolsFactory to generate agent tools
## 0.2.7
### Patch Changes
- 96f8f40: fix: agent stream
- Updated dependencies
- @llamaindex/env@0.0.7
## 0.2.6
### Patch Changes
- a3b4409: Fix agent streaming with new OpenAI models
## 0.2.5
### Patch Changes
+10 -2
View File
@@ -56,8 +56,16 @@ export class OpenAI implements LLM {
if (params.stream) {
return {
[Symbol.asyncIterator]: async function* () {
while (llmCompleteMockStorage.llmEventStream.at(-1)?.id === id) {
yield llmCompleteMockStorage.llmEventStream.shift()!["chunk"];
while (true) {
const idx = llmCompleteMockStorage.llmEventStream.findIndex(
(e) => e.id === id,
);
if (idx === -1) {
break;
}
const chunk = llmCompleteMockStorage.llmEventStream[idx].chunk;
llmCompleteMockStorage.llmEventStream.splice(idx, 1);
yield chunk;
}
},
};
+72 -3
View File
@@ -22,6 +22,14 @@ beforeEach(async () => {
llm = Settings.llm;
});
function sumNumbers({ a, b }: { a: number; b: number }) {
return `${a + b}`;
}
function divideNumbers({ a, b }: { a: number; b: number }) {
return `${a / b}`;
}
await test("llm", async (t) => {
await mockLLMEvent(t, "llm");
await t.test("llm.chat", async () => {
@@ -158,9 +166,6 @@ await test("agent", async (t) => {
});
await t.test("sum numbers", async () => {
function sumNumbers({ a, b }: { a: number; b: number }): string {
return `${a + b}`;
}
const sumFunctionTool = new FunctionTool(sumNumbers, {
name: "sumNumbers",
description: "Use this function to sum two numbers",
@@ -192,6 +197,70 @@ await test("agent", async (t) => {
});
});
await test("agent stream", async (t) => {
await mockLLMEvent(t, "agent_stream");
await t.test("sum numbers stream", async () => {
const sumJSON = {
type: "object",
properties: {
a: {
type: "number",
description: "The first number",
},
b: {
type: "number",
description: "The second number",
},
},
required: ["a", "b"],
} as const;
const divideJSON = {
type: "object",
properties: {
a: {
type: "number",
description: "The dividend",
},
b: {
type: "number",
description: "The divisor",
},
},
required: ["a", "b"],
} as const;
const functionTool = FunctionTool.from(sumNumbers, {
name: "sumNumbers",
description: "Use this function to sum two numbers",
parameters: sumJSON,
});
const functionTool2 = FunctionTool.from(divideNumbers, {
name: "divideNumbers",
description: "Use this function to divide two numbers",
parameters: divideJSON,
});
const agent = new OpenAIAgent({
tools: [functionTool, functionTool2],
});
const { response } = await agent.chat({
message: "Divide 16 by 2 then add 20",
stream: true,
});
let message = "";
for await (const chunk of response) {
message += chunk.response;
}
ok(message.includes("28"));
});
});
await test("queryEngine", async (t) => {
await mockLLMEvent(t, "queryEngine_subquestion");
await t.test("subquestion", async () => {
+16 -16
View File
@@ -1,7 +1,7 @@
{
"llmEventStart": [
{
"id": "HIDDEN",
"id": "PRESERVE_0",
"messages": [
{
"content": "What is the weather in San Francisco?",
@@ -10,7 +10,7 @@
]
},
{
"id": "HIDDEN",
"id": "PRESERVE_1",
"messages": [
{
"content": "What is the weather in San Francisco?",
@@ -43,7 +43,7 @@
]
},
{
"id": "HIDDEN",
"id": "PRESERVE_2",
"messages": [
{
"content": "My name is Alex Yang. What is my unique id?",
@@ -52,7 +52,7 @@
]
},
{
"id": "HIDDEN",
"id": "PRESERVE_3",
"messages": [
{
"content": "My name is Alex Yang. What is my unique id?",
@@ -85,7 +85,7 @@
]
},
{
"id": "HIDDEN",
"id": "PRESERVE_4",
"messages": [
{
"content": "how much is 1 + 1?",
@@ -94,7 +94,7 @@
]
},
{
"id": "HIDDEN",
"id": "PRESERVE_5",
"messages": [
{
"content": "how much is 1 + 1?",
@@ -129,7 +129,7 @@
],
"llmEventEnd": [
{
"id": "HIDDEN",
"id": "PRESERVE_0",
"response": {
"raw": {
"id": "HIDDEN",
@@ -183,7 +183,7 @@
}
},
{
"id": "HIDDEN",
"id": "PRESERVE_1",
"response": {
"raw": {
"id": "HIDDEN",
@@ -216,7 +216,7 @@
}
},
{
"id": "HIDDEN",
"id": "PRESERVE_2",
"response": {
"raw": {
"id": "HIDDEN",
@@ -270,7 +270,7 @@
}
},
{
"id": "HIDDEN",
"id": "PRESERVE_3",
"response": {
"raw": {
"id": "HIDDEN",
@@ -303,7 +303,7 @@
}
},
{
"id": "HIDDEN",
"id": "PRESERVE_4",
"response": {
"raw": {
"id": "HIDDEN",
@@ -357,7 +357,7 @@
}
},
{
"id": "HIDDEN",
"id": "PRESERVE_5",
"response": {
"raw": {
"id": "HIDDEN",
@@ -369,7 +369,7 @@
"index": 0,
"message": {
"role": "assistant",
"content": "1 + 1 is equal to 2."
"content": "The sum of 1 + 1 is 2."
},
"logprobs": null,
"finish_reason": "stop"
@@ -377,13 +377,13 @@
],
"usage": {
"prompt_tokens": 97,
"completion_tokens": 11,
"total_tokens": 108
"completion_tokens": 13,
"total_tokens": 110
},
"system_fingerprint": "HIDDEN"
},
"message": {
"content": "1 + 1 is equal to 2.",
"content": "The sum of 1 + 1 is 2.",
"role": "assistant",
"options": {}
}
File diff suppressed because it is too large Load Diff
@@ -1,7 +1,7 @@
{
"llmEventStart": [
{
"id": "HIDDEN",
"id": "PRESERVE_0",
"messages": [
{
"content": "What is the weather in San Jose?",
@@ -10,7 +10,7 @@
]
},
{
"id": "HIDDEN",
"id": "PRESERVE_1",
"messages": [
{
"content": "What is the weather in San Jose?",
@@ -45,7 +45,7 @@
],
"llmEventEnd": [
{
"id": "HIDDEN",
"id": "PRESERVE_0",
"response": {
"raw": {
"id": "HIDDEN",
@@ -99,7 +99,7 @@
}
},
{
"id": "HIDDEN",
"id": "PRESERVE_1",
"response": {
"raw": {
"id": "HIDDEN",
@@ -111,7 +111,7 @@
"index": 0,
"message": {
"role": "assistant",
"content": "The weather in San Jose is 45 degrees and sunny."
"content": "The weather in San Jose is currently 45 degrees and sunny."
},
"logprobs": null,
"finish_reason": "stop"
@@ -119,13 +119,13 @@
],
"usage": {
"prompt_tokens": 78,
"completion_tokens": 13,
"total_tokens": 91
"completion_tokens": 14,
"total_tokens": 92
},
"system_fingerprint": "HIDDEN"
},
"message": {
"content": "The weather in San Jose is 45 degrees and sunny.",
"content": "The weather in San Jose is currently 45 degrees and sunny.",
"role": "assistant",
"options": {}
}
+13 -13
View File
@@ -1,7 +1,7 @@
{
"llmEventStart": [
{
"id": "HIDDEN",
"id": "PRESERVE_0",
"messages": [
{
"content": "Hello",
@@ -10,7 +10,7 @@
]
},
{
"id": "HIDDEN",
"id": "PRESERVE_1",
"messages": [
{
"content": "hello",
@@ -21,7 +21,7 @@
],
"llmEventEnd": [
{
"id": "HIDDEN",
"id": "PRESERVE_0",
"response": {
"raw": {
"id": "HIDDEN",
@@ -54,7 +54,7 @@
}
},
{
"id": "HIDDEN",
"id": "PRESERVE_1",
"response": {
"raw": [
{
@@ -257,7 +257,7 @@
],
"llmEventStream": [
{
"id": "HIDDEN",
"id": "PRESERVE_1",
"chunk": {
"raw": {
"id": "HIDDEN",
@@ -281,7 +281,7 @@
}
},
{
"id": "HIDDEN",
"id": "PRESERVE_1",
"chunk": {
"raw": {
"id": "HIDDEN",
@@ -305,7 +305,7 @@
}
},
{
"id": "HIDDEN",
"id": "PRESERVE_1",
"chunk": {
"raw": {
"id": "HIDDEN",
@@ -329,7 +329,7 @@
}
},
{
"id": "HIDDEN",
"id": "PRESERVE_1",
"chunk": {
"raw": {
"id": "HIDDEN",
@@ -353,7 +353,7 @@
}
},
{
"id": "HIDDEN",
"id": "PRESERVE_1",
"chunk": {
"raw": {
"id": "HIDDEN",
@@ -377,7 +377,7 @@
}
},
{
"id": "HIDDEN",
"id": "PRESERVE_1",
"chunk": {
"raw": {
"id": "HIDDEN",
@@ -401,7 +401,7 @@
}
},
{
"id": "HIDDEN",
"id": "PRESERVE_1",
"chunk": {
"raw": {
"id": "HIDDEN",
@@ -425,7 +425,7 @@
}
},
{
"id": "HIDDEN",
"id": "PRESERVE_1",
"chunk": {
"raw": {
"id": "HIDDEN",
@@ -449,7 +449,7 @@
}
},
{
"id": "HIDDEN",
"id": "PRESERVE_1",
"chunk": {
"raw": {
"id": "HIDDEN",
@@ -1,7 +1,7 @@
{
"llmEventStart": [
{
"id": "HIDDEN",
"id": "PRESERVE_0",
"messages": [
{
"content": "Given a user question, and a list of tools, output a list of relevant sub-questions that when composed can help answer the full user question:\n\n# Example 1\n<Tools>\n```json\n{\n \"uber_10k\": \"Provides information about Uber financials for year 2021\",\n \"lyft_10k\": \"Provides information about Lyft financials for year 2021\"\n}\n```\n\n<User Question>\nCompare and contrast the revenue growth and EBITDA of Uber and Lyft for year 2021\n\n<Output>\n```json\n[\n {\n \"subQuestion\": \"What is the revenue growth of Uber\",\n \"toolName\": \"uber_10k\"\n },\n {\n \"subQuestion\": \"What is the EBITDA of Uber\",\n \"toolName\": \"uber_10k\"\n },\n {\n \"subQuestion\": \"What is the revenue growth of Lyft\",\n \"toolName\": \"lyft_10k\"\n },\n {\n \"subQuestion\": \"What is the EBITDA of Lyft\",\n \"toolName\": \"lyft_10k\"\n }\n]\n```\n\n# Example 2\n<Tools>\n```json\n{\n \"bill_gates_idea\": \"Get what Bill Gates idea from.\"\n}\n```\n\n<User Question>\nWhat did Bill Gates steal from?\n\n<Output>\n",
@@ -10,7 +10,7 @@
]
},
{
"id": "HIDDEN",
"id": "PRESERVE_1",
"messages": [
{
"content": "Context information is below.\n---------------------\nBill Gates stole from Apple. Steve Jobs stole from Xerox.\n---------------------\nGiven the context information and not prior knowledge, answer the query.\nQuery: What is Bill Gates' idea\nAnswer:",
@@ -19,7 +19,7 @@
]
},
{
"id": "HIDDEN",
"id": "PRESERVE_2",
"messages": [
{
"content": "Context information is below.\n---------------------\nSub question: What is Bill Gates' idea\nResponse: Bill Gates' idea was to steal from Apple.\n---------------------\nGiven the context information and not prior knowledge, answer the query.\nQuery: What did Bill Gates steal from?\nAnswer:",
@@ -30,7 +30,7 @@
],
"llmEventEnd": [
{
"id": "HIDDEN",
"id": "PRESERVE_0",
"response": {
"raw": {
"id": "HIDDEN",
@@ -63,7 +63,7 @@
}
},
{
"id": "HIDDEN",
"id": "PRESERVE_1",
"response": {
"raw": {
"id": "HIDDEN",
@@ -96,7 +96,7 @@
}
},
{
"id": "HIDDEN",
"id": "PRESERVE_2",
"response": {
"raw": {
"id": "HIDDEN",
+19 -4
View File
@@ -27,6 +27,8 @@ export async function mockLLMEvent(
t: Parameters<NonNullable<Parameters<typeof test>[0]>>[0],
snapshotName: string,
) {
const idMap = new Map<string, string>();
let counter = 0;
const newLLMCompleteMockStorage: MockStorage = {
llmEventStart: [],
llmEventEnd: [],
@@ -34,15 +36,28 @@ export async function mockLLMEvent(
};
function captureLLMStart(event: LLMStartEvent) {
newLLMCompleteMockStorage.llmEventStart.push(event.detail.payload);
idMap.set(event.detail.payload.id, `PRESERVE_${counter++}`);
newLLMCompleteMockStorage.llmEventStart.push({
...event.detail.payload,
// @ts-expect-error id is not UUID, but it is fine for testing
id: idMap.get(event.detail.payload.id)!,
});
}
function captureLLMEnd(event: LLMEndEvent) {
newLLMCompleteMockStorage.llmEventEnd.push(event.detail.payload);
newLLMCompleteMockStorage.llmEventEnd.push({
...event.detail.payload,
// @ts-expect-error id is not UUID, but it is fine for testing
id: idMap.get(event.detail.payload.id)!,
});
}
function captureLLMStream(event: LLMStreamEvent) {
newLLMCompleteMockStorage.llmEventStream.push(event.detail.payload);
newLLMCompleteMockStorage.llmEventStream.push({
...event.detail.payload,
// @ts-expect-error id is not UUID, but it is fine for testing
id: idMap.get(event.detail.payload.id)!,
});
}
await readFile(join(testRootDir, "snapshot", `${snapshotName}.snap`), {
@@ -77,7 +92,7 @@ export async function mockLLMEvent(
// eslint-disable-next-line turbo/no-undeclared-env-vars
if (process.env.UPDATE_SNAPSHOT === "1") {
const data = JSON.stringify(newLLMCompleteMockStorage, null, 2)
.replace(/"id": ".*"/g, `"id": "HIDDEN"`)
.replace(/"id": "(?!PRESERVE_).*"/g, '"id": "HIDDEN"')
.replace(/"created": \d+/g, `"created": 114514`)
.replace(
/"system_fingerprint": ".*"/g,
+2 -1
View File
@@ -5,7 +5,8 @@
"type": "module",
"scripts": {
"e2e": "node --import tsx --import ./mock-register.js --test ./node/*.e2e.ts",
"e2e:nomock": "node --import tsx --test ./node/*.e2e.ts"
"e2e:nomock": "node --import tsx --test ./node/*.e2e.ts",
"e2e:updatesnap": "UPDATE_SNAPSHOT=1 node --import tsx --test ./node/*.e2e.ts"
},
"devDependencies": {
"@faker-js/faker": "^8.4.1",
+2 -2
View File
@@ -1,6 +1,6 @@
{
"name": "llamaindex",
"version": "0.2.5",
"version": "0.2.8",
"expectedMinorVersion": "2",
"license": "MIT",
"type": "module",
@@ -16,7 +16,7 @@
"@pinecone-database/pinecone": "^2.2.0",
"@qdrant/js-client-rest": "^1.8.2",
"@types/lodash": "^4.17.0",
"@types/node": "^18.19.31",
"@types/node": "^20.12.7",
"@types/papaparse": "^5.3.14",
"@types/pg": "^8.11.5",
"@xenova/transformers": "^2.16.1",
+2 -1
View File
@@ -1,6 +1,7 @@
import { Settings } from "../../Settings.js";
import type { ChatMessage } from "../../llm/index.js";
import { OpenAI } from "../../llm/index.js";
import type { BaseMemory } from "../../memory/types.js";
import type { ObjectRetriever } from "../../objects/base.js";
import type { BaseTool } from "../../types.js";
import { AgentRunner } from "../runner/base.js";
@@ -9,7 +10,7 @@ import { OpenAIAgentWorker } from "./worker.js";
type OpenAIAgentParams = {
tools?: BaseTool[];
llm?: OpenAI;
memory?: any;
memory?: BaseMemory;
prefixMessages?: ChatMessage[];
maxFunctionCalls?: number;
defaultToolChoice?: string;
+10 -10
View File
@@ -186,10 +186,13 @@ export class OpenAIAgentWorker
for await (const chunk of stream) {
controller.enqueue(chunk);
}
controller.close();
},
});
const [pipStream, finalStream] = responseChunkStream.tee();
const { value } = await pipStream.getReader().read();
const reader = pipStream.getReader();
const { value } = await reader.read();
reader.releaseLock();
if (value === undefined) {
throw new Error("first chunk value is undefined, this should not happen");
}
@@ -212,14 +215,16 @@ export class OpenAIAgentWorker
options: value.options,
});
} else {
const [responseStream, chunkStream] = finalStream.tee();
let content = "";
return pipeline(
finalStream.pipeThrough<Response>({
return new StreamingAgentChatResponse(
responseStream.pipeThrough<Response>({
readable: new ReadableStream({
async start(controller) {
for await (const chunk of finalStream) {
for await (const chunk of chunkStream) {
controller.enqueue(new Response(chunk.delta));
}
controller.close();
},
}),
writable: new WritableStream({
@@ -234,12 +239,7 @@ export class OpenAIAgentWorker
},
}),
}),
async (iterator: AsyncIterable<Response>) => {
return new StreamingAgentChatResponse(
iterator,
task.extraState.sources,
);
},
task.extraState.sources,
);
}
}
+2 -1
View File
@@ -1,4 +1,5 @@
import type { ChatMessage, LLM } from "../../llm/index.js";
import type { BaseMemory } from "../../memory/types.js";
import type { ObjectRetriever } from "../../objects/base.js";
import type { BaseTool } from "../../types.js";
import { AgentRunner } from "../runner/base.js";
@@ -7,7 +8,7 @@ import { ReActAgentWorker } from "./worker.js";
type ReActAgentParams = {
tools: BaseTool[];
llm?: LLM;
memory?: any;
memory?: BaseMemory;
prefixMessages?: ChatMessage[];
maxInteractions?: number;
defaultToolChoice?: string;
+1 -1
View File
@@ -161,7 +161,7 @@ export class AgentRunner extends BaseAgentRunner {
const task = this.state.getTask(taskId);
const curStep = step || this.state.getStepQueue(taskId).shift();
let curStepOutput;
let curStepOutput: TaskStepOutput;
if (!curStep) {
throw new Error(`No step found for task ${taskId}`);
+3 -2
View File
@@ -4,6 +4,7 @@ import type {
StreamingAgentChatResponse,
} from "../engines/chat/index.js";
import type { BaseMemory } from "../memory/types.js";
import type { QueryEngineParamsNonStreaming } from "../types.js";
export interface AgentWorker<ExtraParams extends object = object> {
@@ -72,7 +73,7 @@ export abstract class BaseAgent implements BaseChatEngine, BaseQueryEngine {
type TaskParams = {
taskId: string;
input: string;
memory: any;
memory: BaseMemory;
extraState: Record<string, any>;
};
@@ -84,7 +85,7 @@ export class Task {
taskId: string;
input: string;
memory: any;
memory: BaseMemory;
extraState: Record<string, any>;
constructor({ taskId, input, memory, extraState }: TaskParams) {
+43
View File
@@ -0,0 +1,43 @@
import { WikipediaTool } from "./WikipediaTool.js";
export namespace ToolsFactory {
type ToolsMap = {
[Tools.Wikipedia]: typeof WikipediaTool;
};
export enum Tools {
Wikipedia = "wikipedia.WikipediaToolSpec",
}
export async function createTool<Tool extends Tools>(
key: Tool,
...params: ConstructorParameters<ToolsMap[Tool]>
): Promise<InstanceType<ToolsMap[Tool]>> {
if (key === Tools.Wikipedia) {
return new WikipediaTool(...params) as InstanceType<ToolsMap[Tool]>;
}
throw new Error(
`Sorry! Tool ${key} is not supported yet. Options: ${params}`,
);
}
export async function createTools<const Tool extends Tools>(record: {
[key in Tool]: ConstructorParameters<ToolsMap[Tool]>[1] extends any // backward compatibility for `create-llama` script // if parameters are an array, use them as is
? ConstructorParameters<ToolsMap[Tool]>[0]
: ConstructorParameters<ToolsMap[Tool]>;
}): Promise<InstanceType<ToolsMap[Tool]>[]> {
const tools: InstanceType<ToolsMap[Tool]>[] = [];
for (const key in record) {
const params = record[key];
tools.push(
await createTool(
key,
// @ts-expect-error
Array.isArray(params) ? params : [params],
),
);
}
return tools;
}
}
+32
View File
@@ -0,0 +1,32 @@
import { ToolsFactory } from "llamaindex/tools/ToolsFactory";
import { WikipediaTool } from "llamaindex/tools/WikipediaTool";
import { assertType, describe, test } from "vitest";
describe("ToolsFactory", async () => {
test("createTool", async () => {
await ToolsFactory.createTool(ToolsFactory.Tools.Wikipedia, {
metadata: {
name: "wikipedia_tool",
description: "A tool that uses a query engine to search Wikipedia.",
},
});
});
test("createTools", async () => {
await ToolsFactory.createTools({
[ToolsFactory.Tools.Wikipedia]: {
metadata: {
name: "wikipedia_tool",
description: "A tool that uses a query engine to search Wikipedia.",
},
},
});
});
test("type", () => {
assertType<
(
key: ToolsFactory.Tools.Wikipedia,
params: ConstructorParameters<typeof WikipediaTool>[0],
) => Promise<WikipediaTool>
>(ToolsFactory.createTool<ToolsFactory.Tools.Wikipedia>);
});
});
+8
View File
@@ -0,0 +1,8 @@
# @llamaindex/edge
## 0.2.7
### Patch Changes
- Updated dependencies
- @llamaindex/env@0.0.7
@@ -1,5 +1,11 @@
# test-edge-runtime
## 0.1.2
### Patch Changes
- @llamaindex/edge@0.2.7
## 0.1.1
### Patch Changes
@@ -1,6 +1,6 @@
{
"name": "test-edge-runtime",
"version": "0.1.1",
"version": "0.1.2",
"private": true,
"scripts": {
"dev": "next dev",
+2 -2
View File
@@ -1,6 +1,6 @@
{
"name": "@llamaindex/edge",
"version": "0.2.5",
"version": "0.2.8",
"license": "MIT",
"type": "module",
"dependencies": {
@@ -15,7 +15,7 @@
"@pinecone-database/pinecone": "^2.2.0",
"@qdrant/js-client-rest": "^1.8.2",
"@types/lodash": "^4.17.0",
"@types/node": "^18.19.31",
"@types/node": "^20.12.7",
"@types/papaparse": "^5.3.14",
"@types/pg": "^8.11.5",
"@xenova/transformers": "^2.16.1",
+6
View File
@@ -1,5 +1,11 @@
# @llamaindex/env
## 0.0.7
### Patch Changes
- Add polyfill for pipeline
## 0.0.6
### Patch Changes
+2 -2
View File
@@ -1,7 +1,7 @@
{
"name": "@llamaindex/env",
"description": "environment wrapper",
"version": "0.0.6",
"version": "0.0.7",
"type": "module",
"types": "dist/type/index.d.ts",
"main": "dist/cjs/index.js",
@@ -62,7 +62,7 @@
},
"dependencies": {
"@types/lodash": "^4.14.202",
"@types/node": "^20.11.20",
"@types/node": "^20.12.7",
"lodash": "^4.17.21"
},
"peerDependencies": {
+21
View File
@@ -1,5 +1,26 @@
# @llamaindex/experimental
## 0.0.11
### Patch Changes
- Updated dependencies
- llamaindex@0.2.8
## 0.0.10
### Patch Changes
- Updated dependencies [96f8f40]
- llamaindex@0.2.7
## 0.0.9
### Patch Changes
- Updated dependencies [a3b4409]
- llamaindex@0.2.6
## 0.0.8
### Patch Changes
+1 -1
View File
@@ -7,7 +7,7 @@
"llamaindex": "workspace:*"
},
"devDependencies": {
"@types/node": "^18.19.10",
"@types/node": "^20.12.7",
"ts-node": "^10.9.2",
"typescript": "^5.4.3"
},
+2 -2
View File
@@ -1,7 +1,7 @@
{
"name": "@llamaindex/experimental",
"description": "Experimental package for LlamaIndexTS",
"version": "0.0.8",
"version": "0.0.11",
"type": "module",
"types": "dist/type/index.d.ts",
"main": "dist/cjs/index.js",
@@ -63,7 +63,7 @@
},
"dependencies": {
"@types/lodash": "^4.14.202",
"@types/node": "^20.11.20",
"@types/node": "^20.12.7",
"jsonpath": "^1.1.1",
"llamaindex": "workspace:*",
"lodash": "^4.17.21"
+1 -1
View File
@@ -4,7 +4,7 @@
"license": "MIT",
"type": "module",
"dependencies": {
"@types/node": "^18.19.14",
"@types/node": "^20.12.7",
"@assemblyscript/loader": "^0.19.9"
},
"devDependencies": {
+82 -91
View File
@@ -90,8 +90,8 @@ importers:
specifier: ^2.0.3
version: 2.0.3
'@types/node':
specifier: ^18.19.31
version: 18.19.31
specifier: ^20.12.7
version: 20.12.7
docusaurus-plugin-typedoc:
specifier: ^0.22.0
version: 0.22.0(typedoc-plugin-markdown@3.17.1)(typedoc@0.25.13)
@@ -135,7 +135,7 @@ importers:
specifier: ^1.0.10
version: 1.0.10
llamaindex:
specifier: workspace:latest
specifier: latest
version: link:../packages/core
mongodb:
specifier: ^6.5.0
@@ -145,11 +145,11 @@ importers:
version: 1.1.2
devDependencies:
'@types/node':
specifier: ^18.19.31
version: 18.19.31
specifier: ^20.12.7
version: 20.12.7
ts-node:
specifier: ^10.9.2
version: 10.9.2(@types/node@18.19.31)(typescript@5.4.5)
version: 10.9.2(@types/node@20.12.7)(typescript@5.4.5)
tsx:
specifier: ^4.7.2
version: 4.7.2
@@ -164,11 +164,11 @@ importers:
version: link:../../packages/core
devDependencies:
'@types/node':
specifier: ^20.11.14
version: 20.11.14
specifier: ^20.12.7
version: 20.12.7
ts-node:
specifier: ^10.9.2
version: 10.9.2(@types/node@20.11.14)(typescript@5.4.3)
version: 10.9.2(@types/node@20.12.7)(typescript@5.4.3)
typescript:
specifier: ^5.4.3
version: 5.4.3
@@ -209,8 +209,8 @@ importers:
specifier: ^4.17.0
version: 4.17.0
'@types/node':
specifier: ^18.19.31
version: 18.19.31
specifier: ^20.12.7
version: 20.12.7
'@types/papaparse':
specifier: ^5.3.14
version: 5.3.14
@@ -372,8 +372,8 @@ importers:
specifier: ^4.17.0
version: 4.17.0
'@types/node':
specifier: ^18.19.31
version: 18.19.31
specifier: ^20.12.7
version: 20.12.7
'@types/papaparse':
specifier: ^5.3.14
version: 5.3.14
@@ -490,8 +490,8 @@ importers:
specifier: ^4.14.202
version: 4.14.202
'@types/node':
specifier: ^20.11.20
version: 20.11.20
specifier: ^20.12.7
version: 20.12.7
lodash:
specifier: ^4.17.21
version: 4.17.21
@@ -543,8 +543,8 @@ importers:
specifier: ^4.14.202
version: 4.14.202
'@types/node':
specifier: ^20.11.20
version: 20.11.20
specifier: ^20.12.7
version: 20.12.7
jsonpath:
specifier: ^1.1.1
version: 1.1.1
@@ -582,8 +582,8 @@ importers:
specifier: ^0.19.9
version: 0.19.23
'@types/node':
specifier: ^18.19.14
version: 18.19.14
specifier: ^20.12.7
version: 20.12.7
devDependencies:
'@swc/cli':
specifier: ^0.3.9
@@ -3424,7 +3424,7 @@ packages:
engines: {node: ^8.13.0 || >=10.10.0}
dependencies:
'@grpc/proto-loader': 0.7.7
'@types/node': 18.19.31
'@types/node': 20.12.7
dev: false
/@grpc/proto-loader@0.7.12:
@@ -3505,7 +3505,7 @@ packages:
'@jest/schemas': 29.6.3
'@types/istanbul-lib-coverage': 2.0.6
'@types/istanbul-reports': 3.0.4
'@types/node': 18.19.31
'@types/node': 20.12.7
'@types/yargs': 17.0.32
chalk: 4.1.2
@@ -4602,10 +4602,6 @@ packages:
resolution: {integrity: sha512-3l1L5PzWVa7l0691TjnsZ0yOIEwG9DziSqu5IPZPlI5Dowi7z42cEym8Y35GHbgHvPcBfNxfrbxm7Cncn4nByQ==}
dev: true
/@tsconfig/node10@1.0.11:
resolution: {integrity: sha512-DcRjDCujK/kCk/cUe8Xz8ZSpm8mS3mNNpta+jGCA6USEDfktlNvm1+IuZ9eTcDbNk41BHwpHHeW+N1lKCz4zOw==}
dev: true
/@tsconfig/node10@1.0.9:
resolution: {integrity: sha512-jNsYVVxU8v5g43Erja32laIDHXeoNvFEpX33OK4d6hljo3jDhCBDhx5dhCCTMWUojscpAagGiRkBKxpdl9fxqA==}
dev: true
@@ -4631,19 +4627,19 @@ packages:
resolution: {integrity: sha512-fB3Zu92ucau0iQ0JMCFQE7b/dv8Ot07NI3KaZIkIUNXq82k4eBAqUaneXfleGY9JWskeS9y+u0nXMyspcuQrCg==}
dependencies:
'@types/connect': 3.4.38
'@types/node': 18.19.31
'@types/node': 20.12.7
/@types/bonjour@3.5.13:
resolution: {integrity: sha512-z9fJ5Im06zvUL548KvYNecEVlA7cVDkGUi6kZusb04mpyEFKCIZJvloCcmpmLaIahDpOQGHaHmG6imtPMmPXGQ==}
dependencies:
'@types/node': 18.19.31
'@types/node': 20.12.7
/@types/cacheable-request@6.0.3:
resolution: {integrity: sha512-IQ3EbTzGxIigb1I3qPZc1rWJnH0BmSKv5QYTalEwweFvyBDLSAe24zP0le/hyi7ecGfZVlIVAg4BZqb8WBwKqw==}
dependencies:
'@types/http-cache-semantics': 4.0.4
'@types/keyv': 3.1.4
'@types/node': 18.19.31
'@types/node': 20.12.7
'@types/responselike': 1.0.3
dev: true
@@ -4651,12 +4647,12 @@ packages:
resolution: {integrity: sha512-n6Cr2xS1h4uAulPRdlw6Jl6s1oG8KrVilPN2yUITEs+K48EzMJJ3W1xy8K5eWuFvjp3R74AOIGSmp2UfBJ8HFw==}
dependencies:
'@types/express-serve-static-core': 4.19.0
'@types/node': 18.19.31
'@types/node': 20.12.7
/@types/connect@3.4.38:
resolution: {integrity: sha512-K6uROf1LD88uDQqJCktA4yzL1YYAK6NgfsI0v/mTgyPKWsX1CnJ0XPSDhViejru1GcRkLWb8RlzFYJRqGUbaug==}
dependencies:
'@types/node': 18.19.31
'@types/node': 20.12.7
/@types/debug@4.1.12:
resolution: {integrity: sha512-vIChWdVG3LG1SMxEvI/AK+FWJthlrqlTu7fbrlywTkkaONwk/UAGaULXRlf8vkzFBLVm0zkMdCquhL5aOjhXPQ==}
@@ -4686,7 +4682,7 @@ packages:
/@types/express-serve-static-core@4.19.0:
resolution: {integrity: sha512-bGyep3JqPCRry1wq+O5n7oiBgGWmeIJXPjXXCo8EK0u8duZGSYar7cGqd3ML2JUsLGeB7fmc06KYo9fLGWqPvQ==}
dependencies:
'@types/node': 18.19.31
'@types/node': 20.12.7
'@types/qs': 6.9.14
'@types/range-parser': 1.2.7
'@types/send': 0.17.4
@@ -4723,7 +4719,7 @@ packages:
/@types/http-proxy@1.17.14:
resolution: {integrity: sha512-SSrD0c1OQzlFX7pGu1eXxSEjemej64aaNPRhhVYUGqXh0BtldAAx37MG8btcumvpgKyZp1F5Gn3JkktdxiFv6w==}
dependencies:
'@types/node': 18.19.31
'@types/node': 20.12.7
/@types/istanbul-lib-coverage@2.0.6:
resolution: {integrity: sha512-2QF/t/auWm0lsy8XtKVPG19v3sSOQlJe/YHZgfjb/KBBHOGSV+J2q/S671rcq9uTBrLAXmZpqJiaQbMT+zNU1w==}
@@ -4751,7 +4747,7 @@ packages:
/@types/keyv@3.1.4:
resolution: {integrity: sha512-BQ5aZNSCpj7D6K2ksrRCTmKRLEpnPvWDiLPfoGyhZ++8YtiK9d/3DBKPJgry359X/P1PfruyYwvnvwFjuEiEIg==}
dependencies:
'@types/node': 18.19.31
'@types/node': 20.12.7
dev: true
/@types/lodash-es@4.17.12:
@@ -4793,14 +4789,14 @@ packages:
/@types/node-fetch@2.6.11:
resolution: {integrity: sha512-24xFj9R5+rfQJLRyM56qh+wnVSYhyXC2tkoBndtY0U+vubqNsYXGjufB2nn8Q6gt0LrARwL6UBtMCSVCwl4B1g==}
dependencies:
'@types/node': 18.19.31
'@types/node': 20.12.7
form-data: 4.0.0
dev: false
/@types/node-forge@1.3.11:
resolution: {integrity: sha512-FQx220y22OKNTqaByeBGqHWYz4cl94tpcxeFdvBo3wjG6XPBuZ0BNgNZRV5J5TFmmcsJ4IzsLkmGRiQbnYsBEQ==}
dependencies:
'@types/node': 18.19.31
'@types/node': 20.12.7
/@types/node@12.20.55:
resolution: {integrity: sha512-J8xLz7q2OFulZ2cyGTLE1TbbZcjpno7FaN6zdJNrgAdrJ+DZzh/uFR6YrTb4C+nXakvud8Q4+rbhoIWlYQbUFQ==}
@@ -4810,25 +4806,20 @@ packages:
resolution: {integrity: sha512-w+tIMs3rq2afQdsPJlODhoUEKzFP1ayaoyl1CcnwtIlsVe7K7bA1NGm4s3PraqTLlXnbIN84zuBlxBWo1u9BLw==}
dev: true
/@types/node@18.19.14:
resolution: {integrity: sha512-EnQ4Us2rmOS64nHDWr0XqAD8DsO6f3XR6lf9UIIrZQpUzPVdN/oPuEzfDWNHSyXLvoGgjuEm/sPwFGSSs35Wtg==}
dependencies:
undici-types: 5.26.5
dev: false
/@types/node@18.19.31:
resolution: {integrity: sha512-ArgCD39YpyyrtFKIqMDvjz79jto5fcI/SVUs2HwB+f0dAzq68yqOdyaSivLiLugSziTpNXLQrVb7RZFmdZzbhA==}
dependencies:
undici-types: 5.26.5
dev: false
/@types/node@20.11.14:
resolution: {integrity: sha512-w3yWCcwULefjP9DmDDsgUskrMoOy5Z8MiwKHr1FvqGPtx7CvJzQvxD7eKpxNtklQxLruxSXWddyeRtyud0RcXQ==}
/@types/node@20.11.20:
resolution: {integrity: sha512-7/rR21OS+fq8IyHTgtLkDK949uzsa6n8BkziAKtPVpugIkO6D+/ooXMvzXxDnZrmtXVfjb1bKQafYpb8s89LOg==}
dependencies:
undici-types: 5.26.5
dev: true
/@types/node@20.11.20:
resolution: {integrity: sha512-7/rR21OS+fq8IyHTgtLkDK949uzsa6n8BkziAKtPVpugIkO6D+/ooXMvzXxDnZrmtXVfjb1bKQafYpb8s89LOg==}
/@types/node@20.12.7:
resolution: {integrity: sha512-wq0cICSkRLVaf3UGLMGItu/PtdY7oaXaI/RVU+xliKVOtRna3PRY57ZDfztpDL0n11vfymMUnXv8QwYCO7L1wg==}
dependencies:
undici-types: 5.26.5
@@ -4839,7 +4830,7 @@ packages:
/@types/papaparse@5.3.14:
resolution: {integrity: sha512-LxJ4iEFcpqc6METwp9f6BV6VVc43m6MfH0VqFosHvrUgfXiFe6ww7R3itkOQ+TCK6Y+Iv/+RnnvtRZnkc5Kc9g==}
dependencies:
'@types/node': 18.19.31
'@types/node': 20.12.7
dev: false
/@types/parse-json@4.0.2:
@@ -4848,7 +4839,7 @@ packages:
/@types/pg@8.11.5:
resolution: {integrity: sha512-2xMjVviMxneZHDHX5p5S6tsRRs7TpDHeeK7kTTMe/kAC/mRRNjWHjZg0rkiY+e17jXSZV3zJYDxXV8Cy72/Vuw==}
dependencies:
'@types/node': 18.19.31
'@types/node': 20.12.7
pg-protocol: 1.6.1
pg-types: 4.0.2
dev: false
@@ -4915,7 +4906,7 @@ packages:
/@types/responselike@1.0.3:
resolution: {integrity: sha512-H/+L+UkTV33uf49PH5pCAUBVPNj2nDBXTN+qS1dOwyyg24l3CcicicCA7ca+HMvJBZcFgl5r8e+RR6elsb4Lyw==}
dependencies:
'@types/node': 18.19.31
'@types/node': 20.12.7
dev: true
/@types/retry@0.12.0:
@@ -4924,7 +4915,7 @@ packages:
/@types/sax@1.2.7:
resolution: {integrity: sha512-rO73L89PJxeYM3s3pPPjiPgVVcymqU490g0YO5n5By0k2Erzj6tay/4lr1CHAAU4JyOWd1rpQ8bCf6cZfHU96A==}
dependencies:
'@types/node': 18.19.31
'@types/node': 20.12.7
dev: true
/@types/scheduler@0.16.8:
@@ -4943,7 +4934,7 @@ packages:
resolution: {integrity: sha512-x2EM6TJOybec7c52BX0ZspPodMsQUd5L6PRwOunVyVUhXiBSKf3AezDL8Dgvgt5o0UfKNfuA0eMLr2wLT4AiBA==}
dependencies:
'@types/mime': 1.3.5
'@types/node': 18.19.31
'@types/node': 20.12.7
/@types/serve-index@1.9.4:
resolution: {integrity: sha512-qLpGZ/c2fhSs5gnYsQxtDEq3Oy8SXPClIXkW5ghvAvsNuVSA8k+gCONcUCS/UjLEYvYps+e8uBtfgXgvhwfNug==}
@@ -4954,13 +4945,13 @@ packages:
resolution: {integrity: sha512-W8Ym+h8nhuRwaKPaDw34QUkwsGi6Rc4yYqvKFo5rm2FUEhCFbzVWrxXUxuKK8TASjWsysJY0nsmNCGhCOIsrOw==}
dependencies:
'@types/http-errors': 2.0.4
'@types/node': 18.19.31
'@types/node': 20.12.7
'@types/send': 0.17.4
/@types/sockjs@0.3.36:
resolution: {integrity: sha512-MK9V6NzAS1+Ud7JV9lJLFqW85VbC9dq3LmwZCuBe4wBDgKC0Kj/jd8Xl+nSviU+Qc3+m7umHHyHg//2KSa0a0Q==}
dependencies:
'@types/node': 18.19.31
'@types/node': 20.12.7
/@types/triple-beam@1.3.5:
resolution: {integrity: sha512-6WaYesThRMCl19iryMYP7/x2OVgCtbIVflDGFpWnb9irXI3UjYE4AzmYuiUKY1AJstGijoY+MgUszMgRxIYTYw==}
@@ -4985,7 +4976,7 @@ packages:
/@types/ws@8.5.10:
resolution: {integrity: sha512-vmQSUcfalpIq0R9q7uTo2lXs6eGIpt9wtnLdMv9LVpIjCA/+ufZRozlVoVelIYixx1ugCBKDhn89vnsEGOCx9A==}
dependencies:
'@types/node': 18.19.31
'@types/node': 20.12.7
/@types/yargs-parser@21.0.3:
resolution: {integrity: sha512-I4q9QU9MQv4oEOz4tAHJtNz1cwuLxn2F3xcc2iV5WdqLPpUnj30aUuxt1mAxYTG+oe8CZMV/+6rU4S4gRDzqtQ==}
@@ -8310,7 +8301,7 @@ packages:
resolution: {integrity: sha512-EzV94NYKoO09GLXGjXj9JIlXijVck4ONSr5wiCWDvhsvj5jxSrzTmRU/9C1DyB6uToszLs8aifA6NQ7lEQdvFw==}
engines: {node: '>= 0.8'}
dependencies:
'@types/node': 18.19.31
'@types/node': 20.12.7
require-like: 0.1.2
/event-target-shim@5.0.1:
@@ -10043,7 +10034,7 @@ packages:
engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0}
dependencies:
'@jest/types': 29.6.3
'@types/node': 18.19.31
'@types/node': 20.12.7
chalk: 4.1.2
ci-info: 3.9.0
graceful-fs: 4.2.11
@@ -10053,7 +10044,7 @@ packages:
resolution: {integrity: sha512-7vuh85V5cdDofPyxn58nrPjBktZo0u9x1g8WtjQol+jZDaE+fhN+cIvTj11GndBnMnyfrUOG1sZQxCdjKh+DKg==}
engines: {node: '>= 10.13.0'}
dependencies:
'@types/node': 18.19.31
'@types/node': 20.12.7
merge-stream: 2.0.0
supports-color: 8.1.1
@@ -10061,7 +10052,7 @@ packages:
resolution: {integrity: sha512-eIz2msL/EzL9UFTFFx7jBTkeZfku0yUAyZZZmJ93H2TYEiroIx2PQjEXcwYtYl8zXCxb+PAmA2hLIt/6ZEkPHw==}
engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0}
dependencies:
'@types/node': 18.19.31
'@types/node': 20.12.7
jest-util: 29.7.0
merge-stream: 2.0.0
supports-color: 8.1.1
@@ -13010,7 +13001,7 @@ packages:
'@protobufjs/path': 1.1.2
'@protobufjs/pool': 1.1.0
'@protobufjs/utf8': 1.1.0
'@types/node': 18.19.31
'@types/node': 20.12.7
long: 5.2.3
dev: false
@@ -14913,38 +14904,7 @@ packages:
engines: {node: '>=14.16'}
dev: true
/ts-node@10.9.2(@types/node@18.19.31)(typescript@5.4.5):
resolution: {integrity: sha512-f0FFpIdcHgn8zcPSbf1dRevwt047YMnaiJM3u2w2RewrB+fob/zePZcrOyQoLMMO7aBIddLcQIEK5dYjkLnGrQ==}
hasBin: true
peerDependencies:
'@swc/core': '>=1.2.50'
'@swc/wasm': '>=1.2.50'
'@types/node': '*'
typescript: '>=2.7'
peerDependenciesMeta:
'@swc/core':
optional: true
'@swc/wasm':
optional: true
dependencies:
'@cspotcode/source-map-support': 0.8.1
'@tsconfig/node10': 1.0.11
'@tsconfig/node12': 1.0.11
'@tsconfig/node14': 1.0.3
'@tsconfig/node16': 1.0.4
'@types/node': 18.19.31
acorn: 8.11.3
acorn-walk: 8.3.2
arg: 4.1.3
create-require: 1.1.1
diff: 4.0.2
make-error: 1.3.6
typescript: 5.4.5
v8-compile-cache-lib: 3.0.1
yn: 3.1.1
dev: true
/ts-node@10.9.2(@types/node@20.11.14)(typescript@5.4.3):
/ts-node@10.9.2(@types/node@20.12.7)(typescript@5.4.3):
resolution: {integrity: sha512-f0FFpIdcHgn8zcPSbf1dRevwt047YMnaiJM3u2w2RewrB+fob/zePZcrOyQoLMMO7aBIddLcQIEK5dYjkLnGrQ==}
hasBin: true
peerDependencies:
@@ -14963,7 +14923,7 @@ packages:
'@tsconfig/node12': 1.0.11
'@tsconfig/node14': 1.0.3
'@tsconfig/node16': 1.0.4
'@types/node': 20.11.14
'@types/node': 20.12.7
acorn: 8.11.3
acorn-walk: 8.3.2
arg: 4.1.3
@@ -14975,6 +14935,37 @@ packages:
yn: 3.1.1
dev: true
/ts-node@10.9.2(@types/node@20.12.7)(typescript@5.4.5):
resolution: {integrity: sha512-f0FFpIdcHgn8zcPSbf1dRevwt047YMnaiJM3u2w2RewrB+fob/zePZcrOyQoLMMO7aBIddLcQIEK5dYjkLnGrQ==}
hasBin: true
peerDependencies:
'@swc/core': '>=1.2.50'
'@swc/wasm': '>=1.2.50'
'@types/node': '*'
typescript: '>=2.7'
peerDependenciesMeta:
'@swc/core':
optional: true
'@swc/wasm':
optional: true
dependencies:
'@cspotcode/source-map-support': 0.8.1
'@tsconfig/node10': 1.0.9
'@tsconfig/node12': 1.0.11
'@tsconfig/node14': 1.0.3
'@tsconfig/node16': 1.0.4
'@types/node': 20.12.7
acorn: 8.11.3
acorn-walk: 8.3.2
arg: 4.1.3
create-require: 1.1.1
diff: 4.0.2
make-error: 1.3.6
typescript: 5.4.5
v8-compile-cache-lib: 3.0.1
yn: 3.1.1
dev: true
/tsconfig-paths@3.15.0:
resolution: {integrity: sha512-2Ac2RgzDe/cn48GvOe3M+o82pEFewD3UPbyoUHHdKasHwJKjds4fLXWf/Ux5kATBKN20oaFGu+jbElp1pos0mg==}
dependencies: