File tree Expand file tree Collapse file tree 1 file changed +9
-3
lines changed Expand file tree Collapse file tree 1 file changed +9
-3
lines changed Original file line number Diff line number Diff line change 2929from strands import Agent , tool
3030from strands .agent .conversation_manager import SummarizingConversationManager
3131from strands .models .bedrock import BedrockModel
32- from strands .types .content import ContentBlock , Message
32+ from strands .types .content import CachePoint , ContentBlock , Message
3333from strands .types .media import (
3434 DocumentContent ,
3535 ImageContent ,
@@ -725,15 +725,21 @@ async def structured_output_async(
725725 format = "png" , source = ImageSource (bytes = img_bytes )
726726 )
727727 ),
728+ ContentBlock (cachePoint = CachePoint (type = "default" )),
728729 ],
729730 )
730731 ]
731732 elif isinstance (prompt , dict ) and "content" in prompt :
732733 prompt_content = [prompt ]
733- # Extract and store images as binary strings
734734 else :
735735 prompt_content = [
736- Message (role = "user" , content = [ContentBlock (text = str (prompt ))])
736+ Message (
737+ role = "user" ,
738+ content = [
739+ ContentBlock (text = str (prompt )),
740+ ContentBlock (cachePoint = CachePoint (type = "default" )),
741+ ],
742+ )
737743 ]
738744
739745 # Track token usage
You can’t perform that action at this time.
0 commit comments