raw_message_delta_event.py — anthropic-sdk-python Source File
Architecture documentation for raw_message_delta_event.py, a python file in the anthropic-sdk-python codebase. 6 imports, 3 dependents.
Entity Profile
Dependency Diagram
graph LR 69413c7a_3892_2c3c_ec44_39435bec1ba5["raw_message_delta_event.py"] 699c911a_fb78_b883_732f_5ac6bf31d4a3["_models"] 69413c7a_3892_2c3c_ec44_39435bec1ba5 --> 699c911a_fb78_b883_732f_5ac6bf31d4a3 f79bf88b_d25b_8452_5841_c144754741ff["stop_reason.py"] 69413c7a_3892_2c3c_ec44_39435bec1ba5 --> f79bf88b_d25b_8452_5841_c144754741ff a6c821d1_613a_0e06_9a1a_429f9e6663e9["message_delta_usage.py"] 69413c7a_3892_2c3c_ec44_39435bec1ba5 --> a6c821d1_613a_0e06_9a1a_429f9e6663e9 4c969b2c_7cf2_081b_227a_32f10d1e6bb9["MessageDeltaUsage"] 69413c7a_3892_2c3c_ec44_39435bec1ba5 --> 4c969b2c_7cf2_081b_227a_32f10d1e6bb9 89ddcdd7_3ae1_4c7b_41bb_9f1e25f16875["typing"] 69413c7a_3892_2c3c_ec44_39435bec1ba5 --> 89ddcdd7_3ae1_4c7b_41bb_9f1e25f16875 37c05070_ca59_d596_7250_de9d1939227f["typing_extensions"] 69413c7a_3892_2c3c_ec44_39435bec1ba5 --> 37c05070_ca59_d596_7250_de9d1939227f 2eb1aa7f_c778_4d68_0a26_a102fadd9638["__init__.py"] 2eb1aa7f_c778_4d68_0a26_a102fadd9638 --> 69413c7a_3892_2c3c_ec44_39435bec1ba5 bab31ff6_113c_c8f1_f9ed_0914d8a6ca13["message_delta_event.py"] bab31ff6_113c_c8f1_f9ed_0914d8a6ca13 --> 69413c7a_3892_2c3c_ec44_39435bec1ba5 3c3a350f_0c87_3b27_39ab_9a2cf8561a26["raw_message_stream_event.py"] 3c3a350f_0c87_3b27_39ab_9a2cf8561a26 --> 69413c7a_3892_2c3c_ec44_39435bec1ba5 style 69413c7a_3892_2c3c_ec44_39435bec1ba5 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
from typing import Optional
from typing_extensions import Literal
from .._models import BaseModel
from .stop_reason import StopReason
from .message_delta_usage import MessageDeltaUsage
__all__ = ["RawMessageDeltaEvent", "Delta"]
class Delta(BaseModel):
stop_reason: Optional[StopReason] = None
stop_sequence: Optional[str] = None
class RawMessageDeltaEvent(BaseModel):
delta: Delta
type: Literal["message_delta"]
usage: MessageDeltaUsage
"""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`.
"""
Domain
Classes
Dependencies
- MessageDeltaUsage
- _models
- message_delta_usage.py
- stop_reason.py
- typing
- typing_extensions
Imported By
Source
Frequently Asked Questions
What does raw_message_delta_event.py do?
raw_message_delta_event.py is a source file in the anthropic-sdk-python codebase, written in python. It belongs to the AnthropicClient domain.
What does raw_message_delta_event.py depend on?
raw_message_delta_event.py imports 6 module(s): MessageDeltaUsage, _models, message_delta_usage.py, stop_reason.py, typing, typing_extensions.
What files import raw_message_delta_event.py?
raw_message_delta_event.py is imported by 3 file(s): __init__.py, message_delta_event.py, raw_message_stream_event.py.
Where is raw_message_delta_event.py in the architecture?
raw_message_delta_event.py is located at src/anthropic/types/raw_message_delta_event.py (domain: AnthropicClient, directory: src/anthropic/types).
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free