dropLastNMessages

fun AIAgentLLMWriteSession.dropLastNMessages(n: Int, preserveSystemMessages: Boolean = true)(source)

Removes the last n messages from the current prompt in the write session.

Parameters

n

The number of messages to remove from the end of the current message list.