-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.ts
26 lines (24 loc) · 1.03 KB
/
index.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
import Agent from "./agent";
import chalk from "chalk";
const main = async () => {
const task = prompt(
"\t" + chalk.black(chalk.bgWhite("What can I help you with?\n")),
) as string;
const outputSchema = undefined;
// const instruction =
// "in the current directory theres a file called ciao.py. Read it, then fix it for me cause it does not work. Write the fixed version as fixed_ciao.py";
//const instruction = "give me the first 100 numbers.";
// const outputSchema = {
// numbers: "number[]",
// };
// const instruction =
// "Create a demo file called index.html and open it in my default browser.";
//const outputSchema = undefined;
// const instruction = "create a file in the current directory named 'hello.py' that prints hello world";
// const instruction = "Raise slightly the volume on my Linux machine.";
// const instruction = "Check the current weather in Amsterdam.";
const agent = new Agent({ task, outputSchema });
const output = await agent.run();
console.log({ output });
};
await main();