Skip to content

Commit 7747060

Browse files
chore: add a few more tests and some more models
1 parent e51d339 commit 7747060

File tree

2 files changed

+41
-3
lines changed

2 files changed

+41
-3
lines changed
Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
import { describeAccuracyTests } from "./sdk/describe-accuracy-tests.js";
2+
import { getAvailableModels } from "./sdk/models.js";
3+
import { AccuracyTestConfig } from "./sdk/describe-accuracy-tests.js";
4+
5+
function describeListCollectionsAccuracyTests(prompt: string): AccuracyTestConfig {
6+
return {
7+
systemPrompt: "Assume that you're already connected.",
8+
prompt: prompt,
9+
mockedTools: {
10+
"list-collections": function listCollections() {
11+
return {
12+
content: [
13+
{
14+
type: "text",
15+
text: "Name: coll1",
16+
},
17+
{
18+
type: "text",
19+
text: "Name: coll1",
20+
},
21+
],
22+
};
23+
},
24+
},
25+
expectedToolCalls: [
26+
{
27+
toolName: "list-collections",
28+
parameters: { database: "db1" },
29+
},
30+
],
31+
};
32+
}
33+
34+
describeAccuracyTests("list-collections", getAvailableModels(), [
35+
describeListCollectionsAccuracyTests("How many collections do I have in database db1?"),
36+
describeListCollectionsAccuracyTests("List all the collections in my MongoDB database db1."),
37+
describeListCollectionsAccuracyTests("Is there a coll1 collection in my MongoDB database db1?"),
38+
]);

tests/accuracy/sdk/models.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ export class OllamaModel implements Model {
2626
constructor(readonly modelName: string) {}
2727

2828
isAvailable(): boolean {
29-
return false;
29+
return true;
3030
}
3131

3232
getModel() {
@@ -36,8 +36,8 @@ export class OllamaModel implements Model {
3636

3737
const ALL_TESTABLE_MODELS = [
3838
new GeminiModel("gemini-1.5-flash"),
39-
// new GeminiModel("gemini-2.0-flash"),
40-
// new OllamaModel("qwen3:latest"),
39+
new GeminiModel("gemini-2.0-flash"),
40+
new OllamaModel("qwen3:1.7b"),
4141
];
4242

4343
export type TestableModels = ReturnType<typeof getAvailableModels>;

0 commit comments

Comments
 (0)