(obj: Any)
| 2059 | |
| 2060 | @staticmethod |
| 2061 | def from_dict(obj: Any) -> 'HistoryCompactContextWindow': |
| 2062 | assert isinstance(obj, dict) |
| 2063 | current_tokens = from_int(obj.get("currentTokens")) |
| 2064 | messages_length = from_int(obj.get("messagesLength")) |
| 2065 | token_limit = from_int(obj.get("tokenLimit")) |
| 2066 | conversation_tokens = from_union([from_int, from_none], obj.get("conversationTokens")) |
| 2067 | system_tokens = from_union([from_int, from_none], obj.get("systemTokens")) |
| 2068 | tool_definitions_tokens = from_union([from_int, from_none], obj.get("toolDefinitionsTokens")) |
| 2069 | return HistoryCompactContextWindow(current_tokens, messages_length, token_limit, conversation_tokens, system_tokens, tool_definitions_tokens) |
| 2070 | |
| 2071 | def to_dict(self) -> dict: |
| 2072 | result: dict = {} |
nothing calls this directly
no test coverage detected