(t *testing.T)
| 354 | } |
| 355 | |
| 356 | func TestBuildInstructionsForcedChoice(t *testing.T) { |
| 357 | tools := []official.Tool{ |
| 358 | {Type: "function", Function: official.ToolFunction{Name: "bash"}}, |
| 359 | } |
| 360 | choice := &official.ToolChoice{Type: "function", Function: &official.ToolChoiceFunction{Name: "bash"}} |
| 361 | got := BuildInstructions(tools, choice) |
| 362 | if !strings.Contains(got, `MUST call the tool "bash"`) { |
| 363 | t.Fatalf("missing forced-call line: %s", got) |
| 364 | } |
| 365 | } |
| 366 | |
| 367 | func TestBuildInstructionsForcedNone(t *testing.T) { |
| 368 | tools := []official.Tool{ |
nothing calls this directly
no test coverage detected