Class: Anthropic::Models::Beta::BetaManagedAgentsSessionUsage
- Inherits:
-
Internal::Type::BaseModel
- Object
- Internal::Type::BaseModel
- Anthropic::Models::Beta::BetaManagedAgentsSessionUsage
- Defined in:
- lib/anthropic/models/beta/beta_managed_agents_session_usage.rb,
sig/anthropic/models/beta/beta_managed_agents_session_usage.rbs
Instance Attribute Summary collapse
-
#active_seconds ⇒ Float?
Cumulative time in seconds during which the session had at least one thread in running status.
-
#cache_creation ⇒ Anthropic::Models::Beta::BetaManagedAgentsCacheCreationUsage?
Tokens used to create prompt cache entries, broken down by cache TTL.
-
#cache_read_input_tokens ⇒ Integer?
Total tokens read from prompt cache.
-
#input_tokens ⇒ Integer?
Total input tokens consumed across all turns.
-
#list_cost ⇒ Anthropic::Models::BetaMonetaryAmount?
Cumulative list cost of the session across all turns, priced at public list rates.
-
#output_tokens ⇒ Integer?
Total output tokens generated across all turns.
-
#server_tool_use ⇒ Anthropic::Models::Beta::BetaManagedAgentsServerToolUsage?
Cumulative server-executed tool usage across all turns.
Instance Method Summary collapse
-
#initialize ⇒ BetaManagedAgentsSessionUsage
constructor
A new instance of BetaManagedAgentsSessionUsage.
- #to_hash ⇒ { active_seconds: Float, cache_creation: Anthropic::Beta::BetaManagedAgentsCacheCreationUsage, cache_read_input_tokens: Integer, input_tokens: Integer, list_cost: Anthropic::BetaMonetaryAmount?, output_tokens: Integer, server_tool_use: Anthropic::Beta::BetaManagedAgentsServerToolUsage? }
Methods inherited from Internal::Type::BaseModel
==, #==, #[], coerce, #deconstruct_keys, #deep_to_h, dump, fields, hash, #hash, inherited, inspect, #inspect, known_fields, optional, recursively_to_h, required, #to_h, #to_json, #to_s, to_sorbet_type, #to_yaml
Methods included from Internal::Type::Converter
#coerce, coerce, #dump, dump, inspect, #inspect, meta_info, new_coerce_state, type_info
Methods included from Internal::Util::SorbetRuntimeSupport
#const_missing, #define_sorbet_constant!, #sorbet_constant_defined?, #to_sorbet_type, to_sorbet_type
Constructor Details
#initialize ⇒ BetaManagedAgentsSessionUsage
Returns a new instance of BetaManagedAgentsSessionUsage.
44 45 46 47 48 49 50 51 52 |
# File 'sig/anthropic/models/beta/beta_managed_agents_session_usage.rbs', line 44
def initialize: (
?active_seconds: Float,
?cache_creation: Anthropic::Beta::BetaManagedAgentsCacheCreationUsage,
?cache_read_input_tokens: Integer,
?input_tokens: Integer,
?list_cost: Anthropic::BetaMonetaryAmount?,
?output_tokens: Integer,
?server_tool_use: Anthropic::Beta::BetaManagedAgentsServerToolUsage?
) -> void
|
Instance Attribute Details
#active_seconds ⇒ Float?
Cumulative time in seconds during which the session had at least one thread in
running status. Overlapping activity from concurrent threads is counted once,
unlike stats.active_seconds, which sums each thread's own active time. This is
the duration the session's runtime cost is priced on.
14 |
# File 'lib/anthropic/models/beta/beta_managed_agents_session_usage.rb', line 14 optional :active_seconds, Float |
#cache_creation ⇒ Anthropic::Models::Beta::BetaManagedAgentsCacheCreationUsage?
Tokens used to create prompt cache entries, broken down by cache TTL.
20 |
# File 'lib/anthropic/models/beta/beta_managed_agents_session_usage.rb', line 20 optional :cache_creation, -> { Anthropic::Beta::BetaManagedAgentsCacheCreationUsage } |
#cache_read_input_tokens ⇒ Integer?
Total tokens read from prompt cache.
26 |
# File 'lib/anthropic/models/beta/beta_managed_agents_session_usage.rb', line 26 optional :cache_read_input_tokens, Integer |
#input_tokens ⇒ Integer?
Total input tokens consumed across all turns.
32 |
# File 'lib/anthropic/models/beta/beta_managed_agents_session_usage.rb', line 32 optional :input_tokens, Integer |
#list_cost ⇒ Anthropic::Models::BetaMonetaryAmount?
Cumulative list cost of the session across all turns, priced at public list rates. Absent until cost tracking is available for the session.
39 |
# File 'lib/anthropic/models/beta/beta_managed_agents_session_usage.rb', line 39 optional :list_cost, -> { Anthropic::BetaMonetaryAmount }, nil?: true |
#output_tokens ⇒ Integer?
Total output tokens generated across all turns.
45 |
# File 'lib/anthropic/models/beta/beta_managed_agents_session_usage.rb', line 45 optional :output_tokens, Integer |
#server_tool_use ⇒ Anthropic::Models::Beta::BetaManagedAgentsServerToolUsage?
Cumulative server-executed tool usage across all turns. Absent until server-tool tracking is available for the session.
52 |
# File 'lib/anthropic/models/beta/beta_managed_agents_session_usage.rb', line 52 optional :server_tool_use, -> { Anthropic::Beta::BetaManagedAgentsServerToolUsage }, nil?: true |
Instance Method Details
#to_hash ⇒ { active_seconds: Float, cache_creation: Anthropic::Beta::BetaManagedAgentsCacheCreationUsage, cache_read_input_tokens: Integer, input_tokens: Integer, list_cost: Anthropic::BetaMonetaryAmount?, output_tokens: Integer, server_tool_use: Anthropic::Beta::BetaManagedAgentsServerToolUsage? }
54 55 56 57 58 59 60 61 62 |
# File 'sig/anthropic/models/beta/beta_managed_agents_session_usage.rbs', line 54
def to_hash: -> {
active_seconds: Float,
cache_creation: Anthropic::Beta::BetaManagedAgentsCacheCreationUsage,
cache_read_input_tokens: Integer,
input_tokens: Integer,
list_cost: Anthropic::BetaMonetaryAmount?,
output_tokens: Integer,
server_tool_use: Anthropic::Beta::BetaManagedAgentsServerToolUsage?
}
|