(self)
| 10677 | return HistoryCompactResult(messages_removed, success, tokens_removed, context_window, summary_content) |
| 10678 | |
| 10679 | def to_dict(self) -> dict: |
| 10680 | result: dict = {} |
| 10681 | result["messagesRemoved"] = from_int(self.messages_removed) |
| 10682 | result["success"] = from_bool(self.success) |
| 10683 | result["tokensRemoved"] = from_int(self.tokens_removed) |
| 10684 | if self.context_window is not None: |
| 10685 | result["contextWindow"] = from_union([lambda x: to_class(HistoryCompactContextWindow, x), from_none], self.context_window) |
| 10686 | if self.summary_content is not None: |
| 10687 | result["summaryContent"] = from_union([from_str, from_none], self.summary_content) |
| 10688 | return result |
| 10689 | |
| 10690 | # Experimental: this type is part of an experimental API and may change or be removed. |
| 10691 | @dataclass |
nothing calls this directly
no test coverage detected