_get_last_message() — anthropic-sdk-python Function Reference
Architecture documentation for the _get_last_message() function in _beta_runner.py from the anthropic-sdk-python codebase.
Entity Profile
Dependency Diagram
graph TD b2a98d76_24b2_7388_d54b_d0f7084fdb5f["_get_last_message()"] 9149fa46_e498_7ba3_1b94_e0095e473ff9["BaseSyncToolRunner"] b2a98d76_24b2_7388_d54b_d0f7084fdb5f -->|defined in| 9149fa46_e498_7ba3_1b94_e0095e473ff9 fc3214ad_dd7a_b1a4_994d_95d55d1f3a68["_check_and_compact()"] fc3214ad_dd7a_b1a4_994d_95d55d1f3a68 -->|calls| b2a98d76_24b2_7388_d54b_d0f7084fdb5f 98b55090_3b6f_2dd4_ca2d_6c52114d5a9e["__run__()"] 98b55090_3b6f_2dd4_ca2d_6c52114d5a9e -->|calls| b2a98d76_24b2_7388_d54b_d0f7084fdb5f 1da9fb48_10a6_0c76_a1ce_2ab027e77a58["until_done()"] 1da9fb48_10a6_0c76_a1ce_2ab027e77a58 -->|calls| b2a98d76_24b2_7388_d54b_d0f7084fdb5f b4a3f0c6_055a_0af4_1a49_fa0d3d9a7923["_get_last_assistant_message_content()"] b4a3f0c6_055a_0af4_1a49_fa0d3d9a7923 -->|calls| b2a98d76_24b2_7388_d54b_d0f7084fdb5f 1fdee5f9_923d_e71a_5610_d1556341274b["_get_last_message()"] 1fdee5f9_923d_e71a_5610_d1556341274b -->|calls| b2a98d76_24b2_7388_d54b_d0f7084fdb5f dc62d390_be42_9d71_fa80_f161d7ae3cc8["_check_and_compact()"] dc62d390_be42_9d71_fa80_f161d7ae3cc8 -->|calls| b2a98d76_24b2_7388_d54b_d0f7084fdb5f e767db6b_72ea_d60e_0f49_54ac2dd6c0a7["__run__()"] e767db6b_72ea_d60e_0f49_54ac2dd6c0a7 -->|calls| b2a98d76_24b2_7388_d54b_d0f7084fdb5f 1fdee5f9_923d_e71a_5610_d1556341274b["_get_last_message()"] b2a98d76_24b2_7388_d54b_d0f7084fdb5f -->|calls| 1fdee5f9_923d_e71a_5610_d1556341274b style b2a98d76_24b2_7388_d54b_d0f7084fdb5f fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
src/anthropic/lib/tools/_beta_runner.py lines 336–339
def _get_last_message(self) -> ParsedBetaMessage[ResponseFormatT] | None:
if callable(self._last_message):
return self._last_message()
return self._last_message
Domain
Subdomains
Defined In
Calls
Called By
Source
Frequently Asked Questions
What does _get_last_message() do?
_get_last_message() is a function in the anthropic-sdk-python codebase, defined in src/anthropic/lib/tools/_beta_runner.py.
Where is _get_last_message() defined?
_get_last_message() is defined in src/anthropic/lib/tools/_beta_runner.py at line 336.
What does _get_last_message() call?
_get_last_message() calls 1 function(s): _get_last_message.
What calls _get_last_message()?
_get_last_message() is called by 7 function(s): __run__, __run__, _check_and_compact, _check_and_compact, _get_last_assistant_message_content, _get_last_message, until_done.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free