EndCallToolResponse

Properties

Link copied to clipboard
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

Link copied to clipboard
abstract var result: String

This is the result if the tool call was 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-complete
  2. a request-complete message from tool.messages, if it exists
  3. a response generated by the model, if neither exist

Functions

Link copied to clipboard
abstract fun requestCompleteMessages(block: RequestCompleteMessages.() -> Unit)

This message is triggered when the tool call is complete and will be spoken to the user.
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.

Link copied to clipboard
abstract fun requestFailedMessages(block: RequestFailedMessages.() -> Unit)

This message is triggered when the tool call fails and will be spoken to the user.
This message is never triggered 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.