File tree Expand file tree Collapse file tree 1 file changed +10
-3
lines changed
Expand file tree Collapse file tree 1 file changed +10
-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 ,
3636 ImageSource ,
3737)
38+ from strands .types .streaming import ContentBlockDeltaToolUse
3839
3940from idp_common .bedrock .client import CACHEPOINT_SUPPORTED_MODELS
4041from idp_common .utils .strands_agent_tools .todo_list import (
@@ -725,15 +726,21 @@ async def structured_output_async(
725726 format = "png" , source = ImageSource (bytes = img_bytes )
726727 )
727728 ),
729+ ContentBlock (cachePoint = CachePoint (type = "default" )),
728730 ],
729731 )
730732 ]
731733 elif isinstance (prompt , dict ) and "content" in prompt :
732734 prompt_content = [prompt ]
733- # Extract and store images as binary strings
734735 else :
735736 prompt_content = [
736- Message (role = "user" , content = [ContentBlock (text = str (prompt ))])
737+ Message (
738+ role = "user" ,
739+ content = [
740+ ContentBlock (text = str (prompt )),
741+ ContentBlock (cachePoint = CachePoint (type = "default" )),
742+ ],
743+ )
737744 ]
738745
739746 # Track token usage
You can’t perform that action at this time.
0 commit comments