From the course: Claude with Amazon Bedrock by Anthropic
Unlock this course with a free trial
Join today to access over 25,300 courses taught by industry experts.
Sending tool results
From the course: Claude with Amazon Bedrock by Anthropic
Sending tool results
On to the very last step. We are going to take that list of tool result parts that we just generated, add them all into a user message, and then take the entire conversation history and send it all off to Claude. So let's go back over to our notebooks and test this out really quickly. First, I'm going to scroll up to the cell right above. Now right up here, we called chat and we got our list of parts, but we never actually added them into our message history. So in other words, right now, we do not have this part of the conversation inside of our list of messages. So I'm going to fix that really quickly. I will add in a add assistant message and put in the big list of parts. I'm then going to rerun that cell. Okay, next up, I'm going to go down. In the cell that we were just working in a moment ago, we had a call to run tools. Now it's really fine to leave that in there, but I only have it in there for debug purposes. So I'm going to remove that call just to clean up my code in here…
Practice while you learn with exercise files
Download the files the instructor uses to teach the course. Follow along and learn by watching, listening and practicing.
Contents
-
-
-
-
-
-
(Locked)
Introducing tool use4m 14s
-
(Locked)
Tool functions5m 48s
-
(Locked)
JSON schema for tools5m 17s
-
(Locked)
Handling tool use responses11m 45s
-
(Locked)
Running tool functions11m 23s
-
(Locked)
Sending tool results3m 4s
-
(Locked)
Multiturn conversations with tools6m 35s
-
(Locked)
Adding multiple tools3m 36s
-
(Locked)
Batch tool use7m 15s
-
(Locked)
Structured data with tools9m 13s
-
(Locked)
Flexible tool extraction4m 40s
-
(Locked)
The text editor tool11m 23s
-
(Locked)
-
-
-
-
-