Test from_dict with simple message.
(self)
| 125 | assert msg.name == "test_tool" |
| 126 | |
| 127 | def test_from_dict_simple(self): |
| 128 | """Test from_dict with simple message.""" |
| 129 | data = {"role": "user", "content": "Hello world"} |
| 130 | |
| 131 | msg = Message.from_dict(data) |
| 132 | |
| 133 | assert msg.role == MessageRole.USER |
| 134 | assert msg.content == "Hello world" |
| 135 | |
| 136 | def test_from_dict_with_tool_calls(self): |
| 137 | """Test from_dict with tool calls.""" |