text() — anthropic-sdk-python Function Reference
Architecture documentation for the text() function in bedrock.py from the anthropic-sdk-python codebase.
Entity Profile
Dependency Diagram
graph TD 34b393bf_0154_b235_3234_0deb98c2b429["text()"] 871e7374_d14c_c620_e6da_d4dfceb15d13["bedrock.py"] 34b393bf_0154_b235_3234_0deb98c2b429 -->|defined in| 871e7374_d14c_c620_e6da_d4dfceb15d13 style 34b393bf_0154_b235_3234_0deb98c2b429 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
examples/bedrock.py lines 38–46
for text in stream.text_stream:
print(text, end="", flush=True)
print()
# you can still get the accumulated final message outside of
# the context manager, as long as the entire stream was consumed
# inside of the context manager
accumulated = stream.get_final_message()
print("accumulated message: ", accumulated.model_dump_json(indent=2))
Domain
Subdomains
Defined In
Source
Frequently Asked Questions
What does text() do?
text() is a function in the anthropic-sdk-python codebase, defined in examples/bedrock.py.
Where is text() defined?
text() is defined in examples/bedrock.py at line 38.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free