Home / File/ message_count_tokens_params.py — anthropic-sdk-python Source File

message_count_tokens_params.py — anthropic-sdk-python Source File

Architecture documentation for message_count_tokens_params.py, a python file in the anthropic-sdk-python codebase. 55 imports, 1 dependents.

File python AnthropicClient 55 imports 1 dependents 1 classes

Entity Profile

Dependency Diagram

graph LR
  579bd2f9_ae1a_5b30_88c4_93179ebb82b6["message_count_tokens_params.py"]
  40a4d499_6b34_0763_5e68_275c9212420c["_utils"]
  579bd2f9_ae1a_5b30_88c4_93179ebb82b6 --> 40a4d499_6b34_0763_5e68_275c9212420c
  a385e5c7_b626_c3b2_d334_c334cd0a41af["model_param"]
  579bd2f9_ae1a_5b30_88c4_93179ebb82b6 --> a385e5c7_b626_c3b2_d334_c334cd0a41af
  1c4c78da_6003_b8a4_8245_9d84dfac5927["beta_tool_param.py"]
  579bd2f9_ae1a_5b30_88c4_93179ebb82b6 --> 1c4c78da_6003_b8a4_8245_9d84dfac5927
  5a13152e_0981_77d1_5c74_bd524e253e1e["BetaToolParam"]
  579bd2f9_ae1a_5b30_88c4_93179ebb82b6 --> 5a13152e_0981_77d1_5c74_bd524e253e1e
  485d3097_de74_e5b3_f2e3_d47c98562b99["beta_message_param.py"]
  579bd2f9_ae1a_5b30_88c4_93179ebb82b6 --> 485d3097_de74_e5b3_f2e3_d47c98562b99
  6549df1a_91f8_b36d_1060_8fe657d9a998["BetaMessageParam"]
  579bd2f9_ae1a_5b30_88c4_93179ebb82b6 --> 6549df1a_91f8_b36d_1060_8fe657d9a998
  6e6b04fb_bb37_1a1e_51c1_b5739ba58d0f["anthropic_beta_param"]
  579bd2f9_ae1a_5b30_88c4_93179ebb82b6 --> 6e6b04fb_bb37_1a1e_51c1_b5739ba58d0f
  e3e3b937_6204_475f_da4d_9546b2f9d538["beta_text_block_param.py"]
  579bd2f9_ae1a_5b30_88c4_93179ebb82b6 --> e3e3b937_6204_475f_da4d_9546b2f9d538
  c831ea54_a26f_8081_0728_cafa74e2e189["BetaTextBlockParam"]
  579bd2f9_ae1a_5b30_88c4_93179ebb82b6 --> c831ea54_a26f_8081_0728_cafa74e2e189
  8cfd8f6e_8b08_74f8_03c8_cc3afc0d6a51["beta_mcp_toolset_param.py"]
  579bd2f9_ae1a_5b30_88c4_93179ebb82b6 --> 8cfd8f6e_8b08_74f8_03c8_cc3afc0d6a51
  234fc17b_e36a_22d0_e698_bef191fcd371["BetaMCPToolsetParam"]
  579bd2f9_ae1a_5b30_88c4_93179ebb82b6 --> 234fc17b_e36a_22d0_e698_bef191fcd371
  b3766290_c332_41f7_adb5_4fc93f157783["beta_tool_choice_param.py"]
  579bd2f9_ae1a_5b30_88c4_93179ebb82b6 --> b3766290_c332_41f7_adb5_4fc93f157783
  e301ebd3_52bb_3712_a8f6_afc0f1139661["beta_output_config_param.py"]
  579bd2f9_ae1a_5b30_88c4_93179ebb82b6 --> e301ebd3_52bb_3712_a8f6_afc0f1139661
  c6100600_4652_da1d_14eb_c6e1ba03060d["BetaOutputConfigParam"]
  579bd2f9_ae1a_5b30_88c4_93179ebb82b6 --> c6100600_4652_da1d_14eb_c6e1ba03060d
  style 579bd2f9_ae1a_5b30_88c4_93179ebb82b6 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.

