Skip to content

Commit aec3f3a

Browse files
Merge pull request #301 from ibuildthecloud/main
change: add another test case for case insensitivity
2 parents a9927c7 + cabbc15 commit aec3f3a

File tree

3 files changed

+56
-0
lines changed

3 files changed

+56
-0
lines changed

pkg/tests/runner_test.go

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -640,6 +640,13 @@ func TestCase(t *testing.T) {
640640
assert.Equal(t, "TEST RESULT CALL: 1", x)
641641
}
642642

643+
func TestCase2(t *testing.T) {
644+
runner := tester.NewRunner(t)
645+
x, err := runner.Run("", "")
646+
require.NoError(t, err)
647+
assert.Equal(t, "TEST RESULT CALL: 1", x)
648+
}
649+
643650
func TestContextArg(t *testing.T) {
644651
runner := tester.NewRunner(t)
645652
x, err := runner.Run("", `{
Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
`{
2+
"Model": "gpt-4-turbo-preview",
3+
"InternalSystemPrompt": null,
4+
"Tools": [
5+
{
6+
"function": {
7+
"toolID": "testdata/TestCase2/test.gpt:6",
8+
"name": "bob",
9+
"description": "I'm Bob, a friendly guy.",
10+
"parameters": {
11+
"properties": {
12+
"question": {
13+
"description": "The question to ask Bob.",
14+
"type": "string"
15+
}
16+
},
17+
"type": "object"
18+
}
19+
}
20+
}
21+
],
22+
"Messages": [
23+
{
24+
"role": "system",
25+
"content": [
26+
{
27+
"text": "Ask Bob how he is doing and let me know exactly what he said."
28+
}
29+
]
30+
}
31+
],
32+
"MaxTokens": 0,
33+
"Temperature": null,
34+
"JSONResponse": false,
35+
"Grammar": "",
36+
"Cache": null
37+
}`

pkg/tests/testdata/TestCase2/test.gpt

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
tools: Bob
2+
3+
Ask Bob how he is doing and let me know exactly what he said.
4+
5+
---
6+
name: bob
7+
description: I'm Bob, a friendly guy.
8+
args: question: The question to ask Bob.
9+
10+
#!/bin/bash
11+
12+
echo "Thanks for asking ${question}, I'm doing great fellow friendly AI tool!"

0 commit comments

Comments
 (0)