Convert response to an assistant message.
(self)
| 170 | return len(self.tool_calls) > 0 |
| 171 | |
| 172 | def to_message(self) -> Message: |
| 173 | """Convert response to an assistant message.""" |
| 174 | return Message.assistant( |
| 175 | content=self.content, |
| 176 | tool_calls=self.tool_calls |
| 177 | ) |
| 178 | |
| 179 | def to_dict(self) -> dict: |
| 180 | """Convert to dictionary representation.""" |
no test coverage detected