get_final_message() — anthropic-sdk-python Function Reference
Architecture documentation for the get_final_message() function in _beta_messages.py from the anthropic-sdk-python codebase.
Entity Profile
Dependency Diagram
graph TD 55b6abea_0990_ff98_54bd_a0fa130e0892["get_final_message()"] 8e652b46_6f9a_daae_5db8_1aa0b9386626["BetaAsyncMessageStream"] 55b6abea_0990_ff98_54bd_a0fa130e0892 -->|defined in| 8e652b46_6f9a_daae_5db8_1aa0b9386626 a493aa49_e2c3_381a_28e6_6809172e402a["get_final_message()"] a493aa49_e2c3_381a_28e6_6809172e402a -->|calls| 55b6abea_0990_ff98_54bd_a0fa130e0892 f9a35b6c_3f14_3846_ea2f_b2a1210dd93b["get_final_text()"] f9a35b6c_3f14_3846_ea2f_b2a1210dd93b -->|calls| 55b6abea_0990_ff98_54bd_a0fa130e0892 1b280af0_fc5d_c3ea_3f9e_afe795826544["until_done()"] 55b6abea_0990_ff98_54bd_a0fa130e0892 -->|calls| 1b280af0_fc5d_c3ea_3f9e_afe795826544 a493aa49_e2c3_381a_28e6_6809172e402a["get_final_message()"] 55b6abea_0990_ff98_54bd_a0fa130e0892 -->|calls| a493aa49_e2c3_381a_28e6_6809172e402a style 55b6abea_0990_ff98_54bd_a0fa130e0892 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
src/anthropic/lib/streaming/_beta_messages.py lines 241–247
async def get_final_message(self) -> ParsedBetaMessage[ResponseFormatT]:
"""Waits until the stream has been read to completion and returns
the accumulated `Message` object.
"""
await self.until_done()
assert self.__final_message_snapshot is not None
return self.__final_message_snapshot
Domain
Subdomains
Called By
Source
Frequently Asked Questions
What does get_final_message() do?
get_final_message() is a function in the anthropic-sdk-python codebase, defined in src/anthropic/lib/streaming/_beta_messages.py.
Where is get_final_message() defined?
get_final_message() is defined in src/anthropic/lib/streaming/_beta_messages.py at line 241.
What does get_final_message() call?
get_final_message() calls 2 function(s): get_final_message, until_done.
What calls get_final_message()?
get_final_message() is called by 2 function(s): get_final_message, get_final_text.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free