ToolMessageComplete

interface ToolMessageComplete : ToolMessageCompleteProperties

This message is triggered when the tool call is complete.
This message is triggered immediately without waiting for your server to respond for async tool calls.
If this message is not provided, the model will be requested to respond.
If this message is provided, only this message will be spoken and the model will not be requested to come up with a response. It's an exclusive OR

Properties

Link copied to clipboard
abstract var content: String

This is the content that the assistant says when this message is triggered.

Link copied to clipboard
abstract var endCallAfterSpokenEnabled: Boolean?

This is an optional boolean that if true, the call will end after the message is spoken. Default is false.
This is ignored if role is set to system.

Link copied to clipboard

This is optional and defaults to "assistant".
When role=assistant, content is said out loud.
When role=system, content is passed to the model in a system message. Example: system: default one assistant: user: assistant: user: assistant: user: assistant: tool called tool: your server response <--- system prompt as hint ---> model generates response which is spoken This is useful when you want to provide a hint to the model about what to say next.