You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+9Lines changed: 9 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -470,6 +470,15 @@ pnpm run setup:test:db
470
470
pnpm test
471
471
```
472
472
473
+
474
+
475
+
## Running evals
476
+
477
+
The evals package loads an mcp client that then runs the index.ts file, so there is no need to rebuild between tests. You can load environment variables by prefixing the npx command. Full documentation can be found [here](https://www.mcpevals.io/docs).
description: 'Evaluates the MySQL query execution functionality',
10
+
run: async()=>{
11
+
constresult=awaitgrade(openai("gpt-4"),"Please execute the following SQL query and return the results: SELECT * FROM employees WHERE status='ACTIVE';");
12
+
returnJSON.parse(result);
13
+
}
14
+
};
15
+
16
+
constmysql_queryEval: EvalFunction={
17
+
name: 'mysql_query Tool Evaluation',
18
+
description: 'Evaluates the MySQL query tool for correct SQL generation and execution',
19
+
run: async()=>{
20
+
constresult=awaitgrade(openai("gpt-4"),"Use the mysql_query tool to select all rows from the 'users' table where isActive = 1. Provide the SQL query in the correct format.");
21
+
returnJSON.parse(result);
22
+
}
23
+
};
24
+
25
+
constmysql_queryEval: EvalFunction={
26
+
name: 'mysql_queryEval',
27
+
description: 'Evaluates the mysql_query tool',
28
+
run: async()=>{
29
+
constresult=awaitgrade(openai("gpt-4"),"Please provide a SQL query to retrieve the id, name, and email columns for all records in the users table.");
0 commit comments