File tree Expand file tree Collapse file tree 3 files changed +56
-0
lines changed Expand file tree Collapse file tree 3 files changed +56
-0
lines changed Original file line number Diff line number Diff line change @@ -640,6 +640,13 @@ func TestCase(t *testing.T) {
640
640
assert .Equal (t , "TEST RESULT CALL: 1" , x )
641
641
}
642
642
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
+
643
650
func TestContextArg (t * testing.T ) {
644
651
runner := tester .NewRunner (t )
645
652
x , err := runner .Run ("" , `{
Original file line number Diff line number Diff line change
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
+ }`
Original file line number Diff line number Diff line change
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!"
You can’t perform that action at this time.
0 commit comments