RequestFailedMessages

These are the messages that will be spoken to the user.
If these are not returned, assistant will speak:

  1. a request-failed message from tool.messages, if it exists
  2. a response generated by the model, if not

Functions

Link copied to clipboard
abstract fun condition(requiredCondition: ToolMessageCondition, vararg additionalConditions: ToolMessageCondition, block: RequestFailedCondition.() -> Unit)

Adds a condition to an optional array of conditions that the tool call arguments must meet in order for this message to be triggered.

Link copied to clipboard

This message is triggered when the tool call fails.
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.