Skip to content

Commit 63edd74

Browse files
authored
fix: conflict package versions in ts examples (#678)
1 parent 13a967b commit 63edd74

File tree

6 files changed

+511
-189
lines changed

6 files changed

+511
-189
lines changed

packages/server/examples/agentic-rag/index.ts

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,7 @@
1+
import { OpenAI, OpenAIEmbedding } from "@llamaindex/openai";
12
import { LlamaIndexServer } from "@llamaindex/server";
23
import { agent } from "@llamaindex/workflow";
3-
import {
4-
Document,
5-
OpenAI,
6-
OpenAIEmbedding,
7-
Settings,
8-
VectorStoreIndex,
9-
} from "llamaindex";
4+
import { Document, Settings, VectorStoreIndex } from "llamaindex";
105

116
Settings.llm = new OpenAI({
127
model: "gpt-4o-mini",

packages/server/examples/custom-layout/index.ts

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,13 @@
1+
import { OpenAI } from "@llamaindex/openai";
12
import { LlamaIndexServer } from "@llamaindex/server";
23
import { agent } from "@llamaindex/workflow";
3-
import { tool } from "llamaindex";
4+
import { Settings, tool } from "llamaindex";
45
import { z } from "zod";
56

7+
Settings.llm = new OpenAI({
8+
model: "gpt-4o-mini",
9+
});
10+
611
const weatherAgent = agent({
712
tools: [
813
tool({

packages/server/examples/devmode/index.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,12 @@
1+
import { OpenAI } from "@llamaindex/openai";
12
import { LlamaIndexServer } from "@llamaindex/server";
3+
import { Settings } from "llamaindex";
24
import { workflowFactory } from "./src/app/workflow";
35

6+
Settings.llm = new OpenAI({
7+
model: "gpt-4o-mini",
8+
});
9+
410
new LlamaIndexServer({
511
workflow: workflowFactory,
612
uiConfig: {

packages/server/examples/package.json

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,14 +7,13 @@
77
"dev": "nodemon --exec tsx simple-workflow/calculator.ts"
88
},
99
"dependencies": {
10-
"@llamaindex/openai": "^0.2.0",
11-
"@llamaindex/readers": "^3.0.0",
10+
"@llamaindex/openai": "~0.4.0",
11+
"@llamaindex/readers": "~3.1.4",
1212
"@llamaindex/server": "workspace:*",
13-
"@llamaindex/tools": "0.0.4",
14-
"@llamaindex/workflow": "1.1.0",
13+
"@llamaindex/tools": "~0.0.11",
1514
"dotenv": "^16.4.7",
16-
"llamaindex": "0.10.2",
17-
"zod": "^3.23.8"
15+
"llamaindex": "~0.11.0",
16+
"zod": "^3.24.2"
1817
},
1918
"devDependencies": {
2019
"@types/node": "^20.10.3",

packages/server/examples/simple-workflow/calculator.ts

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,13 @@
1+
import { OpenAI } from "@llamaindex/openai";
12
import { LlamaIndexServer } from "@llamaindex/server";
23
import { agent } from "@llamaindex/workflow";
3-
import { tool } from "llamaindex";
4+
import { Settings, tool } from "llamaindex";
45
import { z } from "zod";
56

7+
Settings.llm = new OpenAI({
8+
model: "gpt-4o-mini",
9+
});
10+
611
const calculatorAgent = agent({
712
tools: [
813
tool({

0 commit comments

Comments
 (0)