_get_last_assistant_message_content() — anthropic-sdk-python Function Reference
Architecture documentation for the _get_last_assistant_message_content() function in _beta_runner.py from the anthropic-sdk-python codebase.
Entity Profile
Dependency Diagram
graph TD b4a3f0c6_055a_0af4_1a49_fa0d3d9a7923["_get_last_assistant_message_content()"] 9149fa46_e498_7ba3_1b94_e0095e473ff9["BaseSyncToolRunner"] b4a3f0c6_055a_0af4_1a49_fa0d3d9a7923 -->|defined in| 9149fa46_e498_7ba3_1b94_e0095e473ff9 d1f2e83f_ca29_2f3a_83b4_5a5af4a46b73["_generate_tool_call_response()"] d1f2e83f_ca29_2f3a_83b4_5a5af4a46b73 -->|calls| b4a3f0c6_055a_0af4_1a49_fa0d3d9a7923 f070b824_7b1c_09b2_23ba_84bb23647a08["_get_last_assistant_message_content()"] f070b824_7b1c_09b2_23ba_84bb23647a08 -->|calls| b4a3f0c6_055a_0af4_1a49_fa0d3d9a7923 b2a98d76_24b2_7388_d54b_d0f7084fdb5f["_get_last_message()"] b4a3f0c6_055a_0af4_1a49_fa0d3d9a7923 -->|calls| b2a98d76_24b2_7388_d54b_d0f7084fdb5f f070b824_7b1c_09b2_23ba_84bb23647a08["_get_last_assistant_message_content()"] b4a3f0c6_055a_0af4_1a49_fa0d3d9a7923 -->|calls| f070b824_7b1c_09b2_23ba_84bb23647a08 style b4a3f0c6_055a_0af4_1a49_fa0d3d9a7923 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
src/anthropic/lib/tools/_beta_runner.py lines 341–346
def _get_last_assistant_message_content(self) -> list[ParsedBetaContentBlock[ResponseFormatT]] | None:
last_message = self._get_last_message()
if last_message is None or last_message.role != "assistant" or not last_message.content:
return None
return last_message.content
Domain
Subdomains
Defined In
Source
Frequently Asked Questions
What does _get_last_assistant_message_content() do?
_get_last_assistant_message_content() is a function in the anthropic-sdk-python codebase, defined in src/anthropic/lib/tools/_beta_runner.py.
Where is _get_last_assistant_message_content() defined?
_get_last_assistant_message_content() is defined in src/anthropic/lib/tools/_beta_runner.py at line 341.
What does _get_last_assistant_message_content() call?
_get_last_assistant_message_content() calls 2 function(s): _get_last_assistant_message_content, _get_last_message.
What calls _get_last_assistant_message_content()?
_get_last_assistant_message_content() is called by 2 function(s): _generate_tool_call_response, _get_last_assistant_message_content.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free