beta_message.py — anthropic-sdk-python Source File
Architecture documentation for beta_message.py, a python file in the anthropic-sdk-python codebase. 12 imports, 3 dependents.
Entity Profile
Dependency Diagram
graph LR 20977b2a_1890_cfe8_7dca_f3846f5fda73["beta_message.py"] 8e826fa1_6d9a_3655_01ba_e446e2f3ab95["model"] 20977b2a_1890_cfe8_7dca_f3846f5fda73 --> 8e826fa1_6d9a_3655_01ba_e446e2f3ab95 c14e2467_291d_6c7c_2b25_9a24e81f8565["_models"] 20977b2a_1890_cfe8_7dca_f3846f5fda73 --> c14e2467_291d_6c7c_2b25_9a24e81f8565 46e8a7de_a05a_d9d7_1570_a70571fd7b00["beta_usage.py"] 20977b2a_1890_cfe8_7dca_f3846f5fda73 --> 46e8a7de_a05a_d9d7_1570_a70571fd7b00 ebe7ae73_c308_f5ca_225a_7053dd679376["BetaUsage"] 20977b2a_1890_cfe8_7dca_f3846f5fda73 --> ebe7ae73_c308_f5ca_225a_7053dd679376 e9543bf1_1f1f_84b9_ccad_4cb082af52ba["beta_container.py"] 20977b2a_1890_cfe8_7dca_f3846f5fda73 --> e9543bf1_1f1f_84b9_ccad_4cb082af52ba e0df8d12_9c52_fb4c_4723_0f25b7e213b4["BetaContainer"] 20977b2a_1890_cfe8_7dca_f3846f5fda73 --> e0df8d12_9c52_fb4c_4723_0f25b7e213b4 8e392c44_353c_2801_bc9a_bb37fb428417["beta_stop_reason.py"] 20977b2a_1890_cfe8_7dca_f3846f5fda73 --> 8e392c44_353c_2801_bc9a_bb37fb428417 24d3a083_86dc_200b_635d_9637016b3ba5["beta_content_block.py"] 20977b2a_1890_cfe8_7dca_f3846f5fda73 --> 24d3a083_86dc_200b_635d_9637016b3ba5 8e1097b4_ba7a_e261_a11e_6ec41bfd39d6["beta_context_management_response.py"] 20977b2a_1890_cfe8_7dca_f3846f5fda73 --> 8e1097b4_ba7a_e261_a11e_6ec41bfd39d6 fb494fe0_770a_241b_61ec_74d1fc570b97["BetaContextManagementResponse"] 20977b2a_1890_cfe8_7dca_f3846f5fda73 --> fb494fe0_770a_241b_61ec_74d1fc570b97 89ddcdd7_3ae1_4c7b_41bb_9f1e25f16875["typing"] 20977b2a_1890_cfe8_7dca_f3846f5fda73 --> 89ddcdd7_3ae1_4c7b_41bb_9f1e25f16875 37c05070_ca59_d596_7250_de9d1939227f["typing_extensions"] 20977b2a_1890_cfe8_7dca_f3846f5fda73 --> 37c05070_ca59_d596_7250_de9d1939227f 65f3d77c_c1b2_82e1_f9d7_1e7e05f3fdfd["__init__.py"] 65f3d77c_c1b2_82e1_f9d7_1e7e05f3fdfd --> 20977b2a_1890_cfe8_7dca_f3846f5fda73 09712ace_481b_3d8f_a54a_8c5477484301["beta_raw_message_start_event.py"] 09712ace_481b_3d8f_a54a_8c5477484301 --> 20977b2a_1890_cfe8_7dca_f3846f5fda73 style 20977b2a_1890_cfe8_7dca_f3846f5fda73 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 List, Optional
from typing_extensions import Literal
from ..model import Model
from ..._models import BaseModel
from .beta_usage import BetaUsage
from .beta_container import BetaContainer
from .beta_stop_reason import BetaStopReason
from .beta_content_block import BetaContentBlock, BetaContentBlock as BetaContentBlock
from .beta_context_management_response import BetaContextManagementResponse
__all__ = ["BetaMessage"]
class BetaMessage(BaseModel):
id: str
"""Unique object identifier.
The format and length of IDs may change over time.
"""
container: Optional[BetaContainer] = None
"""
Information about the container used in the request (for the code execution
tool)
"""
content: List[BetaContentBlock]
"""Content generated by the model.
This is an array of content blocks, each of which has a `type` that determines
its shape.
Example:
```json
[{ "type": "text", "text": "Hi, I'm Claude." }]
```
If the request input `messages` ended with an `assistant` turn, then the
response `content` will continue directly from that last turn. You can use this
to constrain the model's output.
For example, if the input `messages` were:
```json
[
{
"role": "user",
"content": "What's the Greek name for Sun? (A) Sol (B) Helios (C) Sun"
},
{ "role": "assistant", "content": "The best answer is (" }
]
```
Then the response `content` might be:
```json
// ... (72 more lines)
Domain
Classes
Dependencies
Imported By
Source
Frequently Asked Questions
What does beta_message.py do?
beta_message.py is a source file in the anthropic-sdk-python codebase, written in python. It belongs to the AnthropicClient domain.
What does beta_message.py depend on?
beta_message.py imports 12 module(s): BetaContainer, BetaContextManagementResponse, BetaUsage, _models, beta_container.py, beta_content_block.py, beta_context_management_response.py, beta_stop_reason.py, and 4 more.
What files import beta_message.py?
beta_message.py is imported by 3 file(s): __init__.py, beta_raw_message_start_event.py, parsed_beta_message.py.
Where is beta_message.py in the architecture?
beta_message.py is located at src/anthropic/types/beta/beta_message.py (domain: AnthropicClient, directory: src/anthropic/types/beta).
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free