Optional
metadataAdditional metadata to annotate the created tool message with in the "resume" key.
Optional
respondrespond should contain a single or list of toolResponse
parts corresponding
to interrupt toolRequest
parts from the most recent model message. Each
entry must have a matching name
and ref
(if supplied) for its toolRequest
counterpart.
Tools have a .respond
helper method to construct a reply ToolResponse and validate
the data against its schema. Call myTool.respond(interruptToolRequest, yourReplyData)
.
Optional
restartrestart will run a tool again with additionally supplied metadata passed through as
a resumed
option in the second argument. This allows for scenarios like conditionally
requesting confirmation of an LLM's tool request.
Tools have a .restart
helper method to construct a restart ToolRequest. Call
myTool.restart(interruptToolRequest, resumeMetadata)
.
ResumeOptions configure how to resume generation after an interrupt.