MCPcopy Create free account
hub / github.com/pgadmin-org/pgadmin4 / Usage

Class Usage

web/pgadmin/llm/models.py:142–154  ·  view source on GitHub ↗

Token usage information.

Source from the content-addressed store, hash-verified

140
141@dataclass
142class Usage:
143 """Token usage information."""
144 input_tokens: int = 0
145 output_tokens: int = 0
146 total_tokens: int = 0
147
148 def to_dict(self) -> dict:
149 """Convert to dictionary representation."""
150 return {
151 'input_tokens': self.input_tokens,
152 'output_tokens': self.output_tokens,
153 'total_tokens': self.total_tokens
154 }
155
156
157@dataclass

Callers 10

_parse_responseMethod · 0.90
_read_openai_streamMethod · 0.90
_parse_responseMethod · 0.90
_read_ollama_streamMethod · 0.90
_parse_responseMethod · 0.90
_read_openai_streamMethod · 0.90
_parse_responseMethod · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected