Skip to content

change: add another test case for case insensitivity #301

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Apr 29, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions pkg/tests/runner_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -640,6 +640,13 @@ func TestCase(t *testing.T) {
assert.Equal(t, "TEST RESULT CALL: 1", x)
}

func TestCase2(t *testing.T) {
runner := tester.NewRunner(t)
x, err := runner.Run("", "")
require.NoError(t, err)
assert.Equal(t, "TEST RESULT CALL: 1", x)
}

func TestContextArg(t *testing.T) {
runner := tester.NewRunner(t)
x, err := runner.Run("", `{
Expand Down
37 changes: 37 additions & 0 deletions pkg/tests/testdata/TestCase2/call1.golden
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
`{
"Model": "gpt-4-turbo-preview",
"InternalSystemPrompt": null,
"Tools": [
{
"function": {
"toolID": "testdata/TestCase2/test.gpt:6",
"name": "bob",
"description": "I'm Bob, a friendly guy.",
"parameters": {
"properties": {
"question": {
"description": "The question to ask Bob.",
"type": "string"
}
},
"type": "object"
}
}
}
],
"Messages": [
{
"role": "system",
"content": [
{
"text": "Ask Bob how he is doing and let me know exactly what he said."
}
]
}
],
"MaxTokens": 0,
"Temperature": null,
"JSONResponse": false,
"Grammar": "",
"Cache": null
}`
12 changes: 12 additions & 0 deletions pkg/tests/testdata/TestCase2/test.gpt
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
tools: Bob

Ask Bob how he is doing and let me know exactly what he said.

---
name: bob
description: I'm Bob, a friendly guy.
args: question: The question to ask Bob.

#!/bin/bash

echo "Thanks for asking ${question}, I'm doing great fellow friendly AI tool!"