from __future__ import annotations

from typing import List, Union, Iterable, Optional
from typing_extensions import Literal, Required, Annotated, TypeAlias, TypedDict

from ..._utils import PropertyInfo
from ..model_param import ModelParam
from .beta_tool_param import BetaToolParam
from .beta_message_param import BetaMessageParam
from ..anthropic_beta_param import AnthropicBetaParam
from .beta_text_block_param import BetaTextBlockParam
from .beta_mcp_toolset_param import BetaMCPToolsetParam
from .beta_tool_choice_param import BetaToolChoiceParam
from .beta_output_config_param import BetaOutputConfigParam
from .beta_thinking_config_param import BetaThinkingConfigParam
from .beta_json_output_format_param import BetaJSONOutputFormatParam
from .beta_tool_bash_20241022_param import BetaToolBash20241022Param
from .beta_tool_bash_20250124_param import BetaToolBash20250124Param
from .beta_memory_tool_20250818_param import BetaMemoryTool20250818Param
from .beta_web_fetch_tool_20250910_param import BetaWebFetchTool20250910Param
from .beta_web_search_tool_20250305_param import BetaWebSearchTool20250305Param
from .beta_context_management_config_param import BetaContextManagementConfigParam
from .beta_tool_text_editor_20241022_param import BetaToolTextEditor20241022Param
from .beta_tool_text_editor_20250124_param import BetaToolTextEditor20250124Param
from .beta_tool_text_editor_20250429_param import BetaToolTextEditor20250429Param
from .beta_tool_text_editor_20250728_param import BetaToolTextEditor20250728Param
from .beta_tool_computer_use_20241022_param import BetaToolComputerUse20241022Param
from .beta_tool_computer_use_20250124_param import BetaToolComputerUse20250124Param
from .beta_tool_computer_use_20251124_param import BetaToolComputerUse20251124Param
from .beta_code_execution_tool_20250522_param import BetaCodeExecutionTool20250522Param
from .beta_code_execution_tool_20250825_param import BetaCodeExecutionTool20250825Param
from .beta_tool_search_tool_bm25_20251119_param import BetaToolSearchToolBm25_20251119Param
from .beta_tool_search_tool_regex_20251119_param import BetaToolSearchToolRegex20251119Param
from .beta_request_mcp_server_url_definition_param import BetaRequestMCPServerURLDefinitionParam

__all__ = ["MessageCountTokensParams", "Tool"]


class MessageCountTokensParams(TypedDict, total=False):
    messages: Required[Iterable[BetaMessageParam]]
    """Input messages.

    Our models are trained to operate on alternating `user` and `assistant`
    conversational turns. When creating a new `Message`, you specify the prior
    conversational turns with the `messages` parameter, and the model then generates
    the next `Message` in the conversation. Consecutive `user` or `assistant` turns
    in your request will be combined into a single turn.

    Each input message must be an object with a `role` and `content`. You can
    specify a single `user`-role message, or you can include multiple `user` and
    `assistant` messages.

    If the final message uses the `assistant` role, the response content will
    continue immediately from the content in that message. This can be used to
    constrain part of the model's response.

    Example with a single `user` message:

// ... (215 more lines)

Dependencies

Frequently Asked Questions

What does message_count_tokens_params.py do?
message_count_tokens_params.py is a source file in the anthropic-sdk-python codebase, written in python. It belongs to the AnthropicClient domain.
What does message_count_tokens_params.py depend on?
message_count_tokens_params.py imports 55 module(s): BetaCodeExecutionTool20250522Param, BetaCodeExecutionTool20250825Param, BetaContextManagementConfigParam, BetaJSONOutputFormatParam, BetaMCPToolsetParam, BetaMemoryTool20250818Param, BetaMessageParam, BetaOutputConfigParam, and 47 more.
What files import message_count_tokens_params.py?
message_count_tokens_params.py is imported by 1 file(s): __init__.py.
Where is message_count_tokens_params.py in the architecture?
message_count_tokens_params.py is located at src/anthropic/types/beta/message_count_tokens_params.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