( t *testing.T, tool fantasy.AgentTool, args chatadvisor.AdvisorArgs, )
| 439 | } |
| 440 | |
| 441 | func runAdvisorTool( |
| 442 | t *testing.T, |
| 443 | tool fantasy.AgentTool, |
| 444 | args chatadvisor.AdvisorArgs, |
| 445 | ) fantasy.ToolResponse { |
| 446 | t.Helper() |
| 447 | |
| 448 | data, err := json.Marshal(args) |
| 449 | require.NoError(t, err) |
| 450 | |
| 451 | resp, err := tool.Run(t.Context(), fantasy.ToolCall{ |
| 452 | ID: "call-1", |
| 453 | Name: "advisor", |
| 454 | Input: string(data), |
| 455 | }) |
| 456 | require.NoError(t, err) |
| 457 | return resp |
| 458 | } |
no test coverage detected