error

abstract var error: String

This is the error if the tool call was not successful. This is added to the conversation history.
Further, if this is returned, assistant will speak:

  1. the message, if it exists and is of type request-failed
  2. a request-failed message from tool.messages, if it exists
  3. a response generated by the model, if neither exist