If possible adds a cache control to the last message in the conversation.
This is used to enable incremental caching of the conversation.
Parameters
messages: MessageParam[]
The messages to process
Returns MessageParam[]
A new messages array with the last message adapted to include cache control. If no cache control can be added, the original messages are returned.
In any case, the original messages are not modified
If possible adds a cache control to the last message in the conversation. This is used to enable incremental caching of the conversation.