File tree Expand file tree Collapse file tree 6 files changed +511
-189
lines changed Expand file tree Collapse file tree 6 files changed +511
-189
lines changed Original file line number Diff line number Diff line change
1
+ import { OpenAI , OpenAIEmbedding } from "@llamaindex/openai" ;
1
2
import { LlamaIndexServer } from "@llamaindex/server" ;
2
3
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" ;
10
5
11
6
Settings . llm = new OpenAI ( {
12
7
model : "gpt-4o-mini" ,
Original file line number Diff line number Diff line change
1
+ import { OpenAI } from "@llamaindex/openai" ;
1
2
import { LlamaIndexServer } from "@llamaindex/server" ;
2
3
import { agent } from "@llamaindex/workflow" ;
3
- import { tool } from "llamaindex" ;
4
+ import { Settings , tool } from "llamaindex" ;
4
5
import { z } from "zod" ;
5
6
7
+ Settings . llm = new OpenAI ( {
8
+ model : "gpt-4o-mini" ,
9
+ } ) ;
10
+
6
11
const weatherAgent = agent ( {
7
12
tools : [
8
13
tool ( {
Original file line number Diff line number Diff line change
1
+ import { OpenAI } from "@llamaindex/openai" ;
1
2
import { LlamaIndexServer } from "@llamaindex/server" ;
3
+ import { Settings } from "llamaindex" ;
2
4
import { workflowFactory } from "./src/app/workflow" ;
3
5
6
+ Settings . llm = new OpenAI ( {
7
+ model : "gpt-4o-mini" ,
8
+ } ) ;
9
+
4
10
new LlamaIndexServer ( {
5
11
workflow : workflowFactory ,
6
12
uiConfig : {
Original file line number Diff line number Diff line change 7
7
"dev" : " nodemon --exec tsx simple-workflow/calculator.ts"
8
8
},
9
9
"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 " ,
12
12
"@llamaindex/server" : " workspace:*" ,
13
- "@llamaindex/tools" : " 0.0.4" ,
14
- "@llamaindex/workflow" : " 1.1.0" ,
13
+ "@llamaindex/tools" : " ~0.0.11" ,
15
14
"dotenv" : " ^16.4.7" ,
16
- "llamaindex" : " 0.10.2 " ,
17
- "zod" : " ^3.23.8 "
15
+ "llamaindex" : " ~0.11.0 " ,
16
+ "zod" : " ^3.24.2 "
18
17
},
19
18
"devDependencies" : {
20
19
"@types/node" : " ^20.10.3" ,
Original file line number Diff line number Diff line change
1
+ import { OpenAI } from "@llamaindex/openai" ;
1
2
import { LlamaIndexServer } from "@llamaindex/server" ;
2
3
import { agent } from "@llamaindex/workflow" ;
3
- import { tool } from "llamaindex" ;
4
+ import { Settings , tool } from "llamaindex" ;
4
5
import { z } from "zod" ;
5
6
7
+ Settings . llm = new OpenAI ( {
8
+ model : "gpt-4o-mini" ,
9
+ } ) ;
10
+
6
11
const calculatorAgent = agent ( {
7
12
tools : [
8
13
tool ( {
You can’t perform that action at this time.
0 commit comments