()
| 1379 | |
| 1380 | #[test] |
| 1381 | fn test_tool_definition_serialize() { |
| 1382 | let td = ToolDefinition { |
| 1383 | name: "test".into(), |
| 1384 | description: "a test tool".into(), |
| 1385 | parameters: json!({"type": "object"}), |
| 1386 | }; |
| 1387 | let json = serde_json::to_value(&td).unwrap(); |
| 1388 | assert_eq!(json["name"], "test"); |
| 1389 | } |
| 1390 | |
| 1391 | /// Dummy executor for testing the loop mechanics. |
| 1392 | struct EchoExecutor; |