Class: Anthropic::Models::Beta::BetaRawMessageDeltaEvent
- Inherits:
-
Internal::Type::BaseModel
- Object
- Internal::Type::BaseModel
- Anthropic::Models::Beta::BetaRawMessageDeltaEvent
- Defined in:
- lib/anthropic/models/beta/beta_raw_message_delta_event.rb
Defined Under Namespace
Classes: Delta
Instance Attribute Summary collapse
-
#context_management ⇒ Anthropic::Models::Beta::BetaContextManagementResponse?
Information about context management strategies applied during the request.
- #delta ⇒ Anthropic::Models::Beta::BetaRawMessageDeltaEvent::Delta
- #type ⇒ Symbol, :message_delta
-
#usage ⇒ Anthropic::Models::Beta::BetaMessageDeltaUsage
Billing and rate-limit usage.
Instance Method Summary collapse
-
#initialize(context_management: , delta: , usage: , type: :message_delta) ⇒ void
constructor
Some parameter documentations has been truncated, see BetaRawMessageDeltaEvent for more details.
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(context_management: , delta: , usage: , type: :message_delta) ⇒ void
Some parameter documentations has been truncated, see Anthropic::Models::Beta::BetaRawMessageDeltaEvent for more details.
|
|
# File 'lib/anthropic/models/beta/beta_raw_message_delta_event.rb', line 43
|
Instance Attribute Details
#context_management ⇒ Anthropic::Models::Beta::BetaContextManagementResponse?
Information about context management strategies applied during the request
11 |
# File 'lib/anthropic/models/beta/beta_raw_message_delta_event.rb', line 11 required :context_management, -> { Anthropic::Beta::BetaContextManagementResponse }, nil?: true |
#delta ⇒ Anthropic::Models::Beta::BetaRawMessageDeltaEvent::Delta
16 |
# File 'lib/anthropic/models/beta/beta_raw_message_delta_event.rb', line 16 required :delta, -> { Anthropic::Beta::BetaRawMessageDeltaEvent::Delta } |
#type ⇒ Symbol, :message_delta
21 |
# File 'lib/anthropic/models/beta/beta_raw_message_delta_event.rb', line 21 required :type, const: :message_delta |
#usage ⇒ Anthropic::Models::Beta::BetaMessageDeltaUsage
Billing and rate-limit usage.
Anthropic's API bills and rate-limits by token counts, as tokens represent the underlying cost to our systems.
Under the hood, the API transforms requests into a format suitable for the
model. The model's output then goes through a parsing stage before becoming an
API response. As a result, the token counts in usage will not match one-to-one
with the exact visible content of an API request or response.
For example, output_tokens will be non-zero, even for an empty string response
from Claude.
Total input tokens in a request is the summation of input_tokens,
cache_creation_input_tokens, and cache_read_input_tokens.
41 |
# File 'lib/anthropic/models/beta/beta_raw_message_delta_event.rb', line 41 required :usage, -> { Anthropic::Beta::BetaMessageDeltaUsage } |