Class: HermesAgent::Client::Entities::ResponseUsage
- Inherits:
-
HermesAgent::Client::Entity
- Object
- HermesAgent::Client::Entity
- HermesAgent::Client::Entities::ResponseUsage
- Defined in:
- lib/hermes_agent/client/entities/response.rb
Overview
The token usage reported for a Response (HermesAgent::Client::Entities::Response#usage). Note the
Responses API uses different field names than chat completions:
input_tokens/output_tokens rather than
prompt_tokens/completion_tokens.
Instance Method Summary collapse
-
#input_tokens ⇒ Integer?
The number of tokens in the input.
-
#output_tokens ⇒ Integer?
The number of tokens in the generated output.
-
#total_tokens ⇒ Integer?
The total number of tokens used (input plus output).
Methods inherited from HermesAgent::Client::Entity
Instance Method Details
#input_tokens ⇒ Integer?
The number of tokens in the input.
20 21 22 |
# File 'lib/hermes_agent/client/entities/response.rb', line 20 def input_tokens self["input_tokens"] end |
#output_tokens ⇒ Integer?
The number of tokens in the generated output.
28 29 30 |
# File 'lib/hermes_agent/client/entities/response.rb', line 28 def output_tokens self["output_tokens"] end |
#total_tokens ⇒ Integer?
The total number of tokens used (input plus output).
36 37 38 |
# File 'lib/hermes_agent/client/entities/response.rb', line 36 def total_tokens self["total_tokens"] end |