-
Notifications
You must be signed in to change notification settings - Fork 0
/
graph.ts
55 lines (53 loc) · 1.07 KB
/
graph.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
import {GraphDefinition} from "./types";
import * as fs from "node:fs";
export const graphDefinition: GraphDefinition = {
initState: {
init__query: "Set a timer for the time it takes a golark to boil. Research if unsure.",
},
entryPoint: "model",
nodes: [
{
type: "model",
id: "model",
model: "gpt-3.5-turbo-0613",
temperature: 0,
},
{
type: "tool",
id: "dummySearchForInfo",
},
{
type: "tool",
id: "dummySetATimer",
},
],
edges: [
{
from: "model",
to: [
"dummySearchForInfo",
"dummySetATimer",
],
router: "router",
},
{
from: "dummySearchForInfo",
to: "model"
},
{
from: "dummySetATimer",
to: "model"
},
],
}
/**
* If this file is run directly, save the graph definition to a file.
*/
if (require.main === module) {
const toSave = {
$schema: 'schema.json',
...graphDefinition,
}
console.log("Saving graph definition to graph.json");
fs.writeFileSync("graph.json", JSON.stringify(toSave, null, 2));
}