MCPcopy Index your code
hub / github.com/github/copilot-sdk / to_dict

Method to_dict

python/copilot/generated/rpc.py:2071–2082  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

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 = {}
2073 result["currentTokens"] = from_int(self.current_tokens)
2074 result["messagesLength"] = from_int(self.messages_length)
2075 result["tokenLimit"] = from_int(self.token_limit)
2076 if self.conversation_tokens is not None:
2077 result["conversationTokens"] = from_union([from_int, from_none], self.conversation_tokens)
2078 if self.system_tokens is not None:
2079 result["systemTokens"] = from_union([from_int, from_none], self.system_tokens)
2080 if self.tool_definitions_tokens is not None:
2081 result["toolDefinitionsTokens"] = from_union([from_int, from_none], self.tool_definitions_tokens)
2082 return result
2083
2084# Experimental: this type is part of an experimental API and may change or be removed.
2085@dataclass

Callers

nothing calls this directly

Calls 2

from_intFunction · 0.70
from_unionFunction · 0.70

Tested by

no test coverage detected