()
| 933 | |
| 934 | #[test] |
| 935 | fn test_openai_convert_messages_tool_result() { |
| 936 | let client = OpenAiClient::new("key".to_string(), "gpt-4".to_string()); |
| 937 | let msgs = vec![Message::tool_result("call-1", "output data", false)]; |
| 938 | let converted = client.convert_messages(&msgs); |
| 939 | |
| 940 | assert_eq!(converted.len(), 1); |
| 941 | assert_eq!(converted[0]["role"], "tool"); |
| 942 | assert_eq!(converted[0]["tool_call_id"], "call-1"); |
| 943 | assert_eq!(converted[0]["content"], "output data"); |
| 944 | } |
| 945 | |
| 946 | #[test] |
| 947 | fn test_openai_convert_messages_assistant_with_tool_calls() { |
nothing calls this directly
no test coverage detected