withMessages
Creates a copy of the Prompt with updated messages, allowing to modify the existing list of messages or provide a new one.
Return
A new Prompt instance with the modified list of messages.
Parameters
update
A lambda function that returns the new list of messages.